From 70947a4a65c19dd7ed4a86501cad1b042fe50ad3 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Wed, 17 May 2017 11:55:13 -0700 Subject: [PATCH 001/109] Update theme and start over with content --- 404.html | 0 CNAME | 1 - README/index.xml | 34 - guides/for-programmers/index.html | 385 ----------- guides/index.html | 255 +------ guides/index.xml | 189 +---- guides/style/index.html | 513 -------------- handbook/actions/index.html | 389 ----------- handbook/add/index.html | 423 ------------ handbook/aggregates/index.html | 391 ----------- handbook/bind/index.html | 609 ---------------- handbook/blocks/index.html | 504 -------------- handbook/browser/index.html | 367 ---------- handbook/commit/index.html | 613 ---------------- handbook/commonmark/index.html | 435 ------------ handbook/core/index.html | 371 ---------- handbook/databases/index.html | 463 ------------- handbook/datetime/date/index.html | 785 --------------------- handbook/datetime/index.html | 371 ---------- handbook/datetime/time/index.html | 422 ------------ handbook/docker/index.html | 394 ----------- handbook/ebnf/index.html | 473 ------------- handbook/equality/index.html | 420 ----------- handbook/equivalence/index.html | 377 ---------- handbook/event/click/index.html | 391 ----------- handbook/event/index.html | 369 ---------- handbook/events/click/index.html | 440 ------------ handbook/events/index.html | 418 ----------- handbook/expressions/index.html | 379 ---------- handbook/functions/index.html | 424 ------------ handbook/general/index.html | 371 ---------- handbook/general/sort/index.html | 504 -------------- handbook/glossary/index.html | 399 ----------- handbook/help/index.html | 396 ----------- handbook/http/index.html | 367 ---------- handbook/if-then/index.html | 443 ------------ handbook/index.html | 651 +---------------- handbook/index.xml | 638 +---------------- handbook/inequality/index.html | 428 ------------ handbook/installation/index.html | 380 ---------- handbook/intro/index.html | 389 ----------- handbook/is/index.html | 400 ----------- handbook/joins/index.html | 387 ----------- handbook/linux/index.html | 388 ----------- handbook/literate-programming/index.html | 404 ----------- handbook/mac/index.html | 379 ---------- handbook/math/abs/index.html | 399 ----------- handbook/math/ceil/index.html | 399 ----------- handbook/math/cos/index.html | 403 ----------- handbook/math/fix/index.html | 411 ----------- handbook/math/floor/index.html | 399 ----------- handbook/math/index.html | 418 ----------- handbook/math/mod/index.html | 402 ----------- handbook/math/range/index.html | 434 ------------ handbook/math/round/index.html | 402 ----------- handbook/math/sin/index.html | 403 ----------- handbook/math/sum/index.html | 417 ----------- handbook/math/tan/index.html | 400 ----------- handbook/merge/index.html | 391 ----------- handbook/model/index.html | 386 ----------- handbook/not/index.html | 391 ----------- handbook/npm/index.html | 378 ---------- handbook/programs/index.html | 373 ---------- handbook/records/index.html | 460 ------------- handbook/remove/index.html | 384 ----------- handbook/running/index.html | 425 ------------ handbook/search/index.html | 400 ----------- handbook/session/index.html | 367 ---------- handbook/set/index.html | 403 ----------- handbook/sets/index.html | 406 ----------- handbook/standard-library/index.html | 379 ---------- handbook/statistics/count/index.html | 450 ------------ handbook/statistics/index.html | 377 ---------- handbook/statistics/random/index.html | 423 ------------ handbook/string-interpolation/index.html | 404 ----------- handbook/strings/index.html | 372 ---------- handbook/strings/join/index.html | 433 ------------ handbook/strings/split/index.html | 408 ----------- handbook/tags/index.html | 424 ------------ handbook/update-operators/index.html | 391 ----------- handbook/view/index.html | 367 ---------- handbook/windows/index.html | 379 ---------- images/eve.svg | 1 + index.html | 290 ++------ index.xml | 843 +++-------------------- sitemap.xml | 284 +------- stylesheets/application.css | 118 +++- tutorials/index.html | 253 +------ tutorials/index.xml | 255 ++----- tutorials/quickstart.eve/index.html | 273 ++++++++ tutorials/quickstart/index.html | 591 ---------------- 91 files changed, 680 insertions(+), 35215 deletions(-) delete mode 100644 404.html delete mode 100644 CNAME delete mode 100644 README/index.xml delete mode 100644 guides/for-programmers/index.html delete mode 100644 guides/style/index.html delete mode 100644 handbook/actions/index.html delete mode 100644 handbook/add/index.html delete mode 100644 handbook/aggregates/index.html delete mode 100644 handbook/bind/index.html delete mode 100644 handbook/blocks/index.html delete mode 100644 handbook/browser/index.html delete mode 100644 handbook/commit/index.html delete mode 100644 handbook/commonmark/index.html delete mode 100644 handbook/core/index.html delete mode 100644 handbook/databases/index.html delete mode 100644 handbook/datetime/date/index.html delete mode 100644 handbook/datetime/index.html delete mode 100644 handbook/datetime/time/index.html delete mode 100644 handbook/docker/index.html delete mode 100644 handbook/ebnf/index.html delete mode 100644 handbook/equality/index.html delete mode 100644 handbook/equivalence/index.html delete mode 100644 handbook/event/click/index.html delete mode 100644 handbook/event/index.html delete mode 100644 handbook/events/click/index.html delete mode 100644 handbook/events/index.html delete mode 100644 handbook/expressions/index.html delete mode 100644 handbook/functions/index.html delete mode 100644 handbook/general/index.html delete mode 100644 handbook/general/sort/index.html delete mode 100644 handbook/glossary/index.html delete mode 100644 handbook/help/index.html delete mode 100644 handbook/http/index.html delete mode 100644 handbook/if-then/index.html delete mode 100644 handbook/inequality/index.html delete mode 100644 handbook/installation/index.html delete mode 100644 handbook/intro/index.html delete mode 100644 handbook/is/index.html delete mode 100644 handbook/joins/index.html delete mode 100644 handbook/linux/index.html delete mode 100644 handbook/literate-programming/index.html delete mode 100644 handbook/mac/index.html delete mode 100644 handbook/math/abs/index.html delete mode 100644 handbook/math/ceil/index.html delete mode 100644 handbook/math/cos/index.html delete mode 100644 handbook/math/fix/index.html delete mode 100644 handbook/math/floor/index.html delete mode 100644 handbook/math/index.html delete mode 100644 handbook/math/mod/index.html delete mode 100644 handbook/math/range/index.html delete mode 100644 handbook/math/round/index.html delete mode 100644 handbook/math/sin/index.html delete mode 100644 handbook/math/sum/index.html delete mode 100644 handbook/math/tan/index.html delete mode 100644 handbook/merge/index.html delete mode 100644 handbook/model/index.html delete mode 100644 handbook/not/index.html delete mode 100644 handbook/npm/index.html delete mode 100644 handbook/programs/index.html delete mode 100644 handbook/records/index.html delete mode 100644 handbook/remove/index.html delete mode 100644 handbook/running/index.html delete mode 100644 handbook/search/index.html delete mode 100644 handbook/session/index.html delete mode 100644 handbook/set/index.html delete mode 100644 handbook/sets/index.html delete mode 100644 handbook/standard-library/index.html delete mode 100644 handbook/statistics/count/index.html delete mode 100644 handbook/statistics/index.html delete mode 100644 handbook/statistics/random/index.html delete mode 100644 handbook/string-interpolation/index.html delete mode 100644 handbook/strings/index.html delete mode 100644 handbook/strings/join/index.html delete mode 100644 handbook/strings/split/index.html delete mode 100644 handbook/tags/index.html delete mode 100644 handbook/update-operators/index.html delete mode 100644 handbook/view/index.html delete mode 100644 handbook/windows/index.html create mode 100644 images/eve.svg create mode 100644 tutorials/quickstart.eve/index.html delete mode 100644 tutorials/quickstart/index.html diff --git a/404.html b/404.html deleted file mode 100644 index e69de29..0000000 diff --git a/CNAME b/CNAME deleted file mode 100644 index e825467..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -docs.witheve.com \ No newline at end of file diff --git a/README/index.xml b/README/index.xml deleted file mode 100644 index 7f4d5d1..0000000 --- a/README/index.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - READMEs on Eve Documentation - http://docs.witheve.com/readme/ - Recent content in READMEs on Eve Documentation - Hugo -- gohugo.io - en-us - - - - - http://docs.witheve.com/readme/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/readme/ - <p align="center"> - <img src="http://www.witheve.com/logo.png" alt="Eve logo" width="10%" /> -</p> - -<hr /> - -<h1 id="documentation-for-the-eve-programming-language">Documentation for the Eve programming language.</h1> - -<p>You can learn more about Eve here: <a href="http://witheve.com/">http://witheve.com/</a></p> - -<p>You can play with Eve here: <a href="http://play.witheve.com">http://play.witheve.com</a></p> - -<p>Eve is under active development here: <a href="https://github.com/witheve/Eve">https://github.com/witheve/Eve</a></p> - - - - - \ No newline at end of file diff --git a/guides/for-programmers/index.html b/guides/for-programmers/index.html deleted file mode 100644 index 598144a..0000000 --- a/guides/for-programmers/index.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - - - - - - Eve for Programmers - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Eve for Programmers

- -

As a programmer, you probably find it easy to switch between different programming langauges. If you know Javascript, you probably wouldn’t have a hard time learning similar langauges like C++, Java, or Python. That’s because despite syntactic differences, these languages largely conform to the same programming model. When we program in languages like these, we use similar abstractions between them – loops, functions, and input/output patterns have become a staple of every programmer’s toolbox. When we solve problems, we usually reach a solution in terms of these primitive operations.

- -

Eve is a different kind of programming langauge from Javascript or Python, so programmers new to Eve may feel a little lost at first. How do you get anything done in a language without loops? How do you compose code without functions? The purpose of this guide is to provide a mapping from the common tools you know, to the Eve way of solving problems. We’ll look at some programs written in Javascript, and see how they Eve can solve them.

- -

Functions

- -

Functions are the fundamental unit of code reuse in most conventional programming languages. These langauges typically start from a “main” function, and branch

- -

Looping

- -

Map

- -

Reduce

- -

Recursion

- -

I/O

- - -
-
- -
- diff --git a/guides/index.html b/guides/index.html index 39d7472..5d8b597 100644 --- a/guides/index.html +++ b/guides/index.html @@ -10,7 +10,7 @@ Guides - Eve Documentation - + @@ -74,15 +74,10 @@ -
@@ -356,14 +155,8 @@

Pages in Guide

- -

Eve for Programmers

-
- -
- - -

Style Guide

+
+


diff --git a/guides/index.xml b/guides/index.xml index c597fb1..e724608 100644 --- a/guides/index.xml +++ b/guides/index.xml @@ -2,198 +2,19 @@ Guides on Eve Documentation - http://docs.witheve.com/guides/ + http://docs.witheve.com/guides/index.xml Recent content in Guides on Eve Documentation Hugo -- gohugo.io en-us - Eve for Programmers - http://docs.witheve.com/guides/for-programmers/ + + http://docs.witheve.com/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/guides/for-programmers/ - - -<h1 id="eve-for-programmers">Eve for Programmers</h1> - -<p>As a programmer, you probably find it easy to switch between different programming langauges. If you know Javascript, you probably wouldn&rsquo;t have a hard time learning similar langauges like C++, Java, or Python. That&rsquo;s because despite syntactic differences, these languages largely conform to the same programming model. When we program in languages like these, we use similar abstractions between them &ndash; loops, functions, and input/output patterns have become a staple of every programmer&rsquo;s toolbox. When we solve problems, we usually reach a solution in terms of these primitive operations.</p> - -<p>Eve is a different kind of programming langauge from Javascript or Python, so programmers new to Eve may feel a little lost at first. How do you get anything done in a language without loops? How do you compose code without functions? The purpose of this guide is to provide a mapping from the common tools you know, to the Eve way of solving problems. We&rsquo;ll look at some programs written in Javascript, and see how they Eve can solve them.</p> - -<h2 id="functions">Functions</h2> - -<p>Functions are the fundamental unit of code reuse in most conventional programming languages. These langauges typically start from a &ldquo;main&rdquo; function, and branch</p> - -<h2 id="looping">Looping</h2> - -<h3 id="map">Map</h3> - -<h3 id="reduce">Reduce</h3> - -<h3 id="recursion">Recursion</h3> - -<h2 id="i-o">I/O</h2> - - - - - Style Guide - http://docs.witheve.com/guides/style/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/guides/style/ - - -<h1 id="eve-style-guide">Eve Style Guide</h1> - -<h2 id="comments">Comments</h2> - -<p>Add a space after the comment marker to make comments more readable</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// This is correct</span><span class="w"></span> -<span class="c1">//This is incorrect</span><span class="w"></span> -</code></pre></div> - -<h2 id="naming">Naming</h2> - -<p>As much as possible, don&rsquo;t abbreviate names. The goal in writing an Eve program is to be as readable as possible. An abbreviation that makes sense to you might not make sense to someone else, or even yourself when you revisit the program in a year.</p> - -<p>Multi-word names should be joined by dashes <code>-</code>, not underscores <code>_</code>.</p> - -<h2 id="program-layout">Program layout</h2> - -<p>Blocks should be preceded by at least a one line comment, indicating the purpose of the block.</p> - -<h2 id="commas">Commas</h2> - -<p>Although Eve treats commas as white-space, they should be used to enhance readability as needed:</p> - -<p>In records, separate attributes with commas after a bind</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// More readable</span><span class="w"></span> -<span class="p">[</span><span class="nt">#person</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">30</span><span class="p">,</span><span class="w"> </span><span class="x">height</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="x">hair</span><span class="nf">-</span><span class="x">color</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;brown&quot;</span><span class="p">]</span><span class="w"></span> - -<span class="c1">// Less readable</span><span class="w"></span> -<span class="p">[</span><span class="nt">#person</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">30</span><span class="w"> </span><span class="x">height</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="w"> </span><span class="x">hair</span><span class="nf">-</span><span class="x">color</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;brown&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Commas should also be used to separate items contained in parenthesis, such as in a multiple return.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// More readable</span><span class="w"></span> -<span class="p">(</span><span class="x">val</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">val</span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#tag1</span><span class="p">]</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="l">false</span><span class="p">)</span><span class="w"></span> -<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="p">,</span><span class="w"> </span><span class="l">true</span><span class="p">)</span><span class="w"></span> -<span class="x">total</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="p">(</span><span class="x">attr</span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">)]</span><span class="w"></span> - -<span class="c1">// Less readable</span><span class="w"></span> -<span class="p">(</span><span class="x">val</span><span class="m">1</span><span class="w"> </span><span class="x">val</span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#tag1</span><span class="p">]</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="l">false</span><span class="p">)</span><span class="w"></span> -<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="w"> </span><span class="l">true</span><span class="p">)</span><span class="w"></span> -<span class="x">total</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="p">(</span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">)]</span><span class="w"></span> -</code></pre></div> - -<h2 id="indention">Indention</h2> - -<p>Eve does not enforce indention, but it is important for readability</p> - -<h3 id="blocks">Blocks</h3> - -<p><code>search</code>. <code>commit</code>, and <code>bind</code> should be the only lines at zero indention. Everything else should be indented.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Good</span><span class="w"></span> -<span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>But not this:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Not good</span><span class="w"></span> -<span class="kr">search</span><span class="w"></span> -<span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"></span> -<span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h3 id="if-then">If-Then</h3> - -<p>Each arm of an <code>if-then</code> statement should be at the same indention level. The <code>then</code> portion of the statement can be on a new line if the <code>if</code> portion is exceptionally long, but it should be indented once.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Good if layout</span><span class="w"></span> -<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> -<span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> -<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> - -<span class="c1">// Okay, especially if the branch is long</span><span class="w"></span> -<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#long-record</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">]</span><span class="w"> </span> -<span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> -<span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#long-record2</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">]</span><span class="w"> </span> -<span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> -<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> - -<span class="c1">// Less readable &quot;if&quot; formatting</span><span class="w"></span> -<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> -<span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> -<span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> - -<span class="c1">// Less readable &quot;if&quot; formatting</span><span class="w"></span> -<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> -</code></pre></div> - -<h3 id="nested-records">Nested records</h3> - -<p>When nested records are placed on a new line, they should be indented once past the parent record. Where possible, nested records should be the final attribute in the parent record.</p> - -<p>Nested records should appear on their own line if you are nesting more than one.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Okay, but only do this for one level of nesting</span><span class="w"></span> -<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">]]</span><span class="w"></span> - -<span class="c1">// More readable</span><span class="w"></span> -<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">]]</span><span class="w"></span> - -<span class="c1">// Also good</span><span class="w"></span> -<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div1&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div3&quot;</span><span class="p">]]]</span><span class="w"> </span> - -<span class="c1">// Not good</span><span class="w"></span> -<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="p">]]</span><span class="w"></span> - -<span class="c1">// Also not good</span><span class="w"></span> -<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">],</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h2 id="newlines">Newlines</h2> - -<p>Newlines should precede and follow every code block.</p> - -<p>Within code blocks, a newline should be added between every action. This enhances readability, especially in the case where multiple actions are needed. For instance, the following code block:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@studentDB</span><span class="w"></span> -<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#students</span><span class="p">]</span><span class="w"></span> - -<span class="kr">search</span><span class="w"> </span><span class="nt">@schoolDB</span><span class="w"></span> -<span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="x">schools.name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">student.school</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">students.name</span><span class="p">]</span><span class="w"> </span> - -<span class="kr">commit</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#new-record</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>is more readable than this code block:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@studentDB</span><span class="w"></span> -<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#students</span><span class="p">]</span><span class="w"></span> -<span class="kr">search</span><span class="w"> </span><span class="nt">@schoolDB</span><span class="w"></span> -<span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="x">schools.name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">student.school</span><span class="w"></span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">students.name</span><span class="p">]</span><span class="w"> </span> -<span class="kr">commit</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#new-record</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - + http://docs.witheve.com/guides/ + diff --git a/guides/style/index.html b/guides/style/index.html deleted file mode 100644 index 871b7e8..0000000 --- a/guides/style/index.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - - - - - - - Style Guide - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Eve Style Guide

- -

Comments

- -

Add a space after the comment marker to make comments more readable

-
// This is correct
-//This is incorrect
-
- -

Naming

- -

As much as possible, don’t abbreviate names. The goal in writing an Eve program is to be as readable as possible. An abbreviation that makes sense to you might not make sense to someone else, or even yourself when you revisit the program in a year.

- -

Multi-word names should be joined by dashes -, not underscores _.

- -

Program layout

- -

Blocks should be preceded by at least a one line comment, indicating the purpose of the block.

- -

Commas

- -

Although Eve treats commas as white-space, they should be used to enhance readability as needed:

- -

In records, separate attributes with commas after a bind

-
// More readable
-[#person name age: 30, height: 5, hair-color: "brown"]
-
-// Less readable
-[#person name age: 30 height: 5 hair-color: "brown"]
-
- -

Commas should also be used to separate items contained in parenthesis, such as in a multiple return.

-
// More readable
-(val1, val2) = if [#tag1] then (1, false)
-               else (0, true)
-total = count[given: attr1, per: (attr2, attr3)]
-
-// Less readable
-(val1 val2) = if [#tag1] then (1 false)
-               else (0 true)
-total = count[given: attr1 per: (attr2 attr3)]
-
- -

Indention

- -

Eve does not enforce indention, but it is important for readability

- -

Blocks

- -

search. commit, and bind should be the only lines at zero indention. Everything else should be indented.

-
// Good
-search
-  [...]
-
-bind
-  [...]
-
- -

But not this:

-
// Not good
-search
-[...]
-
-bind
-[...]
-
- -

If-Then

- -

Each arm of an if-then statement should be at the same indention level. The then portion of the statement can be on a new line if the if portion is exceptionally long, but it should be indented once.

-
// Good if layout
-value = if bar then baz
-        if bar2 then baz2
-        else baz3
-
-// Okay, especially if the branch is long
-value = if [#long-record attr1 attr2 attr3] 
-          then baz
-        if [#long-record2 attr1 attr2 attr3] 
-          then baz2
-        else baz3
-
-// Less readable "if" formatting
-value = if bar then baz
-if bar2 then baz2
-else baz3
-
-// Less readable "if" formatting
-value = if bar then baz if bar2 then baz2 else baz3
-
- -

Nested records

- -

When nested records are placed on a new line, they should be indented once past the parent record. Where possible, nested records should be the final attribute in the parent record.

- -

Nested records should appear on their own line if you are nesting more than one.

-
// Okay, but only do this for one level of nesting
-[#div text: "hello", children: [#div text: "world"]]
-
-// More readable
-[#div text: "hello", children: 
-  [#div text: "world"]]
-
-// Also good
-[#div children: 
-  [#div text: "div1"]
-  [#div text: "div2" children:
-    [#div text: "div3"]]]  
-
-// Not good
-[#div children: [#div text: "div2"] [#div text: "div2"]]
-
-// Also not good
-[#div children: 
-  [#div text: "world"], text: "hello"]
-
- -

Newlines

- -

Newlines should precede and follow every code block.

- -

Within code blocks, a newline should be added between every action. This enhances readability, especially in the case where multiple actions are needed. For instance, the following code block:

-
search @studentDB
-  students = [#students]
-
-search @schoolDB
-  schools = [#school]
-  schools.name = student.school
-
-bind @browser
-  [#div text: students.name] 
-
-commit
-  [#new-record]
-
- -

is more readable than this code block:

-
search @studentDB
-  students = [#students]
-search @schoolDB
-  schools = [#school]
-  schools.name = student.school
-bind @browser
-  [#div text: students.name] 
-commit
-  [#new-record]
-
- - -
-
- -
- diff --git a/handbook/actions/index.html b/handbook/actions/index.html deleted file mode 100644 index 531b640..0000000 --- a/handbook/actions/index.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - - - - - - Actions - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Actions

- -

Description

- -

There are three actions in Eve: search, bind, and commit.

- -

search is used when you want to gather records from one or more databases. These records are called “supporting records”, because they are used as a basis for bound or committed records.

- -

bind and commit actions are used when you want to update records in one or more databases, but they differ in the way the updates are performed.

- -
    -
  • bound records last only as long as their supporting records. When supporting records changes, then bound records changes accordingly, replacing any previously bound records.

  • - -
  • committed records persist past the lifetime of their supporting records. When supporting records change, then a new record is committed, leaving any previously committed records still intact.

  • -
- -

Examples

-

-
- -

See Also

- -

search | bind | commit

- - -
-
- -
- diff --git a/handbook/add/index.html b/handbook/add/index.html deleted file mode 100644 index 1d58eb1..0000000 --- a/handbook/add/index.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - - - - - - - Add: += - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Add Operator

- -

adds a value to an attribute on a record

- -

Syntax

-
// Add a value to an attribute
-record.attribute += value
-
-// Add a tag to a record
-record += #tag
-
- -

Description

- -

record.attribute += value adds value to attribute. If record already has an attribute with a value, then value will be added to the set. Otherwise, if record doesn’t have an attribute with this name already, then += will create the attribute and set it to value. As Eve variables are sets, if the value already exists on the attribute, the value cannot be added again.

- -

attribute can be an attribute already on the record, or it can be a new attribute.

- -

value can be a string or number literal, a variable bound to one of these, or a record.

- -

record += #tag adds #tag to record. This is shorthand for record.tag += "tag".

- -

Examples

- -

Add the current second to a record. Since Eve works in sets, time-history can only ever hold then numbers 0 through 60. This means after one minute passes, no new elements will be added to tracker.time-history.

-
search
-  tracker = [#seconds-tracker]
-  [#time seconds]
-
-commit
-  tracker.time-history += seconds
-
- -

We can get around this by adding a record:

-
search
-  tracker = [#seconds-tracker]
-  [#time seconds]
-
-commit
-  tracker.time-history += [seconds]
-
- -

Now, instead of adding numbers to time-history we are adding records, which are associated with a unique ID. So after the first minute passes, time-history will contain duplicate seconds, but the record ID will ensure each one is unique.

- -
- -

Add the #honor-student tag to any #student with a GPA greater than 3.75:

-
search
-  student = [#student gpa > 3.75]
-  
-bind
-  student += #honor-student
-
- -

See Also

- -

set operator | remove operator | merge operator | bind | commit

- - -
-
- -
- diff --git a/handbook/aggregates/index.html b/handbook/aggregates/index.html deleted file mode 100644 index 9a63714..0000000 --- a/handbook/aggregates/index.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - Aggregates - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Aggregates

- -

aggregates reduce a set of values to a single value

- -

Description

- -

Aggregates are functions that take an input set and produce an output set, typically with a different cardinality than the input set. Examples of aggregates include sum, count, and average. Each of these takes a set of numbers as an input, and typically produces a single number as output.

- -

Aggregates are called just like other functions in Eve. For instance, the count aggregate is called like so:

-
employee-count = count[given: employees]
-
- -

Aggregates don’t always produce a single output value. In some instances, you may want to group your input according to a desired dimension (department, grade, state, country, zip code, etc.) and then aggregate based on those groupings. Extending the example above, we could count the employees in each department:

-
employee-count = count[given: employees, per: department]
-
- -

Now, employee-count will have a count for each department, instead of a single count over all departments. For more complete examples, see the doc files for specific aggregates.

- -

Tip

- -

Aggregates have similar behavior to the reduce() function in many other langauges.

- -

See Also

- -

count

- - -
-
- -
- diff --git a/handbook/bind/index.html b/handbook/bind/index.html deleted file mode 100644 index ef30a3e..0000000 --- a/handbook/bind/index.html +++ /dev/null @@ -1,609 +0,0 @@ - - - - - - - - - - - - bind - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

bind

- -

updates or creates records, syncing them with matched records

- -

Syntax

-
bind
-
-bind @database1, ..., @databaseN
-
- -

Description

- -

bind updates or creates new records with a lifetime equal to matched records within the block. Matched records are any records found in a search action. If matched records change during program execution, all bound records change accordingly. If any matched records are removed (i.e. they no longer match the search), bound records and updates are removed as well.

- -

By default, bound records are directed to a default local database.

- -

bind @database1, ..., @databaseN directs bound records to one or more databases.

- -

Bind vs. Commit

- -

While bind and commit both update records in a database, they do so with slightly different behavior; a bound record has the same lifetime as its supporting records, whereas a committed record exists in the database until it is removed intentionally. Let’s take a closer look at this distinction and what the implications are.

- -

Consider the following block that reads the current time, and prints it to the screen:

-
search
-  [#time seconds]
-
-bind @browser
-  [#div text: seconds]
-
- -

In this block we search for the current time and bind it to a message that displays it. The message exists as long as the current time stays the same (1 second obviously). When the time changes, the current message disappears and is replaced with a new message, displaying the new time. This is the behavior of bind; bound records persist only as long as their matching records.

- -

Now let’s look at what commit does in contrast:

-
search
-  [#time seconds]
-
-commit @browser
-  [#div text: seconds]
-
- -

Compared to the previous block, we only changed bind to commit. When you run this block, at first you’ll see a single message like before. However, you’ll notice that messages begin to accumulate every second. Unlike with bind, committed records persist in the database until they are intentionally removed.

- -

To make things very concrete, we can actually mimic the behavior of a bind using two blocks that commit. We’ve already got the first one (the one just above), that commits messages to @browser. Now all we need is a second block, one that removes old committed messages from @browser:

-
search 
-  [#time seconds]
-
-search @browser
-  s = seconds - 1
-  // Do some math to handle the roll over at 60 seconds
-  last-time = s - 60 * floor[value: s / 60]
-  msg = [#div text: last-time]
-  
-commit @browser
-  msg := none
-
- -

This block searches for the message that was displayed during the previous second, and sets it to none, thereby removing it from @browser. Therefore, only the message bound to the the current time is displayed on the screen. This behavior is identical to that of the block that binds these messages instead of committing them!

- -

An Execution Perspective

- -

Another way to understand bind vs. commit is by looking at how the databases change over each tick of the Eve evaluator. We’ll consider the same program as before, looking at how its state changes over time. First, consider the bind case. When the program starts, there’s nothing in any databases; the program is a blank slate. At t1 the first #time is added to @session. This addition is bound to a #div, which is added to @browser. These changes are summarized in the first column of the table below.

- -

At t2, a new #time is added to @session, and the one from t1 is removed. Since we used a bind, this causes the existing #div to be removed from @browser, but it is replaced with a new #div reflecting the current time. At t3, the same operations takes place, and this process continues until the program is terminated.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -t0 - -t1 - -t2 - -t3 -
-delta - - - -+ [#time seconds: 39] -+ [#div text: "39"] - -+ [#time seconds: 40] -- [#time seconds: 39] -+ [#div text: "40"] -- [#div text: "39"] - -+ [#time seconds: 41] -- [#time seconds: 40] -+ [#div text: "41"] -- [#div text: "40"] -
-@session - -[ ] - -[[#time seconds: 39]] - -[[#time seconds: 40]] - -[[#time seconds: 41]] -
-@browser - -[ ] - -[[#div text: 39]] - -[[#div text: 40]] - -[[#div text: 41]] -
- -

Let’s perform the same analysis in the commit case. In this program, things start off the same; initially the database is empty, and at t1 a #time and a #div are added to their respective databases. At t2, things get more interesting. While the old #time is still replaced, the #div displaying the old time is not replaced since we committed it to @browser. Indeed, in subsequent rounds of execution, the contents of @browser keeps growing.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -t0 - -t1 - -t2 - -t3 -
-delta - - -+ [#time seconds: 39] -+ [#div text: "39"] - -+ [#time seconds: 40] -- [#time seconds: 39] -+ [#div text: "40"] - -+ [#time seconds: 41] -- [#time seconds: 40] -+ [#div text: "41"] -
-@session - -[ ] - -[[#time seconds: 39]] - -[[#time seconds: 40]] - -[[#time seconds: 41]] -
-@browser - -[ ] - -[[#div text: 39]] - -[[#div text: 39], - [#div text: 40]] - -[[#div text: 39], - [#div text: 40], - [#div text: 41]] -
- -

Tips

- -

When you want to display data in an interface element like a #div, a bind is usually the more appropriate choice compared to a commit. A bind will keep the interface element always up-to-date, whereas a commit will leave lingering elements that no longer reflect the current state of the program.

- -

When searching for an event like a #click, a commit is usually more appropriate than bind. When an event occurs, a record representing the event is added to a database. That record exists for exactly one “instant”, and then it is removed from the database. During that “instant”, any block searching for that event will be satisfied and can execute a bind or commit action. If you bind on the event, then the result will disappear as soon as the event does. However, if you commit on the event, then that result will persist after the event has been removed.

- -

Examples

- -

Display a formatted time:

-
search
-  [#time hours minutes seconds]
-  (am/pm, adjusted-hours) = if hours >= 12 then ("PM", hours - 12)
-                            else if hours = 0 then ("AM", 12)
-                            else ("AM", hours)
-bind @browser
-  [#div text: "The current time is {{adjusted-hours}}:{{minutes}}:{{seconds}} {{am/pm}}"]
-
- -

See Also

- -

commit | databases | search

- - -
-
- -
- diff --git a/handbook/blocks/index.html b/handbook/blocks/index.html deleted file mode 100644 index 6bac6db..0000000 --- a/handbook/blocks/index.html +++ /dev/null @@ -1,504 +0,0 @@ - - - - - - - - - - - - Blocks - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Blocks

- -

blocks compose Eve programs

- -

Syntax

-
// Blocks contain Eve code and can execute actions
-```
-search
-  .....
-
-bind
-  .....
-
-commit
-  .....
-```
-
-// Blocks that are disabled are not executed
-```eve disabled
-search
-  ....
-```
-
-// Non-Eve blocks are not parsed or executed
-```javascript
-function() {
-  ...
-}
-```
-
-// Blocks that omit the search action are satisfied by default
-```
-bind
-  .....
-```
-
-```
-commit
-  .....
-```
-
- -

Description

- -

A block is the fundamental unit of Eve code. Eve programs are made up of a series of blocks, each of which can perform actions:

- -
    -
  1. A block searches one or more databases for records.
  2. -
  3. A block binds or commits new records in one or more databases.
  4. -
- -

Blocks execute when the records they search for exist or change. If a block doesn’t search for any records, then the block executes by default, but it can never update bound or committed records.

- -

Blocks can have any number of search, commit, and bind actions, each of which can reference any number of databases. If a block has multiple search actions, it will only execute if all searches are satisfied.

- -

Blocks automatically keep bound and committed records up-to-date with matched records. When a record matching a search changes, those changes are reflected automatically in bound and committed records within that block.

- -

Specifying a Block

- -

Blocks are specified using two fences to delineate the beginning and end of the block. Code fences are matching pairs of either three consecutive ticks (```) or tildes (~~~). This style of code block is the same as supported by CommonMark. However, we don’t currently support specifying code blocks via indentation.

- -

Info Strings

- -

You can specify the type of code within a block with an info string, written directly after the block’s opening code fence. By default, any block without an info string are assumed to contain Eve code.

- -
```
-// An implicit block of Eve code. This block is parsed and executed
-  ...
-```
-
-```eve
-// An explicit block of Eve code. This block is parsed and executed
-  ...
-```
-
-```eve disabled
-// An explicit block of Eve code. This block is parsed, but not executed
-  ...
-```
-
-```javascript
-// An explicit block of Javascript code. This block is ignored
-// by the Eve compiler entirely
-  ...
-```
-
- -

Tips

- -

Although they are similar, it’s important not to think of blocks like functions in other languages. Blocks don’t have a name, and you don’t “call” them like you do functions. Instead, you “use” a block by searching for the records it creates.

- -

Likewise, there is no “main” block. Since Eve is declarative and there is no order, there is no particular starting point for a program. As a close analog, any block that does not search for records will be the first to execute when the program starts. For instance:

-
commit
-  [#student name: "Sally"]
-  [#student name: "Ingrid"]
-
- -

This block has no search action, so it doesn’t depend on any other records. Thus, it can be viewed as a “root” of the program. A program may contain many such root blocks.

- -

Examples

- -

A block with search and bind actions. The bind action adds the #div to the @browser database.

-
search
-  [name]
-
-bind @browser
-  [#div text: name]
-
- -

A block with only a commit action:

-
commit
-  [name: "Roger"]
-
- -
- -

Search for a #click in @event, create a #request in @http

-
search @event
-  [#click]
-
-commit @http
-  [#request #google url: "https://jsonplaceholder.typicode.com/posts/"]
-
- -

Search for a #request with a response, display it in the browser

-
search @http
-  [#request #google response: [json]]
-  json = [#array]
-  lookup[record: json, attribute, value: [title body]]
-
-bind @browser
-  [#div text: "{{title}}"]
-  [#div text: "{{body}}"]
-
- -

See Also

- -

search | bind | commit | databases

- - -
-
- -
- diff --git a/handbook/browser/index.html b/handbook/browser/index.html deleted file mode 100644 index 73db2a0..0000000 --- a/handbook/browser/index.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - - - - - - - @browser - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

@browser

- - -
-
- -
- diff --git a/handbook/commit/index.html b/handbook/commit/index.html deleted file mode 100644 index 8ceb112..0000000 --- a/handbook/commit/index.html +++ /dev/null @@ -1,613 +0,0 @@ - - - - - - - - - - - - commit - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

commit

- -

updates or creates records that persist until intentionally removed

- -

Syntax

-
commit
-
-commit @database1, ..., @databaseN
-
- -

Description

- -

commit updates or creates new records that persist in a database until they are intentionally removed. If supporting records change or are removed, the original committed records remain in tact, and can still be searched by other blocks. By default, committed records are directed to a local database.

- -

commit @database1, ..., @databaseN directs committed records one or more databases.

- -

Bind vs. Commit

- -

While bind and commit both update records in a database, they do so with slightly different behavior; a bound record has the same lifetime as its supporting records, whereas a committed record exists in the database until it is removed intentionally. Let’s take a closer look at this distinction and what the implications are.

- -

Consider the following block that reads the current time, and prints it to the screen:

-
search
-  [#time seconds]
-
-bind @browser
-  [#div text: seconds]
-
- -

In this block we search for the current time and bind it to a message that displays it. The message exists as long as the current time stays the same (1 second obviously). When the time changes, the current message disappears and is replaced with a new message, displaying the new time. This is the behavior of bind; bound records persist only as long as their matching records.

- -

Now let’s look at what commit does in contrast:

-
search
-  [#time seconds]
-
-commit @browser
-  [#div text: seconds]
-
- -

Compared to the previous block, we only changed bind to commit. When you run this block, at first you’ll see a single message like before. However, you’ll notice that messages begin to accumulate every second. Unlike with bind, committed records persist in the database until they are intentionally removed.

- -

To make things very concrete, we can actually mimic the behavior of a bind using two blocks that commit. We’ve already got the first one (the one just above), that commits messages to @browser. Now all we need is a second block, one that removes old committed messages from @browser:

-
search 
-  [#time seconds]
-
-search @browser
-  s = seconds - 1
-  // Do some math to handle the roll over at 60 seconds
-  last-time = s - 60 * floor[value: s / 60]
-  msg = [#div text: last-time]
-  
-commit @browser
-  msg := none
-
- -

This block searches for the message that was displayed during the previous second, and sets it to none, thereby removing it from @browser. Therefore, only the message bound to the the current time is displayed on the screen. This behavior is identical to that of the block that binds these messages instead of committing them!

- -

An Execution Perspective

- -

Another way to understand bind vs. commit is by looking at how the databases change over each tick of the Eve evaluator. We’ll consider the same program as before, looking at how its state changes over time. First, consider the bind case. When the program starts, there’s nothing in any databases; the program is a blank slate. At t1 the first #time is added to @session. This addition is bound to a #div, which is added to @browser. These changes are summarized in the first column of the table below.

- -

At t2, a new #time is added to @session, and the one from t1 is removed. Since we used a bind, this causes the existing #div to be removed from @browser, but it is replaced with a new #div reflecting the current time. At t3, the same operations takes place, and this process continues until the program is terminated.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -t0 - -t1 - -t2 - -t3 -
-delta - - - -+ [#time seconds: 39] -+ [#div text: "39"] - -+ [#time seconds: 40] -- [#time seconds: 39] -+ [#div text: "40"] -- [#div text: "39"] - -+ [#time seconds: 41] -- [#time seconds: 40] -+ [#div text: "41"] -- [#div text: "40"] -
-@session - -[ ] - -[[#time seconds: 39]] - -[[#time seconds: 40]] - -[[#time seconds: 41]] -
-@browser - -[ ] - -[[#div text: 39]] - -[[#div text: 40]] - -[[#div text: 41]] -
- -

Let’s perform the same analysis in the commit case. In this program, things start off the same; initially the database is empty, and at t1 a #time and a #div are added to their respective databases. At t2, things get more interesting. While the old #time is still replaced, the #div displaying the old time is not replaced since we committed it to @browser. Indeed, in subsequent rounds of execution, the contents of @browser keeps growing.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -t0 - -t1 - -t2 - -t3 -
-delta - - -+ [#time seconds: 39] -+ [#div text: "39"] - -+ [#time seconds: 40] -- [#time seconds: 39] -+ [#div text: "40"] - -+ [#time seconds: 41] -- [#time seconds: 40] -+ [#div text: "41"] -
-@session - -[ ] - -[[#time seconds: 39]] - -[[#time seconds: 40]] - -[[#time seconds: 41]] -
-@browser - -[ ] - -[[#div text: 39]] - -[[#div text: 39], - [#div text: 40]] - -[[#div text: 39], - [#div text: 40], - [#div text: 41]] -
- -

Tips

- -

When you want to display data in an interface element like a #div, a bind is usually the more appropriate choice compared to a commit. A bind will keep the interface element always up-to-date, whereas a commit will leave lingering elements that no longer reflect the current state of the program.

- -

When searching for an event like a #click, a commit is usually more appropriate than bind. When an event occurs, a record representing the event is added to a database. That record exists for exactly one “instant”, and then it is removed from the database. During that “instant”, any block searching for that event will be satisfied and can execute a bind or commit action. If you bind on the event, then the result will disappear as soon as the event does. However, if you commit on the event, then that result will persist after the event has been removed.

- -

Examples

- -

Initialize a counter when a session connects

-
search
-  [#session-connect]
-
-commit
-  [#counter count: 0]
-
- -

Increment a counter when a button is clicked

-
search
-  [#click element: [#count-button diff counter]]
-
-commit
-  counter.count := counter.count + diff
-
- -

See Also

- -

bind | databases | search

- - -
-
- -
- diff --git a/handbook/commonmark/index.html b/handbook/commonmark/index.html deleted file mode 100644 index c3970e3..0000000 --- a/handbook/commonmark/index.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - - - - - - CommonMark - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

CommonMark

- -

Eve documents are compatible with CommonMark

- -

Syntax

- -

Headings

- -
# heading1
-## heading2
-### heading3
-
- -

Emphasis

- -
*italic*
-_italic_
-**bold**
-__bold__
-
- - - -
[link](address)
-
-[link][ref]
-[ref] : address
-
- -

Lists

- -
- list item
-- list item2
-  - sublist item
-
-* list item
-* list item2
-  * sublist item
-
-1. ordered list1
-2. ordered list2
-
-1) ordered list1
-2) ordered list2
-
- -

Quotes

- -
> blockquote
-
- -

Code

- -
```
-  a block of code
-```
-
-`Inline code` with backticks
-
- -

Description

- -

CommonMark is an effort to standardize and remove ambiguity from the Markdown language. Eve uses CommonMark as the basis for formatting and rendering prose contained in Eve files. Eve code is written as code blocks within a document specified in CommonMark. Code blocks are delinated by code fences, three backtics before and after Eve code. Everything within a code block is treated as Eve code.

- -

Examples

- -

See Also

- -

literate programming | blocks | programming model

- - -
-
- -
- diff --git a/handbook/core/index.html b/handbook/core/index.html deleted file mode 100644 index 60e2b5d..0000000 --- a/handbook/core/index.html +++ /dev/null @@ -1,371 +0,0 @@ - - - - - - - - - - - - - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- - -
- diff --git a/handbook/databases/index.html b/handbook/databases/index.html deleted file mode 100644 index 588dd62..0000000 --- a/handbook/databases/index.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - - - - - - - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Databases

- -

Databases contain records

- -

Syntax

-
// search action
-search @database1, ..., @databaseN
-
-// Commit action
-commit @database1, ..., @databaseN
-
-// Bind action
-bind @database1, ..., @databaseN
-
- -

Description

- -

<action> @database performs the given action, one of search, bind, or commit, on the union of the provided databases.

- -

If no database is provided with an action, then that action is performed on the default @session database.

- -

Creating and Searching Databases

- -

You can create databases on-demand by simply committing a record to one. e.g.

- -
commit @my-database
-  [#my-record]
-
- -

This block will create a new database called “my-database”, which will contain the newly committed record. You can now search for this record in your new database:

- -
search @my-database
-  [#my-record]
-
-bind @browser
-  [#div text: "Found a record!"]
-
- -

Special Databases

- -

Eve has some built-in databases that have meaning to the runtime.

- -
    -
  • @session - the default database when no database is specified with an action.
  • -
  • @view - records committed to @view are used to visualize data.
  • -
  • @event - contains events originating from the DOM
  • -
  • @browser - Eve clients running in the browser render applicable records in this @browser as HTML elements.
  • -
  • @http - Stores records representing HTTP requests and responses
  • -
- -

Examples

- -

Display the element that was clicked in the DOM

-
search @event
-  [#click #direct-target element]
-
-commit @browser
-  [#div text: "{{element}} was clicked."]
-
- -

Commit some data in @session, and then display it on a button click.

- -
commit
-  [#for-display text: "Hello"]
-
- -

We are searching over three databases to complete this block.

- -
    -
  • the #click is in @event
  • -
  • the #button is in @browser
  • -
  • the text for display is in @session. This needs to be made explicit; since we are searching in other databases, @session is not searched implicitly.
  • -
- -
search @event @browser @session
-  [#click element: [#button]]
-  [#for-display text]
-
-commit @browser
-  [#div text]
-
- -

This block could have been written with two searches for the same effect:

- -
search @event @browser
-  [#click element: [#button]]
-
-search
-  [#for-display text]
-
-commit @browser
-  [#div text]
-
- -

See Also

- -

search | bind | commit

- - -
-
- -
- diff --git a/handbook/datetime/date/index.html b/handbook/datetime/date/index.html deleted file mode 100644 index eec3f20..0000000 --- a/handbook/datetime/date/index.html +++ /dev/null @@ -1,785 +0,0 @@ - - - - - - - - - - - - - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - - - - - - - - - - - - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - - - - - - - - - - - date - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

date

- -

provides the current date

- -

Syntax

-
[#date day month year]
-
- -

Attributes

- -
    -
  • day - current numeric day
  • -
  • month - current numeric month
  • -
  • year - current numeric year
  • -
- -

Description

- -

Provides the current day as reported by the system clock.

- -

Time updates at the frequency of the smallest selected in the record.

- -

Examples

- -

Prints the current date as a formatted string.

-
search
-  [#date month day year]
-
-bind @browser
-  [#div text: "Today is {{month}}/{{day}}/{{year}}"]
-
- -

See Also

- -

time

- - -
-
- -
- - - -
-
- -
- - - -
-
- -
- diff --git a/handbook/datetime/index.html b/handbook/datetime/index.html deleted file mode 100644 index b33d102..0000000 --- a/handbook/datetime/index.html +++ /dev/null @@ -1,371 +0,0 @@ - - - - - - - - - - - - Date & Time - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Date & Time

- -
    -
  • time - The current system time
  • -
- - -
-
- -
- diff --git a/handbook/datetime/time/index.html b/handbook/datetime/time/index.html deleted file mode 100644 index e3ea73b..0000000 --- a/handbook/datetime/time/index.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - - - - - - - time - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

time

- -

provides the current time

- -

Syntax

-
[#time year 
-       month 
-       day 
-       hours 
-       hours-24 
-       minutes 
-       seconds 
-       time-string 
-       time seconds 
-       frames 
-       ampm]
-
- -

Attributes

- -
    -
  • year - the current year
  • -
  • month - the current month from 0 to 11
  • -
  • day - the current day of the month from 1 to 31
  • -
  • hours - current hour from 0 to 11
  • -
  • hours-24 - current hour from 0 to 23
  • -
  • minutes - current minute from 0 to 59
  • -
  • seconds - current second from 0 to 59
  • -
  • time-string - the current time in a string of the form HH:MM AM/PM
  • -
  • timestamp - the number of milliseconds since midnight January 1, 1970
  • -
  • ampm - a string indicating morning or evening
  • -
  • frames - the number of frames elapsed since the program began. This fastest updating attribute on #time, refreshing evey 16 milliseconds.
  • -
- -

Description

- -

Provides the current time as reported by the system clock.

- -

Time updates at the frequency of the smallest unit of time selected in the record.

- -

Examples

- -

Prints the current time as a formatted string.

-
search
-  [#time hours minutes seconds]
-
-bind @browser
-  [#div text: "The time is {{hours}}:{{minutes}}:{{seconds}}"]
-
- -

Example Usage

- - - - -
-
- -
- diff --git a/handbook/docker/index.html b/handbook/docker/index.html deleted file mode 100644 index 25a68c7..0000000 --- a/handbook/docker/index.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - - - - - - - Docker - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Eve in Docker

- -

A Docker container for Eve is available on Docker Hub. After installing Docker for your platform, you can download our container with the following command:

- -
docker pull witheve/eve
-
- -

Windows Users - Docker for Windows requires Microsoft Hyper-V, which requires Windows 10.

- -

Examples

- -

To run the Docker container, execute:

- -
docker run -p [port]:8080 witheve/eve
-
- -

[port] is an available port on your local machine. It can be 8080 or any other port you would like. Then direct your browser to http://localhost:[port] to access the editor.

- -

[eve_file] is a path to a *.eve file you would like to build. The working directory of the container is eve/build, so to run a program in the eve/examples directory, you need to provide a relative path e.g.

- -
docker -p 8080:8080 witheve/eve
-
- -

To pass Eve files on your local machine into the container, you’ll need to mount a docker volume.

- -

See also

- -

linux | mac | windows | npm |running

- - -
-
- -
- diff --git a/handbook/ebnf/index.html b/handbook/ebnf/index.html deleted file mode 100644 index 1c56213..0000000 --- a/handbook/ebnf/index.html +++ /dev/null @@ -1,473 +0,0 @@ - - - - - - - - - - - - Grammar - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Eve EBNF grammar

- -

The following specification is expressed in Extended Backus–Naur Form

- -

Basics

-
newline = "\n"
-whitespace =  " " | "\t" | "," | newline;
-unicode = ? all unicode chars - whitespace ?;
-specials = "@" | "#" | "." | "," | "(" | ")" | "[" | "]" | "{" | "}" | "⦑" | "⦒" | ":" | "\"";
-non-special = unicode - specials;
-
- -

Values

-
none = "none";
-boolean = "true" | "false";
-numeric = "0" .. "9";
-number = ["-"] {numeric} ["." {numeric}];
-string-interpolation = "{{" expression "}}";
-string = "\"" {string-interpolation | unicode - "\"" | "\\\"" | whitespace} "\"";
-uuid ="⦑" (unicode - specials)  "⦒"
-
- -

Keywords and Identifiers

-
search = "search";
-action = "bind" | "commit";
-if = "if";
-then = "then";
-else = "else";
-is = "is";
-not = "not";
-none = "none";
-keyword = search | action | if | then | else | boolean | is | not | none
-non-special-non-numeric = non-special - numeric
-identifier = (non-special-non-numeric {non-special}) - keyword - "```";
-
- -

Comparisons

-
equality = ":" | "=";
-comparator = equality | ">" | "<" | ">=" | "<=" | "!=";
-comparison = expression whitespace+ comparator whitespace+ expression;
-
- -

Functions

-
infix-op = "*" | "+" | "-" | "/";
-infix = expression infix-op expression;
-function = identifier "[" [attribute] {whitespace+ attribute} "]";
-
- -

Records and Attributes

-
record = "[" [attribute] {whitespace+ attribute} "]"
-attribute = name | tag | attribute-not | identifier {whitespace+ comparator whitespace+ expression};
-name = "@" (identifier | string);
-tag = "#" (identifier | string);
-attribute-not = not "(" whitespace* identifier [comparator whitespace+ expression] ")";
-attribute-access = identifier whitespace* {"." whitespace* identifier}+
-
- -

Special Forms

-
not-statement = not "(" statement {whitespace+ statement} ")";
-is-expression = is "(" comparison ")";
-
- -

Expression

-
expression = number | identifier | function | infix | record | attribute-access;
-
- -

Statements

-
comment = "//" {unicode | whitespace - newline} newline
-statement = record | function | not-statement | if-statement | comparison | comment
-
- -

Action Statements

-
create-action = (identifier whitespace+ equality whitespace+ record) | record
-merge-action = (identifier | attribute-access) whitespace+ "<-" whitespace+ record
-name-tag-action = (identifier | attribute-access) whitespace+ ("+=" | "-=") whitespace+ (name | tag)
-remove-action = (identifier | attribute-access) whitespace+ ":=" whitespace+ none
-attribute-action = attribute-access whitespace+ (":=" | "+=" | "-=") whitespace+ expression
-action-operation = create-action | merge-action | name-tag-action | remove-action | attribute-action
-
- -

If-Then

-
group = "(" expression {whitespace+ expression} ")"
-binding-group = "(" identifier {whitespace+ identifier} ")"
-if-result = (group | expression);
-if-expression = if whitespace+ {statement whitespace+} then whitespace+ if-result;
-else-if-expression = else whitespace+ if whitespace+ {statement whitespace+} then whitespace+ if-result;
-else-expression = else whitespace+ if-result
-if-statement = (identifier | binding-group) whitespace+ equality whitespace+
-               if-expression
-               {whitespace+ (if-expression | else-if-expression)}
-               [else-expression]
-
- -

Sections

-
database-declaration = name | "(" {name whitespace+} ")"
-match-section = search whitespace+ [database-declaration whitespace+] {statement whitespace}
-action-section = action whitespace+ [database-declaration whitespace+] {action-statement whitespace}
-section = match-sectiong | action-section
-
- -

Program and Blocks

-
fence-symbol = "```"
-start-fence = newline fence-symbol [whitespace* (unicode - newline)] newline
-end-fence = newline fence-symbol newline
-block = start-fence {section} end-fence
-program = {unicode | whitespace | block}
-
- - -
-
- -
- diff --git a/handbook/equality/index.html b/handbook/equality/index.html deleted file mode 100644 index 08ace4e..0000000 --- a/handbook/equality/index.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - - - - - - Equality - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Equality

- -

= and : assert the equality of two values

- -

Syntax

-
// Use : in a record to bind an attribute to a value
-[attribute: value]
-
-// Use = outside a record to bind an attribute to a value
-[attribute]
-attribute = value
-
- -

Description

- -

[attribute: value] binds value to attribute, so that only records with attributes of the given value are returned. For instance, [name: "John"] selects all records with a name attribute equal to “John”. You can achieve the same effect with the = operator by first searching for a record. For instance:

-
[name]
-name = "John"
-
- -

This example further demonstrates that in Eve, variables with the same name are equivalent. Here, name inside the record and name on the second line are the same. This has particular implications, especially in the context of joining records. For instance:

-
search
-  [#student name school: name]
-  [#school name address]
-
- -

This block searches for #students and #schools with the same name. This means if you have a school named “South High School”, it won’t match unless there is also a student named “South High School”. If you want to use attributes, but don’t want to join on them, you can access them via dot notation.

-
search
-  [#student name school: schools.name]
-  schools = [#school address]
-
- -

This will correctly allow us to relate students and the addresses of the schools they attend.

- -

Tips

- -

Eve has two identical equivalency operators, : and =. They have the same semantic meaning, and could be used interchangeably. However, for readability reasons we encourage you to use : to express equality within records, and = outside of records. For example [attribute: value] is good, while we don’t encourage [attribute = value], even though it is semantically equivalent.

- -

Examples

- -

The following block will never execute the bind action because of a contradiction in the search:

-
search
-  x = 10
-  x = 20
-
-bind @browser
-  [#div text: "This will never display"]
-
- -

The search action says that x = 10 and x = 20, which is never true. Since there is no order or assignment in Eve, this statement does not first set x to 10 and then to 20. To see this more clearly, these two statements could be written as one:x = 10 = 20.

- -

See Also

- -

inequality | joins

- - -
-
- -
- diff --git a/handbook/equivalence/index.html b/handbook/equivalence/index.html deleted file mode 100644 index cf3cbeb..0000000 --- a/handbook/equivalence/index.html +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - - - - - - Equivalence - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Equivalence

- -
    -
  • Equality - Expresses when two statements are equality
  • -
  • Inequality - Expresses the relationship between two statements when they are not equality
  • -
  • Joins - Relate disjoint records by binding attributes from one with the other.
  • -
- -

See Also

- -

equality | inequality | joins

- - -
-
- -
- diff --git a/handbook/event/click/index.html b/handbook/event/click/index.html deleted file mode 100644 index 3f01cfd..0000000 --- a/handbook/event/click/index.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - click - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

click

- -

click event

- -

Syntax

- -
[#click]
-[#click element]
-[#click #direct-target element]
-
- -

Attributes

- -
    -
  • #direct-target - selects only directly clicked elements, as opposed to elements to which the event bubbles.
  • -
  • element - the element that was clicked.
  • -
- -

Description

- -

When an element in the DOM is clicked, a #click record is created in the @event database.

- -

Examples

- -

See Also

- - -
-
- -
- diff --git a/handbook/event/index.html b/handbook/event/index.html deleted file mode 100644 index c994fb3..0000000 --- a/handbook/event/index.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - - - - - - @event - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

@event

- -

click - a left-button mouse click event

- - -
-
- -
- diff --git a/handbook/events/click/index.html b/handbook/events/click/index.html deleted file mode 100644 index 766d883..0000000 --- a/handbook/events/click/index.html +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - - - - - - - click - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

click

- -

click event

- -

Syntax

- -
[#click]
-[#click element]
-[#click #direct-target element]
-
- -

Attributes

- -
    -
  • #direct-target - selects only directly clicked elements, as opposed to elements to which the event bubbles.
  • -
  • element - the element that was clicked.
  • -
- -

Description

- -

When an element in the DOM is clicked, a #click record is created in the @event database.

- -

Examples

- -

See Also

- - -
-
- -
- diff --git a/handbook/events/index.html b/handbook/events/index.html deleted file mode 100644 index fd0caaf..0000000 --- a/handbook/events/index.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - - - - - Events - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Events

- -

click - a left-button mouse click event

- - -
-
- -
- diff --git a/handbook/expressions/index.html b/handbook/expressions/index.html deleted file mode 100644 index 27e0a00..0000000 --- a/handbook/expressions/index.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - Expressions - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- - -
- diff --git a/handbook/functions/index.html b/handbook/functions/index.html deleted file mode 100644 index 6129749..0000000 --- a/handbook/functions/index.html +++ /dev/null @@ -1,424 +0,0 @@ - - - - - - - - - - - - Functions - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Functions

- -

Functions map one or more arguments to one or more values.

- -

Syntax

-
// A typical function call
-value = fn[argument]
-
-// A function call with multiple arguments
-value = fn[argument1, ..., argumentN]
-
-// A function call with multiple arguments and multiple return values
-(value1, value2) = fn[argument1, ..., argumentN]
-
-// A desugared function call
-[#fn #function argument1, ... argumentN, value1, ..., valueN]
-
- -

Description

- -

Functions as they exist in other languages are mostly obviated by Eve’s tag semantics. Consider the following function call in a C-family language.

-
// A typical function call
-x = sin(1.5);                              
-
- -

In Eve, we could match a record that operates similarly:

-
[#sin #function radians: 1.5, return: x]
-
- -

These statements accomplish the same objective: store the sine of an angle in a result variable. The Eve syntax is at a disadvantage though, because it cannot be composed into an expression like a typical function. Therefore, specific Eve records can be used as traditional functions:

-
x = sin[radians: 1.5]
-
- -

Let’s look at what makes Eve functions different.

- -

Explicit Arguments

- -

A function’s arguments are enclosed in square brackets to draw attention to the fact that functions in Eve are just regular records. Also like records, arguments are stated explicitly. This has several advantages over typical calling patterns:

- -
    -
  • Explicit arguments are self-documenting, so a reader unfamiliar with the function can understand more about the function without looking up exactly how it works. In the case of sin, you don’t have to know whether the inputs have to be in radians or degrees; the call-site tells you.

  • - -
  • Eve provides alternative calling patterns for functions. Some languages have two sin functions, one for angles in radians and another for angles in degrees. By contrast, Eve has a single sin function. If your angles are in radians, you call sin[radians], whereas if your angles are in degrees, you call sin[degrees].

  • - -
  • Like all records, you can state arguments in any order. This opens up an easy path for optional arguments: include the arguments you want and leave out the ones you don’t.

  • -
- -

Referential Transparency

- -

All expressions in Eve are referentially transparent, meaning you can replace the expression with its result and the behavior of the program will not change. This in turn means that expressions are side-effect free, and the only thing they depend on is their input arguments. Referential transparency is key to enabling some key features in Eve, like time travel debugging and provenance.

- -

Set Semantics

- -

In Eve, functions work over sets, meaning that a function will be applied to all elements of the input sets, resulting in an output that is itself a set. For more, see the document on set semantics.

- -

See Also

- -

aggregate | set semantics

- - -
-
- -
- diff --git a/handbook/general/index.html b/handbook/general/index.html deleted file mode 100644 index 936c8fb..0000000 --- a/handbook/general/index.html +++ /dev/null @@ -1,371 +0,0 @@ - - - - - - - - - - - - General - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

General

- -
    -
  • sort - Orders elements in a set
  • -
- - -
-
- -
- diff --git a/handbook/general/sort/index.html b/handbook/general/sort/index.html deleted file mode 100644 index b915f03..0000000 --- a/handbook/general/sort/index.html +++ /dev/null @@ -1,504 +0,0 @@ - - - - - - - - - - - - sort - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

sort

- -

generates an ordering for a set

- -

Syntax

-
// Sort one or more values
-index = sort[value]
-index = sort[value: (value1, value2, ...)]
-
-// Sort one or more values, and specify the direction for each
-index = sort[value direction]
-index = sort[value: (value1, value2, ...), direction: ("up", "down", ...)]
-
-// Sort according to some grouping
-index = sort[value per]
-index = sort[value direction per]
-
- -

Arguments

- -
    -
  • value - one or more variables to sort. More than one variable can be provided using a list e.g. sort[value: (value1, ..., valueN)], and they will be sorted in turn.
  • -
  • direction - _optional_ - one or more directions by which to sort value. If no direction is provided, all variables are sorted from smallest to largest. Possible values are: - -
      -
    • “up” for sorting from smallest to largest.
    • -
    • “down” for sorting from largest to smallest.
    • -
  • -
  • per - _optional_ - Instead of sorting the whole set, per allows you to divide the set into groups and sort each one.
  • -
- -

The output is a set of indices, each of which maps to an element of the sorted variable. For example, if the value is ("A", "C", "D", "B"), then index is (1, 3, 4, 2).

- -

Description

- -

Sort generates an index that describes the ordering of an input value. It’s important to remember that variables in Eve are sets, and therefore have no ordering. Because of this, sort does not reorder value, but it generates a set of indices, each of which maps to an element in value.

- -

Sort is flexible, and can generate an ordering over multiple dimensions, directions, and groupings.

- -

index = sort[value] generates an ordering of value from smallest to largest.

- -

index = sort[value direction] generates an ordering of value in a given direction. Acceptable values are “up” and “down”.

- -

index = sort[value: (value1, ... , valueN)] generates an ordering of a list of values, ordering by value1 first, then value2, and so on. For example, if you have #person records with name, age and height attributes, you could sort as follows:

-
search
-  [#person name age height]
-  index = sort[value: (age, name, height)]
-
- -

This will sort the people first by age, then by name, then by height.

- -

index = sort[value: (value1, ... , valueN), direction: (direction1, ... , directionN)] does the same as above, but you can specify the direction you sort each variable. Acceptable value for direction are “up” and “down”. By default, values are sorted in the “up” direction.

- -

index = sort[value per] sorts value, grouped by per. This divides value into groups according to the elements of per, and each one is sorted.

- -

Examples

- -

We have #student records with grade (1 - 12), teacher, GPA (0.0 - 4.0) attributes. We can sort the students by grade:

-
search
-  [#student name grade]
-  index = sort[value: grade]
-
-bind @browser
-  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
-
- -

The browser handles the task of rendering the divs in the order specified by the sortattribute. Taking this further, we can choose the direction of the sortted set, whether “up” or “down”. The default direction is “up” when none is specified.

-
search
-  [#student name grade]
-  index = sort[value: grade, direction: "down"]
-  
-bind @browser
-  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
-
- -

You can also sort across multiple axes of a record. For instance, we can sort grade from 9 to 12, then sort by name from Z - A.

-
search
-  [#student name grade]
-  index = sort[value: (grade, name) , direction: ("up","down")]
-
-bind @browser
-  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
-
- -

This can be extended to sort any number of attributes

-
search
-  [#student name grade teacher GPA]
-  index = sort[value: (grade, teacher, name, GPA) , direction: ("up", "down", "up", "down")]
-
-bind @browser
-  [#div sort: index, text: "{{index}} - {{name}} {{grade}} {{teacher}} {{GPA}}"]
-
- -

Finally, we can group sorted attributes with the per argument. Here you can see the difference between sorting by name then grade, and sorting by name per grade.

-
search
-  [#student name grade GPA]
-  index = sort[value: (GPA, name), per: grade]
-  
-bind @browser
-  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
-
- -

When you sort per grade, then name is first grouped by grade, and each of those groups is then sorted. This is why index goes from 1-6 instead of 1-20 as in the other examples; Although there are still 20 elements in index, the maximum is 6 because no grade has more than 6 students. You might want to sort data this way in order to display it in a nested structure, such as this:

-
search
-    [#student name grade teacher]
-  index = sort[value: name, per: grade]
-  
-bind @browser
-  [#div grade children: 
-    [#h3 sort: 0, text: "Grade: {{grade}}"]
-    [#div sort: index, text: "{{index}} {{name}}"]]
-
- -
- -

Commit some test data

-
commit
-  [#student name: "Mach", grade: 9, teacher: "Mr. Black", GPA: "1.0"]
-  [#student name: "Pok", grade: 9, teacher: "Mrs. Brown", GPA: "3.4"]
-  [#student name: "Karima", grade: 9, teacher: "Mr. Black", GPA: "2.4"]
-  [#student name: "Garth", grade: 9, teacher: "Mrs. Brown", GPA: "2.8"]
-  [#student name: "Berta", grade: 9, teacher: "Mr. Black", GPA: "2.7"]
-  [#student name: "Maxine", grade: 10, teacher: "Mr. Red", GPA: "4.0"]
-  [#student name: "Gwyn", grade: 10, teacher: "Mrs. Blue", GPA: "2.5"]
-  [#student name: "Ilse", grade: 10, teacher: "Mr. Red", GPA: "3.0"]
-  [#student name: "Hobert", grade: 11, teacher: "Ms. Green", GPA: "3.2"]
-  [#student name: "Arlean", grade: 10, teacher: "Mr. Red", GPA: "2.4"]
-  [#student name: "Ty", grade: 10, teacher: "Mrs. Blue", GPA: "1.7"]
-  [#student name: "Kermit", grade: 11, teacher: "Ms. Green", GPA: "2.9"]
-  [#student name: "Cortez", grade: 11, teacher: "Mrs. Orange", GPA: "2.3"]
-  [#student name: "Polly", grade: 11, teacher: "Ms. Green", GPA: "2.1"]
-  [#student name: "Damion", grade: 12, teacher: "Mrs. Purple", GPA: "3.8"]
-  [#student name: "Gretchen", grade: 12, teacher: "Mrs. Yellow", GPA: "2.8"]
-  [#student name: "Octavio", grade: 12, teacher: "Mrs. Purple", GPA: "3.4"]
-  [#student name: "Pa", grade: 12, teacher: "Mrs. Yellow", GPA: "3.5"]
-  [#student name: "Elwanda", grade: 10, teacher: "Mrs. Blue", GPA: "1.3"]
-  [#student name: "Guadalupe", grade: 11, teacher: "Mrs. Orange", GPA: "3.7"]
-
- - -
-
- -
- diff --git a/handbook/glossary/index.html b/handbook/glossary/index.html deleted file mode 100644 index a0c36ea..0000000 --- a/handbook/glossary/index.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - - - - - - Glossary - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Glossary

- -

Cardinality

- -

Cardinality is the number of elements in a set. For example, the set (5, 4, 2) contains three elements, so the cardinality of the set is 3.

- -

Cartesian Product

- -

The Cartesian product A × B of two sets A and B is the set of ordered pairs (a,b) where a ∈ A and b ∈ B. For example, if A = (1, 2) and B = ("A", "B"), then A x B = ((1,"A"), (1, "B"), (2, "A"), (2, "B")).

- -

Entity

- -

Entities are unique IDs in the Eve DB. An entity can represent anything - a person, a business, a message, an application, a button, etc.

- -

Fact

- -

Facts describe entities. Each fact is composed of an attribute and a value, and is associated with a specific entity. Facts might be a person’s age, an employee’s salary, a department’s budget, etc.

- -

Provenance

- -

Provenance is the record and history of data and its place of origin. In Eve, provenance tells you how a value is calculated by looking back at the history of its computation. Provenance can be used to precisely identify the cause of unexpected data in your application.

- -

Record

- -

Records are composed of facts. In Eve, you select records from the database by supplying a pattern of attributes, and any records matching that pattern are returned to you. For example, a record might be the ages, salaries, and departments of employees.

- -

Referential Transparency

- -

An expression is referentially transparency if it can be replaced with its result without changing the behavior of the program. Expression that are not referentially transparent tend to have side effects, or rely on state that is not supplied as part of the input arguments, but through a side channel.

- -

Set

- -

In mathematics, a set is a collection of elements where each element is unique. Sets have no order, so position in the set does not imply uniqueness. For example (1, 2, 3) is a set, whereas (1, 2, 1, 3) is not a set, because 1 appears twice. Furthermore, this means that (1, 2, 3) is equivalent to (3, 1, 2), (3, 2, 1), and (1, 3, 2) because they have the same elements regardless of order. Elements of a set can be anything, and therefore can be sets themselves. To make the previous collection a set we could do the following: ((1,A), (2,B), (1,C), (3,D)).

- - -
-
- -
- diff --git a/handbook/help/index.html b/handbook/help/index.html deleted file mode 100644 index 8caa8c2..0000000 --- a/handbook/help/index.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - - - - - - Getting Help - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Getting Help

- -

If you have any questions or get stuck while you are learning Eve, there are several ways to get help:

- -

Before reaching out, make sure you’ve looked at the following resources:

- -
    -
  • Read the quick start guide. It contains everything you’ll need to build your first Eve program.
  • -
  • Read the syntax reference. It summarizes the syntax of Eve on a single sheet of paper.
  • -
- -

If you’re still stuck, you can get in touch with Eve developers and the community through these channels:

- -
    -
  • Send a message to the mailing list. We generally respond to messages within a day.
  • -
  • Send a tweet to @with_eve.
  • -
  • Submit an issue to our GitHub repository.
  • -
  • Join the Eve Slack channel to talk with Eve developers and the community in real time (coming soon)
  • -
- -

Hare are some more resources to help you learn Eve:

- -
    -
  • Browse our growing catalog of example applications for something similar to what you’re doing.
  • -
  • Read our development blog to learn more about what goes on behind the scenes at Eve.
  • -
- -

See Also

- -

guides | tutorials | mailing list | @with_eve | GitHub

- - -
-
- -
- diff --git a/handbook/http/index.html b/handbook/http/index.html deleted file mode 100644 index d029a76..0000000 --- a/handbook/http/index.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - - - - - - - @http - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

@http

- - -
-
- -
- diff --git a/handbook/if-then/index.html b/handbook/if-then/index.html deleted file mode 100644 index 9ff2ea2..0000000 --- a/handbook/if-then/index.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - - - - - - - if-then - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

If-Then

- -

Conditional equivalence

- -

Syntax

-
result = if record then value
-  
-result = if record then value
-         else value
-
-result = if record then value
-         if record then value
-
-result = if record then value
-         else if record then value
-
-result = if record then value
-         else if record then value
-         else value
-
-(result1, ..., resultN) = if record then (value, ..., valueN)
-
-(result1, ..., resultN) = if record then (value, ..., valueN)
-                          else (value, ..., valueN)
-
-(result1, ..., resultN) = if record1 then (value, ..., valueN)
-                          if record2 then (value, ..., valueN)
-
-(result1, ..., resultN) = if record1 then (value, ..., valueN)
-                          else if record2 then (value, ..., valueN)
-
-(result1, ..., resultN) = if record1 then (value, ..., valueN)
-                          else if record2 then (value, ..., valueN)
-                          else (value, ..., valueN)                                          
-
- -

Description

- -

If allows conditional equivalence, and works a lot like if in other languages. Our if has two components: The keyword if followed by a conditional; and the keyword then followed by one or more return objects. An optional else keyword indicates the default value:

- -

This block is used to switch between the singular and plural for displaying the number of burgers each guest is eating. If statements can be composed, permitting the creation of complex conditional statements. For instance, instead of inviting friends and their spouses in two blocks (the first two blocks in the example program), I could have done it in a single block using an if statement:

- -

This is equivalent to a union/and operator, which combines elements from disparate sets into the same set. The second way to use if is in conjunction with the else keyword:

- -

This is equivalent to a choose/or operator, selecting only the first branch with a non-empty body. A bug in this program is that if some guest is tagged both #hungry and #vegetarian, that guest will actually receive two burgers. Therefore, while order of statements usually does not matter in Eve, if statements are one area where it does.

- -

A final feature of the if statement is multiple returns. For instance, we could have done this:

- -

Examples

- -

Basic usage

-
burger-switch = if guest.burgers = 1 then "burger"
-                else "burgers"
-
-
[@"my party" date]
-friend = [#friend busy-dates != date]
-guest = if friend then friend
-        if friend.spouse then friend.spouse
-
- -

Using else if

-
burgers = if guest = [@Arthur] then 3
-          else if guest = [#hungry] then 2
-          else if guest = [#vegetarian] then 0
-          else 1
-
- -

Multiple returns

-
(burgers, status) = if guest = [@Arthur] then (3, #fed)
-                    else if guest = [#hungry] then (2, #fed)
-                    else if guest = [#vegetarian] then (0, #needsfood)
-                    else (1, #fed)
-
- -

See Also

- -

expressions | records | functions

- - -
-
- -
- diff --git a/handbook/index.html b/handbook/index.html index 398bd69..df333b1 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -10,7 +10,7 @@ Handbooks - Eve Documentation - + @@ -74,15 +74,10 @@ -
- +
@@ -362,420 +161,18 @@


- +


- -

-
- -
- - -

-
- -
- - -

Linux

-
- -
- - -

Mac

-
- -
- - -

Standard Library

-
- -
- - -

Windows

-
- -
- - -

abs

-
- -
- - -

ceiling

-
- -
- - -

click

-
- -
- - -

cos

-
- -
- - -

count

-
- -
- - -

fix

-
- -
- - -

floor

-
- -
- - -

join

-
- -
- - -

mod

-
- -
- - -

random

-
- -
- - -

range

-
- -
- - -

round

-
- -
- - -

sin

-
- -
- - -

sort

-
- -
- - -

split

-
- -
- - -

sum

-
- -
- - -

tan

-
- -
- - -

time

-
- -
- - -

@session

-
- -
- - -

Add: +=

-
- -
- - -

Equality

-
- -
- - -

Functions

-
- -
- - -

General

-
- -
- - +

Getting Eve


- -

Grammar

-
- -
- - -

Programming Model

-
- -
- - -

Records

-
- -
- - -

search

-
- -
- - -

@browser

-
- -
- - -

Aggregates

-
- -
- - -

CommonMark

-
- -
- - -

Equivalence

-
- -
- - -

Inequality

-
- -
- - -

Math

-
- -
- - -

Running Eve

-
- -
- - -

Set: :=

-
- -
- - -

Sets

-
- -
- - -

Tags

-
- -
- - -

bind

-
- -
- - -

@event

-
- -
- - -

Actions

-
- -
- - -

Getting Help

-
- -
- - -

Joins

-
- -
- - -

Literate Programming

-
- -
- - -

Remove: -=

-
- -
- - -

Strings

-
- -
- - -

commit

-
- -
- - -

if-then

-
- -
- - -

@http

-
- -
- - -

Blocks

-
- -
- - -

Docker

-
- -
- - -

Expressions

-
- -
- - -

Merge <-

-
- -
- - -

Statistics

-
- -
- - -

is

-
- -
- - -

not

-
- -
- - -

@view

-
- -
- - -

Date & Time

-
- -
- - -

String Interpolation

-
- -
- - -

Update Operators

-
- -
- - -

npm

-
- -
- - -

Glossary

-
- -
-
diff --git a/handbook/index.xml b/handbook/index.xml index 98aea9c..4b1f2f2 100644 --- a/handbook/index.xml +++ b/handbook/index.xml @@ -2,7 +2,7 @@ Handbooks on Eve Documentation - http://docs.witheve.com/handbook/ + http://docs.witheve.com/handbook/index.xml Recent content in Handbooks on Eve Documentation Hugo -- gohugo.io en-us @@ -14,645 +14,25 @@ Mon, 01 Jan 0001 00:00:00 +0000 http://docs.witheve.com/handbook/core/ - - -<h1 id="core-language">Core Language</h1> - -<h2 id="see-also">See Also</h2> - -<p><a href="../records">records</a> | <a href="../equivalence">equivalence</a> | <a href="../actions">actions</a> | <a href="../expressions">expressions</a> | <a href="../update-operators">update operators</a> | <a href="../databases">databases</a></p> - - - - - - http://docs.witheve.com/handbook/databases/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/databases/ - - -<h1 id="databases">Databases</h1> - -<p>Databases contain records</p> - -<h2 id="syntax">Syntax</h2> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// search action</span><span class="w"></span> -<span class="kr">search</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> - -<span class="c1">// Commit action</span><span class="w"></span> -<span class="kr">commit</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> - -<span class="c1">// Bind action</span><span class="w"></span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> -</code></pre></div> - -<h2 id="description">Description</h2> - -<p><code>&lt;action&gt; @database</code> performs the given action, one of <code>search</code>, <code>bind</code>, or <code>commit</code>, on the union of the provided databases.</p> - -<p>If no database is provided with an action, then that action is performed on the default <code>@session</code> database.</p> - -<h2 id="creating-and-searching-databases">Creating and Searching Databases</h2> - -<p>You can create databases on-demand by simply committing a record to one. e.g.</p> - -<pre><code>commit @my-database - [#my-record] -</code></pre> - -<p>This block will create a new database called &ldquo;my-database&rdquo;, which will contain the newly committed record. You can now search for this record in your new database:</p> - -<pre><code>search @my-database - [#my-record] - -bind @browser - [#div text: &quot;Found a record!&quot;] -</code></pre> - -<h2 id="special-databases">Special Databases</h2> - -<p>Eve has some built-in databases that have meaning to the runtime.</p> - -<ul> -<li><a href="../session">@session</a> - the default database when no database is specified with an action.</li> -<li><a href="../view">@view</a> - records committed to <code>@view</code> are used to visualize data.</li> -<li><a href="../event">@event</a> - contains events originating from the DOM</li> -<li><a href="../browser">@browser</a> - Eve clients running in the browser render applicable records in this <code>@browser</code> as HTML elements.</li> -<li><a href="../http">@http</a> - Stores records representing HTTP requests and responses</li> -</ul> - -<h2 id="examples">Examples</h2> - -<p>Display the element that was clicked in the DOM</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@event</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#click</span><span class="w"> </span><span class="nt">#direct-target</span><span class="w"> </span><span class="x">element</span><span class="p">]</span><span class="w"></span> - -<span class="kr">commit</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{element}} was clicked.&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Commit some data in <code>@session</code>, and then display it on a button click.</p> - -<pre><code>commit - [#for-display text: &quot;Hello&quot;] -</code></pre> - -<p>We are searching over three databases to complete this block.</p> - -<ul> -<li>the <code>#click</code> is in <code>@event</code></li> -<li>the <code>#button</code> is in <code>@browser</code></li> -<li>the text for display is in <code>@session</code>. This needs to be made explicit; since we are searching in other databases, <code>@session</code> is not searched implicitly.</li> -</ul> - -<pre><code>search @event @browser @session - [#click element: [#button]] - [#for-display text] - -commit @browser - [#div text] -</code></pre> - -<p>This block could have been written with two searches for the same effect:</p> - -<pre><code>search @event @browser - [#click element: [#button]] - -search - [#for-display text] - -commit @browser - [#div text] -</code></pre> - -<h2 id="see-also">See Also</h2> - -<p><a href="../search">search</a> | <a href="../bind">bind</a> | <a href="../commit">commit</a></p> - + - http://docs.witheve.com/handbook/intro/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/intro/ - - -<h1 id="introduction">Introduction</h1> - -<h2 id="notable-features">Notable Features</h2> - -<ul> -<li><p>Eve programs aren&rsquo;t talking to a database, they <em>are</em> the database. That means no plumbing, no impedance mismatch, and no extra infrastructure is needed.</p></li> - -<li><p>Everything is data. The file system, http requests, the DOM&hellip; That means everything can be queried and everything can be reacted to.</p></li> - -<li><p>Eve&rsquo;s semantics were built for concurrency, asynchrony, and distribution. There are no promises, or thread synchronizations, or borrows.</p></li> - -<li><p>Eve programs practice literate programming, since there&rsquo;s no incidental ordering imposed by the language.</p></li> - -<li><p>Another result of a lack of ordering is that programs grow very organically through composition.</p></li> - -<li><p>Eve programs are naturally tiny.</p></li> - -<li><p>Correctness can be defined globally through integrity constraints, allowing people to safely contribute to an application without worrying about checking every possible invariant locally.</p></li> -</ul> - -<h2 id="see-also">See Also</h2> - -<p><a href="../installation">getting eve</a> | <a href="../running">running eve</a> | <a href="../programs">eve programs</a> | <a href="../core">core language</a></p> - - - - - - http://docs.witheve.com/handbook/programs/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/programs/ - - -<h1 id="eve-programs">Eve Programs</h1> - -<p>Coming soon&hellip;</p> - -<h2 id="see-also">See Also</h2> - -<p><a href="../model">programming model</a> | <a href="../literate-programming">literate programming</a> | <a href="../blocks">blocks</a></p> - - - - - Linux - http://docs.witheve.com/handbook/linux/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/linux/ - - -<h1 id="installing-eve-on-linux">Installing Eve on Linux</h1> - -<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> - -<pre><code>npm install -npm start -</code></pre> - -<p>Then open <code>http://localhost:8080/</code> in your browser.</p> - -<h2 id="tips">Tips</h2> - -<p>Some distributions (most notably Ubuntu) have renamed <code>node</code> to <code>nodejs</code>. If this is the case, you&rsquo;ll need to create a symlink that remaps nodejs back to node. e.g.</p> - -<pre><code>ln -s /usr/bin/nodejs /usr/bin/node -</code></pre> - -<p>Then proceed with the installation as usual</p> - -<h2 id="see-also">See also</h2> - -<p><a href="../mac">mac</a> | <a href="../windows">windows</a> | <a href="../docker">docker</a> | <a href="../running">running</a></p> - - - - - Mac - http://docs.witheve.com/handbook/mac/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/mac/ - - -<h1 id="installing-eve-on-mac">Installing Eve on Mac</h1> - -<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> - -<pre><code>npm install -npm start -</code></pre> - -<p>Then open <code>http://localhost:8080/</code> in your browser.</p> - -<h2 id="see-also">See also</h2> - -<p><a href="../linux">linux</a> | <a href="../windows">windows</a> | <a href="../docker">docker</a> | <a href="../npm">npm</a> | <a href="../running">running</a></p> - - - - - Standard Library - http://docs.witheve.com/handbook/standard-library/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/standard-library/ - - -<h1 id="standard-library">Standard Library</h1> - -<p>The Eve standard library of functions is globally available, meaning you don&rsquo;t have to reference a specific database to use these functions.</p> - -<h2 id="description">Description</h2> - -<ul> -<li><a href="../general">general</a> - General functions</li> -<li><a href="../math">math</a> - General mathematical and trigonometric functions</li> -<li><a href="../strings">strings</a> - Functions that manipulate strings</li> -<li><a href="../statistics">statistics</a> - Functions that calculate statistical measures on values</li> -<li><a href="../datetime">date &amp; time</a> - Functions that get and manipulate date and time</li> -</ul> - - - - - Windows - http://docs.witheve.com/handbook/windows/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/windows/ - - -<h1 id="installing-eve-on-windows">Installing Eve on Windows</h1> - -<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> - -<pre><code>npm install -npm start -</code></pre> - -<p>Then open <code>http://localhost:8080/</code> in your browser.</p> - -<h2 id="see-also">See also</h2> - -<p><a href="../linux">linux</a> | <a href="../mac">mac</a> | <a href="../docker">docker</a> | <a href="../npm">npm</a> | <a href="../running">running</a></p> - - - - - abs - http://docs.witheve.com/handbook/math/abs/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/math/abs/ - - -<h1 id="abs">abs</h1> - -<p>The absolute value of a number</p> - -<h2 id="syntax">Syntax</h2> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">abs</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h2 id="attributes">Attributes</h2> - -<ul> -<li><code>value</code> - a set of numbers</li> -</ul> - -<h2 id="description">Description</h2> - -<p><code>y = abs[value]</code> returns the absolute value of the elements in <code>value</code>. Every positive number is kept positive, but every negative number is made positive.</p> - -<h2 id="examples">Examples</h2> - -<p>Get the absolute value of a number</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">abs</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="nf">-</span><span class="m">3</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Displays the number <code>3</code>.</p> - -<h2 id="see-also">See Also</h2> - -<p><a href="../sign">sign</a></p> - - - - - ceiling - http://docs.witheve.com/handbook/math/ceil/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/math/ceil/ - - -<h1 id="ceiling">ceiling</h1> - -<p>Round a number up to the nearest integer.</p> - -<h2 id="syntax">Syntax</h2> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">ceiling</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h2 id="attributes">Attributes</h2> - -<ul> -<li><code>value</code> - a set of numbers</li> -</ul> - -<h2 id="description">Description</h2> - -<p><code>y = ceiling[value]</code> rounds the elements of <code>value</code> up to the nearest integers.</p> - -<h2 id="examples">Examples</h2> - -<p>Calculate the ceiling of <code>34.2</code></p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">ceiling</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="m">34</span><span class="x">.</span><span class="m">2</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>The result is <code>35</code>.</p> - -<h2 id="see-also">See Also</h2> - -<p><a href="../floor">floor</a> | <a href="../fix">fix</a> | <a href="../round">round</a></p> - - - - - click - http://docs.witheve.com/handbook/event/click/ + http://docs.witheve.com/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/event/click/ - - -<h1 id="click">click</h1> - -<p>click event</p> - -<h2 id="syntax">Syntax</h2> - -<pre><code>[#click] -[#click element] -[#click #direct-target element] -</code></pre> - -<h2 id="attributes">Attributes</h2> - -<ul> -<li><code>#direct-target</code> - selects only directly clicked elements, as opposed to elements to which the event bubbles.</li> -<li><code>element</code> - the element that was clicked.</li> -</ul> - -<h2 id="description">Description</h2> - -<p>When an element in the DOM is clicked, a <code>#click</code> record is created in the <code>@event</code> database.</p> - -<h2 id="examples">Examples</h2> - -<h2 id="see-also">See Also</h2> - - - - - cos - http://docs.witheve.com/handbook/math/cos/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/math/cos/ - - -<h1 id="cos">cos</h1> - -<p>Calculate the cosine of an angle</p> - -<h2 id="syntax">Syntax</h2> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">cos</span><span class="p">[</span><span class="x">radians</span><span class="p">]</span><span class="w"></span> -<span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">cos</span><span class="p">[</span><span class="x">degrees</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h2 id="attributes">Attributes</h2> - -<ul> -<li><code>radians</code> - the angle in radians</li> -<li><code>degrees</code> - the angle in degrees</li> -</ul> - -<h2 id="description">Description</h2> - -<p><code>y = cos[degrees]</code> calculates the cosine of an input in degrees.</p> - -<p><code>y = cos[radians]</code> calculates the cosine of an input in radians.</p> - -<p><code>cos</code> operates element-wise on its inputs.</p> - -<h2 id="examples">Examples</h2> - -<p>Calculate the cosine of 90 degrees</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">cos</span><span class="p">[</span><span class="x">degrees</span><span class="nf">:</span><span class="w"> </span><span class="m">90</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h2 id="see-also">See Also</h2> - -<p><a href="../sin">sin</a> | <a href="../tan">tan</a></p> - - - - - count - http://docs.witheve.com/handbook/statistics/count/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/statistics/count/ - - -<h1 id="count">count</h1> - -<p>Returns the number of elements in a set</p> - -<h2 id="syntax">Syntax</h2> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="p">]</span><span class="w"></span> -<span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h2 id="attributes">Attributes</h2> - -<ul> -<li><code>given</code> - the set to count over</li> -<li><code>per</code> - <em>optional</em> - one or more attributes by which to group <code>given</code>.</li> -</ul> - -<h2 id="description">Description</h2> - -<p><code>y = count[given]</code> counts the number of elements in <code>given</code>.</p> - -<p><code>y = count[given, per]</code> counts the number of elements in <code>given</code>, grouped by the attribute(s) provided in <code>per</code>. For instance, <code>class-size = count[given: students, per: grade]</code> would count the number of students in each grade. You can group along multiple axes; the previous example could be extended to work across multiple schools by doing <code>class-size = count[given: students, per: (grade, school)]</code>. See the examples section to see these in action.</p> - -<h2 id="examples">Examples</h2> - -<p>Before we get to the <code>count</code> examples, let&rsquo;s add some students. Each <code>#student</code> has a <code>grade</code> and a <code>school</code>. Grades are one of 10, 11, or 12. Schools are one of &ldquo;West&rdquo; and &ldquo;East&rdquo;.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Diedra&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Celia&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Michaela&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">11</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Jermaine&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">11</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Issac&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">12</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Jamar&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">12</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Yee&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Johanne&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Mertie&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Elmira&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">11</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>First let&rsquo;s count the total number of students in the school district.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="x">enrollment</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@view</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#value</span><span class="w"> </span><span class="x">|</span><span class="w"> </span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;There are {{enrollment}} students in the district&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Now let&rsquo;s count the number of students in each school.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="x">school</span><span class="nf">-</span><span class="x">enrollment</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@view</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#value</span><span class="w"> </span><span class="x">|</span><span class="w"> </span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{school-enrollment}} attend {{school}}&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>We could have similarly counted the number of students in each grade across the district.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">grade</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="x">grade</span><span class="nf">-</span><span class="x">enrollment</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="x">grade</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@view</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#value</span><span class="w"> </span><span class="x">|</span><span class="w"> </span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{grade-enrollment}} students are in {{grade}}th grade&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Finally, we can count the number of students per grade, per school.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="x">grade</span><span class="nf">-</span><span class="x">school</span><span class="nf">-</span><span class="x">enrollment</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="p">(</span><span class="x">grade</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="p">)]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@view</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#value</span><span class="w"> </span><span class="x">|</span><span class="w"> </span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{grade-school-enrollment}} students are in {{grade}}th grade at {{school}}&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h3 id="example-usage">Example Usage</h3> - -<ul> -<li><a href="http://play.witheve.com/#/examples/todomvc.eve">TodoMVC</a></li> -<li><a href="http://play.witheve.com/#/examples/tic-tac-toe.eve">Tic-Tac-Toe</a></li> -</ul> - -<h2 id="see-also">See Also</h2> - -<p><a href="../../math/sum">sum</a> | <a href="../../aggregates">aggregates</a></p> - - - - - fix - http://docs.witheve.com/handbook/math/fix/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/math/fix/ - - -<h1 id="fix">fix</h1> - -<p>Round a number toward zero.</p> - -<h2 id="syntax">Syntax</h2> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">fix</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h2 id="attributes">Attributes</h2> - -<ul> -<li><code>value</code> - a set of numbers</li> -</ul> - -<h2 id="description">Description</h2> - -<p><code>y = fix[value]</code> rounds the elements of <code>value</code> toward zero. This means that negative numbers will be rounded up to the nearest integer, while positive numbers will be rounded down.</p> - -<h2 id="examples">Examples</h2> - -<p>Calculate the fix of <code>34.7</code> and <code>-34.7</code></p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">fix</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="m">34</span><span class="x">.</span><span class="m">7</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="x">z</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">fix</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="nf">-</span><span class="m">34</span><span class="x">.</span><span class="m">7</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;The fix of 34.7 is {{y}}&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;The fix of -34.7 is {{z}}&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>We see that the fix of <code>34.7</code> is <code>34</code>, while the fix of <code>-34.7</code> is <code>-34</code>. Compare this to rounding the numbers:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">round</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="m">34</span><span class="x">.</span><span class="m">7</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="x">z</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">round</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="nf">-</span><span class="m">34</span><span class="x">.</span><span class="m">7</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;The round of 34.7 is {{y}}&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;The round of -34.7 is {{z}}&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>We see that the round of <code>34.7</code> is <code>35</code>, while the round of <code>-34.7</code> is <code>-35</code>.</p> - -<h2 id="see-also">See Also</h2> - -<p><a href="../floor">floor</a> | <a href="../ceil">ceil</a> | <a href="../round">round</a></p> - + http://docs.witheve.com/handbook/libraries/ + - floor - http://docs.witheve.com/handbook/math/floor/ + Getting Eve + http://docs.witheve.com/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/math/floor/ - - -<h1 id="floor">floor</h1> - -<p>Round a number down to the nearest integer.</p> - -<h2 id="syntax">Syntax</h2> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">floor</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h2 id="attributes">Attributes</h2> - -<ul> -<li><code>value</code> - a set of numbers</li> -</ul> - -<h2 id="description">Description</h2> - -<p><code>y = floor[value]</code> rounds the elements of <code>value</code> down to the nearest integers.</p> - -<h2 id="examples">Examples</h2> - -<p>Calculate the floor of <code>34.2</code></p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">floor</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="m">34</span><span class="x">.</span><span class="m">2</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>The result is <code>34</code>.</p> - -<h2 id="see-also">See Also</h2> - -<p><a href="ceil.md">ceil</a> | <a href="fix.md">fix</a> | <a href="round.md">round</a></p> + http://docs.witheve.com/handbook/ + <p>Test</p> diff --git a/handbook/inequality/index.html b/handbook/inequality/index.html deleted file mode 100644 index c4d535d..0000000 --- a/handbook/inequality/index.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - - - - - - Inequality - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Inequality

- -

inequality operators filter records

- -

Syntax

-
// Inequality Operators
->, >=, <, <=, !=
-
-// Inside of records
-[attribute >= value]
-[attribute >= variable]
-
-// Outside of records
-variable >= value
-variable >= variable
-
-// Satisfy multiple constraints in a single line
-value <= variable <= value   
-variable <= variable <= variable
-
- -

Description

- -

Attributes can be filtered using inequality operators, including >, >=, <, <= and !=.

- -

>, >=, <, <= can only filter using values that can be sorted. For instance, you can use these operators to filter numbers, but you cannot filter records this way.

- -

!= tests only for inequality, and doesn’t compare whether an attribute is greater or less than a particular value. Therefore, != can be used to filter any value.

- -

You can use inequality operators inside records or outside of them. Inside of records, you can filter an attribute on a single value. Outside of records, you have more freedom to filter on multiple values. For instance, if you want only records with an attribute between a maximum and minimum value, you can write something like min-value < variable < max-value.

- -

Examples

- -

Select students with a low GPA

-
search @test-data
-  [#student name GPA < 2.0]
-
-bind @browser
-  [#div text: "{{name}} needs a tutor."]
-
- -

Select students with a GPA over 2.0 but less than 3.0

-
search @test-data
-  [#student name GPA]
-  2.0 <= GPA < 3.0
-
-bind @browser
-  [#div text: "{{name}} is doing fine"]
-
- -

You can be very specific with filters. Select students named “John” in 11th or 12th grade with a GPA between 2.0 and 3.0, and who don’t attend “West” high school.

-
search @test-data
-  students = [#student name: "John", grade >= 11, school != "West" ]
-  2.0 <= students.GPA < 3.0
-
-bind @browser
-  [#div text: "{{name}} is doing fine"]  
-
- -

See Also

- -

equality | joins | equivalence

- - -
-
- -
- diff --git a/handbook/installation/index.html b/handbook/installation/index.html deleted file mode 100644 index d336174..0000000 --- a/handbook/installation/index.html +++ /dev/null @@ -1,380 +0,0 @@ - - - - - - - - - - - - Getting Eve - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- - -
- diff --git a/handbook/intro/index.html b/handbook/intro/index.html deleted file mode 100644 index eeb59ff..0000000 --- a/handbook/intro/index.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - - - - - - - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Introduction

- -

Notable Features

- -
    -
  • Eve programs aren’t talking to a database, they are the database. That means no plumbing, no impedance mismatch, and no extra infrastructure is needed.

  • - -
  • Everything is data. The file system, http requests, the DOM… That means everything can be queried and everything can be reacted to.

  • - -
  • Eve’s semantics were built for concurrency, asynchrony, and distribution. There are no promises, or thread synchronizations, or borrows.

  • - -
  • Eve programs practice literate programming, since there’s no incidental ordering imposed by the language.

  • - -
  • Another result of a lack of ordering is that programs grow very organically through composition.

  • - -
  • Eve programs are naturally tiny.

  • - -
  • Correctness can be defined globally through integrity constraints, allowing people to safely contribute to an application without worrying about checking every possible invariant locally.

  • -
- -

See Also

- -

getting eve | running eve | eve programs | core language

- - -
-
- -
- diff --git a/handbook/is/index.html b/handbook/is/index.html deleted file mode 100644 index 2769806..0000000 --- a/handbook/is/index.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - is - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

is

- -

Tests the truth of a statement

- -

Syntax

-
y = is( ... )
-
- -

Description

- -

y = is( ... ) tests the truth of the statement contained in the parentheses. If the statement is true, then is returns the value true, otherwise it returns false.

- -

Examples

-
search
-  x = 10
-  y = is(20 = x)
-  z = is(20 = x * 2)
-
-bind @browser
-  [#div text: "y is {{y}}"]
-  [#div text: "z is {{z}}"]
-
- -

The output shows that y is false while z is true.

- -

Example Usage

- - - -

See Also

- -

not | records | expressions

- - -
-
- -
- diff --git a/handbook/joins/index.html b/handbook/joins/index.html deleted file mode 100644 index fcea673..0000000 --- a/handbook/joins/index.html +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - - - - - - - Joins - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Joins

- -

joins allow you to relate two records

- -

Syntax

-
// Join two records using a bind
-[#record1 attribute1]
-[#record2 attribute2: attribute1]
-
-// Join two records using a name
-[#record1 attribute]
-[#record2 attribute]
-
- -

Description

- -

Examples

- -

See Also

- -

equality | inequality | records

- - -
-
- -
- diff --git a/handbook/linux/index.html b/handbook/linux/index.html deleted file mode 100644 index 2bc3432..0000000 --- a/handbook/linux/index.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - - - - - - - Linux - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Installing Eve on Linux

- -

First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

- -
npm install
-npm start
-
- -

Then open http://localhost:8080/ in your browser.

- -

Tips

- -

Some distributions (most notably Ubuntu) have renamed node to nodejs. If this is the case, you’ll need to create a symlink that remaps nodejs back to node. e.g.

- -
ln -s /usr/bin/nodejs /usr/bin/node
-
- -

Then proceed with the installation as usual

- -

See also

- -

mac | windows | docker | running

- - -
-
- -
- diff --git a/handbook/literate-programming/index.html b/handbook/literate-programming/index.html deleted file mode 100644 index 95683c8..0000000 --- a/handbook/literate-programming/index.html +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - Literate Programming - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Literate Programming

- -

In the spirit of literate programming, Eve programs are primarily prose, interleaved with Eve code. Donald Knuth explains literate programming in his influential paper:

- -
-

The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. Such an author … strives for a program that is comprehensible because its concepts have been introduced in an order that is best for human understanding, using a mixture of formal and informal methods that reinforce each other.

-
- -

This description fits with the ethos of Eve - that programming is primarily meant to communicate with other humans, not the computer. You’ll notice the above Eve program is actually written in two languages: Markdown, used to format the prose; and Eve, which is delineated by standard Markdown code blocks. Only the content within a block is compiled, while everything else is disregarded as a comment.

- -

Writing code this way has several properties that result in higher quality programs:

- -
    -
  • Literate programming forces you to consider a human audience. While this is usually the first step in writing any document, in programming the audience is typically a machine. For an Eve program, the audience might be your collaborators, your boss, or even your future self when revisiting the program in a year. By considering the audience of your program source, you create an anchor from which the narrative of your program flows, leading to a more coherent document.

  • - -
  • The human brain is wired to engage with and remember stories. Think back to a book you read (or maybe a show you watched) last year. You probably remember in great detail all of the characters and their personalities, the pivotal moments of the plot, the descriptions of the various settings, etc. But how much can you remember of a piece of code you haven’t looked at for a year? Literate programming adds another dimension to your code that will help you keep more of your program in working memory.

  • - -
  • Since Eve code blocks can be arranged in any order, literate programming encourages the programmer to arrange them in an way that makes narrative sense. Code can have a beginning, middle, and end just like a short story. Or like an epic novel, code can have many interwoven storylines. Either way, the structure of the code should follow an order imposed by a narrative, not one imposed by the compiler.

  • - -
  • Literate programming can help you think about your program more thoroughly. Through practicing literate programming, you can reveal edge cases, incorrect assumptions, gaps in understanding the problem domain, and shaky implementation details before any code is even written.

  • -
- -

Literate programming is a first-class design concept in Eve. We will be writing all of our programs in this manner, and will encourage others to do the same for the reasons above. That said, there is nothing in the syntax that specifically requires literate programming; you can write your program as a series of code blocks without any prose, and it will be perfectly valid.

- -

CommonMark

- -

Eve is CommonMark compatible.

- -

Examples

- - - -

See Also

- -

blocks | programming model | CommonMark

- - -
-
- -
- diff --git a/handbook/mac/index.html b/handbook/mac/index.html deleted file mode 100644 index ff1dbb9..0000000 --- a/handbook/mac/index.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - Mac - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Installing Eve on Mac

- -

First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

- -
npm install
-npm start
-
- -

Then open http://localhost:8080/ in your browser.

- -

See also

- -

linux | windows | docker | npm | running

- - -
-
- -
- diff --git a/handbook/math/abs/index.html b/handbook/math/abs/index.html deleted file mode 100644 index 64c736a..0000000 --- a/handbook/math/abs/index.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - - - - - - abs - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

abs

- -

The absolute value of a number

- -

Syntax

-
y = abs[value]
-
- -

Attributes

- -
    -
  • value - a set of numbers
  • -
- -

Description

- -

y = abs[value] returns the absolute value of the elements in value. Every positive number is kept positive, but every negative number is made positive.

- -

Examples

- -

Get the absolute value of a number

-
search
-  y = abs[value: -3]
-  
-bind @browser
-  [#div text: y]
-
- -

Displays the number 3.

- -

See Also

- -

sign

- - -
-
- -
- diff --git a/handbook/math/ceil/index.html b/handbook/math/ceil/index.html deleted file mode 100644 index f7137c9..0000000 --- a/handbook/math/ceil/index.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - - - - - - ceiling - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

ceiling

- -

Round a number up to the nearest integer.

- -

Syntax

-
y = ceiling[value]
-
- -

Attributes

- -
    -
  • value - a set of numbers
  • -
- -

Description

- -

y = ceiling[value] rounds the elements of value up to the nearest integers.

- -

Examples

- -

Calculate the ceiling of 34.2

-
search
-  y = ceiling[value: 34.2]
-  
-bind @browser
-  [#div text: y]
-
- -

The result is 35.

- -

See Also

- -

floor | fix | round

- - -
-
- -
- diff --git a/handbook/math/cos/index.html b/handbook/math/cos/index.html deleted file mode 100644 index 256bc6a..0000000 --- a/handbook/math/cos/index.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - - - - - - - cos - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

cos

- -

Calculate the cosine of an angle

- -

Syntax

-
y = cos[radians]
-y = cos[degrees]
-
- -

Attributes

- -
    -
  • radians - the angle in radians
  • -
  • degrees - the angle in degrees
  • -
- -

Description

- -

y = cos[degrees] calculates the cosine of an input in degrees.

- -

y = cos[radians] calculates the cosine of an input in radians.

- -

cos operates element-wise on its inputs.

- -

Examples

- -

Calculate the cosine of 90 degrees

-
search
-  y = cos[degrees: 90]
-  
-bind @browser
-  [#div text: y]
-
- -

See Also

- -

sin | tan

- - -
-
- -
- diff --git a/handbook/math/fix/index.html b/handbook/math/fix/index.html deleted file mode 100644 index 23bcab8..0000000 --- a/handbook/math/fix/index.html +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - - - - - - fix - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

fix

- -

Round a number toward zero.

- -

Syntax

-
y = fix[value]
-
- -

Attributes

- -
    -
  • value - a set of numbers
  • -
- -

Description

- -

y = fix[value] rounds the elements of value toward zero. This means that negative numbers will be rounded up to the nearest integer, while positive numbers will be rounded down.

- -

Examples

- -

Calculate the fix of 34.7 and -34.7

-
search
-  y = fix[value: 34.7]
-  z = fix[value: -34.7]
-
-bind @browser
-  [#div text: "The fix of 34.7 is {{y}}"]
-  [#div text: "The fix of -34.7 is {{z}}"]
-
- -

We see that the fix of 34.7 is 34, while the fix of -34.7 is -34. Compare this to rounding the numbers:

-
search
-  y = round[value: 34.7]
-  z = round[value: -34.7]
-
-bind @browser
-  [#div text: "The round of 34.7 is {{y}}"]
-  [#div text: "The round of -34.7 is {{z}}"]
-
- -

We see that the round of 34.7 is 35, while the round of -34.7 is -35.

- -

See Also

- -

floor | ceil | round

- - -
-
- -
- diff --git a/handbook/math/floor/index.html b/handbook/math/floor/index.html deleted file mode 100644 index 0036b95..0000000 --- a/handbook/math/floor/index.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - - - - - - floor - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

floor

- -

Round a number down to the nearest integer.

- -

Syntax

-
y = floor[value]
-
- -

Attributes

- -
    -
  • value - a set of numbers
  • -
- -

Description

- -

y = floor[value] rounds the elements of value down to the nearest integers.

- -

Examples

- -

Calculate the floor of 34.2

-
search
-  y = floor[value: 34.2]
-
-bind @browser
-  [#div text: y]
-
- -

The result is 34.

- -

See Also

- -

ceil | fix | round

- - -
-
- -
- diff --git a/handbook/math/index.html b/handbook/math/index.html deleted file mode 100644 index f5a7037..0000000 --- a/handbook/math/index.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - - - - - Math - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Math

- -

Arithmetic

- -
    -
  • plus ( + ) - Add two numbers
  • -
  • minus ( - ) - Subtract two numbers
  • -
  • times ( * ) - Multiply two numbers
  • -
  • divide ( / ) - Divide two numbers
  • -
- -

General Math

- -
    -
  • abs - Absolute value
  • -
  • ceiling - Round a number up
  • -
  • floor - Round a number down
  • -
  • round - Round a number
  • -
  • fix - Calculate the fix of a number
  • -
  • mod - Modulo division
  • -
  • exp - The number e raised to a power
  • -
  • log - Calculate the logarithm of a number
  • -
- -

Trigonometric Functions

- -
    -
  • sin - Sine of an angle
  • -
  • cos - Cosine of an angle
  • -
  • tan - Tangent of an angle
  • -
  • asin - Arc sine of an angle
  • -
  • acos - Arc cosine of an angle
  • -
  • atan - Arc tangent of an angle
  • -
  • atan2 - Arc tangent using sign to determine quadrant
  • -
- -

Hyperbolic Functions

- -
    -
  • sinh - Hyperbolic sine of an angle
  • -
  • cosh - Hyperbolic cosine of an angle
  • -
  • tanh - Hyperbolic tangent of an angle
  • -
  • asinh - Hyperbolic arc sine of an angle
  • -
  • acosh - Hyperbolic arc cosine of an angle
  • -
  • atanh - Hyperbolic arc tangent of an angle
  • -
- -

Other Functions

- -
    -
  • range - Generates a range of numbers
  • -
- - -
-
- -
- diff --git a/handbook/math/mod/index.html b/handbook/math/mod/index.html deleted file mode 100644 index 1aaacd5..0000000 --- a/handbook/math/mod/index.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - - - - - - - mod - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

mod

- -

Return the modulus after division

- -

Syntax

-
y = mod[value, by]
-
- -

Attributes

- -
    -
  • value - the number to be divided
  • -
  • by - the number by which to divide value
  • -
- -

Description

- -

Modulo division calculates the modulus (the remainder) after dividing value by by. If value is a set of size N, then by can either be a scalar or another set of size N.

- -

Examples

- -

Keeps the value of an angle between the range [π, -π]:

-
search
-  value = 30
-  angle = mod[value, by: 2 * pi[]]
-  pi2pi = if angle > pi[] then angle - 2 * pi[]
-          if angle < pi[] * -1 then angle + 2 * pi[]
-          else angle
-        
-bind @view
-  [#value | value: "{{value}} -> {{pi2pi}}"]
-
- -

See Also

- -

ceil | floor | round

- - -
-
- -
- diff --git a/handbook/math/range/index.html b/handbook/math/range/index.html deleted file mode 100644 index 8264584..0000000 --- a/handbook/math/range/index.html +++ /dev/null @@ -1,434 +0,0 @@ - - - - - - - - - - - - range - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

range

- -

Generates a set of numbers between two values

- -

Syntax

-
y = range[from, to]
-y = range[from, to, increment]
-
- -

Attributes

- -
    -
  • from - the start of the range. Does not need to be an integer.
  • -
  • to - the end of the range. Does not need to be an integer.
  • -
  • increment - specifies the increment by which the elements are separated. By default, this value is 1.
  • -
- -

Description

- -

y = range[from, to] generates a set of numbers starting at from and ending at to, in increments of 1. The range generated includes from and to.

- -

y = range[from, to, increment] generates a set of numbers starting at from and ending at to inclusive, at a specified increment. The range generated will start at from and include as many elements as possible until the next element exceeds to. Depending on the chosen increment, this could potentially exclude to from the generated range.

- -

Examples

- -

Generate and display the integers between 1 and 10. In this example, y = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10):

-
search
-  y = range[from: 1, to: 10]
-
-bind @browser
-  [#div sort: y, text: y]
-
- -

Generate and display the odd integers between 1 and 10. In this example, y = (1, 3, 5, 7, 9). Notice the set does not include 10 in this case.

-
search
-  y = range[from: 1, to: 10, increment: 2]
-
-bind @browser
-  [#div sort: y, text: y]
-
- -

We can use range and Eve’s join semantics to generate indicies for a grid of cells.

-
search
-  i = range[from: 1 to: 5]
-  j = range[from: 1 to: 5]
-  coordinate = "({{i}}, {{j}})"
-
-bind @browser
-  [#div sort: coordinate, text: coordinate]
-
- -

Will display:

- -
(1, 1)
-(1, 2)
-(1, 3)
-...
-(5, 4)
-(5, 5)
-
- -

Example Usage

- - - -

See Also

- - -
-
- -
- diff --git a/handbook/math/round/index.html b/handbook/math/round/index.html deleted file mode 100644 index 57eae8e..0000000 --- a/handbook/math/round/index.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - - - - - - - round - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

round

- -

Round a number to the nearest integer

- -

Syntax

-
y = round[value]
-
- -

Attributes

- -
    -
  • value - a set of numbers
  • -
- -

Description

- -

y = round[value] rounds the elements of value toward the nearest integers.

- -
    -
  • For positive numbers - if the fractional part of the number is greater than or equal to 0.5, then the number is rounded up. Otherwise, it is rounded down.
  • -
  • For negative numbers - if the fractional part of the number is greater than or equal to -0.5, then the number is rounded down to the nearest negative integer. Otherwise, it is rounded up.
  • -
- -

Examples

-
search
-  y = round[value: 34.5]
-  z = round[value: 34.4]
-  
-bind @browser
-  [#div text: "The round of 34.5 is {{y}}"]
-  [#div text: "The round of 34.4 is {{z}}"]
-
- -

See Also

- -

floor | ceil | fix

- - -
-
- -
- diff --git a/handbook/math/sin/index.html b/handbook/math/sin/index.html deleted file mode 100644 index 76182aa..0000000 --- a/handbook/math/sin/index.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - - - - - - - sin - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

sin

- -

Calculate the sine of an angle

- -

Syntax

-
y = sin[radians]
-y = sin[degrees]
-
- -

Attributes

- -
    -
  • radians - the angle in radians
  • -
  • degrees - the angle in degrees
  • -
- -

Description

- -

y = sin[degrees] calculates the sine of an input in degrees.

- -

y = sin[radians] calculates the sine of an input in radians.

- -

sin operates element-wise on its inputs.

- -

Examples

-
search
-  y = sin[degrees: 90]
-  x = sin[radians: 3.14 / 2]
-  
-bind @browser
-  [#div text: y]
-  [#div text: x]
-
- -

See Also

- -

cos | tan

- - -
-
- -
- diff --git a/handbook/math/sum/index.html b/handbook/math/sum/index.html deleted file mode 100644 index 1899083..0000000 --- a/handbook/math/sum/index.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - - - - - - sum - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

sum

- -

Sum the elements in a set

- -

Syntax

-
y = sum[value, given]
-y = sum[value, given, per]
-
- -

Arguments

- -
    -
  • value - the variable or attribute to be summed
  • -
  • given - the record from which the value can be accessed
  • -
  • per - optional - specifies the set over which you are summing
  • -
- -

Description

- -

y = sum[value, given] returns the sum of elements in a set. The set must be entirely numeric or a runtime-error occurs.

- -

Examples

- -

Context data:

-
commit
-  [#employee salary: 100, department: "hunting"]
-  [#employee salary: 200, department: "hunting"]
-  [#employee salary: 300, department: "gathering"]
-
- -

Get sum of all matching records:

-
search
-  employee = [#employee salary department]
-  total-salary = sum[value:salary, given: employee]
-
-bind @browser
-  [#div text: "Total: {{ total-salary }}" ]
-
- -

Get sum of matching records grouped by department:

-
search
-  employee = [#employee salary department]
-  total-salary = sum[value:salary, given: employee, per: department]
-
-bind @browser
-  [#div text: "{{department}} : {{ total-salary }}" ]
-
- -

See Also

- -

count | aggregates

- - -
-
- -
- diff --git a/handbook/math/tan/index.html b/handbook/math/tan/index.html deleted file mode 100644 index 91b8108..0000000 --- a/handbook/math/tan/index.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - tan - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

tan

- -

Calculate the tangent of an angle

- -

Syntax

-
y = tan[radians]
-y = tan[degrees]
-
- -

Attributes

- -
    -
  • radians - the angle in radians
  • -
  • degrees - the angle in degrees
  • -
- -

Description

- -

y = tan[degrees] calculates the tangent of an input in degrees.

- -

y = tan[radians] calculates the tangent of an input in radians.

- -

tan operates element-wise on its inputs.

- -

Examples

-
match
-  y = tan[degrees: 90]
-bind @browser
-  [#div text: y]
-
- -

See Also

- -

cos | sin

- - -
-
- -
- diff --git a/handbook/merge/index.html b/handbook/merge/index.html deleted file mode 100644 index e8288b0..0000000 --- a/handbook/merge/index.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - Merge <- - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Merge Operator

- -

Merges one record into another

- -

Syntax

-
record <- [attribute: value, ... ]
-
- -

Description

- -

record <- [attribute: value, ... ] merges the anonymous record [attribute: value, ... ] into the record bound to record. Merge is useful for setting multiple attributes on a record at once.

- -

Examples

- -

Search for a record and merge another record into it.

-
search
-  celia = [#Celia]
-
-bind
-  celia <- [#student grade: 10, school: "East"]
-
- -

See Also

- -

set operator | add operator | remove operator | action phase

- - -
-
- -
- diff --git a/handbook/model/index.html b/handbook/model/index.html deleted file mode 100644 index 37ab16c..0000000 --- a/handbook/model/index.html +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - - - - - - - Programming Model - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Programming Model

- -

At its core, Eve only responds to two commands:

- -
    -
  1. What facts do you know about this “record”?
  2. -
  3. Remember a new fact about this “record”.
  4. -
- -

Communication with Eve happens through “records”, which are key-value pairs attached to a unique ID.

- -

Computation occurs as a result of relationships between records. For example, I might model myself as a record with an age and a birth-year. There might also be a record representing the current-year. Then I could compute my age as my birth-year subtracted from the current-year.

- -

A key concept here is that age is a derived fact, supported by two other facts: birth-year and current-year. If either of those supporting facts are removed from Eve, then age can no longer be computed. For intuition, think about modeling this calculation in a spreadsheet using three cells.

- -

One last thing to note about control flow is that we have no concept of a loop in Eve. Recursion is one way to recover looping, but set semantics and aggregates often removes the need for recursion. In Eve, every value is actually a set. With operators defined over sets (think map()) and aggregation (think reduce()) we can actually do away with most cases where we would be tempted to use a loop.

- -

See also

- -

blocks | literate programming | sets | records

- - -
-
- -
- diff --git a/handbook/not/index.html b/handbook/not/index.html deleted file mode 100644 index 24ab2d6..0000000 --- a/handbook/not/index.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - not - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

not

- -

excludes records from the results

- -

Syntax

-
not([ ... ])
-
- -

Description

- -

Not is an anti-join operator, which takes a body of records. For example, we can get a list of people who are not invited to the party:

-
// friends not invited to the party
-search
-  friends = [#friend]
-  not(friends = [#invited])
-
-bind @view
-  [#value | value: "{{friends.name}} wasn't invited to the party"]
-
- -

Examples

- -

See Also

- -

is | records | match

- - -
-
- -
- diff --git a/handbook/npm/index.html b/handbook/npm/index.html deleted file mode 100644 index a00951a..0000000 --- a/handbook/npm/index.html +++ /dev/null @@ -1,378 +0,0 @@ - - - - - - - - - - - - npm - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Eve on npm

- -

A package for Eve is available on npm. After installing npm for your platform, you can download our package with the following command:

- -
npm install -g witheve
-
- -

This will give you a global Eve installation that you can invoke with the command eve from any folder. Doing so will launch an Eve server at http://localhost:8080.

- -

See also

- -

linux | mac | windows | docker | running

- - -
-
- -
- diff --git a/handbook/programs/index.html b/handbook/programs/index.html deleted file mode 100644 index f5cb9e2..0000000 --- a/handbook/programs/index.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - - - - - - - - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- - -
- diff --git a/handbook/records/index.html b/handbook/records/index.html deleted file mode 100644 index 0d46612..0000000 --- a/handbook/records/index.html +++ /dev/null @@ -1,460 +0,0 @@ - - - - - - - - - - - - Records - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Records

- -

Records are attribute: value pairs associated to a unique ID

- -

Syntax

-
// A record with an attribute
-[attribute]
-
-// A record with an attribute of given value
-[attribute: value]
-
-// A record with N attributes of given values
-[attribute1: value1, ... , attributeN: valueN]
-
-// A record nested within another record
-[attribute1: [attribute2: value]]
-
-// Equates a record and a variable
-r = [attribute ...]
-
-// Accessing an attribute on a record
-r.attribute
-
-// Join two records
-[attribute1: attribute2]
-[attribute2]
-
- -

Description

- -

Records are the predominant datatype in Eve. Records are used in two ways:

- -
    -
  1. In a search you supply a pattern of attributes to match records in a supplied database.
  2. -
  3. In a bind or commit, you supply a pattern of attributes to insert into a database.
  4. -
- -

[attribute] matches all records with the given attribute.

- -

[attribute: value] matches all records with the given attribute bound to specified value.

- -

[attribute > value] matches all records with the given attribute bound filtered on a value. The inequality > can be one of the inequality operators.

- -

[attribute1: value1, ... , attributeN: valueN] is the general case for records. This matches all records with all of the given attributes filtered on the given values.

- -

[attribute1: [attribute2: value]] nests a record within another record.

- -

r = [attribute ...] equates a record to a variable r.

- -

r.attribute accesses the value of attribute on variable r.

- -

Examples

- -

Match all records with a name, and bind a #div for each one.

-
search
-  [name]
-
-bind @browser
-  [#div text: name]
-
- -

Records can have multiple attributes

-
search
-  [#student name grade school]
-  
-bind @browser
-  [#div text: "{{name}} is in {{grade}}th grade at {{school}}"]
-
- -

Join records by binding attributes from one record into another record. Equate records with variables. Access record attributes using dot notation.

-
search
-  school = [#school name address]
-  student = [#student school: name]
-
-bind @browser
-  [#div text: "{{student.name}} attends {{school.name}} at {{address}}"]
-
- -

Records can be nested.

-
commit
-  [name: "Jeremy" spouse: [name: "Wendy"]]
-
- -

Dot notation can be composed for deep access to records

-
search
-  Jeremy = [name: "Jeremy"]
-
-bind @browser
-  [#div text: "{{Jeremy.name}} is married to {{Jeremy.spouse.name}}"]
-
- -

See Also

- -

search | bind | commit | tags | databases | equality | inequality | joins

- - -
-
- -
- diff --git a/handbook/remove/index.html b/handbook/remove/index.html deleted file mode 100644 index f414dbe..0000000 --- a/handbook/remove/index.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - - - - - - - Remove: -= - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- - -
- diff --git a/handbook/running/index.html b/handbook/running/index.html deleted file mode 100644 index 0ef1efa..0000000 --- a/handbook/running/index.html +++ /dev/null @@ -1,425 +0,0 @@ - - - - - - - - - - - - Running Eve - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Running Eve

- -

If you’ve downloaded and installed Eve via npm, you can launch Eve with the eve command.

- -
eve
-
- -

This launches an Eve server running in the Eve root directory at http://localhost:8080. From here, you’ll be directed to quickstart.eve, and have access to the Eve examples directory from within the editor.

- -

Running an Eve File

- -

If you want to run a specific Eve program, you can provide its path after the eve command:

- -
eve ~/myDir/myEveFile.eve
-
- -

Then you navigate to Eve in your browser to access the specified program. If you like, you can also recover the editor with a flag:

- -
eve ~/myEveDir/myEveFile.eve --editor
-
- -

This will run the supplied Eve program with the editor visible

- -

Running Eve in Server mode

- -

Eve can be started in server mode using the --server flag:

- -
eve --server
-
- -

Without this flag, execution of Eve programs happens within the browser, with the Eve server acting only as a file server between the browser and your local system. In server mode, Eve will instead execute your program on the server. Currently written programs will operate exactly as before, but this is a preliminary step in order to get networked Eve applications going (like a chat server or a multiplayer game). There is still work needed to be done there

- -

Eve Workspaces

- -

You can run Eve in a custom workspace. To create a new Eve workspace, create a folder with an empty file named package.json, then start Eve from within this folder. Eve recognizes that it is starting an Eve workspace, and will serve *.eve files from within this directory instead of the Eve examples folder. Furthermore, you can serve various assets, like images or CSS, by placing them in an “assets” sub-folder.

- -

Flags

- -
    -
  • server - run Eve in server execution mode.
  • -
  • editor - run Eve with the editor visible. This defaults to false, except when Eve is started in an Eve project folder.
  • -
  • port - specify the port on which to run the Eve server. Alternatively, the running port can be specified with the PORT environment variable, which takes precedence over the port flag.
  • -
- -

Running Eve from Source

- -

To run Eve from source, you invoke the following command in the extracted Eve folder:

- -
npm start
-
- -

You can apply the above flags to this command, but you’ll need an extra -- to do so. e.g.

- -
npm start -- --port 1234
-
- -

See Also

- -

linux | mac | windows | docker | npm

- - -
-
- -
- diff --git a/handbook/search/index.html b/handbook/search/index.html deleted file mode 100644 index 3d02e23..0000000 --- a/handbook/search/index.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - search - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

search

- -

signifies the beginning of the search phase

- -

Syntax

-
search
-
-search @database1, ..., @databaseN
-
- -

Description

- -

search signifies the beginning of the search phase of a block. By default, searched records are drawn from a default local database.

- -

search @database1, ... @databaseN draws searched records from one or more databases.

- -

Examples

- -

search a record

-
search
-  [name]
-  
-bind
-  [#div text: name]  
-
- -

Omit the search phase

-
bind
-  [#div text: "Hello, world"]
-
- -

See Also

- -

bind | commit | databases | records

- - -
-
- -
- diff --git a/handbook/session/index.html b/handbook/session/index.html deleted file mode 100644 index 6c263f5..0000000 --- a/handbook/session/index.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - - - - - - - @session - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

@session

- - -
-
- -
- diff --git a/handbook/set/index.html b/handbook/set/index.html deleted file mode 100644 index c19e024..0000000 --- a/handbook/set/index.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - - - - - - - Set: := - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Set Operator

- -

Sets the value of an attribute on a record

- -

Syntax

-
// Set attribute to value
-record.attribute := value
-
-// Remove attribute
-record.attribute := none
-
- -

Description

- -

record.attribute := value sets attribute to value. If record already has an attribute with a value, then this will overwrite it. Otherwise, if record doesn’t have an attribute with this name already, then := will create the attribute and set it to value.

- -

attribute can be an attribute already on the record, or it can be a new attribute.

- -

value can be a string or number literal, a record, or a variable bound to one of these.

- -

record.attribute := none sets the value of attribute to the special value none, which is the empty set (a set with no elements).

- -

Examples

- -

Set the age of #students that don’t already have an age.

-
search
-  student = [#student]
-  age = if student.age then student.age
-        else if student.grade then student.grade + 6
-        
-bind
-  student.age := age
-
- -

See Also

- -

add operator | remove operator | merge operator

- - -
-
- -
- diff --git a/handbook/sets/index.html b/handbook/sets/index.html deleted file mode 100644 index e826aba..0000000 --- a/handbook/sets/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - - - - - - Sets - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Set Semantics

- -

Expressions and actions in Eve work over sets.

- -

Description

- -

Sets are unordered collections where every element of the collection is unique. For example, ("a", "b", "c") is a set, while ("a", "a", "b", "c") is not. Furthermoer, ("a", "b", "c") and ("c", "b", "a") are equivalent sets, even though the order of elements is different.

- -

Examples

- -
(1, 2, 3, 4) // Every element is unique           
-(1, 2, 3, 1) // One is repeated twice, so this is not a set
-(4, 3, 2, 1) // This set is the same as the first, despite the order of elements
-("Steve", 1, (1, 2)) // Elements can be nonhomogeneous, as long as each one is unique
-(("a", 1), ("a", 2), ("a", 3)) // Sets within sets can be used to repeat values
-
- -

Set Example in Eve

-
commit
-  [#point x: 5, y: 4]
-  [#point x: 3, y: 7]
-  [#point x: 1, y: 2]
-
- -

We can calculate the distance from each of these points to every other point:

-
search
-  p1 = [#point x: x1, y: y1]
-  p2 = [#point x: x2, y: y2]
-  dx = x1 - x2 
-  dy = y1 - y2
-  
-bind @browser
- [#div sort: x1, text: "({{x1}}, {{y1}}) - ({{x2}}, {{y2}}) = ({{dx}}, {{dy}})"]
-
- -

In imperative languages, you would need a nested loop to cover all of the combinations. In Eve, functions (and infix operators like +, which are just sugar for a function) operate over sets, so this loop is implicitly handled by Eve.

- -

See Also

- -

programming model | functions | aggregates | cartesian product

- - -
-
- -
- diff --git a/handbook/standard-library/index.html b/handbook/standard-library/index.html deleted file mode 100644 index b09e933..0000000 --- a/handbook/standard-library/index.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - Standard Library - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Standard Library

- -

The Eve standard library of functions is globally available, meaning you don’t have to reference a specific database to use these functions.

- -

Description

- -
    -
  • general - General functions
  • -
  • math - General mathematical and trigonometric functions
  • -
  • strings - Functions that manipulate strings
  • -
  • statistics - Functions that calculate statistical measures on values
  • -
  • date & time - Functions that get and manipulate date and time
  • -
- - -
-
- -
- diff --git a/handbook/statistics/count/index.html b/handbook/statistics/count/index.html deleted file mode 100644 index f274079..0000000 --- a/handbook/statistics/count/index.html +++ /dev/null @@ -1,450 +0,0 @@ - - - - - - - - - - - - count - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

count

- -

Returns the number of elements in a set

- -

Syntax

-
y = count[given]
-y = count[given, per]
-
- -

Attributes

- -
    -
  • given - the set to count over
  • -
  • per - optional - one or more attributes by which to group given.
  • -
- -

Description

- -

y = count[given] counts the number of elements in given.

- -

y = count[given, per] counts the number of elements in given, grouped by the attribute(s) provided in per. For instance, class-size = count[given: students, per: grade] would count the number of students in each grade. You can group along multiple axes; the previous example could be extended to work across multiple schools by doing class-size = count[given: students, per: (grade, school)]. See the examples section to see these in action.

- -

Examples

- -

Before we get to the count examples, let’s add some students. Each #student has a grade and a school. Grades are one of 10, 11, or 12. Schools are one of “West” and “East”.

-
commit
-  [#student name: "Diedra" grade: 10 school: "West"]
-  [#student name: "Celia" grade: 10 school: "West"]
-  [#student name: "Michaela" grade: 11 school: "West"]
-  [#student name: "Jermaine" grade: 11 school: "West"]
-  [#student name: "Issac" grade: 12 school: "West"]
-  [#student name: "Jamar" grade: 12 school: "West"]
-  [#student name: "Yee" grade: 10 school: "East"]
-  [#student name: "Johanne" grade: 10 school: "East"]
-  [#student name: "Mertie" grade: 10 school: "East"]
-  [#student name: "Elmira" grade: 11 school: "East"]
-
- -

First let’s count the total number of students in the school district.

-
search
-  students = [#student]
-  enrollment = count[given: students]
-
-bind @view
-  [#value | value: "There are {{enrollment}} students in the district"]
-
- -

Now let’s count the number of students in each school.

-
search
-  students = [#student school]
-  school-enrollment = count[given: students, per: school]
-
-bind @view
-  [#value | value: "{{school-enrollment}} attend {{school}}"]
-
- -

We could have similarly counted the number of students in each grade across the district.

-
search
-  students = [#student grade]
-  grade-enrollment = count[given: students, per: grade]
-
-bind @view
-  [#value | value: "{{grade-enrollment}} students are in {{grade}}th grade"]
-
- -

Finally, we can count the number of students per grade, per school.

-
search
-  students = [#student grade school]
-  grade-school-enrollment = count[given: students, per: (grade, school)]
-
-bind @view
-  [#value | value: "{{grade-school-enrollment}} students are in {{grade}}th grade at {{school}}"]
-
- -

Example Usage

- - - -

See Also

- -

sum | aggregates

- - -
-
- -
- diff --git a/handbook/statistics/index.html b/handbook/statistics/index.html deleted file mode 100644 index c86d361..0000000 --- a/handbook/statistics/index.html +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - - - - - - Statistics - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Statistics

- -
    -
  • count - counts the number of elements in a set
  • -
- -

Random Functions

- -
    -
  • random - Generates a random number between 0 and 1
  • -
- - -
-
- -
- diff --git a/handbook/statistics/random/index.html b/handbook/statistics/random/index.html deleted file mode 100644 index b804bfc..0000000 --- a/handbook/statistics/random/index.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - - - - - - - random - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

random

- -

Generates a random number between 0 and 1

- -

Syntax

-
y = random[seed]
-
- -

Attributes

- -
    -
  • seed - initializes the random number generator. The seed itself does not need to be random.
  • -
- -

Description

- -

y = random[seed] generates a pseudorandom number drawn from the standard uniform distribution, meaning the generated number is restricted to be between 0 and 1. To generate a number between a custom range, see the examples.

- -

Examples

- -

Prints a random number every second. The time attribute in #div is used to make each generated number unique for display purposes.

-
search 
-  [#time minutes seconds]
-  x = random[seed: seconds]
-
-commit @browser
-  [#div time: "{{minutes}}{{seconds}}"  text: x]
-
- -

Generate a random number between min and max

-
search
-  min = 5
-  max = 10
-  x = random[seed: 1] * (max - min) + min
-
-bind @browser
-  [#div text: x]
-
- -

Generate 10 random numbers

-
search
-  i = range[from: 1, to: 10]
-  x = random[seed: i]
-
-bind @browser
-  [#div text: x]
-
- -

Example Usage

- - - -

See Also

- -

[gaussian][../gaussian]

- - -
-
- -
- diff --git a/handbook/string-interpolation/index.html b/handbook/string-interpolation/index.html deleted file mode 100644 index 12a5251..0000000 --- a/handbook/string-interpolation/index.html +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - String Interpolation - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

String Interpolation

- -

injects the value of an attribute or variable into a string

- -

Syntax

-
"{{ variable }}"
-
- -

Description

- -

"{{ variable }}" embeds the value of variable within a string. Variable should be an attribute on a record or the result of an expression.

- -

String interpolation works element-wise on its input. This means the string will be repeated for every unique value in variable.

- -

Multiple variables can be interpolated into strings. If the variables have no relation to each other (i.e. they are not joined or part of the same record), then string interpolation is applied to the cartesian product of the sets.

- -

Examples

- -

Display student name, grade and school:

-
search
-  [#student name grade school]
-
-bind @browser
-  [#div text: "{{name}} is a {{grade}}th grade student at {{school}}."]
-
- -

Use string interpolation to display pairs of numbers:

-
search 
-  i = range[from: 1, to: 10]
-  j = range[from: 1, to: 10]
-
-bind @browser
-  [#div text: "({{ i }}, {{ j }})"]
-
- -

See Also

- -

strings | expressions

- - -
-
- -
- diff --git a/handbook/strings/index.html b/handbook/strings/index.html deleted file mode 100644 index a2ed920..0000000 --- a/handbook/strings/index.html +++ /dev/null @@ -1,372 +0,0 @@ - - - - - - - - - - - - Strings - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Strings

- -
    -
  • split - split a string into tokens
  • -
  • join - join tokens into a string
  • -
- - -
-
- -
- diff --git a/handbook/strings/join/index.html b/handbook/strings/join/index.html deleted file mode 100644 index c1590cd..0000000 --- a/handbook/strings/join/index.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - - - - - - join - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

join

- -

Joins a set of strings into a single string

- -

Syntax

-
text = join[token, given, index, with]
-
- -

Attributes

- -
    -
  • token - set of strings to be joined
  • -
  • given - establishes the set being joined. If tokens are not unique, you can add attributes here that will make them unique. Must at least provide token as part of the given set, or only the first one will be returned.
  • -
  • index - indicates where each token is ordered in text.
  • -
  • with - inserted between every element in token.
  • -
- -

Description

- -

text = join[token, index, given, with] takes tokens together using with in an order specified by index. Returns the joined string.

- -

Examples

- -

Split a sentence into tokens, and join the tokens into a sentence again

-
search
-  // Split the sentence into words
-  (token, index) = split[text: "the quick brown fox", by: " "]
-
-  // Join the words back into a sentence, but with hyphens instead of spaces
-  text = join[token given: token, index with: "-"]
-
-bind @view
-  [#value | value: text] // Expected "the-quick-brown-fox"
-
- -
- -

Since join is an aggregate, set semantics play an important part here; if we don’t specify what makes each token unique, then the results can be surprising. The following example will demonstrate this.

- -

Let’s split the phrase “hello world” into letters:

-
search
-  //token = (h, e, l, l, o, w, o, r, l, d)
-  (token, index) = split[text: "hello world", by: ""]
-
-bind
-  [#phrase token index]
-
-bind @view
-  [#value | value: token]
-
- -

Let’s join this phrase back together. Like last time, we’ll join with a -. Notice that some tokens (“l” and “o”) should appear multiple times in the phrase. To correctly join them, we add index as part of the given set:

-
search
-  [#phrase token index]
-  // given = (("h", 1), ("e", 2), ("l", 3), ("l", 4) ... ("l", 10), ("d", 11)) 
-  // without including index, the result is "h-e-l-o- -w-r-d". Try it and see!
-  text = join[token given: (token, index) index with: "-"]
-
-bind @view
-  [#value | value: text]
-
- -

The result expected result is “h-e-l-l-o- -w-o-r-l-d”.

- -

See Also

- -

split

- - -
-
- -
- diff --git a/handbook/strings/split/index.html b/handbook/strings/split/index.html deleted file mode 100644 index 7961ca7..0000000 --- a/handbook/strings/split/index.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - - - - - - split - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

split

- -

splits a string at the given delimiter

- -

Syntax

-
(token, index) = split[text, by]
-
- -

Attributes

- -
    -
  • text - the text to be split
  • -
  • by - the delimiter at which to split the text. An empty string will split the text at every character.
  • -
  • token - the recovered tokens after the split
  • -
  • index - the indices of the tokens in the original text
  • -
- -

Description

- -

(token, index) = split[text, by] splits a text into tokens according to the given delimiter, by. Returns token and index of those tokens in the original string.

- -

Examples

- -

Splits a string at every character

-
search
-  (token, index) = split[text: "hello, world", by: ""]
-  
-bind @browser
-  [#div text: "{{token}} {{index}}"]
-
- -

Split a sentence into words and display them in order

-
search
-  (token, index) = split[text: "the quick brown fox", by: " "]
-  
-bind @browser
-  [#div sort: index, text: token]
-
- -

See Also

- -

concat | join | char-at | find | length | replace

- - -
-
- -
- diff --git a/handbook/tags/index.html b/handbook/tags/index.html deleted file mode 100644 index 4b5c340..0000000 --- a/handbook/tags/index.html +++ /dev/null @@ -1,424 +0,0 @@ - - - - - - - - - - - - Tags - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Tag Selector

- -

The tag selector is a shortcut for the tag attribute on records

- -

Syntax

-
#tag
-
-#"tag with spaces"
-
- -

Description

- -

The tag selector # is a shortcut for the tag attribute, e.g. [#person] is a shortcut for [tag: "person"].

- -

The tag selector is useful for selecting a group of similar records.

- -

Tags are useful for making a record unique. For instance, in a single database, many disparate records might have an age attribute. e.g. [age] might select unrelated records if you’re only interested in ages of employees. A more specific record would be [#employee age], which would match only records that are both tagged “employee” and have an age attribute.

- -

Multiple tags can be used to further specify a record. For instance:

-
[#employee wage]
-[#employee #part-time wage]
-
- -

The first record matches all #employees, while the second matches only those who are also #part-time. Any number of tags can be used in this way.

- -

Tips

- -

Tags are useful for creating switches. Add a tag to a record to include it in a set. Then, when you don’t want that record in the set anymore, just remove the tag. The record will no longer match the set.

- -

Examples

- -

Search for students and display their names and the grade they’re in.

-
search
-  [#student name grade]
-
-bind @browser
-  [#div text: "{{name}} is in {{grade}}th grade."]
-
- -

Add students with good marks to the honor roll. When a student’s GPA falls below 3.5, he or she will not make the honor roll because this block will not add the #honor-roll tag.

-
search
-  students = [#student gpa >= 3.5]
-
-bind
-  students += #honor-roll
-
- -

Display the honor roll

-
search
-  [#student #honor-roll name]
-
-bind @browser
-  [#div text: "{{name}} is a smarty pants"]
-
- -

See Also

- -

records | search | sets

- - -
-
- -
- diff --git a/handbook/update-operators/index.html b/handbook/update-operators/index.html deleted file mode 100644 index f54a384..0000000 --- a/handbook/update-operators/index.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - Update Operators - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Update Operators

- -

Update operates are used to modify records

- -

Syntax

-
// Add operator
-record.attribute += value
-
-// Remove operator
-record.attribute -= value
-
-// Set operator
-record.attribute := value
-
-// Merge operator
-record <- [ ... ]
-
- -

Description

- -

Examples

- -

See Also

- -

add | remove | set | merge | bind | commit

- - -
-
- -
- diff --git a/handbook/view/index.html b/handbook/view/index.html deleted file mode 100644 index 069b6f9..0000000 --- a/handbook/view/index.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - - - - - - - @view - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

@view

- - -
-
- -
- diff --git a/handbook/windows/index.html b/handbook/windows/index.html deleted file mode 100644 index bc0b04b..0000000 --- a/handbook/windows/index.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - Windows - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Installing Eve on Windows

- -

First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

- -
npm install
-npm start
-
- -

Then open http://localhost:8080/ in your browser.

- -

See also

- -

linux | mac | docker | npm | running

- - -
-
- -
- diff --git a/images/eve.svg b/images/eve.svg new file mode 100644 index 0000000..7bf5127 --- /dev/null +++ b/images/eve.svg @@ -0,0 +1 @@ +Asset 1 \ No newline at end of file diff --git a/index.html b/index.html index f506c17..aaede10 100644 --- a/index.html +++ b/index.html @@ -9,8 +9,8 @@ - Eve Documentation - + Eve Documentation - Eve Documentation + @@ -67,31 +67,38 @@ - - - - -
-
+ +
+
+ +
+ +
-
- +
+ +
+
- -
\ No newline at end of file + + + + + + diff --git a/index.xml b/index.xml index e12f38c..03c599f 100644 --- a/index.xml +++ b/index.xml @@ -2,848 +2,201 @@ Eve Documentation - http://docs.witheve.com/ + http://docs.witheve.com/index.xml Recent content on Eve Documentation Hugo -- gohugo.io en-us - - http://docs.witheve.com/README/ + Getting Eve + http://docs.witheve.com/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/README/ - - -<p align="center"> - <img src="http://www.witheve.com/logo.png" alt="Eve logo" width="10%" /> -</p> - -<hr /> - -<h1 id="documentation-for-the-eve-programming-language">Documentation for the Eve programming language.</h1> - -<p>You can learn more about Eve here: <a href="http://witheve.com/">http://witheve.com/</a></p> - -<p>You can play with Eve here: <a href="http://play.witheve.com">http://play.witheve.com</a></p> - -<p>Eve is under active development here: <a href="https://github.com/witheve/Eve">https://github.com/witheve/Eve</a></p> - -<h2 id="contributing">Contributing</h2> - -<p>There&rsquo;s a lot of work to be done on the documentation, so this is a great place for beginners to get started with Eve. From fixing typos to adding examples, work needs to be done across the board here. Check out the <a href="https://github.com/witheve/docs/issues">issues</a> for a place to start, as they have been raised already as points of improvement by the community. If someone is already assigned and the issue has been aroud a while, check to see if it&rsquo;s being worked on before starting it yourself. Or, if you find an issue yourself, please report it so others know it exists. Thank you!</p> + http://docs.witheve.com/handbook/ + <p>Test</p> - - http://docs.witheve.com/handbook/core/ + Quickstart + http://docs.witheve.com/tutorials/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/core/ + http://docs.witheve.com/tutorials/quickstart.eve/ -<h1 id="core-language">Core Language</h1> +<h1 id="quickstart">Quickstart</h1> -<h2 id="see-also">See Also</h2> +<p>In this guide we&rsquo;re going to give you a 5 minute introduction to the essential concepts in Eve. If you&rsquo;ve never used Eve before, you&rsquo;re in the right place.</p> -<p><a href="../records">records</a> | <a href="../equivalence">equivalence</a> | <a href="../actions">actions</a> | <a href="../expressions">expressions</a> | <a href="../update-operators">update operators</a> | <a href="../databases">databases</a></p> - - - - - - http://docs.witheve.com/handbook/databases/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/databases/ - +<h2 id="adding-records-to-eve">Adding records to Eve</h2> -<h1 id="databases">Databases</h1> +<p>Eve represents data as records, which are key value pairs attached to a unique ID. Eve programs are made up of small composable blocks that search for and create records. Let&rsquo;s start with a block that adds a record to Eve:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">greeting</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;hello world&quot;</span><span class="p">]</span> +</code></pre></div> -<p>Databases contain records</p> +<p>This record is tagged <code>#greeting</code>, and has an attribute &ldquo;text&rdquo; with the value &ldquo;hello world&rdquo;. Although tags have a special syntax, they are attributes like any other. We encourage you to classify groups of related records with tags.</p> -<h2 id="syntax">Syntax</h2> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// search action</span><span class="w"></span> -<span class="kr">search</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> +<h2 id="finding-records-in-eve">Finding records in Eve</h2> -<span class="c1">// Commit action</span><span class="w"></span> -<span class="kr">commit</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> +<p>Eve finds every record that matches the supplied patterns, then binds new records to them. If no records match the search, then the block does not run at all. A block will only run if every pattern in a search matches at least one record. Let&rsquo;s search for the <code>#greeting</code> we just committed, and then display it in a text container:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="p">[</span><span class="err">#</span><span class="nv">greeting</span> <span class="nv">text</span><span class="p">]</span> -<span class="c1">// Bind action</span><span class="w"></span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="p">]</span> </code></pre></div> -<h2 id="description">Description</h2> +<p>Variables with the same name are equivalent within a block; because they have the same name, the <code>text</code> in <code>[#greeting text]</code> and <code>[#ui/text text]</code> are equivalent. Go ahead and add another <code>#greeting</code> record to the first block to see what happens when more than one record matches the search.</p> -<p><code>&lt;action&gt; @database</code> performs the given action, one of <code>search</code>, <code>bind</code>, or <code>commit</code>, on the union of the provided databases.</p> +<h2 id="records-update-as-data-changes">Records update as data changes</h2> -<p>If no database is provided with an action, then that action is performed on the default <code>@session</code> database.</p> +<p>Blocks in Eve react automatically to changes in data. When a record changes, any bound records are automatically updated. Let&rsquo;s search for the current time, and display it in a div:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="p">[</span><span class="err">#</span><span class="nv">time</span> <span class="nv">seconds</span><span class="p">]</span> -<h2 id="creating-and-searching-databases">Creating and Searching Databases</h2> - -<p>You can create databases on-demand by simply committing a record to one. e.g.</p> +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="nf">:</span> <span class="nv">seconds</span><span class="p">]</span> +</code></pre></div> -<pre><code>commit @my-database - [#my-record] -</code></pre> +<p>As the time changes, the output updates to reflect the current state of the <code>#time</code> record. Records can be committed instead of bound, but the behavior is a little different &ndash; committed records persist until they are removed explicitly. Try changing <code>bind</code> to <code>commit</code> in the above block and see what happens.</p> -<p>This block will create a new database called &ldquo;my-database&rdquo;, which will contain the newly committed record. You can now search for this record in your new database:</p> +<h2 id="reacting-to-events">Reacting to events</h2> -<pre><code>search @my-database - [#my-record] +<p>Let&rsquo;s draw a button on the screen:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">button</span> <span class="err">#</span><span class="nv">increment</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;+1&quot;</span><span class="p">]</span> +</code></pre></div> -bind @browser - [#div text: &quot;Found a record!&quot;] -</code></pre> +<p>When you click anywhere on the screen, Eve creates an <code>#html/event/click</code> record representing the click. You can react to clicks on the <code>#increment</code> button by searching for the <code>#html/event/click</code> record, where the element attribute is the button:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="nv">event</span> <span class="nf">=</span> <span class="p">[</span><span class="err">#</span><span class="nv">html</span><span class="nf">/</span><span class="nv">event</span><span class="nf">/</span><span class="nv">click</span> <span class="nv">element</span><span class="nf">:</span> <span class="p">[</span><span class="err">#</span><span class="nv">increment</span><span class="p">]]</span> -<h2 id="special-databases">Special Databases</h2> +<span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">clicked</span> <span class="nv">event</span><span class="p">]</span> +</code></pre></div> -<p>Eve has some built-in databases that have meaning to the runtime.</p> +<p>Clicks only last for an instant, but we want to create a permanent record of each click so we can search for them later. This block commits a <code>#clicked</code> record that will persist until it&rsquo;s explicitly removed. Much like the <code>#greeting</code> text we bound to the <code>#ui</code>, variables with the same name are equivalent, so the variable <code>event</code> in the <code>#clicked</code> record is a reference to the <code>#html/event/click</code> on the <code>#increment</code> button.</p> -<ul> -<li><a href="../session">@session</a> - the default database when no database is specified with an action.</li> -<li><a href="../view">@view</a> - records committed to <code>@view</code> are used to visualize data.</li> -<li><a href="../event">@event</a> - contains events originating from the DOM</li> -<li><a href="../browser">@browser</a> - Eve clients running in the browser render applicable records in this <code>@browser</code> as HTML elements.</li> -<li><a href="../http">@http</a> - Stores records representing HTTP requests and responses</li> -</ul> +<p>The identity of a record is determined by its attribute/value pairs. Two records with the same attributes and values are identical in Eve. We included the <code>event</code> attribute in the <code>#clicked</code> record to differentiate each record. Without this differentiation, we could only ever create a single <code>#clicked</code> record. Try removing <code>event</code> from the record and click the button to test this out.</p> -<h2 id="examples">Examples</h2> +<h2 id="count-the-number-of-clicks">Count the number of clicks</h2> -<p>Display the element that was clicked in the DOM</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@event</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#click</span><span class="w"> </span><span class="nt">#direct-target</span><span class="w"> </span><span class="x">element</span><span class="p">]</span><span class="w"></span> +<p>Now let&rsquo;s count the number of times the button has been clicked. Make sure <code>event</code> is back in <code>#clicked</code>, and then we can count those records directly:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="nv">how</span><span class="nf">-</span><span class="nv">many</span> <span class="nf">=</span> <span class="nv">gather</span><span class="nf">/</span><span class="nv">count</span><span class="p">[</span><span class="nv">for</span><span class="nf">:</span> <span class="p">[</span><span class="err">#</span><span class="nv">clicked</span><span class="p">]]</span> -<span class="kr">commit</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{element}} was clicked.&quot;</span><span class="p">]</span><span class="w"></span> +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;The button has been clicked {{how-many}} times&quot;</span><span class="p">]</span> </code></pre></div> -<p>Commit some data in <code>@session</code>, and then display it on a button click.</p> +<p>This block searches for every unique <code>#clicked</code>, counts them, and returns that value in <code>how-many</code>. Then we display this value in a text container using the operator <code>{{ ... }}</code>, which inserts the value of the contained variable into the string. An important thing to remember here is that this block will only run when the button has been clicked at least once. Before then, this block will not run because there are no <code>#clicked</code> records to count.</p> -<pre><code>commit - [#for-display text: &quot;Hello&quot;] -</code></pre> +<h2 id="summary">Summary</h2> -<p>We are searching over three databases to complete this block.</p> +<p>That&rsquo;s it for the 5 minute introduction to Eve. To summarize:</p> <ul> -<li>the <code>#click</code> is in <code>@event</code></li> -<li>the <code>#button</code> is in <code>@browser</code></li> -<li>the text for display is in <code>@session</code>. This needs to be made explicit; since we are searching in other databases, <code>@session</code> is not searched implicitly.</li> +<li>Eve programs are made up of blocks.</li> +<li>Data are represented by records, key value pairs associated to a unique ID.</li> +<li>There are two sections of a block: one where you search for records, and one where you bind or commit records.</li> +<li>Blocks update records automatically to reflect changes in data.</li> +<li>Bound records are replaced when data changes, while committed records must be removed manually.</li> +<li>Records are unique, uniqueness is determined by a record&rsquo;s attributes and their values.</li> </ul> -<pre><code>search @event @browser @session - [#click element: [#button]] - [#for-display text] - -commit @browser - [#div text] -</code></pre> - -<p>This block could have been written with two searches for the same effect:</p> - -<pre><code>search @event @browser - [#click element: [#button]] - -search - [#for-display text] - -commit @browser - [#div text] -</code></pre> - -<h2 id="see-also">See Also</h2> - -<p><a href="../search">search</a> | <a href="../bind">bind</a> | <a href="../commit">commit</a></p> - - - - - - http://docs.witheve.com/handbook/intro/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/intro/ - - -<h1 id="introduction">Introduction</h1> - -<h2 id="notable-features">Notable Features</h2> +<p>This will get you started with Eve, but there&rsquo;s still more to learn. From here, you can:</p> <ul> -<li><p>Eve programs aren&rsquo;t talking to a database, they <em>are</em> the database. That means no plumbing, no impedance mismatch, and no extra infrastructure is needed.</p></li> - -<li><p>Everything is data. The file system, http requests, the DOM&hellip; That means everything can be queried and everything can be reacted to.</p></li> - -<li><p>Eve&rsquo;s semantics were built for concurrency, asynchrony, and distribution. There are no promises, or thread synchronizations, or borrows.</p></li> - -<li><p>Eve programs practice literate programming, since there&rsquo;s no incidental ordering imposed by the language.</p></li> - -<li><p>Another result of a lack of ordering is that programs grow very organically through composition.</p></li> - -<li><p>Eve programs are naturally tiny.</p></li> - -<li><p>Correctness can be defined globally through integrity constraints, allowing people to safely contribute to an application without worrying about checking every possible invariant locally.</p></li> +<li>Advance to Level 2 of the introductory tutorial.</li> +<li>View the syntax reference or the Eve handbook.</li> +<li>Explore already made examples.</li> +<li>Or dive right in to the editor and try out the concepts you&rsquo;ve just learned.</li> </ul> - -<h2 id="see-also">See Also</h2> - -<p><a href="../installation">getting eve</a> | <a href="../running">running eve</a> | <a href="../programs">eve programs</a> | <a href="../core">core language</a></p> - http://docs.witheve.com/handbook/programs/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/programs/ - - -<h1 id="eve-programs">Eve Programs</h1> - -<p>Coming soon&hellip;</p> - -<h2 id="see-also">See Also</h2> - -<p><a href="../model">programming model</a> | <a href="../literate-programming">literate programming</a> | <a href="../blocks">blocks</a></p> - - - - - Eve Documentation - http://docs.witheve.com/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/ - - -<h1 id="eve-programming-language-documentation">Eve Programming Language Documentation</h1> - -<h2 id="guides">Guides</h2> - -<ul> -<li><a href="http://play.witheve.com">Eve Quickstart Guide</a></li> -</ul> - - - - - Eve for Programmers - http://docs.witheve.com/guides/for-programmers/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/guides/for-programmers/ - - -<h1 id="eve-for-programmers">Eve for Programmers</h1> - -<p>As a programmer, you probably find it easy to switch between different programming langauges. If you know Javascript, you probably wouldn&rsquo;t have a hard time learning similar langauges like C++, Java, or Python. That&rsquo;s because despite syntactic differences, these languages largely conform to the same programming model. When we program in languages like these, we use similar abstractions between them &ndash; loops, functions, and input/output patterns have become a staple of every programmer&rsquo;s toolbox. When we solve problems, we usually reach a solution in terms of these primitive operations.</p> - -<p>Eve is a different kind of programming langauge from Javascript or Python, so programmers new to Eve may feel a little lost at first. How do you get anything done in a language without loops? How do you compose code without functions? The purpose of this guide is to provide a mapping from the common tools you know, to the Eve way of solving problems. We&rsquo;ll look at some programs written in Javascript, and see how they Eve can solve them.</p> - -<h2 id="functions">Functions</h2> - -<p>Functions are the fundamental unit of code reuse in most conventional programming languages. These langauges typically start from a &ldquo;main&rdquo; function, and branch</p> - -<h2 id="looping">Looping</h2> - -<h3 id="map">Map</h3> - -<h3 id="reduce">Reduce</h3> - -<h3 id="recursion">Recursion</h3> - -<h2 id="i-o">I/O</h2> - - - - - Linux - http://docs.witheve.com/handbook/linux/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/linux/ - - -<h1 id="installing-eve-on-linux">Installing Eve on Linux</h1> - -<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> - -<pre><code>npm install -npm start -</code></pre> - -<p>Then open <code>http://localhost:8080/</code> in your browser.</p> - -<h2 id="tips">Tips</h2> - -<p>Some distributions (most notably Ubuntu) have renamed <code>node</code> to <code>nodejs</code>. If this is the case, you&rsquo;ll need to create a symlink that remaps nodejs back to node. e.g.</p> - -<pre><code>ln -s /usr/bin/nodejs /usr/bin/node -</code></pre> - -<p>Then proceed with the installation as usual</p> - -<h2 id="see-also">See also</h2> - -<p><a href="../mac">mac</a> | <a href="../windows">windows</a> | <a href="../docker">docker</a> | <a href="../running">running</a></p> - - - - - Mac - http://docs.witheve.com/handbook/mac/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/mac/ - - -<h1 id="installing-eve-on-mac">Installing Eve on Mac</h1> - -<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> - -<pre><code>npm install -npm start -</code></pre> - -<p>Then open <code>http://localhost:8080/</code> in your browser.</p> - -<h2 id="see-also">See also</h2> - -<p><a href="../linux">linux</a> | <a href="../windows">windows</a> | <a href="../docker">docker</a> | <a href="../npm">npm</a> | <a href="../running">running</a></p> - - - - - Quickstart - http://docs.witheve.com/tutorials/quickstart/ + http://docs.witheve.com/README/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/tutorials/quickstart/ + http://docs.witheve.com/README/ -<h1 id="eve-quick-start-tutorial">Eve Quick Start Tutorial</h1> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">```</span><span class="w"></span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">tag</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, world&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x">```</span><span class="w"></span> -</code></pre></div> - -<p>Hello world! At its core, Eve is a pattern matching language. You match patterns of data by searching a database, then update or create new data according to what you&rsquo;ve found. In this example, we created a <a href="https://witheve.github.io/docs/handbook/records/"><code>record</code></a> that has two attributes: a tag attribute with the value <code>&quot;div&quot;</code>, and a text attribute with the value <code>&quot;Hello, world&quot;</code>. We <a href="https://witheve.github.io/docs/handbook/bind/">bound</a> this record to the browser, which is how we displayed our venerable message.</p> - -<p>The three backticks <code>```</code> are called a code fence, and they allow us to denote blocks of code. This gives us the ability to embed Eve code in normal documents written in Markdown. This is how Eve programs are written: everything in a code fence is a <a href="https://witheve.github.io/docs/handbook/blocks/">block</a> of Eve code, while everything outside is prose describing the program. In fact, this quick start tutorial is an example of an executable Eve program! In the subsequent blocks, you won&rsquo;t see any code fences, but they still exist in the <a href="https://raw.githubusercontent.com/witheve/docs/src/guides/quickstart.md">document&rsquo;s source</a>.</p> - -<p>So far we&rsquo;ve created a record that displays “Hello, world!” but as I said, Eve is a pattern matching language. Let&rsquo;s explore that by searching for something:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">tag</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, world&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Our message disappeared! Before, we bound without searching, so the message displayed by default. Now we&rsquo;re binding in the presence of a <a href="https://witheve.github.io/docs/handbook/search/"><code>search</code></a> action, so the bound record only exists if all the searched records are matched. Here, we&rsquo;re searching for all records with a <code>name</code> attribute, but we haven&rsquo;t added any records like that to Eve so none are matched. With no matching records, the <code>bind</code> cannot execute, and the message disappears from the screen.</p> - -<p>This is the flow of an Eve block: you search for records in a database, and if all the records you searched for are matched, you can modify the matched records or create new ones. If any part of your search is not matched, then no records will be created or updated.</p> - -<p>To get our message back, all we need is a record with a name attribute. We can create one permanently with the <a href="https://witheve.github.io/docs/handbook/commit/"><code>commit</code></a> action:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Celia&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Hello, world… again! Commit permanently updates or creates a record that will persist even if its matched records (the records matched in a search action) change. Since we aren&rsquo;t searching for anything in this block, the commit executes by default and adds a record with a name attribute of <code>&quot;Celia&quot;</code>. The addition of this new record satisfies the search in the previous block, so “Hello, world!” appears on the screen again.</p> - -<p>But what else can you do with matched records? For starters, we can use them to create new records:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, {{name}}&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Since we matched on a record with a name attribute, we now have a reference to that name, and we can inject it into a string using <a href="https://witheve.github.io/docs/handbook/string-interpolation/"><code>{{ ... }}</code></a> embedding. We can also swap out <code>tag: &quot;div&quot;</code> for the sugared <code>#div</code>. <a href="https://witheve.github.io/docs/handbook/tags/">Tags</a> are used a lot in Eve to talk about collections of related records. For example, we could search for all records with a <code>#student</code> tag, with name, grade, and school attributes.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is a {{grade}}th grade student at {{school}}.&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Since we&rsquo;re matching on more attributes, this block is no longer satisfied by the record we added earlier; we&rsquo;re missing a <code>#student</code> tag, as well as grade and school attributes. Even though these are currently missing, we can still write the code that would display them.</p> - -<p>Let&rsquo;s display this new message by adding the missing attributes to Celia. We could add them to the block where we comitted Celia originally, but we can also do it programatically:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">celia</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Celia”</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">celia</span><span class="w"> </span><span class="nf">&lt;-</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">16</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>You can define variables within blocks, which act as handles on records that allow you to change them. In this case, we&rsquo;re using the <a href="https://witheve.github.io/docs/handbook/merge/">merge operator</a> <code>&lt;-</code> to combine two records. With the addition of this block, the sentence &ldquo;Celia is a 10th grade student at East.&rdquo; appears in the browser.</p> - -<p>Celia is cool and all, but let&rsquo;s add some more students to our database:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Diedra”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">12</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Michelle”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">11</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Jermaine”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">9</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Three sentences are now printed, one for each student that matches the search. Eve works on <a href="https://witheve.github.io/docs/handbook/sets/">sets</a>, so when we search for <code>[#student name grade school]</code>, we find <em>all</em> records that match the given pattern. This includes Celia, Diedra and Michelle (but not Jermaine, as he has no school in his record). Therefore, when we bind the record <code>[#div text: &quot;{{name}} is a ... &quot;]</code>, we are actually binding three records, one for each matching <code>#student</code>.</p> - -<p>If you re-compile the program a couple times, you&rsquo;ll see the order of sentences may change. This is because <strong>there is no ordering in Eve - blocks are not ordered, statements are not ordered, and results are not ordered</strong>. If you want to order elements, you must impose an ordering yourself. We can ask the browser to draw elements in an order with the &ldquo;sort&rdquo; attribute:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="x">name</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is a {{grade}}th grade student at {{school}}.&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>This time when you recompile your program, the order will stay fixed, sorted alphabetically by name.</p> - -<p>Let&rsquo;s make things a little more interesting by adding some records about the schools the students attend:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“West”</span><span class="p">,</span><span class="w"> </span><span class="x">address</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;1234 Main Street&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“East”</span><span class="p">,</span><span class="w"> </span><span class="x">address</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;5678 Broad Street&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>What if we want to display the address of the school each student attends? Although <code>#student</code>s and <code>#school</code>s are in different records, <strong>we can relate two records by associating attributes from one record with attributes from the other.</strong> This is an operation known as <a href="https://witheve.github.io/docs/handbook/joins/">joining</a>. In this case, we want to relate the <code>name</code> attribute on <code>#schools</code> with the <code>school</code> attribute on <code>#students</code>. This compares the values of the attributes between records, and matches up those with the same value. For instance, since Celia&rsquo;s school is &ldquo;East&rdquo;, she can join with the <code>#school</code> named &ldquo;East&rdquo;.</p> - -<p>Our first attempt may come out looking a little something like this:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">student</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">name</span><span class="p">]</span><span class="w"> </span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{student.name}} attends {{school.name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>But that didn&rsquo;t work. How come? In Eve, <strong>things with the same name are <a href="https://witheve.github.io/docs/handbook/equivalence/">equivalent</a></strong>. In this block, we&rsquo;ve used &ldquo;name&rdquo; three times, which says that the school&rsquo;s name, the student&rsquo;s name, and the student&rsquo;s school are all the same. Of course, there is no combination of students and schools that match this search, so nothing is displayed.</p> - -<p>Instead, we can use the dot operator to specifically ask for the name attribute in the <code>#school</code> records, and rename our variables to get a correct block:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school.name</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{students.name}} attends {{schools.name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>This creates an implicit join over the school name without mixing up the names of the students and the names of the schools, giving us our desired output. You can actually bind attributes to any name you want to avoid collisions in a block:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="nf">-</span><span class="x">name</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">student</span><span class="nf">-</span><span class="x">name</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="nf">-</span><span class="x">name</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{student-name}} attends {{school-name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h2 id="advanced-eve">Advanced Eve</h2> - -<p>Recall when we added our students, Celia was the only one we added an <code>age</code> to. Therefore, the following block only displays Celia&rsquo;s age, even though we ask for all the <code>#student</code>s:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is {{age}} years old&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Let&rsquo;s pretend that all students enter first grade at six years old. Therefore, if we know a student&rsquo;s grade, we can calculate their age and add it to the student&rsquo;s record:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">student</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">calculated</span><span class="nf">-</span><span class="x">age</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">student.age</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">student.age</span><span class="w"></span> -<span class="x">                  </span><span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">student.grade</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">student.grade</span><span class="w"> </span><span class="nf">+</span><span class="w"> </span><span class="m">5</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">student.age</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="x">calculated</span><span class="nf">-</span><span class="x">age</span><span class="w"></span> -</code></pre></div> - -<p>This block selects all students, and uses and <a href="https://witheve.github.io/docs/handbook/if-then/"><code>if-then</code></a> expression to set the student&rsquo;s calculated age. If the student already has an age, we set it to that. Otherwise, if the student has no age, we can calculate it with some arithmetic. The <a href="https://witheve.github.io/docs/handbook/set/">set operator</a> <code>:=</code> sets an attribute to a specified value regardless of what it was before the block executed. That value can be anything, from a number to a string to another record.</p> - -<h3 id="aggregates">Aggregates</h3> - -<p>So far everything we&rsquo;ve done has used one record at a time, but what happens when we want to work over a group of records, such as counting how many students there are? To solve such a problem, we&rsquo;ll need to use an <a href="https://witheve.github.io/docs/handbook/aggregates/">aggregate</a>. Aggregates take a set of values and turn them into a single value, akin to &ldquo;fold&rdquo; or &ldquo;reduce&rdquo; functions in other languages. In this case, we&rsquo;ll use the aggregate <a href="https://witheve.github.io/docs/handbook/statistics/count/"><code>count</code></a> to figure out how many <code>#students</code> are in the school district:  </p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">total</span><span class="nf">-</span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{total-students}} are in the school district&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>A quick note on the syntax for <code>count</code> - it feels a lot like a function in other languages, since it has a return value and can be used inline in expressions. Under the hood, <a href="https://witheve.github.io/docs/handbook/functions/">functions</a> and aggregates are actually records; <code>total = count[given: students]</code> is shorthand for <code>[#count #function given: students, value: total]</code>. This distinction won&rsquo;t materially change the way you use <code>count</code>, but it goes to show that everything in Eve reduces to working with records.</p> - -<p>While <code>given</code> is a required argument in <code>count</code>, aggregates (and functions in general) can also have optional arguments. Let&rsquo;s say we want to know how many students attend each school. We can use the optional argument <code>per</code> to count students grouped by the school they attend:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="nf">-</span><span class="x">per</span><span class="nf">-</span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{students-per-school}} attend {{school}}&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>All function-like records in Eve specify their arguments as attributes. This means you specify the argument and its value, unlike in other languages, where the order of the values determines the attribute to which they belong. As with everything else in Eve, order doesn&rsquo;t matter.</p> - -<h2 id="extra-credit">Extra Credit</h2> - -<p>At this point, you know everything necessary about Eve to complete this extra credit portion (the only additional knowledge you need is domain knowledge of HTML and forms). Let&rsquo;s review some of the key concepts:</p> - -<ul> -<li>Eve programs are composed of blocks of code that search for and update records.</li> -<li>Records are sets of <code>attribute: value</code> pairs attached to a unique ID.</li> -<li>Eve works with sets, which have no ordering and contain unique elements.</li> -<li>Things with the same name are equivalent.</li> -</ul> - -<p>Your extra credit task is to build a web-based form that allows you to add students to the database. Take a moment to think about how this might be done in Eve, given everything we&rsquo;ve learned so far.</p> - -<p>First, let&rsquo;s make the form. We&rsquo;ve already displayed a <code>#div</code>, and in the same way we can draw <code>#input</code>s and a <code>#button</code>:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Name:&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#name-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">2</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">3</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Grade:&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#grade-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">4</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;School:&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#school-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">6</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#button</span><span class="w"> </span><span class="nt">#submit</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">7</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;submit&quot;</span><span class="p">]]</span><span class="w"></span> -</code></pre></div> - -<p>We&rsquo;ve added some tags to the inputs and the button to distinguish them, so we can easily search for them from other blocks. Now that we have a form, we need to define what happens when the submit button is clicked.</p> - -<p>Remember, everything in Eve is a record, so the <code>#click</code> event is no different. When a user clicks the mouse in the browser, Eve records that click in the database.</p> +<p align="center"> + <img src="http://www.witheve.com/logo.png" alt="Eve logo" width="10%" /> +</p> -<p>This record exists only for an instant, but we can react to it by searching for <code>[#click element: [#submit]]</code>. This record represents a <code>#click</code> on our <code>#submit</code> button. Then, all we need to do is capture the values of the input boxes and save them as a <code>#student</code> record:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#click</span><span class="w"> </span><span class="x">element</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#submit</span><span class="p">]]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#name-input</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#grade-input</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school-input</span><span class="p">]</span><span class="w"></span> +<hr /> -<span class="kr">commit</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="c1">// save the new student</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">name.value</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="x">grade.value</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school.value</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="c1">// reset the form</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">name.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">grade.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">school.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> -</code></pre></div> +<h1 id="documentation-for-the-eve-programming-language">Documentation for the Eve programming language.</h1> -<h2 id="learning-more">Learning more</h2> +<p>You can learn more about Eve here: <a href="http://witheve.com/">http://witheve.com/</a></p> -<p>If you want to learn more about Eve, we have some resources to help with that:</p> +<p>You can play with Eve here: <a href="http://play.witheve.com">http://play.witheve.com</a></p> -<ul> -<li>Example applications - See some working programs and explore how they work.</li> -<li>Tutorials - Step by step instructions on building Eve applications.</li> -<li><a href="https://witheve.github.io/docs">The Eve Handbook</a> - Everything you need to know about Eve.</li> -<li><a href="https://witheve.github.io/assets/docs/SyntaxReference.pdf">Eve syntax reference</a> - Eve&rsquo;s syntax in one page.</li> -<li>Guides - In-depth documents on topics relating to Eve.</li> -</ul> +<p>Eve is under active development here: <a href="https://github.com/witheve/Eve">https://github.com/witheve/Eve</a></p> -<p>We also invite you to join the Eve community! There are several ways to get involved:</p> +<h2 id="contributing">Contributing</h2> -<ul> -<li>Join our <a href="https://groups.google.com/forum/#!forum/eve-talk">mailing list</a> and get involved with the latest discussions on Eve.</li> -<li>Impact the future of Eve by getting involved with our <a href="https://github.com/witheve/rfcs">Request for Comments</a> process.</li> -<li>Read our <a href="http://incidentalcomplexity.com/">development diary</a> for the latest news and articles on Eve.</li> -<li>Follow us on <a href="https://twitter.com/with_eve">twitter</a>.</li> -</ul> +<p>There&rsquo;s a lot of work to be done on the documentation, so this is a great place for beginners to get started with Eve. From fixing typos to adding examples, work needs to be done across the board here. Check out the <a href="https://github.com/witheve/docs/issues">issues</a> for a place to start, as they have been raised already as points of improvement by the community. If someone is already assigned and the issue has been aroud a while, check to see if it&rsquo;s being worked on before starting it yourself. Or, if you find an issue yourself, please report it so others know it exists. Thank you!</p> - Standard Library - http://docs.witheve.com/handbook/standard-library/ + + http://docs.witheve.com/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/standard-library/ - - -<h1 id="standard-library">Standard Library</h1> - -<p>The Eve standard library of functions is globally available, meaning you don&rsquo;t have to reference a specific database to use these functions.</p> - -<h2 id="description">Description</h2> - -<ul> -<li><a href="../general">general</a> - General functions</li> -<li><a href="../math">math</a> - General mathematical and trigonometric functions</li> -<li><a href="../strings">strings</a> - Functions that manipulate strings</li> -<li><a href="../statistics">statistics</a> - Functions that calculate statistical measures on values</li> -<li><a href="../datetime">date &amp; time</a> - Functions that get and manipulate date and time</li> -</ul> - + http://docs.witheve.com/guides/ + - Style Guide - http://docs.witheve.com/guides/style/ + + http://docs.witheve.com/handbook/core/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/guides/style/ - - -<h1 id="eve-style-guide">Eve Style Guide</h1> - -<h2 id="comments">Comments</h2> - -<p>Add a space after the comment marker to make comments more readable</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// This is correct</span><span class="w"></span> -<span class="c1">//This is incorrect</span><span class="w"></span> -</code></pre></div> - -<h2 id="naming">Naming</h2> - -<p>As much as possible, don&rsquo;t abbreviate names. The goal in writing an Eve program is to be as readable as possible. An abbreviation that makes sense to you might not make sense to someone else, or even yourself when you revisit the program in a year.</p> - -<p>Multi-word names should be joined by dashes <code>-</code>, not underscores <code>_</code>.</p> - -<h2 id="program-layout">Program layout</h2> - -<p>Blocks should be preceded by at least a one line comment, indicating the purpose of the block.</p> - -<h2 id="commas">Commas</h2> - -<p>Although Eve treats commas as white-space, they should be used to enhance readability as needed:</p> - -<p>In records, separate attributes with commas after a bind</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// More readable</span><span class="w"></span> -<span class="p">[</span><span class="nt">#person</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">30</span><span class="p">,</span><span class="w"> </span><span class="x">height</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="x">hair</span><span class="nf">-</span><span class="x">color</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;brown&quot;</span><span class="p">]</span><span class="w"></span> - -<span class="c1">// Less readable</span><span class="w"></span> -<span class="p">[</span><span class="nt">#person</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">30</span><span class="w"> </span><span class="x">height</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="w"> </span><span class="x">hair</span><span class="nf">-</span><span class="x">color</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;brown&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Commas should also be used to separate items contained in parenthesis, such as in a multiple return.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// More readable</span><span class="w"></span> -<span class="p">(</span><span class="x">val</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">val</span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#tag1</span><span class="p">]</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="l">false</span><span class="p">)</span><span class="w"></span> -<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="p">,</span><span class="w"> </span><span class="l">true</span><span class="p">)</span><span class="w"></span> -<span class="x">total</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="p">(</span><span class="x">attr</span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">)]</span><span class="w"></span> - -<span class="c1">// Less readable</span><span class="w"></span> -<span class="p">(</span><span class="x">val</span><span class="m">1</span><span class="w"> </span><span class="x">val</span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#tag1</span><span class="p">]</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="l">false</span><span class="p">)</span><span class="w"></span> -<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="w"> </span><span class="l">true</span><span class="p">)</span><span class="w"></span> -<span class="x">total</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="p">(</span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">)]</span><span class="w"></span> -</code></pre></div> - -<h2 id="indention">Indention</h2> - -<p>Eve does not enforce indention, but it is important for readability</p> - -<h3 id="blocks">Blocks</h3> - -<p><code>search</code>. <code>commit</code>, and <code>bind</code> should be the only lines at zero indention. Everything else should be indented.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Good</span><span class="w"></span> -<span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>But not this:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Not good</span><span class="w"></span> -<span class="kr">search</span><span class="w"></span> -<span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"></span> -<span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h3 id="if-then">If-Then</h3> - -<p>Each arm of an <code>if-then</code> statement should be at the same indention level. The <code>then</code> portion of the statement can be on a new line if the <code>if</code> portion is exceptionally long, but it should be indented once.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Good if layout</span><span class="w"></span> -<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> -<span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> -<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> - -<span class="c1">// Okay, especially if the branch is long</span><span class="w"></span> -<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#long-record</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">]</span><span class="w"> </span> -<span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> -<span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#long-record2</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">]</span><span class="w"> </span> -<span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> -<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> - -<span class="c1">// Less readable &quot;if&quot; formatting</span><span class="w"></span> -<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> -<span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> -<span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> - -<span class="c1">// Less readable &quot;if&quot; formatting</span><span class="w"></span> -<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> -</code></pre></div> - -<h3 id="nested-records">Nested records</h3> - -<p>When nested records are placed on a new line, they should be indented once past the parent record. Where possible, nested records should be the final attribute in the parent record.</p> - -<p>Nested records should appear on their own line if you are nesting more than one.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Okay, but only do this for one level of nesting</span><span class="w"></span> -<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">]]</span><span class="w"></span> - -<span class="c1">// More readable</span><span class="w"></span> -<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">]]</span><span class="w"></span> - -<span class="c1">// Also good</span><span class="w"></span> -<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div1&quot;</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div3&quot;</span><span class="p">]]]</span><span class="w"> </span> - -<span class="c1">// Not good</span><span class="w"></span> -<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="p">]]</span><span class="w"></span> - -<span class="c1">// Also not good</span><span class="w"></span> -<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">],</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h2 id="newlines">Newlines</h2> - -<p>Newlines should precede and follow every code block.</p> - -<p>Within code blocks, a newline should be added between every action. This enhances readability, especially in the case where multiple actions are needed. For instance, the following code block:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@studentDB</span><span class="w"></span> -<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#students</span><span class="p">]</span><span class="w"></span> - -<span class="kr">search</span><span class="w"> </span><span class="nt">@schoolDB</span><span class="w"></span> -<span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="x">schools.name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">student.school</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">students.name</span><span class="p">]</span><span class="w"> </span> - -<span class="kr">commit</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#new-record</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>is more readable than this code block:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@studentDB</span><span class="w"></span> -<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#students</span><span class="p">]</span><span class="w"></span> -<span class="kr">search</span><span class="w"> </span><span class="nt">@schoolDB</span><span class="w"></span> -<span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span><span class="x">schools.name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">student.school</span><span class="w"></span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">students.name</span><span class="p">]</span><span class="w"> </span> -<span class="kr">commit</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#new-record</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - + http://docs.witheve.com/handbook/core/ + - Windows - http://docs.witheve.com/handbook/windows/ + + http://docs.witheve.com/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/windows/ - - -<h1 id="installing-eve-on-windows">Installing Eve on Windows</h1> - -<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> - -<pre><code>npm install -npm start -</code></pre> - -<p>Then open <code>http://localhost:8080/</code> in your browser.</p> - -<h2 id="see-also">See also</h2> - -<p><a href="../linux">linux</a> | <a href="../mac">mac</a> | <a href="../docker">docker</a> | <a href="../npm">npm</a> | <a href="../running">running</a></p> - + http://docs.witheve.com/handbook/libraries/ + - abs - http://docs.witheve.com/handbook/math/abs/ + + http://docs.witheve.com/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/math/abs/ - - -<h1 id="abs">abs</h1> - -<p>The absolute value of a number</p> - -<h2 id="syntax">Syntax</h2> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">abs</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<h2 id="attributes">Attributes</h2> - -<ul> -<li><code>value</code> - a set of numbers</li> -</ul> - -<h2 id="description">Description</h2> - -<p><code>y = abs[value]</code> returns the absolute value of the elements in <code>value</code>. Every positive number is kept positive, but every negative number is made positive.</p> - -<h2 id="examples">Examples</h2> - -<p>Get the absolute value of a number</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">abs</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="nf">-</span><span class="m">3</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Displays the number <code>3</code>.</p> - -<h2 id="see-also">See Also</h2> - -<p><a href="../sign">sign</a></p> - + http://docs.witheve.com/tutorials/ + - ceiling - http://docs.witheve.com/handbook/math/ceil/ + Eve Documentation + http://docs.witheve.com/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/math/ceil/ + http://docs.witheve.com/ -<h1 id="ceiling">ceiling</h1> - -<p>Round a number up to the nearest integer.</p> - -<h2 id="syntax">Syntax</h2> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">ceiling</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> -</code></pre></div> +<h1 id="eve-programming-language-documentation">Eve Programming Language Documentation</h1> -<h2 id="attributes">Attributes</h2> +<h2 id="guides">Guides</h2> <ul> -<li><code>value</code> - a set of numbers</li> +<li><a href="http://play.witheve.com">Eve Quickstart Guide</a></li> </ul> - -<h2 id="description">Description</h2> - -<p><code>y = ceiling[value]</code> rounds the elements of <code>value</code> up to the nearest integers.</p> - -<h2 id="examples">Examples</h2> - -<p>Calculate the ceiling of <code>34.2</code></p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">ceiling</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="m">34</span><span class="x">.</span><span class="m">2</span><span class="p">]</span><span class="w"></span> -<span class="w"> </span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>The result is <code>35</code>.</p> - -<h2 id="see-also">See Also</h2> - -<p><a href="../floor">floor</a> | <a href="../fix">fix</a> | <a href="../round">round</a></p> diff --git a/sitemap.xml b/sitemap.xml index 1f66684..2a87aa5 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,307 +2,55 @@ - http://docs.witheve.com/ - - - - http://docs.witheve.com/README/ - - - - http://docs.witheve.com/handbook/core/ - - - - http://docs.witheve.com/handbook/databases/ - - - - http://docs.witheve.com/handbook/intro/ - - - - http://docs.witheve.com/handbook/programs/ - - - - http://docs.witheve.com/ - - - - http://docs.witheve.com/guides/for-programmers/ - - - - http://docs.witheve.com/handbook/linux/ - - - - http://docs.witheve.com/handbook/mac/ - - - - http://docs.witheve.com/tutorials/quickstart/ - - - - http://docs.witheve.com/handbook/standard-library/ - - - - http://docs.witheve.com/guides/style/ - - - - http://docs.witheve.com/handbook/windows/ - - - - http://docs.witheve.com/handbook/math/abs/ - - - - http://docs.witheve.com/handbook/math/ceil/ - - - - http://docs.witheve.com/handbook/event/click/ - - - - http://docs.witheve.com/handbook/math/cos/ - - - - http://docs.witheve.com/handbook/statistics/count/ - - - - http://docs.witheve.com/handbook/math/fix/ - - - - http://docs.witheve.com/handbook/math/floor/ - - - - http://docs.witheve.com/handbook/strings/join/ - - - - http://docs.witheve.com/handbook/math/mod/ - - - - http://docs.witheve.com/handbook/statistics/random/ - - - - http://docs.witheve.com/handbook/math/range/ - - - - http://docs.witheve.com/handbook/math/round/ - - - - http://docs.witheve.com/handbook/math/sin/ - - - - http://docs.witheve.com/handbook/general/sort/ - - - - http://docs.witheve.com/handbook/strings/split/ - - - - http://docs.witheve.com/handbook/math/sum/ - - - - http://docs.witheve.com/handbook/math/tan/ - - - - http://docs.witheve.com/handbook/datetime/time/ - - - - http://docs.witheve.com/handbook/session/ + http://docs.witheve.com/handbook/ - http://docs.witheve.com/handbook/add/ + http://docs.witheve.com/tutorials/quickstart.eve/ - http://docs.witheve.com/handbook/equality/ - - - - http://docs.witheve.com/handbook/functions/ - - - - http://docs.witheve.com/handbook/general/ - - - - http://docs.witheve.com/handbook/installation/ - - - - http://docs.witheve.com/handbook/ebnf/ - - - - http://docs.witheve.com/handbook/model/ - - - - http://docs.witheve.com/handbook/records/ - - - - http://docs.witheve.com/handbook/search/ - - - - http://docs.witheve.com/handbook/browser/ - - - - http://docs.witheve.com/handbook/aggregates/ - - - - http://docs.witheve.com/handbook/commonmark/ - - - - http://docs.witheve.com/handbook/equivalence/ - - - - http://docs.witheve.com/handbook/inequality/ - - - - http://docs.witheve.com/handbook/math/ - - - - http://docs.witheve.com/handbook/running/ - - - - http://docs.witheve.com/handbook/set/ - - - - http://docs.witheve.com/handbook/sets/ - - - - http://docs.witheve.com/handbook/tags/ - - - - http://docs.witheve.com/handbook/bind/ - - - - http://docs.witheve.com/handbook/event/ - - - - http://docs.witheve.com/handbook/actions/ - - - - http://docs.witheve.com/handbook/help/ - - - - http://docs.witheve.com/handbook/joins/ - - - - http://docs.witheve.com/handbook/literate-programming/ - - - - http://docs.witheve.com/handbook/remove/ - - - - http://docs.witheve.com/handbook/strings/ - - - - http://docs.witheve.com/handbook/commit/ - - - - http://docs.witheve.com/handbook/if-then/ - - - - http://docs.witheve.com/handbook/http/ - - - - http://docs.witheve.com/handbook/blocks/ - - - - http://docs.witheve.com/handbook/docker/ - - - - http://docs.witheve.com/handbook/expressions/ - - - - http://docs.witheve.com/handbook/merge/ + http://docs.witheve.com/README/ - http://docs.witheve.com/handbook/statistics/ + http://docs.witheve.com/guides/ - http://docs.witheve.com/handbook/is/ + http://docs.witheve.com/handbook/core/ - http://docs.witheve.com/handbook/not/ + http://docs.witheve.com/handbook/libraries/ - http://docs.witheve.com/handbook/view/ + http://docs.witheve.com/tutorials/ - http://docs.witheve.com/handbook/datetime/ + http://docs.witheve.com/ + 0 - http://docs.witheve.com/handbook/string-interpolation/ + http://docs.witheve.com/ - http://docs.witheve.com/handbook/update-operators/ + http://docs.witheve.com/guides/ + 0 - http://docs.witheve.com/handbook/npm/ + http://docs.witheve.com/handbook/ + 0 - http://docs.witheve.com/handbook/glossary/ + http://docs.witheve.com/tutorials/ + 0 \ No newline at end of file diff --git a/stylesheets/application.css b/stylesheets/application.css index 119f9e1..c21f5b3 100644 --- a/stylesheets/application.css +++ b/stylesheets/application.css @@ -1,3 +1,5 @@ +#COOKIECOOKASDASDAS{} + #eve-pallette { /* Default */ color: rgb(74,64,136); @@ -64,16 +66,30 @@ color: rgb(145, 192, 214); } -html, body { - font-family: Avenir, "Nelvetica Neue", sans-serif; - height: 100%; - padding: 0px; - margin: 0px; - color: rgb(85,85,85); - font-size: 15px; - background-color: #f5f5f5; +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; } +body { display: flex; flex-direction: column; margin: 0; background: white; color: #555; line-height: 1.7; font-family: "Open Sans", Avenir, "Helvetica neue", sans-serif;} + + pre { background-color: rgb(38,38,38); padding: 20px; @@ -100,19 +116,15 @@ ul, ol { } h1 { - font-size: 30px; - color: rgb(85, 85, 85); + font-size: 35px; + padding-top: 0px; + margin-top:0px; + margin-bottom: 20px; } h2 { font-size: 25px; - color: rgb(85, 85, 85); - font-weight: bold; - line-height: 25px; -} - -.logo { - width: 30%; + padding-top: 0px; margin-top: 20px; margin-bottom: 20px; } @@ -124,24 +136,29 @@ h2 { } .drawer { - background-color: #555; - color: rgb(187,187,187); - width: 280px; + color: rgb(85, 85, 85); + border-right: 1px solid #f0f0f0; padding-left: 10px; - padding-right: 10px; + padding-right: 50px; padding-bottom: 20px; + +} + +.highlight { + margin-bottom: 20px; + margin-top: 20px; +} + +.colored { + font-weight: bold; } .drawer a { - color: rgb(187,187,187); + color: rgb(85, 85, 85); } .article { - max-width: 750px; - padding-left: 60px; - padding-right: 60px; - padding-top: 30px; - background-color: white; + padding-left: 50px; } .article a { @@ -176,10 +193,6 @@ h2 { margin-top: 20px; } -.colored { - color: #eee; -} - .selected a { color: rgb(145, 192, 214); } @@ -208,4 +221,45 @@ h2 { white-space: pre; font-family: monospace; padding: 5px; -} \ No newline at end of file +} + +.flex-spacer { flex: 1; } +.flex-row { display: flex; } +.flex-row.spaced > * + * { margin-left: 30px; } +.flex-row.double-spaced > * + * { margin-left: 60px; } +.flex-row.stretched { align-self: stretch; } + +.layer-wrapper { display: flex; flex-direction: column; align-items: center; margin-top: 60px; padding: 0 40px; } +.layer { max-width: 100%; width: 960px; display: flex; align-items: center; } +.toplayer { max-width: 100%; width: 960px; display: flex; align-items: top; } +.sub-layer { margin-top: 30px; } + +.header-wrapper { } +header > .logo { display: flex; flex: 0 0 auto; align-items: center; padding: 0; } +header > .logo > img { max-width: 60px; } +header > .logo > h1 { margin: 0; margin-left: 18px; padding: 0; height: 26px; margin-top: -32px; } +header > .logo > h1 > img { height: 100%; } + +nav { flex: none; display: flex; flex-direction: row-reverse; } +nav > * { flex: 0 0 auto; padding: 10px 20px; margin: 0; text-decoration: none; color: rgb(74, 64, 136); transition: background 0.1s ease-out; } +nav > *:hover { background: #f2f2f2; } +nav > *:active { background: #e9e9e9; } +nav > .play-cta { margin: 0; padding: 10px 20px; color: white; } + +.btn { cursor: pointer; text-align: center; user-select: none; -moz-user-select: none; -ms-user-select: none; } +.btn.big { flex: 1 0 auto; padding: 18px 30px; } +.btn.rounded { border-radius: 3px; } + +.cta { cursor: pointer; text-decoration: none; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; transition: background 0.1s ease-out; } + +.cta.primary { background: rgb(0, 184, 241); color: white; } +.cta.primary:hover { background: rgb(0, 158, 224); } +.cta.primary:active { background: rgb(0, 121, 177); } + +.cta.secondary { background: rgb(107, 103, 173); color: white; } +.cta.secondary:hover { background: rgb(91, 89, 164); } +.cta.secondary:active { background: rgb(74, 64, 136); } + +.cta.tertiary { background: #888a8f; color: white; } +.cta.tertiary:hover { background: #808284; } +.cta.tertiary:active { background: #787a7f; } diff --git a/tutorials/index.html b/tutorials/index.html index 0fd06a1..82ef114 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -10,7 +10,7 @@ Tutorials - Eve Documentation - + @@ -74,15 +74,10 @@ -
@@ -356,7 +155,13 @@

Pages in Tutorial

- + +

+
+ +
+ +

Quickstart

diff --git a/tutorials/index.xml b/tutorials/index.xml index 93c43b1..3183735 100644 --- a/tutorials/index.xml +++ b/tutorials/index.xml @@ -2,244 +2,117 @@ Tutorials on Eve Documentation - http://docs.witheve.com/tutorials/ + http://docs.witheve.com/tutorials/index.xml Recent content in Tutorials on Eve Documentation Hugo -- gohugo.io en-us + + + http://docs.witheve.com/tutorials/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs.witheve.com/tutorials/ + + + Quickstart - http://docs.witheve.com/tutorials/quickstart/ + http://docs.witheve.com/tutorials/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/tutorials/quickstart/ + http://docs.witheve.com/tutorials/quickstart.eve/ -<h1 id="eve-quick-start-tutorial">Eve Quick Start Tutorial</h1> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">```</span><span class="w"></span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">tag</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, world&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x">```</span><span class="w"></span> -</code></pre></div> - -<p>Hello world! At its core, Eve is a pattern matching language. You match patterns of data by searching a database, then update or create new data according to what you&rsquo;ve found. In this example, we created a <a href="https://witheve.github.io/docs/handbook/records/"><code>record</code></a> that has two attributes: a tag attribute with the value <code>&quot;div&quot;</code>, and a text attribute with the value <code>&quot;Hello, world&quot;</code>. We <a href="https://witheve.github.io/docs/handbook/bind/">bound</a> this record to the browser, which is how we displayed our venerable message.</p> - -<p>The three backticks <code>```</code> are called a code fence, and they allow us to denote blocks of code. This gives us the ability to embed Eve code in normal documents written in Markdown. This is how Eve programs are written: everything in a code fence is a <a href="https://witheve.github.io/docs/handbook/blocks/">block</a> of Eve code, while everything outside is prose describing the program. In fact, this quick start tutorial is an example of an executable Eve program! In the subsequent blocks, you won&rsquo;t see any code fences, but they still exist in the <a href="https://raw.githubusercontent.com/witheve/docs/src/guides/quickstart.md">document&rsquo;s source</a>.</p> - -<p>So far we&rsquo;ve created a record that displays “Hello, world!” but as I said, Eve is a pattern matching language. Let&rsquo;s explore that by searching for something:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">tag</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, world&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Our message disappeared! Before, we bound without searching, so the message displayed by default. Now we&rsquo;re binding in the presence of a <a href="https://witheve.github.io/docs/handbook/search/"><code>search</code></a> action, so the bound record only exists if all the searched records are matched. Here, we&rsquo;re searching for all records with a <code>name</code> attribute, but we haven&rsquo;t added any records like that to Eve so none are matched. With no matching records, the <code>bind</code> cannot execute, and the message disappears from the screen.</p> - -<p>This is the flow of an Eve block: you search for records in a database, and if all the records you searched for are matched, you can modify the matched records or create new ones. If any part of your search is not matched, then no records will be created or updated.</p> - -<p>To get our message back, all we need is a record with a name attribute. We can create one permanently with the <a href="https://witheve.github.io/docs/handbook/commit/"><code>commit</code></a> action:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Celia&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Hello, world… again! Commit permanently updates or creates a record that will persist even if its matched records (the records matched in a search action) change. Since we aren&rsquo;t searching for anything in this block, the commit executes by default and adds a record with a name attribute of <code>&quot;Celia&quot;</code>. The addition of this new record satisfies the search in the previous block, so “Hello, world!” appears on the screen again.</p> - -<p>But what else can you do with matched records? For starters, we can use them to create new records:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, {{name}}&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Since we matched on a record with a name attribute, we now have a reference to that name, and we can inject it into a string using <a href="https://witheve.github.io/docs/handbook/string-interpolation/"><code>{{ ... }}</code></a> embedding. We can also swap out <code>tag: &quot;div&quot;</code> for the sugared <code>#div</code>. <a href="https://witheve.github.io/docs/handbook/tags/">Tags</a> are used a lot in Eve to talk about collections of related records. For example, we could search for all records with a <code>#student</code> tag, with name, grade, and school attributes.</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is a {{grade}}th grade student at {{school}}.&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Since we&rsquo;re matching on more attributes, this block is no longer satisfied by the record we added earlier; we&rsquo;re missing a <code>#student</code> tag, as well as grade and school attributes. Even though these are currently missing, we can still write the code that would display them.</p> - -<p>Let&rsquo;s display this new message by adding the missing attributes to Celia. We could add them to the block where we comitted Celia originally, but we can also do it programatically:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">celia</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Celia”</span><span class="p">]</span><span class="w"></span> +<h1 id="quickstart">Quickstart</h1> -<span class="kr">bind</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">celia</span><span class="w"> </span><span class="nf">&lt;-</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">16</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>You can define variables within blocks, which act as handles on records that allow you to change them. In this case, we&rsquo;re using the <a href="https://witheve.github.io/docs/handbook/merge/">merge operator</a> <code>&lt;-</code> to combine two records. With the addition of this block, the sentence &ldquo;Celia is a 10th grade student at East.&rdquo; appears in the browser.</p> - -<p>Celia is cool and all, but let&rsquo;s add some more students to our database:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Diedra”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">12</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Michelle”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">11</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Jermaine”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">9</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>Three sentences are now printed, one for each student that matches the search. Eve works on <a href="https://witheve.github.io/docs/handbook/sets/">sets</a>, so when we search for <code>[#student name grade school]</code>, we find <em>all</em> records that match the given pattern. This includes Celia, Diedra and Michelle (but not Jermaine, as he has no school in his record). Therefore, when we bind the record <code>[#div text: &quot;{{name}} is a ... &quot;]</code>, we are actually binding three records, one for each matching <code>#student</code>.</p> - -<p>If you re-compile the program a couple times, you&rsquo;ll see the order of sentences may change. This is because <strong>there is no ordering in Eve - blocks are not ordered, statements are not ordered, and results are not ordered</strong>. If you want to order elements, you must impose an ordering yourself. We can ask the browser to draw elements in an order with the &ldquo;sort&rdquo; attribute:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> - -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="x">name</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is a {{grade}}th grade student at {{school}}.&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>This time when you recompile your program, the order will stay fixed, sorted alphabetically by name.</p> - -<p>Let&rsquo;s make things a little more interesting by adding some records about the schools the students attend:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“West”</span><span class="p">,</span><span class="w"> </span><span class="x">address</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;1234 Main Street&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“East”</span><span class="p">,</span><span class="w"> </span><span class="x">address</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;5678 Broad Street&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>What if we want to display the address of the school each student attends? Although <code>#student</code>s and <code>#school</code>s are in different records, <strong>we can relate two records by associating attributes from one record with attributes from the other.</strong> This is an operation known as <a href="https://witheve.github.io/docs/handbook/joins/">joining</a>. In this case, we want to relate the <code>name</code> attribute on <code>#schools</code> with the <code>school</code> attribute on <code>#students</code>. This compares the values of the attributes between records, and matches up those with the same value. For instance, since Celia&rsquo;s school is &ldquo;East&rdquo;, she can join with the <code>#school</code> named &ldquo;East&rdquo;.</p> +<p>In this guide we&rsquo;re going to give you a 5 minute introduction to the essential concepts in Eve. If you&rsquo;ve never used Eve before, you&rsquo;re in the right place.</p> -<p>Our first attempt may come out looking a little something like this:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">student</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">name</span><span class="p">]</span><span class="w"> </span> +<h2 id="adding-records-to-eve">Adding records to Eve</h2> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{student.name}} attends {{school.name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> +<p>Eve represents data as records, which are key value pairs attached to a unique ID. Eve programs are made up of small composable blocks that search for and create records. Let&rsquo;s start with a block that adds a record to Eve:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">greeting</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;hello world&quot;</span><span class="p">]</span> </code></pre></div> -<p>But that didn&rsquo;t work. How come? In Eve, <strong>things with the same name are <a href="https://witheve.github.io/docs/handbook/equivalence/">equivalent</a></strong>. In this block, we&rsquo;ve used &ldquo;name&rdquo; three times, which says that the school&rsquo;s name, the student&rsquo;s name, and the student&rsquo;s school are all the same. Of course, there is no combination of students and schools that match this search, so nothing is displayed.</p> +<p>This record is tagged <code>#greeting</code>, and has an attribute &ldquo;text&rdquo; with the value &ldquo;hello world&rdquo;. Although tags have a special syntax, they are attributes like any other. We encourage you to classify groups of related records with tags.</p> -<p>Instead, we can use the dot operator to specifically ask for the name attribute in the <code>#school</code> records, and rename our variables to get a correct block:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school.name</span><span class="p">]</span><span class="w"></span> +<h2 id="finding-records-in-eve">Finding records in Eve</h2> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{students.name}} attends {{schools.name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> - -<p>This creates an implicit join over the school name without mixing up the names of the students and the names of the schools, giving us our desired output. You can actually bind attributes to any name you want to avoid collisions in a block:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="nf">-</span><span class="x">name</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">student</span><span class="nf">-</span><span class="x">name</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="nf">-</span><span class="x">name</span><span class="p">]</span><span class="w"></span> +<p>Eve finds every record that matches the supplied patterns, then binds new records to them. If no records match the search, then the block does not run at all. A block will only run if every pattern in a search matches at least one record. Let&rsquo;s search for the <code>#greeting</code> we just committed, and then display it in a text container:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="p">[</span><span class="err">#</span><span class="nv">greeting</span> <span class="nv">text</span><span class="p">]</span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{student-name}} attends {{school-name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="p">]</span> </code></pre></div> -<h2 id="advanced-eve">Advanced Eve</h2> - -<p>Recall when we added our students, Celia was the only one we added an <code>age</code> to. Therefore, the following block only displays Celia&rsquo;s age, even though we ask for all the <code>#student</code>s:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="p">]</span><span class="w"></span> +<p>Variables with the same name are equivalent within a block; because they have the same name, the <code>text</code> in <code>[#greeting text]</code> and <code>[#ui/text text]</code> are equivalent. Go ahead and add another <code>#greeting</code> record to the first block to see what happens when more than one record matches the search.</p> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is {{age}} years old&quot;</span><span class="p">]</span><span class="w"></span> -</code></pre></div> +<h2 id="records-update-as-data-changes">Records update as data changes</h2> -<p>Let&rsquo;s pretend that all students enter first grade at six years old. Therefore, if we know a student&rsquo;s grade, we can calculate their age and add it to the student&rsquo;s record:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">student</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">calculated</span><span class="nf">-</span><span class="x">age</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">student.age</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">student.age</span><span class="w"></span> -<span class="x">                  </span><span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">student.grade</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">student.grade</span><span class="w"> </span><span class="nf">+</span><span class="w"> </span><span class="m">5</span><span class="w"></span> +<p>Blocks in Eve react automatically to changes in data. When a record changes, any bound records are automatically updated. Let&rsquo;s search for the current time, and display it in a div:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="p">[</span><span class="err">#</span><span class="nv">time</span> <span class="nv">seconds</span><span class="p">]</span> -<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">student.age</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="x">calculated</span><span class="nf">-</span><span class="x">age</span><span class="w"></span> +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="nf">:</span> <span class="nv">seconds</span><span class="p">]</span> </code></pre></div> -<p>This block selects all students, and uses and <a href="https://witheve.github.io/docs/handbook/if-then/"><code>if-then</code></a> expression to set the student&rsquo;s calculated age. If the student already has an age, we set it to that. Otherwise, if the student has no age, we can calculate it with some arithmetic. The <a href="https://witheve.github.io/docs/handbook/set/">set operator</a> <code>:=</code> sets an attribute to a specified value regardless of what it was before the block executed. That value can be anything, from a number to a string to another record.</p> - -<h3 id="aggregates">Aggregates</h3> +<p>As the time changes, the output updates to reflect the current state of the <code>#time</code> record. Records can be committed instead of bound, but the behavior is a little different &ndash; committed records persist until they are removed explicitly. Try changing <code>bind</code> to <code>commit</code> in the above block and see what happens.</p> -<p>So far everything we&rsquo;ve done has used one record at a time, but what happens when we want to work over a group of records, such as counting how many students there are? To solve such a problem, we&rsquo;ll need to use an <a href="https://witheve.github.io/docs/handbook/aggregates/">aggregate</a>. Aggregates take a set of values and turn them into a single value, akin to &ldquo;fold&rdquo; or &ldquo;reduce&rdquo; functions in other languages. In this case, we&rsquo;ll use the aggregate <a href="https://witheve.github.io/docs/handbook/statistics/count/"><code>count</code></a> to figure out how many <code>#students</code> are in the school district:  </p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">total</span><span class="nf">-</span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">]</span><span class="w"></span> +<h2 id="reacting-to-events">Reacting to events</h2> -<span class="kr">bind</span><span class="w"> </span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{total-students}} are in the school district&quot;</span><span class="p">]</span><span class="w"></span> +<p>Let&rsquo;s draw a button on the screen:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">button</span> <span class="err">#</span><span class="nv">increment</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;+1&quot;</span><span class="p">]</span> </code></pre></div> -<p>A quick note on the syntax for <code>count</code> - it feels a lot like a function in other languages, since it has a return value and can be used inline in expressions. Under the hood, <a href="https://witheve.github.io/docs/handbook/functions/">functions</a> and aggregates are actually records; <code>total = count[given: students]</code> is shorthand for <code>[#count #function given: students, value: total]</code>. This distinction won&rsquo;t materially change the way you use <code>count</code>, but it goes to show that everything in Eve reduces to working with records.</p> - -<p>While <code>given</code> is a required argument in <code>count</code>, aggregates (and functions in general) can also have optional arguments. Let&rsquo;s say we want to know how many students attend each school. We can use the optional argument <code>per</code> to count students grouped by the school they attend:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="nf">-</span><span class="x">per</span><span class="nf">-</span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> +<p>When you click anywhere on the screen, Eve creates an <code>#html/event/click</code> record representing the click. You can react to clicks on the <code>#increment</code> button by searching for the <code>#html/event/click</code> record, where the element attribute is the button:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="nv">event</span> <span class="nf">=</span> <span class="p">[</span><span class="err">#</span><span class="nv">html</span><span class="nf">/</span><span class="nv">event</span><span class="nf">/</span><span class="nv">click</span> <span class="nv">element</span><span class="nf">:</span> <span class="p">[</span><span class="err">#</span><span class="nv">increment</span><span class="p">]]</span> -<span class="kr">bind</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{students-per-school}} attend {{school}}&quot;</span><span class="p">]</span><span class="w"></span> +<span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">clicked</span> <span class="nv">event</span><span class="p">]</span> </code></pre></div> -<p>All function-like records in Eve specify their arguments as attributes. This means you specify the argument and its value, unlike in other languages, where the order of the values determines the attribute to which they belong. As with everything else in Eve, order doesn&rsquo;t matter.</p> +<p>Clicks only last for an instant, but we want to create a permanent record of each click so we can search for them later. This block commits a <code>#clicked</code> record that will persist until it&rsquo;s explicitly removed. Much like the <code>#greeting</code> text we bound to the <code>#ui</code>, variables with the same name are equivalent, so the variable <code>event</code> in the <code>#clicked</code> record is a reference to the <code>#html/event/click</code> on the <code>#increment</code> button.</p> -<h2 id="extra-credit">Extra Credit</h2> +<p>The identity of a record is determined by its attribute/value pairs. Two records with the same attributes and values are identical in Eve. We included the <code>event</code> attribute in the <code>#clicked</code> record to differentiate each record. Without this differentiation, we could only ever create a single <code>#clicked</code> record. Try removing <code>event</code> from the record and click the button to test this out.</p> -<p>At this point, you know everything necessary about Eve to complete this extra credit portion (the only additional knowledge you need is domain knowledge of HTML and forms). Let&rsquo;s review some of the key concepts:</p> +<h2 id="count-the-number-of-clicks">Count the number of clicks</h2> -<ul> -<li>Eve programs are composed of blocks of code that search for and update records.</li> -<li>Records are sets of <code>attribute: value</code> pairs attached to a unique ID.</li> -<li>Eve works with sets, which have no ordering and contain unique elements.</li> -<li>Things with the same name are equivalent.</li> -</ul> +<p>Now let&rsquo;s count the number of times the button has been clicked. Make sure <code>event</code> is back in <code>#clicked</code>, and then we can count those records directly:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="nv">how</span><span class="nf">-</span><span class="nv">many</span> <span class="nf">=</span> <span class="nv">gather</span><span class="nf">/</span><span class="nv">count</span><span class="p">[</span><span class="nv">for</span><span class="nf">:</span> <span class="p">[</span><span class="err">#</span><span class="nv">clicked</span><span class="p">]]</span> -<p>Your extra credit task is to build a web-based form that allows you to add students to the database. Take a moment to think about how this might be done in Eve, given everything we&rsquo;ve learned so far.</p> - -<p>First, let&rsquo;s make the form. We&rsquo;ve already displayed a <code>#div</code>, and in the same way we can draw <code>#input</code>s and a <code>#button</code>:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Name:&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#name-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">2</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">3</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Grade:&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#grade-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">4</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;School:&quot;</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#school-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">6</span><span class="p">]</span><span class="w"></span> -<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#button</span><span class="w"> </span><span class="nt">#submit</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">7</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;submit&quot;</span><span class="p">]]</span><span class="w"></span> +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;The button has been clicked {{how-many}} times&quot;</span><span class="p">]</span> </code></pre></div> -<p>We&rsquo;ve added some tags to the inputs and the button to distinguish them, so we can easily search for them from other blocks. Now that we have a form, we need to define what happens when the submit button is clicked.</p> - -<p>Remember, everything in Eve is a record, so the <code>#click</code> event is no different. When a user clicks the mouse in the browser, Eve records that click in the database.</p> - -<p>This record exists only for an instant, but we can react to it by searching for <code>[#click element: [#submit]]</code>. This record represents a <code>#click</code> on our <code>#submit</code> button. Then, all we need to do is capture the values of the input boxes and save them as a <code>#student</code> record:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#click</span><span class="w"> </span><span class="x">element</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#submit</span><span class="p">]]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#name-input</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#grade-input</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school-input</span><span class="p">]</span><span class="w"></span> - -<span class="kr">commit</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="c1">// save the new student</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">name.value</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="x">grade.value</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school.value</span><span class="p">]</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="c1">// reset the form</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">name.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">grade.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> -<span class="x"> </span><span class="w"> </span><span class="x">school.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> -</code></pre></div> +<p>This block searches for every unique <code>#clicked</code>, counts them, and returns that value in <code>how-many</code>. Then we display this value in a text container using the operator <code>{{ ... }}</code>, which inserts the value of the contained variable into the string. An important thing to remember here is that this block will only run when the button has been clicked at least once. Before then, this block will not run because there are no <code>#clicked</code> records to count.</p> -<h2 id="learning-more">Learning more</h2> +<h2 id="summary">Summary</h2> -<p>If you want to learn more about Eve, we have some resources to help with that:</p> +<p>That&rsquo;s it for the 5 minute introduction to Eve. To summarize:</p> <ul> -<li>Example applications - See some working programs and explore how they work.</li> -<li>Tutorials - Step by step instructions on building Eve applications.</li> -<li><a href="https://witheve.github.io/docs">The Eve Handbook</a> - Everything you need to know about Eve.</li> -<li><a href="https://witheve.github.io/assets/docs/SyntaxReference.pdf">Eve syntax reference</a> - Eve&rsquo;s syntax in one page.</li> -<li>Guides - In-depth documents on topics relating to Eve.</li> +<li>Eve programs are made up of blocks.</li> +<li>Data are represented by records, key value pairs associated to a unique ID.</li> +<li>There are two sections of a block: one where you search for records, and one where you bind or commit records.</li> +<li>Blocks update records automatically to reflect changes in data.</li> +<li>Bound records are replaced when data changes, while committed records must be removed manually.</li> +<li>Records are unique, uniqueness is determined by a record&rsquo;s attributes and their values.</li> </ul> -<p>We also invite you to join the Eve community! There are several ways to get involved:</p> +<p>This will get you started with Eve, but there&rsquo;s still more to learn. From here, you can:</p> <ul> -<li>Join our <a href="https://groups.google.com/forum/#!forum/eve-talk">mailing list</a> and get involved with the latest discussions on Eve.</li> -<li>Impact the future of Eve by getting involved with our <a href="https://github.com/witheve/rfcs">Request for Comments</a> process.</li> -<li>Read our <a href="http://incidentalcomplexity.com/">development diary</a> for the latest news and articles on Eve.</li> -<li>Follow us on <a href="https://twitter.com/with_eve">twitter</a>.</li> +<li>Advance to Level 2 of the introductory tutorial.</li> +<li>View the syntax reference or the Eve handbook.</li> +<li>Explore already made examples.</li> +<li>Or dive right in to the editor and try out the concepts you&rsquo;ve just learned.</li> </ul> diff --git a/tutorials/quickstart.eve/index.html b/tutorials/quickstart.eve/index.html new file mode 100644 index 0000000..9987a39 --- /dev/null +++ b/tutorials/quickstart.eve/index.html @@ -0,0 +1,273 @@ + + + + + + + + + + + + Quickstart - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+
+ +
+
+
+
+ +
+
+ + + + + +
+
+
+
+
+
+ + + +

Quickstart

+ +

In this guide we’re going to give you a 5 minute introduction to the essential concepts in Eve. If you’ve never used Eve before, you’re in the right place.

+ +

Adding records to Eve

+ +

Eve represents data as records, which are key value pairs attached to a unique ID. Eve programs are made up of small composable blocks that search for and create records. Let’s start with a block that adds a record to Eve:

+
commit
+  [#greeting text: "hello world"]
+
+ +

This record is tagged #greeting, and has an attribute “text” with the value “hello world”. Although tags have a special syntax, they are attributes like any other. We encourage you to classify groups of related records with tags.

+ +

Finding records in Eve

+ +

Eve finds every record that matches the supplied patterns, then binds new records to them. If no records match the search, then the block does not run at all. A block will only run if every pattern in a search matches at least one record. Let’s search for the #greeting we just committed, and then display it in a text container:

+
search
+  [#greeting text]
+
+bind
+  [#ui/text text]
+
+ +

Variables with the same name are equivalent within a block; because they have the same name, the text in [#greeting text] and [#ui/text text] are equivalent. Go ahead and add another #greeting record to the first block to see what happens when more than one record matches the search.

+ +

Records update as data changes

+ +

Blocks in Eve react automatically to changes in data. When a record changes, any bound records are automatically updated. Let’s search for the current time, and display it in a div:

+
search
+  [#time seconds]
+
+bind 
+  [#ui/text text: seconds]
+
+ +

As the time changes, the output updates to reflect the current state of the #time record. Records can be committed instead of bound, but the behavior is a little different – committed records persist until they are removed explicitly. Try changing bind to commit in the above block and see what happens.

+ +

Reacting to events

+ +

Let’s draw a button on the screen:

+
commit
+  [#ui/button #increment text: "+1"]
+
+ +

When you click anywhere on the screen, Eve creates an #html/event/click record representing the click. You can react to clicks on the #increment button by searching for the #html/event/click record, where the element attribute is the button:

+
search
+  event = [#html/event/click element: [#increment]]
+
+commit
+  [#clicked event]
+
+ +

Clicks only last for an instant, but we want to create a permanent record of each click so we can search for them later. This block commits a #clicked record that will persist until it’s explicitly removed. Much like the #greeting text we bound to the #ui, variables with the same name are equivalent, so the variable event in the #clicked record is a reference to the #html/event/click on the #increment button.

+ +

The identity of a record is determined by its attribute/value pairs. Two records with the same attributes and values are identical in Eve. We included the event attribute in the #clicked record to differentiate each record. Without this differentiation, we could only ever create a single #clicked record. Try removing event from the record and click the button to test this out.

+ +

Count the number of clicks

+ +

Now let’s count the number of times the button has been clicked. Make sure event is back in #clicked, and then we can count those records directly:

+
search
+  how-many = gather/count[for: [#clicked]]
+
+bind
+  [#ui/text text: "The button has been clicked {{how-many}} times"]
+
+ +

This block searches for every unique #clicked, counts them, and returns that value in how-many. Then we display this value in a text container using the operator {{ ... }}, which inserts the value of the contained variable into the string. An important thing to remember here is that this block will only run when the button has been clicked at least once. Before then, this block will not run because there are no #clicked records to count.

+ +

Summary

+ +

That’s it for the 5 minute introduction to Eve. To summarize:

+ +
    +
  • Eve programs are made up of blocks.
  • +
  • Data are represented by records, key value pairs associated to a unique ID.
  • +
  • There are two sections of a block: one where you search for records, and one where you bind or commit records.
  • +
  • Blocks update records automatically to reflect changes in data.
  • +
  • Bound records are replaced when data changes, while committed records must be removed manually.
  • +
  • Records are unique, uniqueness is determined by a record’s attributes and their values.
  • +
+ +

This will get you started with Eve, but there’s still more to learn. From here, you can:

+ +
    +
  • Advance to Level 2 of the introductory tutorial.
  • +
  • View the syntax reference or the Eve handbook.
  • +
  • Explore already made examples.
  • +
  • Or dive right in to the editor and try out the concepts you’ve just learned.
  • +
+ + +
+
+
+
+ diff --git a/tutorials/quickstart/index.html b/tutorials/quickstart/index.html deleted file mode 100644 index d88419b..0000000 --- a/tutorials/quickstart/index.html +++ /dev/null @@ -1,591 +0,0 @@ - - - - - - - - - - - - Quickstart - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- - - -

Eve Quick Start Tutorial

-
```
-bind @browser
-  [tag: "div", text: "Hello, world"]
-```
-
- -

Hello world! At its core, Eve is a pattern matching language. You match patterns of data by searching a database, then update or create new data according to what you’ve found. In this example, we created a record that has two attributes: a tag attribute with the value "div", and a text attribute with the value "Hello, world". We bound this record to the browser, which is how we displayed our venerable message.

- -

The three backticks ``` are called a code fence, and they allow us to denote blocks of code. This gives us the ability to embed Eve code in normal documents written in Markdown. This is how Eve programs are written: everything in a code fence is a block of Eve code, while everything outside is prose describing the program. In fact, this quick start tutorial is an example of an executable Eve program! In the subsequent blocks, you won’t see any code fences, but they still exist in the document’s source.

- -

So far we’ve created a record that displays “Hello, world!” but as I said, Eve is a pattern matching language. Let’s explore that by searching for something:

-
search
-  [name]
-
-bind @browser
-  [tag: "div", text: "Hello, world"]
-
- -

Our message disappeared! Before, we bound without searching, so the message displayed by default. Now we’re binding in the presence of a search action, so the bound record only exists if all the searched records are matched. Here, we’re searching for all records with a name attribute, but we haven’t added any records like that to Eve so none are matched. With no matching records, the bind cannot execute, and the message disappears from the screen.

- -

This is the flow of an Eve block: you search for records in a database, and if all the records you searched for are matched, you can modify the matched records or create new ones. If any part of your search is not matched, then no records will be created or updated.

- -

To get our message back, all we need is a record with a name attribute. We can create one permanently with the commit action:

-
commit
-  [name: "Celia"]
-
- -

Hello, world… again! Commit permanently updates or creates a record that will persist even if its matched records (the records matched in a search action) change. Since we aren’t searching for anything in this block, the commit executes by default and adds a record with a name attribute of "Celia". The addition of this new record satisfies the search in the previous block, so “Hello, world!” appears on the screen again.

- -

But what else can you do with matched records? For starters, we can use them to create new records:

-
search
-  [name]
-
-bind @browser
-  [#div, text: "Hello, {{name}}"]
-
- -

Since we matched on a record with a name attribute, we now have a reference to that name, and we can inject it into a string using {{ ... }} embedding. We can also swap out tag: "div" for the sugared #div. Tags are used a lot in Eve to talk about collections of related records. For example, we could search for all records with a #student tag, with name, grade, and school attributes.

-
search
-  [#student name grade school]
-
-bind @browser
-  [#div text: "{{name}} is a {{grade}}th grade student at {{school}}."]
-
- -

Since we’re matching on more attributes, this block is no longer satisfied by the record we added earlier; we’re missing a #student tag, as well as grade and school attributes. Even though these are currently missing, we can still write the code that would display them.

- -

Let’s display this new message by adding the missing attributes to Celia. We could add them to the block where we comitted Celia originally, but we can also do it programatically:

-
search
-  celia = [name: “Celia”]
-
-bind
-  celia <- [#student grade: 10, school: "East", age: 16]
-
- -

You can define variables within blocks, which act as handles on records that allow you to change them. In this case, we’re using the merge operator <- to combine two records. With the addition of this block, the sentence “Celia is a 10th grade student at East.” appears in the browser.

- -

Celia is cool and all, but let’s add some more students to our database:

-
commit
-  [#student name: “Diedra”, grade: 12, school: "West"]
-  [#student name: “Michelle”, grade: 11, school: "West"]
-  [#student name: “Jermaine”, grade: 9]
-
- -

Three sentences are now printed, one for each student that matches the search. Eve works on sets, so when we search for [#student name grade school], we find all records that match the given pattern. This includes Celia, Diedra and Michelle (but not Jermaine, as he has no school in his record). Therefore, when we bind the record [#div text: "{{name}} is a ... "], we are actually binding three records, one for each matching #student.

- -

If you re-compile the program a couple times, you’ll see the order of sentences may change. This is because there is no ordering in Eve - blocks are not ordered, statements are not ordered, and results are not ordered. If you want to order elements, you must impose an ordering yourself. We can ask the browser to draw elements in an order with the “sort” attribute:

-
search
-  [#student name grade school]
-
-bind @browser
-  [#div sort: name, text: "{{name}} is a {{grade}}th grade student at {{school}}."]
-
- -

This time when you recompile your program, the order will stay fixed, sorted alphabetically by name.

- -

Let’s make things a little more interesting by adding some records about the schools the students attend:

-
commit
-  [#school name: “West”, address: "1234 Main Street"]
-  [#school name: “East”, address: "5678 Broad Street"]
-
- -

What if we want to display the address of the school each student attends? Although #students and #schools are in different records, we can relate two records by associating attributes from one record with attributes from the other. This is an operation known as joining. In this case, we want to relate the name attribute on #schools with the school attribute on #students. This compares the values of the attributes between records, and matches up those with the same value. For instance, since Celia’s school is “East”, she can join with the #school named “East”.

- -

Our first attempt may come out looking a little something like this:

-
search
-  school = [#school name address]
-  student = [#student name school: name] 
-
-bind @browser
-  [#div text: "{{student.name}} attends {{school.name}} at {{address}}"]
-
- -

But that didn’t work. How come? In Eve, things with the same name are equivalent. In this block, we’ve used “name” three times, which says that the school’s name, the student’s name, and the student’s school are all the same. Of course, there is no combination of students and schools that match this search, so nothing is displayed.

- -

Instead, we can use the dot operator to specifically ask for the name attribute in the #school records, and rename our variables to get a correct block:

-
search
-  schools = [#school address]
-  students = [#student school: school.name]
-
-bind @browser
-  [#div text: "{{students.name}} attends {{schools.name}} at {{address}}"]
-
- -

This creates an implicit join over the school name without mixing up the names of the students and the names of the schools, giving us our desired output. You can actually bind attributes to any name you want to avoid collisions in a block:

-
search
-  [#school name: school-name address]
-  [#student name: student-name school: school-name]
-
-bind @browser
-  [#div text: "{{student-name}} attends {{school-name}} at {{address}}"]
-
- -

Advanced Eve

- -

Recall when we added our students, Celia was the only one we added an age to. Therefore, the following block only displays Celia’s age, even though we ask for all the #students:

-
search
-  [#student name age]
-
-bind @browser
-  [#div text: "{{name}} is {{age}} years old"]
-
- -

Let’s pretend that all students enter first grade at six years old. Therefore, if we know a student’s grade, we can calculate their age and add it to the student’s record:

-
search
-  student = [#student]
-  calculated-age = if student.age then student.age
-                   else if student.grade then student.grade + 5
-
-bind @browser
-  student.age := calculated-age
-
- -

This block selects all students, and uses and if-then expression to set the student’s calculated age. If the student already has an age, we set it to that. Otherwise, if the student has no age, we can calculate it with some arithmetic. The set operator := sets an attribute to a specified value regardless of what it was before the block executed. That value can be anything, from a number to a string to another record.

- -

Aggregates

- -

So far everything we’ve done has used one record at a time, but what happens when we want to work over a group of records, such as counting how many students there are? To solve such a problem, we’ll need to use an aggregate. Aggregates take a set of values and turn them into a single value, akin to “fold” or “reduce” functions in other languages. In this case, we’ll use the aggregate count to figure out how many #students are in the school district:  

-
search
-  students = [#student]
-  total-students = count[given: students]
-
-bind 
-  [#div text: "{{total-students}} are in the school district"]
-
- -

A quick note on the syntax for count - it feels a lot like a function in other languages, since it has a return value and can be used inline in expressions. Under the hood, functions and aggregates are actually records; total = count[given: students] is shorthand for [#count #function given: students, value: total]. This distinction won’t materially change the way you use count, but it goes to show that everything in Eve reduces to working with records.

- -

While given is a required argument in count, aggregates (and functions in general) can also have optional arguments. Let’s say we want to know how many students attend each school. We can use the optional argument per to count students grouped by the school they attend:

-
search
-  students = [#student school]
-  students-per-school = count[given: students, per: school]
-
-bind
-  [#div text: "{{students-per-school}} attend {{school}}"]
-
- -

All function-like records in Eve specify their arguments as attributes. This means you specify the argument and its value, unlike in other languages, where the order of the values determines the attribute to which they belong. As with everything else in Eve, order doesn’t matter.

- -

Extra Credit

- -

At this point, you know everything necessary about Eve to complete this extra credit portion (the only additional knowledge you need is domain knowledge of HTML and forms). Let’s review some of the key concepts:

- -
    -
  • Eve programs are composed of blocks of code that search for and update records.
  • -
  • Records are sets of attribute: value pairs attached to a unique ID.
  • -
  • Eve works with sets, which have no ordering and contain unique elements.
  • -
  • Things with the same name are equivalent.
  • -
- -

Your extra credit task is to build a web-based form that allows you to add students to the database. Take a moment to think about how this might be done in Eve, given everything we’ve learned so far.

- -

First, let’s make the form. We’ve already displayed a #div, and in the same way we can draw #inputs and a #button:

-
bind @browser
-  [#div children: 
-    [#div sort: 1, text: "Name:"]
-    [#input #name-input sort: 2]
-    [#div sort: 3, text: "Grade:"]
-    [#input #grade-input sort: 4]
-    [#div sort: 5, text: "School:"]
-    [#input #school-input sort: 6]
-    [#button #submit sort: 7 text: "submit"]]
-
- -

We’ve added some tags to the inputs and the button to distinguish them, so we can easily search for them from other blocks. Now that we have a form, we need to define what happens when the submit button is clicked.

- -

Remember, everything in Eve is a record, so the #click event is no different. When a user clicks the mouse in the browser, Eve records that click in the database.

- -

This record exists only for an instant, but we can react to it by searching for [#click element: [#submit]]. This record represents a #click on our #submit button. Then, all we need to do is capture the values of the input boxes and save them as a #student record:

-
search
-  [#click element: [#submit]]
-  name = [#name-input]
-  grade = [#grade-input]
-  school = [#school-input]
-
-commit
-  // save the new student
-  [#student name: name.value, grade: grade.value, school: school.value]
-  // reset the form
-  name.value := ""
-  grade.value := ""
-  school.value := ""
-
- -

Learning more

- -

If you want to learn more about Eve, we have some resources to help with that:

- -
    -
  • Example applications - See some working programs and explore how they work.
  • -
  • Tutorials - Step by step instructions on building Eve applications.
  • -
  • The Eve Handbook - Everything you need to know about Eve.
  • -
  • Eve syntax reference - Eve’s syntax in one page.
  • -
  • Guides - In-depth documents on topics relating to Eve.
  • -
- -

We also invite you to join the Eve community! There are several ways to get involved:

- - - - -
-
- -
- From f303a2fa8273941aef74dd089b334225c6169c8a Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Wed, 17 May 2017 12:04:17 -0700 Subject: [PATCH 002/109] Create CNAME --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..e825467 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +docs.witheve.com \ No newline at end of file From 0dc08ec5376814308a4b05f3a241f5b1b5ad1e86 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Thu, 18 May 2017 11:02:02 -0700 Subject: [PATCH 003/109] update style --- handbook/libraries/style.css | 79 +++++++++ stylesheets/application.css | 266 +--------------------------- stylesheets/highlight/highlight.css | 47 +---- 3 files changed, 81 insertions(+), 311 deletions(-) create mode 100644 handbook/libraries/style.css diff --git a/handbook/libraries/style.css b/handbook/libraries/style.css new file mode 100644 index 0000000..bdd60b2 --- /dev/null +++ b/handbook/libraries/style.css @@ -0,0 +1,79 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} + +* { box-sizing: border-box; } + +body { display: flex; flex-direction: column; margin: 0; background: white; color: #555; line-height: 1.7; font-family: "Open Sans", Avenir, "Helvetica neue", sans-serif;} + +h1 { padding: 0; margin: 0; margin-bottom: 15px; font-size: 2em; font-weight: 600;} + +h2 { padding: 0; margin: 0; margin-bottom: 15px; font-size: 1.5em;} + +h3 { padding: 0; margin: 0; margin-bottom: 15px; font-size: 1em; color} + +p { + display: block; + -webkit-margin-before: .5em; + -webkit-margin-after: 1em; + -webkit-margin-start: 0px; + -webkit-margin-end: 0px; +} + +a { color: rgb(0, 158, 224); } +a:hover { color: rgb(0, 184, 241); } +a:active { color: rgb(0, 121, 177); } + +ul { display: block; margin-left: 2em; } + +code { padding: 0.2em; background: #f0f2f7; white-space: pre-wrap; font-family: "Inconsolata", "Monaco", "Consolas", "Ubuntu Mono", monospace; font-size: 0.9rem; } + +strong { font-weight: 600; } + +table { border: 1px black solid; margin-bottom: 1em; } +td { border: 1px black solid; width: 20em; } \ No newline at end of file diff --git a/stylesheets/application.css b/stylesheets/application.css index c21f5b3..58822aa 100644 --- a/stylesheets/application.css +++ b/stylesheets/application.css @@ -1,265 +1 @@ -#COOKIECOOKASDASDAS{} - -#eve-pallette { - /* Default */ - color: rgb(74,64,136); - color: rgb(91,89,164); - color: rgb(107,103,173); - color: rgb(0,121,177); - color: rgb(0,158,224); - color: rgb(0,184,241); - - /* Style 1 */ - color: rgb(0, 115, 139); - color: rgb(0, 152, 167); - color: rgb(0, 171, 188); - color: rgb(140, 49, 55); - color: rgb(177, 67, 73); - color: rgb(226, 79, 94); - - /* Style 2 */ - color: rgb(85, 138, 126); - color: rgb(113, 177, 162); - color: rgb(128, 198, 182); - color: rgb(153, 114, 45); - color: rgb(198, 154, 63); - color: rgb(246, 192, 78); - - /* Style 3 */ - color: rgb(82, 129, 62); - color: rgb(111, 165, 81); - color: rgb(129, 191, 95); - color: rgb(0, 113, 140); - color: rgb(0, 151, 167); - color: rgb(0, 170, 190); - - /* Style 4 */ - color: rgb(60, 48, 130); - color: rgb(80, 79, 161); - color: rgb(98, 94, 169); - color: rgb(158, 34, 101); - color: rgb(216, 65, 140); - color: rgb(238, 81, 158); - - /* Style 5 */ - color: rgb(185, 73, 21); - color: rgb(216, 99, 27); - color: rgb(244, 119, 33); - color: rgb(197, 114, 21); - color: rgb(248, 158, 36); - color: rgb(251, 176, 49); - - /* Style 6 */ - color: rgb(124, 38, 118); - color: rgb(169, 59, 150); - color: rgb(200, 56, 150); - color: rgb(91, 34, 127); - color: rgb(126, 60, 151); - color: rgb(164, 95, 167); - - /* Style 7 */ - color: rgb(151, 150, 137); - color: rgb(183, 182, 167); - color: rgb(204, 202, 185); - color: rgb(88, 132, 150); - color: rgb(123, 164, 182); - color: rgb(145, 192, 214); -} - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} - -body { display: flex; flex-direction: column; margin: 0; background: white; color: #555; line-height: 1.7; font-family: "Open Sans", Avenir, "Helvetica neue", sans-serif;} - - -pre { - background-color: rgb(38,38,38); - padding: 20px; - padding-left: 10px; - overflow: auto; -} - -code { - color: rgb(0, 121, 211); -} - -blockquote { - color: rgb(125,125,125); - border-left: 3px solid rgb(200,200,200); - padding-left: 10px; -} - -p { - line-height: 25px; -} - -ul, ol { - line-height: 25px; -} - -h1 { - font-size: 35px; - padding-top: 0px; - margin-top:0px; - margin-bottom: 20px; -} - -h2 { - font-size: 25px; - padding-top: 0px; - margin-top: 20px; - margin-bottom: 20px; -} - -.main { - display: flex; - align-items: stretch; - min-height: 100%; -} - -.drawer { - color: rgb(85, 85, 85); - border-right: 1px solid #f0f0f0; - padding-left: 10px; - padding-right: 50px; - padding-bottom: 20px; - -} - -.highlight { - margin-bottom: 20px; - margin-top: 20px; -} - -.colored { - font-weight: bold; -} - -.drawer a { - color: rgb(85, 85, 85); -} - -.article { - padding-left: 50px; -} - -.article a { - color: rgb(0,158,224); -} - -.article a::hover { - color: rgb(91,89,164); -} - -.sidebar-menu { - list-style: none; - margin: 0px; - padding: 0px; -} - -.sidebar-menu a { - text-decoration: none; -} - -.sidebar-menu li { - -} - -.sub { - margin: 0px; - padding: 0px; - padding-left: 20px; -} - -.sub-menu { - margin-top: 20px; -} - -.selected a { - color: rgb(145, 192, 214); -} - -.active { - -} - -.active li { - display: inherit; -} - -.dataTable { - border: 1px solid #000; - border-collapse: collapse; - width: 100%; -} - -.dataTable th { - font-weight: bold; - border: 1px solid #000; -} - -.dataTable td { - border: 1px solid #000; - white-space: pre; - font-family: monospace; - padding: 5px; -} - -.flex-spacer { flex: 1; } -.flex-row { display: flex; } -.flex-row.spaced > * + * { margin-left: 30px; } -.flex-row.double-spaced > * + * { margin-left: 60px; } -.flex-row.stretched { align-self: stretch; } - -.layer-wrapper { display: flex; flex-direction: column; align-items: center; margin-top: 60px; padding: 0 40px; } -.layer { max-width: 100%; width: 960px; display: flex; align-items: center; } -.toplayer { max-width: 100%; width: 960px; display: flex; align-items: top; } -.sub-layer { margin-top: 30px; } - -.header-wrapper { } -header > .logo { display: flex; flex: 0 0 auto; align-items: center; padding: 0; } -header > .logo > img { max-width: 60px; } -header > .logo > h1 { margin: 0; margin-left: 18px; padding: 0; height: 26px; margin-top: -32px; } -header > .logo > h1 > img { height: 100%; } - -nav { flex: none; display: flex; flex-direction: row-reverse; } -nav > * { flex: 0 0 auto; padding: 10px 20px; margin: 0; text-decoration: none; color: rgb(74, 64, 136); transition: background 0.1s ease-out; } -nav > *:hover { background: #f2f2f2; } -nav > *:active { background: #e9e9e9; } -nav > .play-cta { margin: 0; padding: 10px 20px; color: white; } - -.btn { cursor: pointer; text-align: center; user-select: none; -moz-user-select: none; -ms-user-select: none; } -.btn.big { flex: 1 0 auto; padding: 18px 30px; } -.btn.rounded { border-radius: 3px; } - -.cta { cursor: pointer; text-decoration: none; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; transition: background 0.1s ease-out; } - -.cta.primary { background: rgb(0, 184, 241); color: white; } -.cta.primary:hover { background: rgb(0, 158, 224); } -.cta.primary:active { background: rgb(0, 121, 177); } - -.cta.secondary { background: rgb(107, 103, 173); color: white; } -.cta.secondary:hover { background: rgb(91, 89, 164); } -.cta.secondary:active { background: rgb(74, 64, 136); } - -.cta.tertiary { background: #888a8f; color: white; } -.cta.tertiary:hover { background: #808284; } -.cta.tertiary:active { background: #787a7f; } +#COOKIECOOKASDASDAS{}#eve-pallette{color:#4a4088;color:#5b59a4;color:#6b67ad;color:#0079b1;color:#009ee0;color:#00b8f1;color:#00738b;color:#0098a7;color:#00abbc;color:#8c3137;color:#b14349;color:#e24f5e;color:#558a7e;color:#71b1a2;color:#80c6b6;color:#99722d;color:#c69a3f;color:#f6c04e;color:#52813e;color:#6fa551;color:#81bf5f;color:#00718c;color:#0097a7;color:#00aabe;color:#3c3082;color:#504fa1;color:#625ea9;color:#9e2265;color:#d8418c;color:#ee519e;color:#b94915;color:#d8631b;color:#f47721;color:#c57215;color:#f89e24;color:#fbb031;color:#7c2676;color:#a93b96;color:#c83896;color:#5b227f;color:#7e3c97;color:#a45fa7;color:#979689;color:#b7b6a7;color:#cccab9;color:#588496;color:#7ba4b6;color:#91c0d6}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}body{display:flex;flex-direction:column;margin:0;background:white;color:#555;line-height:1.7;font-family:"Open Sans",Avenir,"Helvetica neue",sans-serif}pre{background-color:#262626;padding:20px;padding-left:10px;overflow:auto}code{color:#0079d3}blockquote{color:#7d7d7d;border-left:3px solid #c8c8c8;padding-left:10px}p{line-height:25px}ul,ol{line-height:25px}h1{font-size:35px;padding-top:0;margin-top:0;margin-bottom:20px}h2{font-size:25px;padding-top:0;margin-top:20px;margin-bottom:20px}.main{display:flex;align-items:stretch;min-height:100%}.drawer{color:#555;border-right:1px solid #f0f0f0;padding-left:10px;padding-right:50px;padding-bottom:20px}.highlight{margin-bottom:20px;margin-top:20px}.colored{font-weight:bold}.drawer a{color:#555}.article{padding-left:50px}.article a{color:#009ee0}.article a::hover{color:#5b59a4}.sidebar-menu{list-style:none;margin:0;padding:0}.sidebar-menu a{text-decoration:none}.sidebar-menu li{}.sub{margin:0;padding:0;padding-left:20px}.sub-menu{margin-top:20px}.selected a{color:#91c0d6}.active{}.active li{display:inherit}.dataTable{border:1px solid #000;border-collapse:collapse;width:100%}.dataTable th{font-weight:bold;border:1px solid #000}.dataTable td{border:1px solid #000;white-space:pre;font-family:monospace;padding:5px}.flex-spacer{flex:1}.flex-row{display:flex}.flex-row.spaced>*+*{margin-left:30px}.flex-row.double-spaced>*+*{margin-left:60px}.flex-row.stretched{align-self:stretch}.layer-wrapper{display:flex;flex-direction:column;align-items:center;margin-top:60px;padding:0 40px}.layer{max-width:100%;width:960px;display:flex;align-items:center}.toplayer{max-width:100%;width:960px;display:flex;align-items:top}.sub-layer{margin-top:30px}.header-wrapper{}header>.logo{display:flex;flex:0 0 auto;align-items:center;padding:0}header>.logo>img{max-width:60px}header>.logo>h1{margin:0;margin-left:18px;padding:0;height:26px;margin-top:-32px}header>.logo>h1>img{height:100%}nav{flex:none;display:flex;flex-direction:row-reverse}nav>*{flex:0 0 auto;padding:10px 20px;margin:0;text-decoration:none;color:#4a4088;transition:background .1s ease-out}nav>*:hover{background:#f2f2f2}nav>*:active{background:#e9e9e9}nav>.play-cta{margin:0;padding:10px 20px;color:white}.btn{cursor:pointer;text-align:center;user-select:none;-moz-user-select:none;-ms-user-select:none}.btn.big{flex:1 0 auto;padding:18px 30px}.btn.rounded{border-radius:3px}.cta{cursor:pointer;text-decoration:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none;transition:background .1s ease-out}.cta.primary{background:#00b8f1;color:white}.cta.primary:hover{background:#009ee0}.cta.primary:active{background:#0079b1}.cta.secondary{background:#6b67ad;color:white}.cta.secondary:hover{background:#5b59a4}.cta.secondary:active{background:#4a4088}.cta.tertiary{background:#888a8f;color:white}.cta.tertiary:hover{background:#808284}.cta.tertiary:active{background:#787a7f} \ No newline at end of file diff --git a/stylesheets/highlight/highlight.css b/stylesheets/highlight/highlight.css index 7255fa6..e887506 100644 --- a/stylesheets/highlight/highlight.css +++ b/stylesheets/highlight/highlight.css @@ -1,46 +1 @@ -.article pre { - color: black; - background-color: #f5f5f5; - border-left: 5px solid rgb(234, 234, 234); - padding-left: 15px; -} - -.kr { - color: black; -} - -.c1 { - color: #747474; -} - -.nt { - color: rgb(0, 118, 206); -} - -.s { - color: rgb(1, 165, 136); -} - -.m { - color: rgb(1, 165, 136); -} - -.l { - color: rgb(1, 165, 136); -} - -.p { - color: gray; -} - -.nf { - color: rgb(128, 128, 128); -} - -.s2 { - color: rgb(1, 165, 136); -} - -.x { - color: rgb(0, 0, 0); -} \ No newline at end of file +.article pre{color:black;background-color:#f5f5f5;border-left:5px solid #eaeaea;padding-left:15px}.kr{color:black}.c1{color:#747474}.nt{color:#0076ce}.s{color:#01a588}.m{color:#01a588}.l{color:#01a588}.p{color:gray}.nf{color:#808080}.s2{color:#01a588}.x{color:#000} \ No newline at end of file From 6dbc9e673d718cb94b066568b727c1dff62eabb1 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Thu, 18 May 2017 15:24:10 -0700 Subject: [PATCH 004/109] update --- guides/index.html | 50 ++- handbook/index.html | 56 ++- handbook/index.xml | 475 ++++++++++++++++++++++++ handbook/libraries/stdlib/index.html | 467 +++++++++++++++++++++++ handbook/libraries/style.css | 80 +--- index.html | 98 +++-- index.xml | 533 ++++++++++++++++++++++++++- sitemap.xml | 10 +- style.css | 1 + stylesheets/application.css | 281 +++++++++++++- stylesheets/highlight/highlight.css | 47 ++- tutorials/index.html | 50 ++- tutorials/quickstart.eve/index.html | 85 ++--- 13 files changed, 1942 insertions(+), 291 deletions(-) create mode 100644 handbook/libraries/stdlib/index.html create mode 100644 style.css diff --git a/guides/index.html b/guides/index.html index 5d8b597..252f145 100644 --- a/guides/index.html +++ b/guides/index.html @@ -74,6 +74,25 @@ +
+
+ + + +
+ +
+
+
@@ -89,36 +108,9 @@
  • - - - Eve Programs - -
  • - - - -
  • - - - Core Language - -
  • - - - -
  • - - - Guides - -
  • - - - -
  • - + - Tutorials + Index
  • diff --git a/handbook/index.html b/handbook/index.html index df333b1..5f38b4e 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -74,6 +74,25 @@ +
    +
    + + + +
    + +
    +
    +
    @@ -89,36 +108,9 @@
  • - - - Eve Programs - -
  • - - - -
  • - - - Core Language - -
  • - - - -
  • - - - Guides - -
  • - - - -
  • - + - Tutorials + Index
  • @@ -167,6 +159,12 @@


    + +

    +
    + +
    +

    Getting Eve

    diff --git a/handbook/index.xml b/handbook/index.xml index 4b1f2f2..94f2470 100644 --- a/handbook/index.xml +++ b/handbook/index.xml @@ -26,6 +26,481 @@ + + + http://docs.witheve.com/handbook/libraries/stdlib/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs.witheve.com/handbook/libraries/stdlib/ + <head> + <link rel="stylesheet" type="text/css" href="style.css"> +</head> + +<body> + + <h2> + Aggregates + </h2> + + <table> + <tr> + <td> + <h3>gather/sort</h3> + Generates an ordering for a set + </td> + <td> + <ul> + <li><strong>for</strong> - the set to sort</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: + <ul> + <li>'up' - smallest to largest; default option</li> + <li>'down' - largest to smallest</li> + </ul> + </li> + </ul> + </td> + <td> + <code>// sorts the students by GPA + [#student GPA] + index = sort[value: GPA]</code> + </td> + </tr> + + <tr> + <td> + <h3>gather/count</h3> + Returns the number of elements in a set + </td> + <td> + <ul> + <li><strong>for</strong> - the set to count over</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// counts the number of citizens in each state + residents = [#citizen state] + population = count[given: residents, per: state]</code> + </td> + </tr> + + <tr> + <td> + <h3>gather/sum</h3> + Returns the sum of values in a set of attributes + </td> + <td> + <ul> + <li><strong>for</strong> - the set to gather</li> + <li><strong>value</strong> - the specific variable to be summed</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// returns the sum of salaries for each department + employees = [#employee salary department] + expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> + </td> + </tr> + </table> + + <h2> + Math + </h2> + + <table> + <tr> + <td> + <h3>+</h3> + Adds two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>total-debt = credit-card + debit-card</code> + </td> + </tr> + + <tr> + <td> + <h3>-</h3> + Subtracts two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>remaining-debt = total-debt - amount_paid</code> + </td> + </tr> + + <tr> + <td> + <h3>*</h3> + Multiplies two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>yearly-payments = monthly-payments * 12</code> + </td> + </tr> + + <tr> + <td> + <h3>/</h3> + Divides two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>monthly-payments = yearly-payments / 12</code> + </td> + </tr> + + <tr> + <td> + <h3>math/floor</h3> + Rounds a number down + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded down</li> + </ul> + </td> + <td> + <code>// x rounded down to 34 + x = math/floor[a: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/ceil</h3> + Rounds a number up + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded up</li> + </ul> + </td> + <td> + <code>// x rounded up to 35 + x = math/floor[a: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/round</h3> + Rounds a number to the nearest integer + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded to the nearest integer</li> + </ul> + </td> + <td> + <code>// x rounded to 34 + x = math/floor[a: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/sin</h3> + Sine of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 + r = math/sin[a: 90]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/cos</h3> + Cosine of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 0 + r = math/cos[a: 90]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/tan</h3> + Tangent of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 + r = math/tan[a: 45]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/max</h3> + The greater of two values + </td> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the higher score + [#scores pac-man donkey-kong] + best-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/min</h3> + The lesser of two values + </td> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the lower score + [#scores pac-man donkey-kong] + worst-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/mod</h3> + Modulo division + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be divided (dividend)</li> + <li><strong>b</strong> - the number by which to divide (divisor)</li> + </ul> + </td> + <td> + <code>// m is the remainder, 1 + m = math/mod[a: 5, b: 2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/abs</h3> + Absolute value of a number + </td> + <td> + <ul> + <li><strong>a</strong> - the number whose absolute value is found</li> + </ul> + </td> + <td> + <code>// number of hours from the prime meridian + [#city latitude longitude] + hours-from-gmt = math/abs[a: latitude] / 15</code> + </td> + </tr> + + <tr> + <td> + <h3>math/to-fixed</h3> + Formats a number as a string to a certain number of decimal places + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be formatted</li> + <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> + </ul> + </td> + <td> + <code>// pi represented as the string "3.14" + [#circle circumference diameter] + pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/range</h3> + Generates a range of numbers + </td> + <td> + <ul> + <li><strong>start</strong> - the start of the range</li> + <li><strong>stop</strong> - the end of the range</li> + </ul> + </td> + <td> + <code>// generates integers 1 through 10 + y = math/range[start: 1, stop: 10]</code> + </td> + </tr> + + <tr> + <td> + <h3>random/number</h3> + Generates a random number between 1 and 0 + </td> + <td> + <ul> + <li><strong>seed</strong> - a number used to initialize the random number generator</li> + </ul> + </td> + <td> + <code>// generates a random number every second + [#time minutes seconds] + x = random/number[seed: seconds]</code> + </td> + </tr> + </table> + + <h2> + Strings + </h2> + + <table> + <tr> + <td> + <h3>string/replace</h3> + Replaces a string of text with another + </td> + <td> + <ul> + <li><strong>text</strong> - the text in which to search for strings and replace them</li> + <li><strong>replace</strong> - the string to be replaced</li> + <li><strong>with</strong> - the string that will replace `replace`</li> + </ul> + </td> + <td> + <code>// Americanized version of British spelling + [#website body] + american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/get</h3> + Gets a character from a specific location in a string + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>at</strong> - the location to be searched</li> + </ul> + </td> + <td> + <code>// finds the 17th letter of the alphabet + alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + letter = string/get[text: alphabet, at: 17]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/uppercase</h3> + Converts a string to uppercase + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>funny = "lol" +really-funny = string/uppercase[text: funny]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/lowercase</h3> + Converts a string to lowercase + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>really-funny = "LOL" +down-a-notch = string/uppercase[text: really-funny]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/index-of</h3> + Returns the position of the first occurrence of a specified value in a string + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>substring</strong> - the string to be found in `text`</li> + </ul> + </td> + <td> + <code>// Eve is in developers, starting at an index of 2 +index = string/index_of[text: "developers", substring: "eve"</code> + </td> + </tr> + + <tr> + <td> + <h3>string/codepoint-length</h3> + Returns the length of a string in Unicode code points. + </td> + <td> + <ul> + <li><strong>text</strong> - the string whose length is found</li> + </ul> + </td> + <td> + <code>// the code point length of the word "unicode" +string = "unicode" +length-in-js = string/codepoint_length[text: string]</code> + </td> + </tr> + </table> + +</body> + + Getting Eve http://docs.witheve.com/handbook/ diff --git a/handbook/libraries/stdlib/index.html b/handbook/libraries/stdlib/index.html new file mode 100644 index 0000000..4e690da --- /dev/null +++ b/handbook/libraries/stdlib/index.html @@ -0,0 +1,467 @@ + + + + + + +

    + Aggregates +

    + + + + + + + + + + + + + + + + + + + +
    +

    gather/sort

    + Generates an ordering for a set +
    +
      +
    • for - the set to sort
    • +
    • per - (optional) - one or more attributes by which to group `for`
    • +
    • direction - (optional) - direction in which to sort `for`. Possible values are: +
        +
      • 'up' - smallest to largest; default option
      • +
      • 'down' - largest to smallest
      • +
      +
    • +
    +
    + // sorts the students by GPA + [#student GPA] + index = sort[value: GPA] +
    +

    gather/count

    + Returns the number of elements in a set +
    +
      +
    • for - the set to count over
    • +
    • per - (optional) - one or more attributes by which to group `for`
    • +
    +
    + // counts the number of citizens in each state + residents = [#citizen state] + population = count[given: residents, per: state] +
    +

    gather/sum

    + Returns the sum of values in a set of attributes +
    +
      +
    • for - the set to gather
    • +
    • value - the specific variable to be summed
    • +
    • per - (optional) - one or more attributes by which to group `for`
    • +
    +
    + // returns the sum of salaries for each department + employees = [#employee salary department] + expenses = gather/sum[for: employees, value: employees.salary, per: department] +
    + +

    + Math +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    +

    + Adds two numbers +
    +
      +
    • Infix notation
    • +
    +
    + total-debt = credit-card + debit-card +
    +

    -

    + Subtracts two numbers +
    +
      +
    • Infix notation
    • +
    +
    + remaining-debt = total-debt - amount_paid +
    +

    *

    + Multiplies two numbers +
    +
      +
    • Infix notation
    • +
    +
    + yearly-payments = monthly-payments * 12 +
    +

    /

    + Divides two numbers +
    +
      +
    • Infix notation
    • +
    +
    + monthly-payments = yearly-payments / 12 +
    +

    math/floor

    + Rounds a number down +
    +
      +
    • a - the number to be rounded down
    • +
    +
    + // x rounded down to 34 + x = math/floor[a: 34.2] +
    +

    math/ceil

    + Rounds a number up +
    +
      +
    • a - the number to be rounded up
    • +
    +
    + // x rounded up to 35 + x = math/floor[a: 34.2] +
    +

    math/round

    + Rounds a number to the nearest integer +
    +
      +
    • a - the number to be rounded to the nearest integer
    • +
    +
    + // x rounded to 34 + x = math/floor[a: 34.2] +
    +

    math/sin

    + Sine of an angle +
    +
      +
    • a - the angle in degrees
    • +
    +
    + // r calculated to 1 + r = math/sin[a: 90] +
    +

    math/cos

    + Cosine of an angle +
    +
      +
    • a - the angle in degrees
    • +
    +
    + // r calculated to 0 + r = math/cos[a: 90] +
    +

    math/tan

    + Tangent of an angle +
    +
      +
    • a - the angle in degrees
    • +
    +
    + // r calculated to 1 + r = math/tan[a: 45] +
    +

    math/max

    + The greater of two values +
    +
      +
    • a - a value to compare
    • +
    • b - another value to compare
    • +
    +
    + // takes the higher score + [#scores pac-man donkey-kong] + best-score = math/min[a: pac-man, b: donkey-kong] +
    +

    math/min

    + The lesser of two values +
    +
      +
    • a - a value to compare
    • +
    • b - another value to compare
    • +
    +
    + // takes the lower score + [#scores pac-man donkey-kong] + worst-score = math/min[a: pac-man, b: donkey-kong] +
    +

    math/mod

    + Modulo division +
    +
      +
    • a - the number to be divided (dividend)
    • +
    • b - the number by which to divide (divisor)
    • +
    +
    + // m is the remainder, 1 + m = math/mod[a: 5, b: 2] +
    +

    math/abs

    + Absolute value of a number +
    +
      +
    • a - the number whose absolute value is found
    • +
    +
    + // number of hours from the prime meridian + [#city latitude longitude] + hours-from-gmt = math/abs[a: latitude] / 15 +
    +

    math/to-fixed

    + Formats a number as a string to a certain number of decimal places +
    +
      +
    • a - the number to be formatted
    • +
    • b - the number of decimal places to which `a` will be formatted
    • +
    +
    + // pi represented as the string "3.14" + [#circle circumference diameter] + pi = math/to-fixed[a: (circumference / diameter), b: 2] +
    +

    math/range

    + Generates a range of numbers +
    +
      +
    • start - the start of the range
    • +
    • stop - the end of the range
    • +
    +
    + // generates integers 1 through 10 + y = math/range[start: 1, stop: 10] +
    +

    random/number

    + Generates a random number between 1 and 0 +
    +
      +
    • seed - a number used to initialize the random number generator
    • +
    +
    + // generates a random number every second + [#time minutes seconds] + x = random/number[seed: seconds] +
    + +

    + Strings +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    string/replace

    + Replaces a string of text with another +
    +
      +
    • text - the text in which to search for strings and replace them
    • +
    • replace - the string to be replaced
    • +
    • with - the string that will replace `replace`
    • +
    +
    + // Americanized version of British spelling + [#website body] + american-version = string/replace[text: body, replace: "flavour", with: "flavor"] +
    +

    string/get

    + Gets a character from a specific location in a string +
    +
      +
    • text - the text to be searched
    • +
    • at - the location to be searched
    • +
    +
    + // finds the 17th letter of the alphabet + alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + letter = string/get[text: alphabet, at: 17] +
    +

    string/uppercase

    + Converts a string to uppercase +
    +
      +
    • text - the text to be converted
    • +
    +
    + funny = "lol" +really-funny = string/uppercase[text: funny] +
    +

    string/lowercase

    + Converts a string to lowercase +
    +
      +
    • text - the text to be converted
    • +
    +
    + really-funny = "LOL" +down-a-notch = string/uppercase[text: really-funny] +
    +

    string/index-of

    + Returns the position of the first occurrence of a specified value in a string +
    +
      +
    • text - the text to be searched
    • +
    • substring - the string to be found in `text`
    • +
    +
    + // Eve is in developers, starting at an index of 2 +index = string/index_of[text: "developers", substring: "eve" +
    +

    string/codepoint-length

    + Returns the length of a string in Unicode code points. +
    +
      +
    • text - the string whose length is found
    • +
    +
    + // the code point length of the word "unicode" +string = "unicode" +length-in-js = string/codepoint_length[text: string] +
    + + \ No newline at end of file diff --git a/handbook/libraries/style.css b/handbook/libraries/style.css index bdd60b2..19254f9 100644 --- a/handbook/libraries/style.css +++ b/handbook/libraries/style.css @@ -1,79 +1 @@ -/* http://meyerweb.com/eric/tools/css/reset/ - v2.0 | 20110126 - License: none (public domain) -*/ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; -} -body { - line-height: 1; -} -ol, ul { - list-style: none; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} - -* { box-sizing: border-box; } - -body { display: flex; flex-direction: column; margin: 0; background: white; color: #555; line-height: 1.7; font-family: "Open Sans", Avenir, "Helvetica neue", sans-serif;} - -h1 { padding: 0; margin: 0; margin-bottom: 15px; font-size: 2em; font-weight: 600;} - -h2 { padding: 0; margin: 0; margin-bottom: 15px; font-size: 1.5em;} - -h3 { padding: 0; margin: 0; margin-bottom: 15px; font-size: 1em; color} - -p { - display: block; - -webkit-margin-before: .5em; - -webkit-margin-after: 1em; - -webkit-margin-start: 0px; - -webkit-margin-end: 0px; -} - -a { color: rgb(0, 158, 224); } -a:hover { color: rgb(0, 184, 241); } -a:active { color: rgb(0, 121, 177); } - -ul { display: block; margin-left: 2em; } - -code { padding: 0.2em; background: #f0f2f7; white-space: pre-wrap; font-family: "Inconsolata", "Monaco", "Consolas", "Ubuntu Mono", monospace; font-size: 0.9rem; } - -strong { font-weight: 600; } - -table { border: 1px black solid; margin-bottom: 1em; } -td { border: 1px black solid; width: 20em; } \ No newline at end of file +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}*{box-sizing:border-box}body{display:flex;flex-direction:column;margin:0;background:white;color:#555;line-height:1.7;font-family:"Open Sans",Avenir,"Helvetica neue",sans-serif}h1{padding:0;margin:0;margin-bottom:15px;font-size:2em;font-weight:600}h2{padding:0;margin:0;margin-bottom:15px;font-size:1.5em}h3{padding:0;margin:0;margin-bottom:15px;font-size:1em;color}p{display:block;-webkit-margin-before:.5em;-webkit-margin-after:1em;-webkit-margin-start:0;-webkit-margin-end:0}a{color:#009ee0}a:hover{color:#00b8f1}a:active{color:#0079b1}ul{display:block;margin-left:2em}code{padding:.2em;background:#f0f2f7;white-space:pre-wrap;font-family:"Inconsolata","Monaco","Consolas","Ubuntu Mono",monospace;font-size:.9rem}strong{font-weight:600}table{border:1px black solid;margin-bottom:1em}td{border:1px black solid;width:20em} \ No newline at end of file diff --git a/index.html b/index.html index aaede10..bed75d0 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ - Eve Documentation - Eve Documentation + Eve Documentation @@ -67,33 +67,37 @@ + + + +
    +
    + + + +
    + +
    +
    + - -
    -
    - -
    - -
    -
    -
    @@ -110,36 +114,9 @@

    EVE

  • - - - Eve Programs - -
  • - - - -
  • - - - Core Language - -
  • - - - -
  • - - - Guides - -
  • - - - -
  • - + - Tutorials + Index
  • @@ -175,17 +152,24 @@

    EVE

    -

    Eve Programming Language Documentation

    - -

    Guides

    - - - -
    + \ No newline at end of file diff --git a/index.xml b/index.xml index 03c599f..d6b123b 100644 --- a/index.xml +++ b/index.xml @@ -118,6 +118,50 @@ + + Index + http://docs.witheve.com/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs.witheve.com/ + + +<h2 id="install-guide">Install guide</h2> + +<p>Need to install Eve on your machine? <a href="../install">Head here</a> for step-by-step directions.</p> + +<h2 id="quickstart">Quickstart</h2> + +<p>If you’re new to Eve and want a hands-on demo to learn the language, you can jump right in with a 5 minute <a href="../quickstart">quickstart guide</a> that shows you how to build a simple incrementing counter.</p> + +<h2 id="syntax-reference">Syntax reference</h2> + +<p>Want a reminder how the syntax works or to get an overview of Eve without going through the quickstart? The <a href="../syntax">syntax reference</a> is a good place to start.</p> + +<h2 id="libraries">Libraries</h2> + +<p>Want to know everything Eve can do? <a href="../library">Here’s a list</a> of all the functions, operators, and watchers available in the language.</p> + +<h2 id="stuck">Stuck?</h2> + +<p>If you didn’t find what you were looking for, you can get in touch with the Eve team and the community through these channels:</p> + +<ul> +<li>Send a message to the <a href="https://groups.google.com/forum/#!forum/eve-talk">mailing list</a>. We generally respond to messages within a day.</li> +<li>Send a tweet to <a href="https://twitter.com/with_eve/">@with_eve</a>.</li> +<li>Submit an issue to our <a href="https://github.com/witheve">GitHub repository</a>.</li> +<li>Join the Eve Slack channel to talk with Eve developers and the community in real time <em>(coming soon)</em></li> +</ul> + +<h2 id="want-to-learn-more">Want to learn more?</h2> + +<ul> +<li>Browse our <a href="../gallery">gallery</a> of examples from the Eve crew and the community to learn, to be inspired, or just for fun!</li> +<li>Read our <a href="http://incidentalcomplexity.com">blog</a> to see what we’re up to, from our developer diary to essays, announcements, and more.</li> +</ul> + + + http://docs.witheve.com/README/ @@ -175,29 +219,486 @@ - http://docs.witheve.com/tutorials/ + http://docs.witheve.com/handbook/libraries/stdlib/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/tutorials/ - + http://docs.witheve.com/handbook/libraries/stdlib/ + <head> + <link rel="stylesheet" type="text/css" href="style.css"> +</head> + +<body> + + <h2> + Aggregates + </h2> + + <table> + <tr> + <td> + <h3>gather/sort</h3> + Generates an ordering for a set + </td> + <td> + <ul> + <li><strong>for</strong> - the set to sort</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: + <ul> + <li>'up' - smallest to largest; default option</li> + <li>'down' - largest to smallest</li> + </ul> + </li> + </ul> + </td> + <td> + <code>// sorts the students by GPA + [#student GPA] + index = sort[value: GPA]</code> + </td> + </tr> + + <tr> + <td> + <h3>gather/count</h3> + Returns the number of elements in a set + </td> + <td> + <ul> + <li><strong>for</strong> - the set to count over</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// counts the number of citizens in each state + residents = [#citizen state] + population = count[given: residents, per: state]</code> + </td> + </tr> + + <tr> + <td> + <h3>gather/sum</h3> + Returns the sum of values in a set of attributes + </td> + <td> + <ul> + <li><strong>for</strong> - the set to gather</li> + <li><strong>value</strong> - the specific variable to be summed</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// returns the sum of salaries for each department + employees = [#employee salary department] + expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> + </td> + </tr> + </table> + + <h2> + Math + </h2> + + <table> + <tr> + <td> + <h3>+</h3> + Adds two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>total-debt = credit-card + debit-card</code> + </td> + </tr> + + <tr> + <td> + <h3>-</h3> + Subtracts two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>remaining-debt = total-debt - amount_paid</code> + </td> + </tr> + + <tr> + <td> + <h3>*</h3> + Multiplies two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>yearly-payments = monthly-payments * 12</code> + </td> + </tr> + + <tr> + <td> + <h3>/</h3> + Divides two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>monthly-payments = yearly-payments / 12</code> + </td> + </tr> + + <tr> + <td> + <h3>math/floor</h3> + Rounds a number down + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded down</li> + </ul> + </td> + <td> + <code>// x rounded down to 34 + x = math/floor[a: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/ceil</h3> + Rounds a number up + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded up</li> + </ul> + </td> + <td> + <code>// x rounded up to 35 + x = math/floor[a: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/round</h3> + Rounds a number to the nearest integer + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded to the nearest integer</li> + </ul> + </td> + <td> + <code>// x rounded to 34 + x = math/floor[a: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/sin</h3> + Sine of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 + r = math/sin[a: 90]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/cos</h3> + Cosine of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 0 + r = math/cos[a: 90]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/tan</h3> + Tangent of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 + r = math/tan[a: 45]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/max</h3> + The greater of two values + </td> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the higher score + [#scores pac-man donkey-kong] + best-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/min</h3> + The lesser of two values + </td> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the lower score + [#scores pac-man donkey-kong] + worst-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/mod</h3> + Modulo division + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be divided (dividend)</li> + <li><strong>b</strong> - the number by which to divide (divisor)</li> + </ul> + </td> + <td> + <code>// m is the remainder, 1 + m = math/mod[a: 5, b: 2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/abs</h3> + Absolute value of a number + </td> + <td> + <ul> + <li><strong>a</strong> - the number whose absolute value is found</li> + </ul> + </td> + <td> + <code>// number of hours from the prime meridian + [#city latitude longitude] + hours-from-gmt = math/abs[a: latitude] / 15</code> + </td> + </tr> + + <tr> + <td> + <h3>math/to-fixed</h3> + Formats a number as a string to a certain number of decimal places + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be formatted</li> + <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> + </ul> + </td> + <td> + <code>// pi represented as the string "3.14" + [#circle circumference diameter] + pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/range</h3> + Generates a range of numbers + </td> + <td> + <ul> + <li><strong>start</strong> - the start of the range</li> + <li><strong>stop</strong> - the end of the range</li> + </ul> + </td> + <td> + <code>// generates integers 1 through 10 + y = math/range[start: 1, stop: 10]</code> + </td> + </tr> + + <tr> + <td> + <h3>random/number</h3> + Generates a random number between 1 and 0 + </td> + <td> + <ul> + <li><strong>seed</strong> - a number used to initialize the random number generator</li> + </ul> + </td> + <td> + <code>// generates a random number every second + [#time minutes seconds] + x = random/number[seed: seconds]</code> + </td> + </tr> + </table> + + <h2> + Strings + </h2> + + <table> + <tr> + <td> + <h3>string/replace</h3> + Replaces a string of text with another + </td> + <td> + <ul> + <li><strong>text</strong> - the text in which to search for strings and replace them</li> + <li><strong>replace</strong> - the string to be replaced</li> + <li><strong>with</strong> - the string that will replace `replace`</li> + </ul> + </td> + <td> + <code>// Americanized version of British spelling + [#website body] + american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/get</h3> + Gets a character from a specific location in a string + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>at</strong> - the location to be searched</li> + </ul> + </td> + <td> + <code>// finds the 17th letter of the alphabet + alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + letter = string/get[text: alphabet, at: 17]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/uppercase</h3> + Converts a string to uppercase + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>funny = "lol" +really-funny = string/uppercase[text: funny]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/lowercase</h3> + Converts a string to lowercase + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>really-funny = "LOL" +down-a-notch = string/uppercase[text: really-funny]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/index-of</h3> + Returns the position of the first occurrence of a specified value in a string + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>substring</strong> - the string to be found in `text`</li> + </ul> + </td> + <td> + <code>// Eve is in developers, starting at an index of 2 +index = string/index_of[text: "developers", substring: "eve"</code> + </td> + </tr> + + <tr> + <td> + <h3>string/codepoint-length</h3> + Returns the length of a string in Unicode code points. + </td> + <td> + <ul> + <li><strong>text</strong> - the string whose length is found</li> + </ul> + </td> + <td> + <code>// the code point length of the word "unicode" +string = "unicode" +length-in-js = string/codepoint_length[text: string]</code> + </td> + </tr> + </table> + +</body> - Eve Documentation - http://docs.witheve.com/ + + http://docs.witheve.com/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/ - - -<h1 id="eve-programming-language-documentation">Eve Programming Language Documentation</h1> - -<h2 id="guides">Guides</h2> - -<ul> -<li><a href="http://play.witheve.com">Eve Quickstart Guide</a></li> -</ul> - + http://docs.witheve.com/tutorials/ +
    diff --git a/sitemap.xml b/sitemap.xml index 2a87aa5..1d127b8 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -9,6 +9,10 @@ http://docs.witheve.com/tutorials/quickstart.eve/ + + http://docs.witheve.com/ + + http://docs.witheve.com/README/ @@ -26,16 +30,16 @@ - http://docs.witheve.com/tutorials/ + http://docs.witheve.com/handbook/libraries/stdlib/ - http://docs.witheve.com/ - 0 + http://docs.witheve.com/tutorials/ http://docs.witheve.com/ + 0 diff --git a/style.css b/style.css new file mode 100644 index 0000000..19254f9 --- /dev/null +++ b/style.css @@ -0,0 +1 @@ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}*{box-sizing:border-box}body{display:flex;flex-direction:column;margin:0;background:white;color:#555;line-height:1.7;font-family:"Open Sans",Avenir,"Helvetica neue",sans-serif}h1{padding:0;margin:0;margin-bottom:15px;font-size:2em;font-weight:600}h2{padding:0;margin:0;margin-bottom:15px;font-size:1.5em}h3{padding:0;margin:0;margin-bottom:15px;font-size:1em;color}p{display:block;-webkit-margin-before:.5em;-webkit-margin-after:1em;-webkit-margin-start:0;-webkit-margin-end:0}a{color:#009ee0}a:hover{color:#00b8f1}a:active{color:#0079b1}ul{display:block;margin-left:2em}code{padding:.2em;background:#f0f2f7;white-space:pre-wrap;font-family:"Inconsolata","Monaco","Consolas","Ubuntu Mono",monospace;font-size:.9rem}strong{font-weight:600}table{border:1px black solid;margin-bottom:1em}td{border:1px black solid;width:20em} \ No newline at end of file diff --git a/stylesheets/application.css b/stylesheets/application.css index 58822aa..3509bcd 100644 --- a/stylesheets/application.css +++ b/stylesheets/application.css @@ -1 +1,280 @@ -#COOKIECOOKASDASDAS{}#eve-pallette{color:#4a4088;color:#5b59a4;color:#6b67ad;color:#0079b1;color:#009ee0;color:#00b8f1;color:#00738b;color:#0098a7;color:#00abbc;color:#8c3137;color:#b14349;color:#e24f5e;color:#558a7e;color:#71b1a2;color:#80c6b6;color:#99722d;color:#c69a3f;color:#f6c04e;color:#52813e;color:#6fa551;color:#81bf5f;color:#00718c;color:#0097a7;color:#00aabe;color:#3c3082;color:#504fa1;color:#625ea9;color:#9e2265;color:#d8418c;color:#ee519e;color:#b94915;color:#d8631b;color:#f47721;color:#c57215;color:#f89e24;color:#fbb031;color:#7c2676;color:#a93b96;color:#c83896;color:#5b227f;color:#7e3c97;color:#a45fa7;color:#979689;color:#b7b6a7;color:#cccab9;color:#588496;color:#7ba4b6;color:#91c0d6}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}body{display:flex;flex-direction:column;margin:0;background:white;color:#555;line-height:1.7;font-family:"Open Sans",Avenir,"Helvetica neue",sans-serif}pre{background-color:#262626;padding:20px;padding-left:10px;overflow:auto}code{color:#0079d3}blockquote{color:#7d7d7d;border-left:3px solid #c8c8c8;padding-left:10px}p{line-height:25px}ul,ol{line-height:25px}h1{font-size:35px;padding-top:0;margin-top:0;margin-bottom:20px}h2{font-size:25px;padding-top:0;margin-top:20px;margin-bottom:20px}.main{display:flex;align-items:stretch;min-height:100%}.drawer{color:#555;border-right:1px solid #f0f0f0;padding-left:10px;padding-right:50px;padding-bottom:20px}.highlight{margin-bottom:20px;margin-top:20px}.colored{font-weight:bold}.drawer a{color:#555}.article{padding-left:50px}.article a{color:#009ee0}.article a::hover{color:#5b59a4}.sidebar-menu{list-style:none;margin:0;padding:0}.sidebar-menu a{text-decoration:none}.sidebar-menu li{}.sub{margin:0;padding:0;padding-left:20px}.sub-menu{margin-top:20px}.selected a{color:#91c0d6}.active{}.active li{display:inherit}.dataTable{border:1px solid #000;border-collapse:collapse;width:100%}.dataTable th{font-weight:bold;border:1px solid #000}.dataTable td{border:1px solid #000;white-space:pre;font-family:monospace;padding:5px}.flex-spacer{flex:1}.flex-row{display:flex}.flex-row.spaced>*+*{margin-left:30px}.flex-row.double-spaced>*+*{margin-left:60px}.flex-row.stretched{align-self:stretch}.layer-wrapper{display:flex;flex-direction:column;align-items:center;margin-top:60px;padding:0 40px}.layer{max-width:100%;width:960px;display:flex;align-items:center}.toplayer{max-width:100%;width:960px;display:flex;align-items:top}.sub-layer{margin-top:30px}.header-wrapper{}header>.logo{display:flex;flex:0 0 auto;align-items:center;padding:0}header>.logo>img{max-width:60px}header>.logo>h1{margin:0;margin-left:18px;padding:0;height:26px;margin-top:-32px}header>.logo>h1>img{height:100%}nav{flex:none;display:flex;flex-direction:row-reverse}nav>*{flex:0 0 auto;padding:10px 20px;margin:0;text-decoration:none;color:#4a4088;transition:background .1s ease-out}nav>*:hover{background:#f2f2f2}nav>*:active{background:#e9e9e9}nav>.play-cta{margin:0;padding:10px 20px;color:white}.btn{cursor:pointer;text-align:center;user-select:none;-moz-user-select:none;-ms-user-select:none}.btn.big{flex:1 0 auto;padding:18px 30px}.btn.rounded{border-radius:3px}.cta{cursor:pointer;text-decoration:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none;transition:background .1s ease-out}.cta.primary{background:#00b8f1;color:white}.cta.primary:hover{background:#009ee0}.cta.primary:active{background:#0079b1}.cta.secondary{background:#6b67ad;color:white}.cta.secondary:hover{background:#5b59a4}.cta.secondary:active{background:#4a4088}.cta.tertiary{background:#888a8f;color:white}.cta.tertiary:hover{background:#808284}.cta.tertiary:active{background:#787a7f} \ No newline at end of file +#eve-pallette { + /* Default */ + color: rgb(74,64,136); + color: rgb(91,89,164); + color: rgb(107,103,173); + color: rgb(0,121,177); + color: rgb(0,158,224); + color: rgb(0,184,241); + + /* Style 1 */ + color: rgb(0, 115, 139); + color: rgb(0, 152, 167); + color: rgb(0, 171, 188); + color: rgb(140, 49, 55); + color: rgb(177, 67, 73); + color: rgb(226, 79, 94); + + /* Style 2 */ + color: rgb(85, 138, 126); + color: rgb(113, 177, 162); + color: rgb(128, 198, 182); + color: rgb(153, 114, 45); + color: rgb(198, 154, 63); + color: rgb(246, 192, 78); + + /* Style 3 */ + color: rgb(82, 129, 62); + color: rgb(111, 165, 81); + color: rgb(129, 191, 95); + color: rgb(0, 113, 140); + color: rgb(0, 151, 167); + color: rgb(0, 170, 190); + + /* Style 4 */ + color: rgb(60, 48, 130); + color: rgb(80, 79, 161); + color: rgb(98, 94, 169); + color: rgb(158, 34, 101); + color: rgb(216, 65, 140); + color: rgb(238, 81, 158); + + /* Style 5 */ + color: rgb(185, 73, 21); + color: rgb(216, 99, 27); + color: rgb(244, 119, 33); + color: rgb(197, 114, 21); + color: rgb(248, 158, 36); + color: rgb(251, 176, 49); + + /* Style 6 */ + color: rgb(124, 38, 118); + color: rgb(169, 59, 150); + color: rgb(200, 56, 150); + color: rgb(91, 34, 127); + color: rgb(126, 60, 151); + color: rgb(164, 95, 167); + + /* Style 7 */ + color: rgb(151, 150, 137); + color: rgb(183, 182, 167); + color: rgb(204, 202, 185); + color: rgb(88, 132, 150); + color: rgb(123, 164, 182); + color: rgb(145, 192, 214); +} + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} + +body { display: flex; flex-direction: column; margin: 0; background: white; color: #555; line-height: 1.7; font-family: "Open Sans", Avenir, "Helvetica neue", sans-serif;} + + +pre { + background-color: rgb(38,38,38); + padding: 20px; + padding-left: 10px; + overflow: auto; +} + +code { + color: rgb(0, 121, 211); +} + +blockquote { + color: rgb(125,125,125); + border-left: 3px solid rgb(200,200,200); + padding-left: 10px; +} + +p { + line-height: 25px; +} + +ul, ol { + line-height: 25px; +} + +h1 { + font-size: 35px; + padding-top: 0px; + margin-top:0px; + margin-bottom: 20px; +} + +h2 { + font-size: 25px; + padding-top: 0px; + margin-top: 20px; + margin-bottom: 20px; +} + +.main { + display: flex; + align-items: stretch; + min-height: 100%; +} + +.drawer { + color: rgb(85, 85, 85); + border-right: 1px solid #f0f0f0; + padding-left: 10px; + padding-right: 50px; + padding-bottom: 20px; + +} + +.highlight { + margin-bottom: 20px; + margin-top: 20px; +} + +.colored { + font-weight: bold; +} + +.drawer a { + color: rgb(85, 85, 85); +} + +.article { + padding-left: 50px; +} + +.article a { + color: rgb(0,158,224); +} + +.article a::hover { + color: rgb(91,89,164); +} + +.sidebar-menu { + list-style: none; + margin: 0px; + padding: 0px; +} + +.sidebar-menu a { + text-decoration: none; +} + +.sidebar-menu li { + +} + +.sub { + margin: 0px; + padding: 0px; + padding-left: 20px; +} + +.sub-menu { + margin-top: 20px; +} + +.selected a { + color: rgb(145, 192, 214); +} + +.active { + +} + +.active li { + display: inherit; +} + +.dataTable { + border: 1px solid #000; + border-collapse: collapse; + width: 100%; +} + +.dataTable th { + font-weight: bold; + border: 1px solid #000; +} + +.dataTable td { + border: 1px solid #000; + white-space: pre; + font-family: monospace; + padding: 5px; +} + +.flex-spacer { flex: 1; } +.flex-row { display: flex; } +.flex-row.spaced > * + * { margin-left: 30px; } +.flex-row.double-spaced > * + * { margin-left: 60px; } +.flex-row.stretched { align-self: stretch; } + +.layer-wrapper { display: flex; flex-direction: column; align-items: center; margin-top: 60px; padding: 0 40px; } +.layer { max-width: 100%; width: 960px; display: flex; align-items: center; } +.toplayer { max-width: 100%; width: 960px; display: flex; align-items: top; } +.sub-layer { margin-top: 30px; } + +.header-wrapper { } +.logo { display: flex; flex: 0 0 auto; align-items: center; padding: 0; } +.logo > img { max-width: 60px; } +.logo > h1 { margin: 0; margin-left: 18px; padding: 0; height: 26px; margin-top: -32px; } +.logo > h1 > img { height: 100%; } + +nav { flex: none; display: flex; flex-direction: row-reverse; } +nav > * { flex: 0 0 auto; padding: 10px 20px; margin: 0; text-decoration: none; color: rgb(74, 64, 136); transition: background 0.1s ease-out; } +nav > *:hover { background: #f2f2f2; } +nav > *:active { background: #e9e9e9; } +nav > .play-cta { margin: 0; padding: 10px 20px; color: white; } + +.btn { cursor: pointer; text-align: center; user-select: none; -moz-user-select: none; -ms-user-select: none; } +.btn.big { flex: 1 0 auto; padding: 18px 30px; } +.btn.rounded { border-radius: 3px; } + +.cta { cursor: pointer; text-decoration: none; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; transition: background 0.1s ease-out; } + +.cta.primary { background: rgb(0, 184, 241); color: white; } +.cta.primary:hover { background: rgb(0, 158, 224); } +.cta.primary:active { background: rgb(0, 121, 177); } + +.cta.secondary { background: rgb(107, 103, 173); color: white; } +.cta.secondary:hover { background: rgb(91, 89, 164); } +.cta.secondary:active { background: rgb(74, 64, 136); } + +.cta.tertiary { background: #888a8f; color: white; } +.cta.tertiary:hover { background: #808284; } +.cta.tertiary:active { background: #787a7f; } + +.contact-wrapper { display: flex; flex-direction: column; padding: 0; position: relative; margin-bottom: 60px; color: white; } +.contact { display: flex; flex-direction: row; max-width: 960px; align-self: center; margin: auto; overflow: hidden; border-radius: 3px; cursor: pointer; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; } +.contact > * { flex: 1 1 auto; align-self: stretch; max-width: 320px; padding: 30px; color: white !important; text-decoration: none; transition: background 0.1s ease-out; } +.contact h3 { margin-bottom: 20px; font-size: 1.25rem; } + +.contact > *:first-child { background: rgb(107, 103, 173); } +.contact > *:first-child:hover { background: rgb(117, 115, 190); } +.contact > *:first-child:active { background: rgb(142, 140, 215); } + +.contact > *:nth-child(2) { background: rgb(91, 89, 164); } +.contact > *:nth-child(2):hover { background: rgb(117, 115, 190); } +.contact > *:nth-child(2):active { background: rgb(142, 140, 215); } + +.contact > *:last-child { background: rgb(74, 64, 136); } +.contact > *:last-child:hover { background: rgb(117, 115, 190); } +.contact > *:last-child:active { background: rgb(142, 140, 215); } \ No newline at end of file diff --git a/stylesheets/highlight/highlight.css b/stylesheets/highlight/highlight.css index e887506..7255fa6 100644 --- a/stylesheets/highlight/highlight.css +++ b/stylesheets/highlight/highlight.css @@ -1 +1,46 @@ -.article pre{color:black;background-color:#f5f5f5;border-left:5px solid #eaeaea;padding-left:15px}.kr{color:black}.c1{color:#747474}.nt{color:#0076ce}.s{color:#01a588}.m{color:#01a588}.l{color:#01a588}.p{color:gray}.nf{color:#808080}.s2{color:#01a588}.x{color:#000} \ No newline at end of file +.article pre { + color: black; + background-color: #f5f5f5; + border-left: 5px solid rgb(234, 234, 234); + padding-left: 15px; +} + +.kr { + color: black; +} + +.c1 { + color: #747474; +} + +.nt { + color: rgb(0, 118, 206); +} + +.s { + color: rgb(1, 165, 136); +} + +.m { + color: rgb(1, 165, 136); +} + +.l { + color: rgb(1, 165, 136); +} + +.p { + color: gray; +} + +.nf { + color: rgb(128, 128, 128); +} + +.s2 { + color: rgb(1, 165, 136); +} + +.x { + color: rgb(0, 0, 0); +} \ No newline at end of file diff --git a/tutorials/index.html b/tutorials/index.html index 82ef114..038e271 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -74,6 +74,25 @@ +
    +
    + + + +
    + +
    +
    +
    @@ -89,36 +108,9 @@
  • - - - Eve Programs - -
  • - - - -
  • - - - Core Language - -
  • - - - -
  • - - - Guides - -
  • - - - -
  • - + - Tutorials + Index
  • diff --git a/tutorials/quickstart.eve/index.html b/tutorials/quickstart.eve/index.html index 9987a39..fbcb634 100644 --- a/tutorials/quickstart.eve/index.html +++ b/tutorials/quickstart.eve/index.html @@ -71,29 +71,30 @@ +
    +
    + + + +
    + +
    +
    + - -
    -
    - -
    - -
    -
    -
    @@ -110,36 +111,9 @@

    EVE

  • - - - Eve Programs - -
  • - - - -
  • - + - Core Language - -
  • - - - -
  • - - - Guides - -
  • - - - -
  • - - - Tutorials + Index
  • @@ -271,3 +245,20 @@

    Summary

    + + From de3a3ea8eed4fe8165942e553c27333d2adf4d30 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Sun, 21 May 2017 19:07:19 -0700 Subject: [PATCH 005/109] update with more pages --- guides/index.html | 27 +- handbook/index.html | 37 +- handbook/index.xml | 873 ++++++++++++----------- handbook/libraries/index.html | 635 +++++++++++++++++ index.html | 64 +- index.xml | 1221 ++++++++++++++++++++------------- install/index.html | 203 ++++++ quickstart.eve/index.html | 267 +++++++ sitemap.xml | 12 +- syntaxreference/index.html | 427 ++++++++++++ tutorials/index.html | 33 +- tutorials/index.xml | 100 --- 12 files changed, 2817 insertions(+), 1082 deletions(-) create mode 100644 handbook/libraries/index.html create mode 100644 install/index.html create mode 100644 quickstart.eve/index.html create mode 100644 syntaxreference/index.html diff --git a/guides/index.html b/guides/index.html index 252f145..d0a53e9 100644 --- a/guides/index.html +++ b/guides/index.html @@ -107,33 +107,36 @@

    EVE

    -
  • - - - Index - -
  • - - - + +
  • + + + Standard Library + +
  • + +
    diff --git a/handbook/index.html b/handbook/index.html index 5f38b4e..2bbd02a 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -107,33 +107,36 @@

    EVE

    -
  • - - - Index - -
  • - - - + +
  • + + + Standard Library + +
  • + +
    @@ -153,24 +156,18 @@


    - +


    - +


    - -

    Getting Eve

    -
    - -
    -
    diff --git a/handbook/index.xml b/handbook/index.xml index 94f2470..00cc446 100644 --- a/handbook/index.xml +++ b/handbook/index.xml @@ -19,495 +19,478 @@ - http://docs.witheve.com/handbook/libraries/ + http://docs.witheve.com/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/libraries/ + http://docs.witheve.com/handbook/ - http://docs.witheve.com/handbook/libraries/stdlib/ + http://docs.witheve.com/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/libraries/stdlib/ - <head> - <link rel="stylesheet" type="text/css" href="style.css"> -</head> + http://docs.witheve.com/handbook/libraries/ + -<body> +<p><head> + <link rel="stylesheet" type="text/css" href="style.css"> +</head></p> - <h2> - Aggregates - </h2> +<h2 id="aggregates">Aggregates</h2> - <table> - <tr> - <td> - <h3>gather/sort</h3> - Generates an ordering for a set - </td> - <td> - <ul> - <li><strong>for</strong> - the set to sort</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: - <ul> - <li>'up' - smallest to largest; default option</li> - <li>'down' - largest to smallest</li> - </ul> - </li> - </ul> - </td> - <td> - <code>// sorts the students by GPA - [#student GPA] - index = sort[value: GPA]</code> - </td> - </tr> +<table> + <tr> + <td> + <h3>gather/sort</h3> + Generates an ordering for a set + </td> + <td> + <ul> + <li><strong>for</strong> - the set to sort</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: + <ul> + <li>'up' - smallest to largest; default option</li> + <li>'down' - largest to smallest</li> + </ul> + </li> + </ul> + </td> + <td> + <code>// sorts the students by GPA +[#student GPA] +index = sort[value: GPA]</code> + </td> + </tr> - <tr> - <td> - <h3>gather/count</h3> - Returns the number of elements in a set - </td> - <td> - <ul> - <li><strong>for</strong> - the set to count over</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - </ul> - </td> - <td> - <code>// counts the number of citizens in each state - residents = [#citizen state] - population = count[given: residents, per: state]</code> - </td> - </tr> + <tr> + <td> + <h3>gather/count</h3> + Returns the number of elements in a set + </td> + <td> + <ul> + <li><strong>for</strong> - the set to count over</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// counts the number of citizens in each state +residents = [#citizen state] +population = count[given: residents, per: state]</code> + </td> + </tr> - <tr> - <td> - <h3>gather/sum</h3> - Returns the sum of values in a set of attributes - </td> - <td> - <ul> - <li><strong>for</strong> - the set to gather</li> - <li><strong>value</strong> - the specific variable to be summed</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - </ul> - </td> - <td> - <code>// returns the sum of salaries for each department - employees = [#employee salary department] - expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> - </td> - </tr> - </table> + <tr> + <td> + <h3>gather/sum</h3> + Returns the sum of values in a set of attributes + </td> + <td> + <ul> + <li><strong>for</strong> - the set to gather</li> + <li><strong>value</strong> - the specific variable to be summed</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// returns the sum of salaries for each department +employees = [#employee salary department] +expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> + </td> + </tr> +</table> - <h2> - Math - </h2> +<h2 id="math">Math</h2> - <table> - <tr> - <td> - <h3>+</h3> - Adds two numbers - </td> - <td> - <ul> - <li>Infix notation</li> - </ul> - </td> - <td> - <code>total-debt = credit-card + debit-card</code> - </td> - </tr> +<table> + <tr> + <td> + <h3>+</h3> + Adds two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>total-debt = credit-card + debit-card</code> + </td> + </tr> - <tr> - <td> - <h3>-</h3> - Subtracts two numbers - </td> - <td> - <ul> - <li>Infix notation</li> - </ul> - </td> - <td> - <code>remaining-debt = total-debt - amount_paid</code> - </td> - </tr> + <tr> + <td> + <h3>-</h3> + Subtracts two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>remaining-debt = total-debt - amount_paid</code> + </td> + </tr> - <tr> - <td> - <h3>*</h3> - Multiplies two numbers - </td> - <td> - <ul> - <li>Infix notation</li> - </ul> - </td> - <td> - <code>yearly-payments = monthly-payments * 12</code> - </td> - </tr> + <tr> + <td> + <h3>*</h3> + Multiplies two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>yearly-payments = monthly-payments * 12</code> + </td> + </tr> - <tr> - <td> - <h3>/</h3> - Divides two numbers - </td> - <td> - <ul> - <li>Infix notation</li> - </ul> - </td> - <td> - <code>monthly-payments = yearly-payments / 12</code> - </td> - </tr> + <tr> + <td> + <h3>/</h3> + Divides two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>monthly-payments = yearly-payments / 12</code> + </td> + </tr> - <tr> - <td> - <h3>math/floor</h3> - Rounds a number down - </td> - <td> - <ul> - <li><strong>a</strong> - the number to be rounded down</li> - </ul> - </td> - <td> - <code>// x rounded down to 34 - x = math/floor[a: 34.2]</code> - </td> - </tr> + <tr> + <td> + <h3>math/floor</h3> + Rounds a number down + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded down</li> + </ul> + </td> + <td> + <code>// x rounded down to 34 +x = math/floor[a: 34.2]</code> + </td> + </tr> - <tr> - <td> - <h3>math/ceil</h3> - Rounds a number up - </td> - <td> - <ul> - <li><strong>a</strong> - the number to be rounded up</li> - </ul> - </td> - <td> - <code>// x rounded up to 35 - x = math/floor[a: 34.2]</code> - </td> - </tr> + <tr> + <td> + <h3>math/ceil</h3> + Rounds a number up + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded up</li> + </ul> + </td> + <td> + <code>// x rounded up to 35 +x = math/floor[a: 34.2]</code> + </td> + </tr> - <tr> - <td> - <h3>math/round</h3> - Rounds a number to the nearest integer - </td> - <td> - <ul> - <li><strong>a</strong> - the number to be rounded to the nearest integer</li> - </ul> - </td> - <td> - <code>// x rounded to 34 - x = math/floor[a: 34.2]</code> - </td> - </tr> + <tr> + <td> + <h3>math/round</h3> + Rounds a number to the nearest integer + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded to the nearest integer</li> + </ul> + </td> + <td> + <code>// x rounded to 34 +x = math/floor[a: 34.2]</code> + </td> + </tr> - <tr> - <td> - <h3>math/sin</h3> - Sine of an angle - </td> - <td> - <ul> - <li><strong>a</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 1 - r = math/sin[a: 90]</code> - </td> - </tr> + <tr> + <td> + <h3>math/sin</h3> + Sine of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 +r = math/sin[a: 90]</code> + </td> + </tr> - <tr> - <td> - <h3>math/cos</h3> - Cosine of an angle - </td> - <td> - <ul> - <li><strong>a</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 0 - r = math/cos[a: 90]</code> - </td> - </tr> + <tr> + <td> + <h3>math/cos</h3> + Cosine of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 0 +r = math/cos[a: 90]</code> + </td> + </tr> - <tr> - <td> - <h3>math/tan</h3> - Tangent of an angle - </td> - <td> - <ul> - <li><strong>a</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 1 - r = math/tan[a: 45]</code> - </td> - </tr> + <tr> + <td> + <h3>math/tan</h3> + Tangent of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 +r = math/tan[a: 45]</code> + </td> + </tr> - <tr> - <td> - <h3>math/max</h3> - The greater of two values - </td> - <td> - <ul> - <li><strong>a</strong> - a value to compare</li> - <li><strong>b</strong> - another value to compare</li> - </ul> - </td> - <td> - <code>// takes the higher score - [#scores pac-man donkey-kong] - best-score = math/min[a: pac-man, b: donkey-kong]</code> - </td> - </tr> + <tr> + <td> + <h3>math/max</h3> + The greater of two values + </td> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the higher score +[#scores pac-man donkey-kong] +best-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> - <tr> - <td> - <h3>math/min</h3> - The lesser of two values - </td> - <td> - <ul> - <li><strong>a</strong> - a value to compare</li> - <li><strong>b</strong> - another value to compare</li> - </ul> - </td> - <td> - <code>// takes the lower score - [#scores pac-man donkey-kong] - worst-score = math/min[a: pac-man, b: donkey-kong]</code> - </td> - </tr> + <tr> + <td> + <h3>math/min</h3> + The lesser of two values + </td> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the lower score +[#scores pac-man donkey-kong] +worst-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> - <tr> - <td> - <h3>math/mod</h3> - Modulo division - </td> - <td> - <ul> - <li><strong>a</strong> - the number to be divided (dividend)</li> - <li><strong>b</strong> - the number by which to divide (divisor)</li> - </ul> - </td> - <td> - <code>// m is the remainder, 1 - m = math/mod[a: 5, b: 2]</code> - </td> - </tr> + <tr> + <td> + <h3>math/mod</h3> + Modulo division + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be divided (dividend)</li> + <li><strong>b</strong> - the number by which to divide (divisor)</li> + </ul> + </td> + <td> + <code>// m is the remainder, 1 +m = math/mod[a: 5, b: 2]</code> + </td> + </tr> - <tr> - <td> - <h3>math/abs</h3> - Absolute value of a number - </td> - <td> - <ul> - <li><strong>a</strong> - the number whose absolute value is found</li> - </ul> - </td> - <td> - <code>// number of hours from the prime meridian - [#city latitude longitude] - hours-from-gmt = math/abs[a: latitude] / 15</code> - </td> - </tr> + <tr> + <td> + <h3>math/abs</h3> + Absolute value of a number + </td> + <td> + <ul> + <li><strong>a</strong> - the number whose absolute value is found</li> + </ul> + </td> + <td> + <code>// number of hours from the prime meridian +[#city latitude longitude] +hours-from-gmt = math/abs[a: latitude] / 15</code> + </td> + </tr> - <tr> - <td> - <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places - </td> - <td> - <ul> - <li><strong>a</strong> - the number to be formatted</li> - <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> - </ul> - </td> - <td> - <code>// pi represented as the string "3.14" - [#circle circumference diameter] - pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> - </td> - </tr> + <tr> + <td> + <h3>math/to-fixed</h3> + Formats a number as a string to a certain number of decimal places + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be formatted</li> + <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> + </ul> + </td> + <td> + <code>// pi represented as the string "3.14" +[#circle circumference diameter] +pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> + </td> + </tr> - <tr> - <td> - <h3>math/range</h3> - Generates a range of numbers - </td> - <td> - <ul> - <li><strong>start</strong> - the start of the range</li> - <li><strong>stop</strong> - the end of the range</li> - </ul> - </td> - <td> - <code>// generates integers 1 through 10 - y = math/range[start: 1, stop: 10]</code> - </td> - </tr> + <tr> + <td> + <h3>math/range</h3> + Generates a range of numbers + </td> + <td> + <ul> + <li><strong>start</strong> - the start of the range</li> + <li><strong>stop</strong> - the end of the range</li> + </ul> + </td> + <td> + <code>// generates integers 1 through 10 +y = math/range[start: 1, stop: 10]</code> + </td> + </tr> - <tr> - <td> - <h3>random/number</h3> - Generates a random number between 1 and 0 - </td> - <td> - <ul> - <li><strong>seed</strong> - a number used to initialize the random number generator</li> - </ul> - </td> - <td> - <code>// generates a random number every second - [#time minutes seconds] - x = random/number[seed: seconds]</code> - </td> - </tr> - </table> + <tr> + <td> + <h3>random/number</h3> + Generates a random number between 1 and 0 + </td> + <td> + <ul> + <li><strong>seed</strong> - a number used to initialize the random number generator</li> + </ul> + </td> + <td> + <code>// generates a random number every second +[#time minutes seconds] +x = random/number[seed: seconds]</code> + </td> + </tr> +</table> - <h2> - Strings - </h2> +<h2 id="strings">Strings</h2> - <table> - <tr> - <td> - <h3>string/replace</h3> - Replaces a string of text with another - </td> - <td> - <ul> - <li><strong>text</strong> - the text in which to search for strings and replace them</li> - <li><strong>replace</strong> - the string to be replaced</li> - <li><strong>with</strong> - the string that will replace `replace`</li> - </ul> - </td> - <td> - <code>// Americanized version of British spelling - [#website body] - american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> - </td> - </tr> +<table> + <tr> + <td> + <h3>string/replace</h3> + Replaces a string of text with another + </td> + <td> + <ul> + <li><strong>text</strong> - the text in which to search for strings and replace them</li> + <li><strong>replace</strong> - the string to be replaced</li> + <li><strong>with</strong> - the string that will replace `replace`</li> + </ul> + </td> + <td> + <code>// Americanized version of British spelling +[#website body] +american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> + </td> + </tr> - <tr> - <td> - <h3>string/get</h3> - Gets a character from a specific location in a string - </td> - <td> - <ul> - <li><strong>text</strong> - the text to be searched</li> - <li><strong>at</strong> - the location to be searched</li> - </ul> - </td> - <td> - <code>// finds the 17th letter of the alphabet - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - letter = string/get[text: alphabet, at: 17]</code> - </td> - </tr> + <tr> + <td> + <h3>string/get</h3> + Gets a character from a specific location in a string + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>at</strong> - the location to be searched</li> + </ul> + </td> + <td> + <code>// finds the 17th letter of the alphabet +alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +letter = string/get[text: alphabet, at: 17]</code> + </td> + </tr> - <tr> - <td> - <h3>string/uppercase</h3> - Converts a string to uppercase - </td> - <td> - <ul> - <li><strong>text</strong> - the text to be converted</li> - </ul> - </td> - <td> - <code>funny = "lol" + <tr> + <td> + <h3>string/uppercase</h3> + Converts a string to uppercase + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>funny = "lol" really-funny = string/uppercase[text: funny]</code> - </td> - </tr> + </td> + </tr> - <tr> - <td> - <h3>string/lowercase</h3> - Converts a string to lowercase - </td> - <td> - <ul> - <li><strong>text</strong> - the text to be converted</li> - </ul> - </td> - <td> - <code>really-funny = "LOL" + <tr> + <td> + <h3>string/lowercase</h3> + Converts a string to lowercase + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>really-funny = "LOL" down-a-notch = string/uppercase[text: really-funny]</code> - </td> - </tr> + </td> + </tr> - <tr> - <td> - <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string - </td> - <td> - <ul> - <li><strong>text</strong> - the text to be searched</li> - <li><strong>substring</strong> - the string to be found in `text`</li> - </ul> - </td> - <td> - <code>// Eve is in developers, starting at an index of 2 + <tr> + <td> + <h3>string/index-of</h3> + Returns the position of the first occurrence of a specified value in a string + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>substring</strong> - the string to be found in `text`</li> + </ul> + </td> + <td> + <code>// Eve is in developers, starting at an index of 2 index = string/index_of[text: "developers", substring: "eve"</code> - </td> - </tr> + </td> + </tr> - <tr> - <td> - <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. - </td> - <td> - <ul> - <li><strong>text</strong> - the string whose length is found</li> - </ul> - </td> - <td> - <code>// the code point length of the word "unicode" + <tr> + <td> + <h3>string/codepoint-length</h3> + Returns the length of a string in Unicode code points. + </td> + <td> + <ul> + <li><strong>text</strong> - the string whose length is found</li> + </ul> + </td> + <td> + <code>// the code point length of the word "unicode" string = "unicode" length-in-js = string/codepoint_length[text: string]</code> - </td> - </tr> - </table> - -</body> - - - - Getting Eve - http://docs.witheve.com/handbook/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/handbook/ - <p>Test</p> + </td> + </tr> +</table> diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html new file mode 100644 index 0000000..4acb8d7 --- /dev/null +++ b/handbook/libraries/index.html @@ -0,0 +1,635 @@ + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    + +

    + +

    Aggregates

    + + + + + + + + + + + + + + + + + + + +
    +

    gather/sort

    + Generates an ordering for a set +
    +
      +
    • for - the set to sort
    • +
    • per - (optional) - one or more attributes by which to group `for`
    • +
    • direction - (optional) - direction in which to sort `for`. Possible values are: +
        +
      • 'up' - smallest to largest; default option
      • +
      • 'down' - largest to smallest
      • +
      +
    • +
    +
    + // sorts the students by GPA +[#student GPA] +index = sort[value: GPA] +
    +

    gather/count

    + Returns the number of elements in a set +
    +
      +
    • for - the set to count over
    • +
    • per - (optional) - one or more attributes by which to group `for`
    • +
    +
    + // counts the number of citizens in each state +residents = [#citizen state] +population = count[given: residents, per: state] +
    +

    gather/sum

    + Returns the sum of values in a set of attributes +
    +
      +
    • for - the set to gather
    • +
    • value - the specific variable to be summed
    • +
    • per - (optional) - one or more attributes by which to group `for`
    • +
    +
    + // returns the sum of salaries for each department +employees = [#employee salary department] +expenses = gather/sum[for: employees, value: employees.salary, per: department] +
    + +

    Math

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    +

    + Adds two numbers +
    +
      +
    • Infix notation
    • +
    +
    + total-debt = credit-card + debit-card +
    +

    -

    + Subtracts two numbers +
    +
      +
    • Infix notation
    • +
    +
    + remaining-debt = total-debt - amount_paid +
    +

    *

    + Multiplies two numbers +
    +
      +
    • Infix notation
    • +
    +
    + yearly-payments = monthly-payments * 12 +
    +

    /

    + Divides two numbers +
    +
      +
    • Infix notation
    • +
    +
    + monthly-payments = yearly-payments / 12 +
    +

    math/floor

    + Rounds a number down +
    +
      +
    • a - the number to be rounded down
    • +
    +
    + // x rounded down to 34 +x = math/floor[a: 34.2] +
    +

    math/ceil

    + Rounds a number up +
    +
      +
    • a - the number to be rounded up
    • +
    +
    + // x rounded up to 35 +x = math/floor[a: 34.2] +
    +

    math/round

    + Rounds a number to the nearest integer +
    +
      +
    • a - the number to be rounded to the nearest integer
    • +
    +
    + // x rounded to 34 +x = math/floor[a: 34.2] +
    +

    math/sin

    + Sine of an angle +
    +
      +
    • a - the angle in degrees
    • +
    +
    + // r calculated to 1 +r = math/sin[a: 90] +
    +

    math/cos

    + Cosine of an angle +
    +
      +
    • a - the angle in degrees
    • +
    +
    + // r calculated to 0 +r = math/cos[a: 90] +
    +

    math/tan

    + Tangent of an angle +
    +
      +
    • a - the angle in degrees
    • +
    +
    + // r calculated to 1 +r = math/tan[a: 45] +
    +

    math/max

    + The greater of two values +
    +
      +
    • a - a value to compare
    • +
    • b - another value to compare
    • +
    +
    + // takes the higher score +[#scores pac-man donkey-kong] +best-score = math/min[a: pac-man, b: donkey-kong] +
    +

    math/min

    + The lesser of two values +
    +
      +
    • a - a value to compare
    • +
    • b - another value to compare
    • +
    +
    + // takes the lower score +[#scores pac-man donkey-kong] +worst-score = math/min[a: pac-man, b: donkey-kong] +
    +

    math/mod

    + Modulo division +
    +
      +
    • a - the number to be divided (dividend)
    • +
    • b - the number by which to divide (divisor)
    • +
    +
    + // m is the remainder, 1 +m = math/mod[a: 5, b: 2] +
    +

    math/abs

    + Absolute value of a number +
    +
      +
    • a - the number whose absolute value is found
    • +
    +
    + // number of hours from the prime meridian +[#city latitude longitude] +hours-from-gmt = math/abs[a: latitude] / 15 +
    +

    math/to-fixed

    + Formats a number as a string to a certain number of decimal places +
    +
      +
    • a - the number to be formatted
    • +
    • b - the number of decimal places to which `a` will be formatted
    • +
    +
    + // pi represented as the string "3.14" +[#circle circumference diameter] +pi = math/to-fixed[a: (circumference / diameter), b: 2] +
    +

    math/range

    + Generates a range of numbers +
    +
      +
    • start - the start of the range
    • +
    • stop - the end of the range
    • +
    +
    + // generates integers 1 through 10 +y = math/range[start: 1, stop: 10] +
    +

    random/number

    + Generates a random number between 1 and 0 +
    +
      +
    • seed - a number used to initialize the random number generator
    • +
    +
    + // generates a random number every second +[#time minutes seconds] +x = random/number[seed: seconds] +
    + +

    Strings

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    string/replace

    + Replaces a string of text with another +
    +
      +
    • text - the text in which to search for strings and replace them
    • +
    • replace - the string to be replaced
    • +
    • with - the string that will replace `replace`
    • +
    +
    + // Americanized version of British spelling +[#website body] +american-version = string/replace[text: body, replace: "flavour", with: "flavor"] +
    +

    string/get

    + Gets a character from a specific location in a string +
    +
      +
    • text - the text to be searched
    • +
    • at - the location to be searched
    • +
    +
    + // finds the 17th letter of the alphabet +alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +letter = string/get[text: alphabet, at: 17] +
    +

    string/uppercase

    + Converts a string to uppercase +
    +
      +
    • text - the text to be converted
    • +
    +
    + funny = "lol" +really-funny = string/uppercase[text: funny] +
    +

    string/lowercase

    + Converts a string to lowercase +
    +
      +
    • text - the text to be converted
    • +
    +
    + really-funny = "LOL" +down-a-notch = string/uppercase[text: really-funny] +
    +

    string/index-of

    + Returns the position of the first occurrence of a specified value in a string +
    +
      +
    • text - the text to be searched
    • +
    • substring - the string to be found in `text`
    • +
    +
    + // Eve is in developers, starting at an index of 2 +index = string/index_of[text: "developers", substring: "eve" +
    +

    string/codepoint-length

    + Returns the length of a string in Unicode code points. +
    +
      +
    • text - the string whose length is found
    • +
    +
    + // the code point length of the word "unicode" +string = "unicode" +length-in-js = string/codepoint_length[text: string] +
    + + +
    +
    +
    +
    + + + diff --git a/index.html b/index.html index bed75d0..d27f2b0 100644 --- a/index.html +++ b/index.html @@ -113,33 +113,36 @@

    EVE

    -
  • - - - Index - -
  • - - - + +
  • + + + Standard Library + +
  • + + @@ -151,6 +154,43 @@

    EVE

    + + +

    Install guide

    + +

    Need to install Eve on your machine? Head here for step-by-step directions.

    + +

    Quickstart

    + +

    If you’re new to Eve and want a hands-on demo to learn the language, you can jump right in with a 5 minute quickstart guide that shows you how to build a simple incrementing counter.

    + +

    Syntax reference

    + +

    Want a reminder how the syntax works or to get an overview of Eve without going through the quickstart? The syntax reference is a good place to start.

    + +

    Libraries

    + +

    Want to know everything Eve can do? Here’s a list of all the functions, operators, and watchers available in the language.

    + +

    Stuck?

    + +

    If you didn’t find what you were looking for, you can get in touch with the Eve team and the community through these channels:

    + +
      +
    • Send a message to the mailing list. We generally respond to messages within a day.
    • +
    • Send a tweet to @with_eve.
    • +
    • Submit an issue to our GitHub repository.
    • +
    • Join the Eve Slack channel to talk with Eve developers and the community in real time (coming soon)
    • +
    + +

    Want to learn more?

    + +
      +
    • Browse our gallery of examples from the Eve crew and the community to learn, to be inspired, or just for fun!
    • +
    • Read our blog to see what we’re up to, from our developer diary to essays, announcements, and more.
    • +
    + +
    diff --git a/index.xml b/index.xml index d6b123b..db7f29c 100644 --- a/index.xml +++ b/index.xml @@ -9,21 +9,47 @@ - Getting Eve - http://docs.witheve.com/handbook/ + Installation + http://docs.witheve.com/install/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/ - <p>Test</p> + http://docs.witheve.com/install/ + + +<h1 id="installation">Installation</h1> + +<p>Install <a href="https://nodejs.org/en/download/">Node</a> for your platform, then clone and build the Eve starter repository:</p> + +<pre><code>git clone git@github.com:witheve/eve-starter.git +cd eve-starter +npm install +</code></pre> + +<h2 id="usage">Usage</h2> + +<p>You can start the program switcher, which allows you to browse included example programs:</p> + +<pre><code>npm start +</code></pre> + +<p>Or you can run a specific program by providing its path as an argument:</p> + +<pre><code>npm start -- path/to/program.eve +</code></pre> + +<p>To view other functionality of the starter, run</p> + +<pre><code>npm start -- --help +</code></pre> Quickstart - http://docs.witheve.com/tutorials/quickstart.eve/ + http://docs.witheve.com/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/tutorials/quickstart.eve/ + http://docs.witheve.com/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> @@ -162,6 +188,266 @@ + + Syntax Ref + http://docs.witheve.com/syntaxreference/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs.witheve.com/syntaxreference/ + + +<p><link rel="stylesheet" type="text/css" href="style.css"></p> + +<h2 id="records-and-patterns">Records and Patterns</h2> + +<table> + <tr> + <td>Eve represents data as attribute-value pairs called records. They can have many attributes and attributes can have many values.</td> + <td><code>[tag: “person” age: 30, name: “Jeff”] + +[tag: “boat” tag: “expensive” type: “yacht”]</code></td> + </tr> + + <tr> + <td>The tag attribute is used to indicate the type of a record. <code>#foo</code> is short for <code>tag: “foo”</code>.</td> + <td><code>[#person] = [tag: “person”]</code></td> + </tr> + + <tr> + <td>You can alias an attribute to a different name like <code>age: person-age</code>. Without an alias, the name of the attribute is bound to its value.</td> + <td><code>// These do the same thing. +person-age = 20 +[#person age: person-age] + +age = 20 +[#person age]</code></td> + </tr> + + <tr> + <td>Records can be nested to find or create relationships. + + <strong>Note</strong>: All records in Eve are global. The Ryan record can still be matched on its own.</td> + <td><code>[#person name: “Chris” brother: +[#person name: “Ryan”] +[#person name: “Jeff” age: 20]]</code></td> + </tr> + + <tr> + <td>Attributes can also be accessed using dot notation.</td> + <td><code>person = [#person] +person.brother = [name: “Ryan”]</code></td> + </tr> + + <tr> + <td>You can search for records by pattern. Eve will match records based on the pattern of attributes you provide. Any attributes you don’t provide a value for will be filled in from the matches.</td> + <td><code>search +me = [#person brother] + +bind +[#my-family me relative: brother]</code></td> + </tr> +</table> + +<h2> + Program Structure: Search, Bind, and Commit +</h2> + +<table> + + <tr> + <td>Eve programs are <a href="https://guides.github.com/features/mastering-markdown/">markdown documents</a>, with code blocks fenced between three grave (<code>`</code>) or tilde (<code>~</code>) characters. In each block you (optionally) <code>search</code> for patterns, then either <code>bind</code> or <code>commit</code> new or updated records for each match found. + + <strong>Note</strong>: With no search, the records are automatically added once.</td> + <td><code># An example Eve program +``` +search // Find something interesting +[#person name] + + +bind // Do something with it + [#html/div text: name] +```</code></td> + </tr> + + <tr> + <td>The search section finds records matching its patterns, staying up to date as data changes.<code>If</code>there aren’t any matches, the <code>bind</code> or <code>commit</code> will do nothing.</td> + <td><code>search +person = [#person name: “Jeff”] +person.age = 20</code></td> + </tr> + + <tr> + <td>The <code>bind</code> section creates or updated records from your pattern. Since this is a <code>bind</code>, when the search stops matching, those records or updates disappear.</td> + <td><code>search +person = [#person name: “Jeff” age] + +bind +[#my-age age]</code></td> + </tr> + + <tr> + <td>Like <code>bind</code>, the <code>commit</code> section creates or updates records. Unlike <code>bind</code>, it does so permanently.<code>If</code>the search stops matching, the records will remain.</td> + <td><code>search +[#html/event/click element] + +commit +[#html/div text: “You clicked on {{element}}!”]</code></td> + </tr> + +</table> + +<h2> + Equivalence and Filtering +</h2> + +<table> + + <tr> + <td>Eve has equivalence instead of assignment. Instead of setting Jeff’s age to 20, equivalence causes us to only find the people whose age is 20.</td> + <td><code>// Filter for people named “Jeff” who are 20 years old. +person = [#person name: “Jeff” age] +age = 20</code></td> + </tr> + + <tr> + <td>Nothing can be equivalent to two different values at once.</td> + <td><code>// Something that always fails. +x = 10 +x = 100</code></td> + </tr> + + <tr> + <td>Using the same variable in two patterns will find pairs where the value is the same.</td> + <td><code>// pairs of boats and people with the same age. +person = [#person age] +boat = [#boat age]</code></td> + </tr> + + <tr> + <td>You can also filter using inequalities.</td> + <td><code>// Filter within an attribute. +cube = [#rectangle width > 30 height] +height > 30 // Filter a variable. +cube.depth > 30 // Filter with dot notation.</code></td> + </tr> + +</table> + +<h2 id="not">Not</h2> + +<table> + + <tr> + <td>You can check for the absence of <strong>any</strong> matching record for a search by wrapping it in <code>not()</code>.</td> + <td><code>// People who are not employees. +person = [#person] +not(person = [#employee])</code></td> + </tr> + +</table> + +<h2 id="if-then-and-if-else">If&hellip;Then and If&hellip;Else</h2> + +<table> + + <tr><td><em><code>If</code> lets your block try multiple branches for a variable. If every branch has no matches, the block fails.</em></td></tr> + + <tr> + <td><code>If … else</code> lets you express ordered choice. <strong>Only the first branch</strong> with matches will contribute values to the variable.</td> + <td><code></code></td> + </tr> + + <tr> + <td>Multiple <code>If</code> statements without <code>else</code> let each branch contribute to a variable (equivalent to union).</td> + <td><code>// All my friends and their spouses are party guests. +guest = if f = [#friend] then f + if [#friend spouse] then spouse</code></td> + </tr> + + <tr> + <td><code>If</code> can return multiple values each. + +<strong>Note</strong>: Each branch must return the same number!</td> + <td><code>(points, passing) = if score > 90 then (3, “true”) + if score > 70 then (1, “true”) + else (0, “false”)</code></td> + </tr> + +</table> + +<h2 id="functions-and-aggregates">Functions and Aggregates</h2> + +<table> + + <tr> + <td>Functions are record-like constructs that return values.</td> + <td><code>// The sin function with input in degrees. +x = sin[degrees: 30] +// …or radians +x = sin[radians: 3 * π / 180]</code></td> + </tr> + + <tr> + <td>Aggregates return a value (or value per group) for <strong>all</strong> matches of your search (akin to reduce() in other languages). Eve will set collapse inputs to an aggregate. That is, if you have 5 unique salary levels for 100 employees, Eve would add each unique salary once. To adjust this, specify the actual identity (employee) you care about with <code>for</code>. To get a value per group, specify the grouping variables with <code>per</code>.</td> + <td><code>// *for* specifies the matches to count. +total-employees = gather/count[for: employee] + +// *value* is the number to add to the sum +// *per* specifies the groups to sum the matches in. +budgets = gather/sum[value: employee.salary, + for: employee, + per: employee.department]</code></td> + </tr> + +</table> + +<h2 id="update-operators">Update Operators</h2> + +<table> + + <tr><td><em>Besides creating new records, Eve has four operators to modify existing records in <code>bind</code> or <code>commit</code>.</em></td></tr> + + <tr> + <td>(<code>+=</code>) Add value to attribute.</td> + <td><code>chris.likes += “pizza”</code></td> + </tr> + + <tr> + <td>(<code>-=</code>) Remove value of attribute. + +<strong>Note</strong>: An attribute with no values ceases to exist.</td> + <td><code>chris.likes -= “eggplant” +</code></td> + </tr> + + <tr> + <td>(<code>:=</code>) Set value of attribute. +Set is the same as removing the current value(s) and adding the new value(s).</td> + <td><code>chris.age := 30</code></td> + </tr> + + <tr> + <td>(<code><-</code>) Merge pattern into record. +Attributes from the pattern on the right overwrite those of the record on the left.</td> + <td><code>chris <- [eye-color: “green”, hair-color: “brown”]</code></td> + </tr> + + <tr> + <td>The <strong>set</strong> operator with the special value <code>none</code> deletes entire attributes and records. + +<strong>Note</strong>: This should usually be done in commits.</td> + <td><code>search +chris = [#chris] + +commit +chris.likes := none +chris := none</code></td> + </tr> + +</table> + + + http://docs.witheve.com/README/ @@ -210,486 +496,479 @@ - http://docs.witheve.com/handbook/libraries/ + http://docs.witheve.com/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/libraries/ + http://docs.witheve.com/handbook/ - http://docs.witheve.com/handbook/libraries/stdlib/ + http://docs.witheve.com/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/libraries/stdlib/ - <head> + http://docs.witheve.com/handbook/libraries/ + + +<p><head> <link rel="stylesheet" type="text/css" href="style.css"> -</head> - -<body> - - <h2> - Aggregates - </h2> - - <table> - <tr> - <td> - <h3>gather/sort</h3> - Generates an ordering for a set - </td> - <td> - <ul> - <li><strong>for</strong> - the set to sort</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: - <ul> - <li>'up' - smallest to largest; default option</li> - <li>'down' - largest to smallest</li> - </ul> - </li> - </ul> - </td> - <td> - <code>// sorts the students by GPA - [#student GPA] - index = sort[value: GPA]</code> - </td> - </tr> - - <tr> - <td> - <h3>gather/count</h3> - Returns the number of elements in a set - </td> - <td> - <ul> - <li><strong>for</strong> - the set to count over</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - </ul> - </td> - <td> - <code>// counts the number of citizens in each state - residents = [#citizen state] - population = count[given: residents, per: state]</code> - </td> - </tr> - - <tr> - <td> - <h3>gather/sum</h3> - Returns the sum of values in a set of attributes - </td> - <td> - <ul> - <li><strong>for</strong> - the set to gather</li> - <li><strong>value</strong> - the specific variable to be summed</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - </ul> - </td> - <td> - <code>// returns the sum of salaries for each department - employees = [#employee salary department] - expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> - </td> - </tr> - </table> - - <h2> - Math - </h2> - - <table> - <tr> - <td> - <h3>+</h3> - Adds two numbers - </td> - <td> - <ul> - <li>Infix notation</li> - </ul> - </td> - <td> - <code>total-debt = credit-card + debit-card</code> - </td> - </tr> - - <tr> - <td> - <h3>-</h3> - Subtracts two numbers - </td> - <td> - <ul> - <li>Infix notation</li> - </ul> - </td> - <td> - <code>remaining-debt = total-debt - amount_paid</code> - </td> - </tr> - - <tr> - <td> - <h3>*</h3> - Multiplies two numbers - </td> - <td> - <ul> - <li>Infix notation</li> - </ul> - </td> - <td> - <code>yearly-payments = monthly-payments * 12</code> - </td> - </tr> - - <tr> - <td> - <h3>/</h3> - Divides two numbers - </td> - <td> - <ul> - <li>Infix notation</li> - </ul> - </td> - <td> - <code>monthly-payments = yearly-payments / 12</code> - </td> - </tr> - - <tr> - <td> - <h3>math/floor</h3> - Rounds a number down - </td> - <td> - <ul> - <li><strong>a</strong> - the number to be rounded down</li> - </ul> - </td> - <td> - <code>// x rounded down to 34 - x = math/floor[a: 34.2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/ceil</h3> - Rounds a number up - </td> - <td> - <ul> - <li><strong>a</strong> - the number to be rounded up</li> - </ul> - </td> - <td> - <code>// x rounded up to 35 - x = math/floor[a: 34.2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/round</h3> - Rounds a number to the nearest integer - </td> - <td> - <ul> - <li><strong>a</strong> - the number to be rounded to the nearest integer</li> - </ul> - </td> - <td> - <code>// x rounded to 34 - x = math/floor[a: 34.2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/sin</h3> - Sine of an angle - </td> - <td> - <ul> - <li><strong>a</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 1 - r = math/sin[a: 90]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/cos</h3> - Cosine of an angle - </td> - <td> - <ul> - <li><strong>a</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 0 - r = math/cos[a: 90]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/tan</h3> - Tangent of an angle - </td> - <td> - <ul> - <li><strong>a</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 1 - r = math/tan[a: 45]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/max</h3> - The greater of two values - </td> - <td> - <ul> - <li><strong>a</strong> - a value to compare</li> - <li><strong>b</strong> - another value to compare</li> - </ul> - </td> - <td> - <code>// takes the higher score - [#scores pac-man donkey-kong] - best-score = math/min[a: pac-man, b: donkey-kong]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/min</h3> - The lesser of two values - </td> - <td> - <ul> - <li><strong>a</strong> - a value to compare</li> - <li><strong>b</strong> - another value to compare</li> - </ul> - </td> - <td> - <code>// takes the lower score - [#scores pac-man donkey-kong] - worst-score = math/min[a: pac-man, b: donkey-kong]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/mod</h3> - Modulo division - </td> - <td> - <ul> - <li><strong>a</strong> - the number to be divided (dividend)</li> - <li><strong>b</strong> - the number by which to divide (divisor)</li> - </ul> - </td> - <td> - <code>// m is the remainder, 1 - m = math/mod[a: 5, b: 2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/abs</h3> - Absolute value of a number - </td> - <td> - <ul> - <li><strong>a</strong> - the number whose absolute value is found</li> - </ul> - </td> - <td> - <code>// number of hours from the prime meridian - [#city latitude longitude] - hours-from-gmt = math/abs[a: latitude] / 15</code> - </td> - </tr> - - <tr> - <td> - <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places - </td> - <td> - <ul> - <li><strong>a</strong> - the number to be formatted</li> - <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> - </ul> - </td> - <td> - <code>// pi represented as the string "3.14" - [#circle circumference diameter] - pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/range</h3> - Generates a range of numbers - </td> - <td> - <ul> - <li><strong>start</strong> - the start of the range</li> - <li><strong>stop</strong> - the end of the range</li> - </ul> - </td> - <td> - <code>// generates integers 1 through 10 - y = math/range[start: 1, stop: 10]</code> - </td> - </tr> - - <tr> - <td> - <h3>random/number</h3> - Generates a random number between 1 and 0 - </td> - <td> - <ul> - <li><strong>seed</strong> - a number used to initialize the random number generator</li> - </ul> - </td> - <td> - <code>// generates a random number every second - [#time minutes seconds] - x = random/number[seed: seconds]</code> - </td> - </tr> - </table> - - <h2> - Strings - </h2> - - <table> - <tr> - <td> - <h3>string/replace</h3> - Replaces a string of text with another - </td> - <td> - <ul> - <li><strong>text</strong> - the text in which to search for strings and replace them</li> - <li><strong>replace</strong> - the string to be replaced</li> - <li><strong>with</strong> - the string that will replace `replace`</li> - </ul> - </td> - <td> - <code>// Americanized version of British spelling - [#website body] - american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/get</h3> - Gets a character from a specific location in a string - </td> - <td> - <ul> - <li><strong>text</strong> - the text to be searched</li> - <li><strong>at</strong> - the location to be searched</li> - </ul> - </td> - <td> - <code>// finds the 17th letter of the alphabet - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - letter = string/get[text: alphabet, at: 17]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/uppercase</h3> - Converts a string to uppercase - </td> - <td> - <ul> - <li><strong>text</strong> - the text to be converted</li> - </ul> - </td> - <td> - <code>funny = "lol" +</head></p> + +<h2 id="aggregates">Aggregates</h2> + +<table> + <tr> + <td> + <h3>gather/sort</h3> + Generates an ordering for a set + </td> + <td> + <ul> + <li><strong>for</strong> - the set to sort</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: + <ul> + <li>'up' - smallest to largest; default option</li> + <li>'down' - largest to smallest</li> + </ul> + </li> + </ul> + </td> + <td> + <code>// sorts the students by GPA +[#student GPA] +index = sort[value: GPA]</code> + </td> + </tr> + + <tr> + <td> + <h3>gather/count</h3> + Returns the number of elements in a set + </td> + <td> + <ul> + <li><strong>for</strong> - the set to count over</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// counts the number of citizens in each state +residents = [#citizen state] +population = count[given: residents, per: state]</code> + </td> + </tr> + + <tr> + <td> + <h3>gather/sum</h3> + Returns the sum of values in a set of attributes + </td> + <td> + <ul> + <li><strong>for</strong> - the set to gather</li> + <li><strong>value</strong> - the specific variable to be summed</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// returns the sum of salaries for each department +employees = [#employee salary department] +expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> + </td> + </tr> +</table> + +<h2 id="math">Math</h2> + +<table> + <tr> + <td> + <h3>+</h3> + Adds two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>total-debt = credit-card + debit-card</code> + </td> + </tr> + + <tr> + <td> + <h3>-</h3> + Subtracts two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>remaining-debt = total-debt - amount_paid</code> + </td> + </tr> + + <tr> + <td> + <h3>*</h3> + Multiplies two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>yearly-payments = monthly-payments * 12</code> + </td> + </tr> + + <tr> + <td> + <h3>/</h3> + Divides two numbers + </td> + <td> + <ul> + <li>Infix notation</li> + </ul> + </td> + <td> + <code>monthly-payments = yearly-payments / 12</code> + </td> + </tr> + + <tr> + <td> + <h3>math/floor</h3> + Rounds a number down + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded down</li> + </ul> + </td> + <td> + <code>// x rounded down to 34 +x = math/floor[a: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/ceil</h3> + Rounds a number up + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded up</li> + </ul> + </td> + <td> + <code>// x rounded up to 35 +x = math/floor[a: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/round</h3> + Rounds a number to the nearest integer + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be rounded to the nearest integer</li> + </ul> + </td> + <td> + <code>// x rounded to 34 +x = math/floor[a: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/sin</h3> + Sine of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 +r = math/sin[a: 90]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/cos</h3> + Cosine of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 0 +r = math/cos[a: 90]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/tan</h3> + Tangent of an angle + </td> + <td> + <ul> + <li><strong>a</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 +r = math/tan[a: 45]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/max</h3> + The greater of two values + </td> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the higher score +[#scores pac-man donkey-kong] +best-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/min</h3> + The lesser of two values + </td> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the lower score +[#scores pac-man donkey-kong] +worst-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/mod</h3> + Modulo division + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be divided (dividend)</li> + <li><strong>b</strong> - the number by which to divide (divisor)</li> + </ul> + </td> + <td> + <code>// m is the remainder, 1 +m = math/mod[a: 5, b: 2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/abs</h3> + Absolute value of a number + </td> + <td> + <ul> + <li><strong>a</strong> - the number whose absolute value is found</li> + </ul> + </td> + <td> + <code>// number of hours from the prime meridian +[#city latitude longitude] +hours-from-gmt = math/abs[a: latitude] / 15</code> + </td> + </tr> + + <tr> + <td> + <h3>math/to-fixed</h3> + Formats a number as a string to a certain number of decimal places + </td> + <td> + <ul> + <li><strong>a</strong> - the number to be formatted</li> + <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> + </ul> + </td> + <td> + <code>// pi represented as the string "3.14" +[#circle circumference diameter] +pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/range</h3> + Generates a range of numbers + </td> + <td> + <ul> + <li><strong>start</strong> - the start of the range</li> + <li><strong>stop</strong> - the end of the range</li> + </ul> + </td> + <td> + <code>// generates integers 1 through 10 +y = math/range[start: 1, stop: 10]</code> + </td> + </tr> + + <tr> + <td> + <h3>random/number</h3> + Generates a random number between 1 and 0 + </td> + <td> + <ul> + <li><strong>seed</strong> - a number used to initialize the random number generator</li> + </ul> + </td> + <td> + <code>// generates a random number every second +[#time minutes seconds] +x = random/number[seed: seconds]</code> + </td> + </tr> +</table> + +<h2 id="strings">Strings</h2> + +<table> + <tr> + <td> + <h3>string/replace</h3> + Replaces a string of text with another + </td> + <td> + <ul> + <li><strong>text</strong> - the text in which to search for strings and replace them</li> + <li><strong>replace</strong> - the string to be replaced</li> + <li><strong>with</strong> - the string that will replace `replace`</li> + </ul> + </td> + <td> + <code>// Americanized version of British spelling +[#website body] +american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/get</h3> + Gets a character from a specific location in a string + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>at</strong> - the location to be searched</li> + </ul> + </td> + <td> + <code>// finds the 17th letter of the alphabet +alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +letter = string/get[text: alphabet, at: 17]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/uppercase</h3> + Converts a string to uppercase + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>funny = "lol" really-funny = string/uppercase[text: funny]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/lowercase</h3> - Converts a string to lowercase - </td> - <td> - <ul> - <li><strong>text</strong> - the text to be converted</li> - </ul> - </td> - <td> - <code>really-funny = "LOL" + </td> + </tr> + + <tr> + <td> + <h3>string/lowercase</h3> + Converts a string to lowercase + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>really-funny = "LOL" down-a-notch = string/uppercase[text: really-funny]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string - </td> - <td> - <ul> - <li><strong>text</strong> - the text to be searched</li> - <li><strong>substring</strong> - the string to be found in `text`</li> - </ul> - </td> - <td> - <code>// Eve is in developers, starting at an index of 2 + </td> + </tr> + + <tr> + <td> + <h3>string/index-of</h3> + Returns the position of the first occurrence of a specified value in a string + </td> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>substring</strong> - the string to be found in `text`</li> + </ul> + </td> + <td> + <code>// Eve is in developers, starting at an index of 2 index = string/index_of[text: "developers", substring: "eve"</code> - </td> - </tr> - - <tr> - <td> - <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. - </td> - <td> - <ul> - <li><strong>text</strong> - the string whose length is found</li> - </ul> - </td> - <td> - <code>// the code point length of the word "unicode" + </td> + </tr> + + <tr> + <td> + <h3>string/codepoint-length</h3> + Returns the length of a string in Unicode code points. + </td> + <td> + <ul> + <li><strong>text</strong> - the string whose length is found</li> + </ul> + </td> + <td> + <code>// the code point length of the word "unicode" string = "unicode" length-in-js = string/codepoint_length[text: string]</code> - </td> - </tr> - </table> - -</body> + </td> + </tr> +</table> + diff --git a/install/index.html b/install/index.html new file mode 100644 index 0000000..9c2f52f --- /dev/null +++ b/install/index.html @@ -0,0 +1,203 @@ + + + + + + + + + + + + Installation - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Installation

    + +

    Install Node for your platform, then clone and build the Eve starter repository:

    + +
    git clone git@github.com:witheve/eve-starter.git
    +cd eve-starter
    +npm install
    +
    + +

    Usage

    + +

    You can start the program switcher, which allows you to browse included example programs:

    + +
    npm start
    +
    + +

    Or you can run a specific program by providing its path as an argument:

    + +
    npm start -- path/to/program.eve
    +
    + +

    To view other functionality of the starter, run

    + +
    npm start -- --help
    +
    + + +
    +
    +
    +
    + + + diff --git a/quickstart.eve/index.html b/quickstart.eve/index.html new file mode 100644 index 0000000..e649914 --- /dev/null +++ b/quickstart.eve/index.html @@ -0,0 +1,267 @@ + + + + + + + + + + + + Quickstart - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Quickstart

    + +

    In this guide we’re going to give you a 5 minute introduction to the essential concepts in Eve. If you’ve never used Eve before, you’re in the right place.

    + +

    Adding records to Eve

    + +

    Eve represents data as records, which are key value pairs attached to a unique ID. Eve programs are made up of small composable blocks that search for and create records. Let’s start with a block that adds a record to Eve:

    +
    commit
    +  [#greeting text: "hello world"]
    +
    + +

    This record is tagged #greeting, and has an attribute “text” with the value “hello world”. Although tags have a special syntax, they are attributes like any other. We encourage you to classify groups of related records with tags.

    + +

    Finding records in Eve

    + +

    Eve finds every record that matches the supplied patterns, then binds new records to them. If no records match the search, then the block does not run at all. A block will only run if every pattern in a search matches at least one record. Let’s search for the #greeting we just committed, and then display it in a text container:

    +
    search
    +  [#greeting text]
    +
    +bind
    +  [#ui/text text]
    +
    + +

    Variables with the same name are equivalent within a block; because they have the same name, the text in [#greeting text] and [#ui/text text] are equivalent. Go ahead and add another #greeting record to the first block to see what happens when more than one record matches the search.

    + +

    Records update as data changes

    + +

    Blocks in Eve react automatically to changes in data. When a record changes, any bound records are automatically updated. Let’s search for the current time, and display it in a div:

    +
    search
    +  [#time seconds]
    +
    +bind 
    +  [#ui/text text: seconds]
    +
    + +

    As the time changes, the output updates to reflect the current state of the #time record. Records can be committed instead of bound, but the behavior is a little different – committed records persist until they are removed explicitly. Try changing bind to commit in the above block and see what happens.

    + +

    Reacting to events

    + +

    Let’s draw a button on the screen:

    +
    commit
    +  [#ui/button #increment text: "+1"]
    +
    + +

    When you click anywhere on the screen, Eve creates an #html/event/click record representing the click. You can react to clicks on the #increment button by searching for the #html/event/click record, where the element attribute is the button:

    +
    search
    +  event = [#html/event/click element: [#increment]]
    +
    +commit
    +  [#clicked event]
    +
    + +

    Clicks only last for an instant, but we want to create a permanent record of each click so we can search for them later. This block commits a #clicked record that will persist until it’s explicitly removed. Much like the #greeting text we bound to the #ui, variables with the same name are equivalent, so the variable event in the #clicked record is a reference to the #html/event/click on the #increment button.

    + +

    The identity of a record is determined by its attribute/value pairs. Two records with the same attributes and values are identical in Eve. We included the event attribute in the #clicked record to differentiate each record. Without this differentiation, we could only ever create a single #clicked record. Try removing event from the record and click the button to test this out.

    + +

    Count the number of clicks

    + +

    Now let’s count the number of times the button has been clicked. Make sure event is back in #clicked, and then we can count those records directly:

    +
    search
    +  how-many = gather/count[for: [#clicked]]
    +
    +bind
    +  [#ui/text text: "The button has been clicked {{how-many}} times"]
    +
    + +

    This block searches for every unique #clicked, counts them, and returns that value in how-many. Then we display this value in a text container using the operator {{ ... }}, which inserts the value of the contained variable into the string. An important thing to remember here is that this block will only run when the button has been clicked at least once. Before then, this block will not run because there are no #clicked records to count.

    + +

    Summary

    + +

    That’s it for the 5 minute introduction to Eve. To summarize:

    + +
      +
    • Eve programs are made up of blocks.
    • +
    • Data are represented by records, key value pairs associated to a unique ID.
    • +
    • There are two sections of a block: one where you search for records, and one where you bind or commit records.
    • +
    • Blocks update records automatically to reflect changes in data.
    • +
    • Bound records are replaced when data changes, while committed records must be removed manually.
    • +
    • Records are unique, uniqueness is determined by a record’s attributes and their values.
    • +
    + +

    This will get you started with Eve, but there’s still more to learn. From here, you can:

    + +
      +
    • Advance to Level 2 of the introductory tutorial.
    • +
    • View the syntax reference or the Eve handbook.
    • +
    • Explore already made examples.
    • +
    • Or dive right in to the editor and try out the concepts you’ve just learned.
    • +
    + + +
    +
    +
    +
    + + + diff --git a/sitemap.xml b/sitemap.xml index 1d127b8..aa303f0 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,17 +2,21 @@ - http://docs.witheve.com/handbook/ + http://docs.witheve.com/install/ - http://docs.witheve.com/tutorials/quickstart.eve/ + http://docs.witheve.com/quickstart.eve/ http://docs.witheve.com/ + + http://docs.witheve.com/syntaxreference/ + + http://docs.witheve.com/README/ @@ -26,11 +30,11 @@
    - http://docs.witheve.com/handbook/libraries/ + http://docs.witheve.com/handbook/ - http://docs.witheve.com/handbook/libraries/stdlib/ + http://docs.witheve.com/handbook/libraries/ diff --git a/syntaxreference/index.html b/syntaxreference/index.html new file mode 100644 index 0000000..41e7687 --- /dev/null +++ b/syntaxreference/index.html @@ -0,0 +1,427 @@ + + + + + + + + + + + + Syntax Ref - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    + +

    Records and Patterns

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Eve represents data as attribute-value pairs called records. They can have many attributes and attributes can have many values.[tag: “person” age: 30, name: “Jeff”] + +[tag: “boat” tag: “expensive” type: “yacht”]
    The tag attribute is used to indicate the type of a record. #foo is short for tag: “foo”.[#person] = [tag: “person”]
    You can alias an attribute to a different name like age: person-age. Without an alias, the name of the attribute is bound to its value.// These do the same thing. +person-age = 20 +[#person age: person-age] + +age = 20 +[#person age]
    Records can be nested to find or create relationships. + + Note: All records in Eve are global. The Ryan record can still be matched on its own.[#person name: “Chris” brother: +[#person name: “Ryan”] +[#person name: “Jeff” age: 20]]
    Attributes can also be accessed using dot notation.person = [#person] +person.brother = [name: “Ryan”]
    You can search for records by pattern. Eve will match records based on the pattern of attributes you provide. Any attributes you don’t provide a value for will be filled in from the matches.search +me = [#person brother] + +bind +[#my-family me relative: brother]
    + +

    + Program Structure: Search, Bind, and Commit +

    + + + + + + + + + + + + + + + + + + + + + + + +
    Eve programs are markdown documents, with code blocks fenced between three grave (`) or tilde (~) characters. In each block you (optionally) search for patterns, then either bind or commit new or updated records for each match found. + + Note: With no search, the records are automatically added once.# An example Eve program +``` +search // Find something interesting +[#person name] + + +bind // Do something with it + [#html/div text: name] +```
    The search section finds records matching its patterns, staying up to date as data changes.Ifthere aren’t any matches, the bind or commit will do nothing.search +person = [#person name: “Jeff”] +person.age = 20
    The bind section creates or updated records from your pattern. Since this is a bind, when the search stops matching, those records or updates disappear.search +person = [#person name: “Jeff” age] + +bind +[#my-age age]
    Like bind, the commit section creates or updates records. Unlike bind, it does so permanently.Ifthe search stops matching, the records will remain.search +[#html/event/click element] + +commit +[#html/div text: “You clicked on {{element}}!”]
    + +

    + Equivalence and Filtering +

    + + + + + + + + + + + + + + + + + + + + + + + +
    Eve has equivalence instead of assignment. Instead of setting Jeff’s age to 20, equivalence causes us to only find the people whose age is 20.// Filter for people named “Jeff” who are 20 years old. +person = [#person name: “Jeff” age] +age = 20
    Nothing can be equivalent to two different values at once.// Something that always fails. +x = 10 +x = 100
    Using the same variable in two patterns will find pairs where the value is the same.// pairs of boats and people with the same age. +person = [#person age] +boat = [#boat age]
    You can also filter using inequalities.// Filter within an attribute. +cube = [#rectangle width > 30 height] +height > 30 // Filter a variable. +cube.depth > 30 // Filter with dot notation.
    + +

    Not

    + + + + + + + + +
    You can check for the absence of any matching record for a search by wrapping it in not().// People who are not employees. +person = [#person] +not(person = [#employee])
    + +

    If…Then and If…Else

    + + + + + + + + + + + + + + + + + + + + +
    If lets your block try multiple branches for a variable. If every branch has no matches, the block fails.
    If … else lets you express ordered choice. Only the first branch with matches will contribute values to the variable.
    Multiple If statements without else let each branch contribute to a variable (equivalent to union).// All my friends and their spouses are party guests. +guest = if f = [#friend] then f + if [#friend spouse] then spouse
    If can return multiple values each. + +Note: Each branch must return the same number!(points, passing) = if score > 90 then (3, “true”) + if score > 70 then (1, “true”) + else (0, “false”)
    + +

    Functions and Aggregates

    + + + + + + + + + + + + + +
    Functions are record-like constructs that return values.// The sin function with input in degrees. +x = sin[degrees: 30] +// …or radians +x = sin[radians: 3 * π / 180]
    Aggregates return a value (or value per group) for all matches of your search (akin to reduce() in other languages). Eve will set collapse inputs to an aggregate. That is, if you have 5 unique salary levels for 100 employees, Eve would add each unique salary once. To adjust this, specify the actual identity (employee) you care about with for. To get a value per group, specify the grouping variables with per.// *for* specifies the matches to count. +total-employees = gather/count[for: employee] + +// *value* is the number to add to the sum +// *per* specifies the groups to sum the matches in. +budgets = gather/sum[value: employee.salary, + for: employee, + per: employee.department]
    + +

    Update Operators

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Besides creating new records, Eve has four operators to modify existing records in bind or commit.
    (+=) Add value to attribute.chris.likes += “pizza”
    (-=) Remove value of attribute. + +Note: An attribute with no values ceases to exist.chris.likes -= “eggplant” +
    (:=) Set value of attribute. +Set is the same as removing the current value(s) and adding the new value(s).chris.age := 30
    (<-) Merge pattern into record. +Attributes from the pattern on the right overwrite those of the record on the left.chris <- [eye-color: “green”, hair-color: “brown”]
    The set operator with the special value none deletes entire attributes and records. + +Note: This should usually be done in commits.search +chris = [#chris] + +commit +chris.likes := none +chris := none
    + + +
    +
    +
    +
    + + + diff --git a/tutorials/index.html b/tutorials/index.html index 038e271..0969ee2 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -107,33 +107,36 @@

    EVE

    -
  • - - - Index - -
  • - - - + +
  • + + + Standard Library + +
  • + + @@ -153,12 +156,6 @@


    - -

    Quickstart

    -
    - -
    - diff --git a/tutorials/index.xml b/tutorials/index.xml index 3183735..8ef7007 100644 --- a/tutorials/index.xml +++ b/tutorials/index.xml @@ -17,105 +17,5 @@ - - Quickstart - http://docs.witheve.com/tutorials/quickstart.eve/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://docs.witheve.com/tutorials/quickstart.eve/ - - -<h1 id="quickstart">Quickstart</h1> - -<p>In this guide we&rsquo;re going to give you a 5 minute introduction to the essential concepts in Eve. If you&rsquo;ve never used Eve before, you&rsquo;re in the right place.</p> - -<h2 id="adding-records-to-eve">Adding records to Eve</h2> - -<p>Eve represents data as records, which are key value pairs attached to a unique ID. Eve programs are made up of small composable blocks that search for and create records. Let&rsquo;s start with a block that adds a record to Eve:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span> - <span class="p">[</span><span class="err">#</span><span class="nv">greeting</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;hello world&quot;</span><span class="p">]</span> -</code></pre></div> - -<p>This record is tagged <code>#greeting</code>, and has an attribute &ldquo;text&rdquo; with the value &ldquo;hello world&rdquo;. Although tags have a special syntax, they are attributes like any other. We encourage you to classify groups of related records with tags.</p> - -<h2 id="finding-records-in-eve">Finding records in Eve</h2> - -<p>Eve finds every record that matches the supplied patterns, then binds new records to them. If no records match the search, then the block does not run at all. A block will only run if every pattern in a search matches at least one record. Let&rsquo;s search for the <code>#greeting</code> we just committed, and then display it in a text container:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> - <span class="p">[</span><span class="err">#</span><span class="nv">greeting</span> <span class="nv">text</span><span class="p">]</span> - -<span class="kr">bind</span> - <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="p">]</span> -</code></pre></div> - -<p>Variables with the same name are equivalent within a block; because they have the same name, the <code>text</code> in <code>[#greeting text]</code> and <code>[#ui/text text]</code> are equivalent. Go ahead and add another <code>#greeting</code> record to the first block to see what happens when more than one record matches the search.</p> - -<h2 id="records-update-as-data-changes">Records update as data changes</h2> - -<p>Blocks in Eve react automatically to changes in data. When a record changes, any bound records are automatically updated. Let&rsquo;s search for the current time, and display it in a div:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> - <span class="p">[</span><span class="err">#</span><span class="nv">time</span> <span class="nv">seconds</span><span class="p">]</span> - -<span class="kr">bind</span> - <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="nf">:</span> <span class="nv">seconds</span><span class="p">]</span> -</code></pre></div> - -<p>As the time changes, the output updates to reflect the current state of the <code>#time</code> record. Records can be committed instead of bound, but the behavior is a little different &ndash; committed records persist until they are removed explicitly. Try changing <code>bind</code> to <code>commit</code> in the above block and see what happens.</p> - -<h2 id="reacting-to-events">Reacting to events</h2> - -<p>Let&rsquo;s draw a button on the screen:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span> - <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">button</span> <span class="err">#</span><span class="nv">increment</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;+1&quot;</span><span class="p">]</span> -</code></pre></div> - -<p>When you click anywhere on the screen, Eve creates an <code>#html/event/click</code> record representing the click. You can react to clicks on the <code>#increment</code> button by searching for the <code>#html/event/click</code> record, where the element attribute is the button:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> - <span class="nv">event</span> <span class="nf">=</span> <span class="p">[</span><span class="err">#</span><span class="nv">html</span><span class="nf">/</span><span class="nv">event</span><span class="nf">/</span><span class="nv">click</span> <span class="nv">element</span><span class="nf">:</span> <span class="p">[</span><span class="err">#</span><span class="nv">increment</span><span class="p">]]</span> - -<span class="kr">commit</span> - <span class="p">[</span><span class="err">#</span><span class="nv">clicked</span> <span class="nv">event</span><span class="p">]</span> -</code></pre></div> - -<p>Clicks only last for an instant, but we want to create a permanent record of each click so we can search for them later. This block commits a <code>#clicked</code> record that will persist until it&rsquo;s explicitly removed. Much like the <code>#greeting</code> text we bound to the <code>#ui</code>, variables with the same name are equivalent, so the variable <code>event</code> in the <code>#clicked</code> record is a reference to the <code>#html/event/click</code> on the <code>#increment</code> button.</p> - -<p>The identity of a record is determined by its attribute/value pairs. Two records with the same attributes and values are identical in Eve. We included the <code>event</code> attribute in the <code>#clicked</code> record to differentiate each record. Without this differentiation, we could only ever create a single <code>#clicked</code> record. Try removing <code>event</code> from the record and click the button to test this out.</p> - -<h2 id="count-the-number-of-clicks">Count the number of clicks</h2> - -<p>Now let&rsquo;s count the number of times the button has been clicked. Make sure <code>event</code> is back in <code>#clicked</code>, and then we can count those records directly:</p> -<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> - <span class="nv">how</span><span class="nf">-</span><span class="nv">many</span> <span class="nf">=</span> <span class="nv">gather</span><span class="nf">/</span><span class="nv">count</span><span class="p">[</span><span class="nv">for</span><span class="nf">:</span> <span class="p">[</span><span class="err">#</span><span class="nv">clicked</span><span class="p">]]</span> - -<span class="kr">bind</span> - <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;The button has been clicked {{how-many}} times&quot;</span><span class="p">]</span> -</code></pre></div> - -<p>This block searches for every unique <code>#clicked</code>, counts them, and returns that value in <code>how-many</code>. Then we display this value in a text container using the operator <code>{{ ... }}</code>, which inserts the value of the contained variable into the string. An important thing to remember here is that this block will only run when the button has been clicked at least once. Before then, this block will not run because there are no <code>#clicked</code> records to count.</p> - -<h2 id="summary">Summary</h2> - -<p>That&rsquo;s it for the 5 minute introduction to Eve. To summarize:</p> - -<ul> -<li>Eve programs are made up of blocks.</li> -<li>Data are represented by records, key value pairs associated to a unique ID.</li> -<li>There are two sections of a block: one where you search for records, and one where you bind or commit records.</li> -<li>Blocks update records automatically to reflect changes in data.</li> -<li>Bound records are replaced when data changes, while committed records must be removed manually.</li> -<li>Records are unique, uniqueness is determined by a record&rsquo;s attributes and their values.</li> -</ul> - -<p>This will get you started with Eve, but there&rsquo;s still more to learn. From here, you can:</p> - -<ul> -<li>Advance to Level 2 of the introductory tutorial.</li> -<li>View the syntax reference or the Eve handbook.</li> -<li>Explore already made examples.</li> -<li>Or dive right in to the editor and try out the concepts you&rsquo;ve just learned.</li> -</ul> - - -
    \ No newline at end of file From eacc791511545d9fea3bcc6c7fcd3e827f8a348c Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Sun, 21 May 2017 19:09:47 -0700 Subject: [PATCH 006/109] change domain --- guides/index.html | 46 ++++++++++++++++---------------- guides/index.xml | 8 +++--- handbook/index.html | 50 +++++++++++++++++------------------ handbook/index.xml | 16 +++++------ handbook/libraries/index.html | 40 ++++++++++++++-------------- index.html | 44 +++++++++++++++--------------- index.xml | 44 +++++++++++++++--------------- install/index.html | 40 ++++++++++++++-------------- quickstart.eve/index.html | 40 ++++++++++++++-------------- sitemap.xml | 28 ++++++++++---------- syntaxreference/index.html | 40 ++++++++++++++-------------- tutorials/index.html | 46 ++++++++++++++++---------------- tutorials/index.xml | 8 +++--- 13 files changed, 225 insertions(+), 225 deletions(-) diff --git a/guides/index.html b/guides/index.html index d0a53e9..b5287cc 100644 --- a/guides/index.html +++ b/guides/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Standard Library @@ -150,7 +150,7 @@

    EVE

    Pages in Guide

    - +

    diff --git a/guides/index.xml b/guides/index.xml index e724608..0a331fa 100644 --- a/guides/index.xml +++ b/guides/index.xml @@ -2,18 +2,18 @@ Guides on Eve Documentation - http://docs.witheve.com/guides/index.xml + http://cmontella.github.io/docs/guides/index.xml Recent content in Guides on Eve Documentation Hugo -- gohugo.io en-us - + - http://docs.witheve.com/guides/ + http://cmontella.github.io/docs/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/guides/ + http://cmontella.github.io/docs/guides/ diff --git a/handbook/index.html b/handbook/index.html index 2bbd02a..57364ec 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Standard Library @@ -150,19 +150,19 @@

    EVE

    Pages in Handbook

    - +


    - +


    - +

    diff --git a/handbook/index.xml b/handbook/index.xml index 00cc446..b45c018 100644 --- a/handbook/index.xml +++ b/handbook/index.xml @@ -2,36 +2,36 @@ Handbooks on Eve Documentation - http://docs.witheve.com/handbook/index.xml + http://cmontella.github.io/docs/handbook/index.xml Recent content in Handbooks on Eve Documentation Hugo -- gohugo.io en-us - + - http://docs.witheve.com/handbook/core/ + http://cmontella.github.io/docs/handbook/core/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/core/ + http://cmontella.github.io/docs/handbook/core/ - http://docs.witheve.com/handbook/ + http://cmontella.github.io/docs/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/ + http://cmontella.github.io/docs/handbook/ - http://docs.witheve.com/handbook/libraries/ + http://cmontella.github.io/docs/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/libraries/ + http://cmontella.github.io/docs/handbook/libraries/ <p><head> diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html index 4acb8d7..e10ee70 100644 --- a/handbook/libraries/index.html +++ b/handbook/libraries/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Standard Library diff --git a/index.html b/index.html index d27f2b0..84c1c68 100644 --- a/index.html +++ b/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -114,20 +114,20 @@

    EVE

  • - + Standard Library diff --git a/index.xml b/index.xml index db7f29c..7de7fc9 100644 --- a/index.xml +++ b/index.xml @@ -2,18 +2,18 @@ Eve Documentation - http://docs.witheve.com/index.xml + http://cmontella.github.io/docs/index.xml Recent content on Eve Documentation Hugo -- gohugo.io en-us - + Installation - http://docs.witheve.com/install/ + http://cmontella.github.io/docs/install/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/install/ + http://cmontella.github.io/docs/install/ <h1 id="installation">Installation</h1> @@ -46,10 +46,10 @@ npm install Quickstart - http://docs.witheve.com/quickstart.eve/ + http://cmontella.github.io/docs/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/quickstart.eve/ + http://cmontella.github.io/docs/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> @@ -146,10 +146,10 @@ npm install Index - http://docs.witheve.com/ + http://cmontella.github.io/docs/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/ + http://cmontella.github.io/docs/ <h2 id="install-guide">Install guide</h2> @@ -190,10 +190,10 @@ npm install Syntax Ref - http://docs.witheve.com/syntaxreference/ + http://cmontella.github.io/docs/syntaxreference/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/syntaxreference/ + http://cmontella.github.io/docs/syntaxreference/ <p><link rel="stylesheet" type="text/css" href="style.css"></p> @@ -450,10 +450,10 @@ chris := none</code></td> - http://docs.witheve.com/README/ + http://cmontella.github.io/docs/README/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/README/ + http://cmontella.github.io/docs/README/ <p align="center"> @@ -478,37 +478,37 @@ chris := none</code></td> - http://docs.witheve.com/guides/ + http://cmontella.github.io/docs/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/guides/ + http://cmontella.github.io/docs/guides/ - http://docs.witheve.com/handbook/core/ + http://cmontella.github.io/docs/handbook/core/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/core/ + http://cmontella.github.io/docs/handbook/core/ - http://docs.witheve.com/handbook/ + http://cmontella.github.io/docs/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/ + http://cmontella.github.io/docs/handbook/ - http://docs.witheve.com/handbook/libraries/ + http://cmontella.github.io/docs/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/handbook/libraries/ + http://cmontella.github.io/docs/handbook/libraries/ <p><head> @@ -973,10 +973,10 @@ length-in-js = string/codepoint_length[text: string]</code> - http://docs.witheve.com/tutorials/ + http://cmontella.github.io/docs/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/tutorials/ + http://cmontella.github.io/docs/tutorials/ diff --git a/install/index.html b/install/index.html index 9c2f52f..6a412fa 100644 --- a/install/index.html +++ b/install/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Standard Library diff --git a/quickstart.eve/index.html b/quickstart.eve/index.html index e649914..e43e0ee 100644 --- a/quickstart.eve/index.html +++ b/quickstart.eve/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Standard Library diff --git a/sitemap.xml b/sitemap.xml index aa303f0..3a8f27a 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,62 +2,62 @@ - http://docs.witheve.com/install/ + http://cmontella.github.io/docs/install/ - http://docs.witheve.com/quickstart.eve/ + http://cmontella.github.io/docs/quickstart.eve/ - http://docs.witheve.com/ + http://cmontella.github.io/docs/ - http://docs.witheve.com/syntaxreference/ + http://cmontella.github.io/docs/syntaxreference/ - http://docs.witheve.com/README/ + http://cmontella.github.io/docs/README/ - http://docs.witheve.com/guides/ + http://cmontella.github.io/docs/guides/ - http://docs.witheve.com/handbook/core/ + http://cmontella.github.io/docs/handbook/core/ - http://docs.witheve.com/handbook/ + http://cmontella.github.io/docs/handbook/ - http://docs.witheve.com/handbook/libraries/ + http://cmontella.github.io/docs/handbook/libraries/ - http://docs.witheve.com/tutorials/ + http://cmontella.github.io/docs/tutorials/ - http://docs.witheve.com/ + http://cmontella.github.io/docs/ 0 - http://docs.witheve.com/guides/ + http://cmontella.github.io/docs/guides/ 0 - http://docs.witheve.com/handbook/ + http://cmontella.github.io/docs/handbook/ 0 - http://docs.witheve.com/tutorials/ + http://cmontella.github.io/docs/tutorials/ 0 diff --git a/syntaxreference/index.html b/syntaxreference/index.html index 41e7687..7c4d976 100644 --- a/syntaxreference/index.html +++ b/syntaxreference/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Standard Library diff --git a/tutorials/index.html b/tutorials/index.html index 0969ee2..4ba0b76 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Standard Library @@ -150,7 +150,7 @@

    EVE

    Pages in Tutorial

    - +

    diff --git a/tutorials/index.xml b/tutorials/index.xml index 8ef7007..00504ba 100644 --- a/tutorials/index.xml +++ b/tutorials/index.xml @@ -2,18 +2,18 @@ Tutorials on Eve Documentation - http://docs.witheve.com/tutorials/index.xml + http://cmontella.github.io/docs/tutorials/index.xml Recent content in Tutorials on Eve Documentation Hugo -- gohugo.io en-us - + - http://docs.witheve.com/tutorials/ + http://cmontella.github.io/docs/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs.witheve.com/tutorials/ + http://cmontella.github.io/docs/tutorials/ From dde2fc24bb1609d66a06190e910e4c8222f3b9a3 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Sun, 21 May 2017 19:12:53 -0700 Subject: [PATCH 007/109] Update CNAME --- CNAME | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CNAME b/CNAME index e825467..a34d99a 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -docs.witheve.com \ No newline at end of file +corey.montella.net \ No newline at end of file From 88fad824ff9e6426c770110649b0361c0e7c7e01 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Sun, 21 May 2017 19:13:03 -0700 Subject: [PATCH 008/109] Delete CNAME --- CNAME | 1 - 1 file changed, 1 deletion(-) delete mode 100644 CNAME diff --git a/CNAME b/CNAME deleted file mode 100644 index a34d99a..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -corey.montella.net \ No newline at end of file From 2e8eb7ea8c209c138f5659b51484ef0d9991340e Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Sun, 21 May 2017 19:14:08 -0700 Subject: [PATCH 009/109] change domain --- guides/index.html | 26 +++++++++++++------------- handbook/index.html | 26 +++++++++++++------------- handbook/libraries/index.html | 26 +++++++++++++------------- index.html | 26 +++++++++++++------------- install/index.html | 26 +++++++++++++------------- quickstart.eve/index.html | 26 +++++++++++++------------- syntaxreference/index.html | 26 +++++++++++++------------- tutorials/index.html | 26 +++++++++++++------------- 8 files changed, 104 insertions(+), 104 deletions(-) diff --git a/guides/index.html b/guides/index.html index b5287cc..cdb80b8 100644 --- a/guides/index.html +++ b/guides/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -79,7 +79,7 @@
    diff --git a/handbook/index.html b/handbook/index.html index 57364ec..66a5bba 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -79,7 +79,7 @@
    diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html index e10ee70..b0f7a5d 100644 --- a/handbook/libraries/index.html +++ b/handbook/libraries/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    diff --git a/index.html b/index.html index 84c1c68..66f804f 100644 --- a/index.html +++ b/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -79,7 +79,7 @@
    diff --git a/install/index.html b/install/index.html index 6a412fa..48572bc 100644 --- a/install/index.html +++ b/install/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    diff --git a/quickstart.eve/index.html b/quickstart.eve/index.html index e43e0ee..e3b3ff1 100644 --- a/quickstart.eve/index.html +++ b/quickstart.eve/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    diff --git a/syntaxreference/index.html b/syntaxreference/index.html index 7c4d976..111dc1a 100644 --- a/syntaxreference/index.html +++ b/syntaxreference/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    diff --git a/tutorials/index.html b/tutorials/index.html index 4ba0b76..d7c1b62 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -79,7 +79,7 @@
    From 6a818f38085e57aaf75f99b13d0cdf0ddcafda4c Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Sun, 21 May 2017 22:42:15 -0700 Subject: [PATCH 010/109] update site --- stylesheets/application.css | 281 +--------------------------- stylesheets/highlight/highlight.css | 47 +---- 2 files changed, 2 insertions(+), 326 deletions(-) diff --git a/stylesheets/application.css b/stylesheets/application.css index 3509bcd..d5d893f 100644 --- a/stylesheets/application.css +++ b/stylesheets/application.css @@ -1,280 +1 @@ -#eve-pallette { - /* Default */ - color: rgb(74,64,136); - color: rgb(91,89,164); - color: rgb(107,103,173); - color: rgb(0,121,177); - color: rgb(0,158,224); - color: rgb(0,184,241); - - /* Style 1 */ - color: rgb(0, 115, 139); - color: rgb(0, 152, 167); - color: rgb(0, 171, 188); - color: rgb(140, 49, 55); - color: rgb(177, 67, 73); - color: rgb(226, 79, 94); - - /* Style 2 */ - color: rgb(85, 138, 126); - color: rgb(113, 177, 162); - color: rgb(128, 198, 182); - color: rgb(153, 114, 45); - color: rgb(198, 154, 63); - color: rgb(246, 192, 78); - - /* Style 3 */ - color: rgb(82, 129, 62); - color: rgb(111, 165, 81); - color: rgb(129, 191, 95); - color: rgb(0, 113, 140); - color: rgb(0, 151, 167); - color: rgb(0, 170, 190); - - /* Style 4 */ - color: rgb(60, 48, 130); - color: rgb(80, 79, 161); - color: rgb(98, 94, 169); - color: rgb(158, 34, 101); - color: rgb(216, 65, 140); - color: rgb(238, 81, 158); - - /* Style 5 */ - color: rgb(185, 73, 21); - color: rgb(216, 99, 27); - color: rgb(244, 119, 33); - color: rgb(197, 114, 21); - color: rgb(248, 158, 36); - color: rgb(251, 176, 49); - - /* Style 6 */ - color: rgb(124, 38, 118); - color: rgb(169, 59, 150); - color: rgb(200, 56, 150); - color: rgb(91, 34, 127); - color: rgb(126, 60, 151); - color: rgb(164, 95, 167); - - /* Style 7 */ - color: rgb(151, 150, 137); - color: rgb(183, 182, 167); - color: rgb(204, 202, 185); - color: rgb(88, 132, 150); - color: rgb(123, 164, 182); - color: rgb(145, 192, 214); -} - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} - -body { display: flex; flex-direction: column; margin: 0; background: white; color: #555; line-height: 1.7; font-family: "Open Sans", Avenir, "Helvetica neue", sans-serif;} - - -pre { - background-color: rgb(38,38,38); - padding: 20px; - padding-left: 10px; - overflow: auto; -} - -code { - color: rgb(0, 121, 211); -} - -blockquote { - color: rgb(125,125,125); - border-left: 3px solid rgb(200,200,200); - padding-left: 10px; -} - -p { - line-height: 25px; -} - -ul, ol { - line-height: 25px; -} - -h1 { - font-size: 35px; - padding-top: 0px; - margin-top:0px; - margin-bottom: 20px; -} - -h2 { - font-size: 25px; - padding-top: 0px; - margin-top: 20px; - margin-bottom: 20px; -} - -.main { - display: flex; - align-items: stretch; - min-height: 100%; -} - -.drawer { - color: rgb(85, 85, 85); - border-right: 1px solid #f0f0f0; - padding-left: 10px; - padding-right: 50px; - padding-bottom: 20px; - -} - -.highlight { - margin-bottom: 20px; - margin-top: 20px; -} - -.colored { - font-weight: bold; -} - -.drawer a { - color: rgb(85, 85, 85); -} - -.article { - padding-left: 50px; -} - -.article a { - color: rgb(0,158,224); -} - -.article a::hover { - color: rgb(91,89,164); -} - -.sidebar-menu { - list-style: none; - margin: 0px; - padding: 0px; -} - -.sidebar-menu a { - text-decoration: none; -} - -.sidebar-menu li { - -} - -.sub { - margin: 0px; - padding: 0px; - padding-left: 20px; -} - -.sub-menu { - margin-top: 20px; -} - -.selected a { - color: rgb(145, 192, 214); -} - -.active { - -} - -.active li { - display: inherit; -} - -.dataTable { - border: 1px solid #000; - border-collapse: collapse; - width: 100%; -} - -.dataTable th { - font-weight: bold; - border: 1px solid #000; -} - -.dataTable td { - border: 1px solid #000; - white-space: pre; - font-family: monospace; - padding: 5px; -} - -.flex-spacer { flex: 1; } -.flex-row { display: flex; } -.flex-row.spaced > * + * { margin-left: 30px; } -.flex-row.double-spaced > * + * { margin-left: 60px; } -.flex-row.stretched { align-self: stretch; } - -.layer-wrapper { display: flex; flex-direction: column; align-items: center; margin-top: 60px; padding: 0 40px; } -.layer { max-width: 100%; width: 960px; display: flex; align-items: center; } -.toplayer { max-width: 100%; width: 960px; display: flex; align-items: top; } -.sub-layer { margin-top: 30px; } - -.header-wrapper { } -.logo { display: flex; flex: 0 0 auto; align-items: center; padding: 0; } -.logo > img { max-width: 60px; } -.logo > h1 { margin: 0; margin-left: 18px; padding: 0; height: 26px; margin-top: -32px; } -.logo > h1 > img { height: 100%; } - -nav { flex: none; display: flex; flex-direction: row-reverse; } -nav > * { flex: 0 0 auto; padding: 10px 20px; margin: 0; text-decoration: none; color: rgb(74, 64, 136); transition: background 0.1s ease-out; } -nav > *:hover { background: #f2f2f2; } -nav > *:active { background: #e9e9e9; } -nav > .play-cta { margin: 0; padding: 10px 20px; color: white; } - -.btn { cursor: pointer; text-align: center; user-select: none; -moz-user-select: none; -ms-user-select: none; } -.btn.big { flex: 1 0 auto; padding: 18px 30px; } -.btn.rounded { border-radius: 3px; } - -.cta { cursor: pointer; text-decoration: none; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; transition: background 0.1s ease-out; } - -.cta.primary { background: rgb(0, 184, 241); color: white; } -.cta.primary:hover { background: rgb(0, 158, 224); } -.cta.primary:active { background: rgb(0, 121, 177); } - -.cta.secondary { background: rgb(107, 103, 173); color: white; } -.cta.secondary:hover { background: rgb(91, 89, 164); } -.cta.secondary:active { background: rgb(74, 64, 136); } - -.cta.tertiary { background: #888a8f; color: white; } -.cta.tertiary:hover { background: #808284; } -.cta.tertiary:active { background: #787a7f; } - -.contact-wrapper { display: flex; flex-direction: column; padding: 0; position: relative; margin-bottom: 60px; color: white; } -.contact { display: flex; flex-direction: row; max-width: 960px; align-self: center; margin: auto; overflow: hidden; border-radius: 3px; cursor: pointer; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; } -.contact > * { flex: 1 1 auto; align-self: stretch; max-width: 320px; padding: 30px; color: white !important; text-decoration: none; transition: background 0.1s ease-out; } -.contact h3 { margin-bottom: 20px; font-size: 1.25rem; } - -.contact > *:first-child { background: rgb(107, 103, 173); } -.contact > *:first-child:hover { background: rgb(117, 115, 190); } -.contact > *:first-child:active { background: rgb(142, 140, 215); } - -.contact > *:nth-child(2) { background: rgb(91, 89, 164); } -.contact > *:nth-child(2):hover { background: rgb(117, 115, 190); } -.contact > *:nth-child(2):active { background: rgb(142, 140, 215); } - -.contact > *:last-child { background: rgb(74, 64, 136); } -.contact > *:last-child:hover { background: rgb(117, 115, 190); } -.contact > *:last-child:active { background: rgb(142, 140, 215); } \ No newline at end of file +#eve-pallette{color:#4a4088;color:#5b59a4;color:#6b67ad;color:#0079b1;color:#009ee0;color:#00b8f1;color:#00738b;color:#0098a7;color:#00abbc;color:#8c3137;color:#b14349;color:#e24f5e;color:#558a7e;color:#71b1a2;color:#80c6b6;color:#99722d;color:#c69a3f;color:#f6c04e;color:#52813e;color:#6fa551;color:#81bf5f;color:#00718c;color:#0097a7;color:#00aabe;color:#3c3082;color:#504fa1;color:#625ea9;color:#9e2265;color:#d8418c;color:#ee519e;color:#b94915;color:#d8631b;color:#f47721;color:#c57215;color:#f89e24;color:#fbb031;color:#7c2676;color:#a93b96;color:#c83896;color:#5b227f;color:#7e3c97;color:#a45fa7;color:#979689;color:#b7b6a7;color:#cccab9;color:#588496;color:#7ba4b6;color:#91c0d6}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}body{display:flex;flex-direction:column;margin:0;background:white;color:#555;line-height:1.7;font-family:"Open Sans",Avenir,"Helvetica neue",sans-serif}pre{background-color:#262626;padding:20px;padding-left:10px;overflow:auto}code{color:#0079d3}blockquote{color:#7d7d7d;border-left:3px solid #c8c8c8;padding-left:10px}p{line-height:25px}ul,ol{line-height:25px}h1{font-size:35px;padding-top:0;margin-top:0;margin-bottom:20px}h2{font-size:25px;padding-top:0;margin-top:20px;margin-bottom:20px}.main{display:flex;align-items:stretch;min-height:100%}.drawer{color:#555;border-right:1px solid #f0f0f0;padding-left:10px;padding-right:50px;padding-bottom:20px}.highlight{margin-bottom:20px;margin-top:20px}.colored{font-weight:bold}.drawer a{color:#555}.article{padding-left:50px}.article a{color:#009ee0}.article a::hover{color:#5b59a4}.sidebar-menu{list-style:none;margin:0;padding:0}.sidebar-menu a{text-decoration:none}.sidebar-menu li{}.sub{margin:0;padding:0;padding-left:20px}.sub-menu{margin-top:20px}.selected a{color:#91c0d6}.active{}.active li{display:inherit}.dataTable{border:1px solid #000;border-collapse:collapse;width:100%}.dataTable th{font-weight:bold;border:1px solid #000}.dataTable td{border:1px solid #000;white-space:pre;font-family:monospace;padding:5px}.flex-spacer{flex:1}.flex-row{display:flex}.flex-row.spaced>*+*{margin-left:30px}.flex-row.double-spaced>*+*{margin-left:60px}.flex-row.stretched{align-self:stretch}.layer-wrapper{display:flex;flex-direction:column;align-items:center;margin-top:60px;padding:0 40px}.layer{max-width:100%;width:960px;display:flex;align-items:center}.toplayer{max-width:100%;width:960px;display:flex;align-items:top}.sub-layer{margin-top:30px}.header-wrapper{}.logo{display:flex;flex:0 0 auto;align-items:center;padding:0}.logo>img{max-width:60px}.logo>h1{margin:0;margin-left:18px;padding:0;height:26px;margin-top:-32px}.logo>h1>img{height:100%}nav{flex:none;display:flex;flex-direction:row-reverse}nav>*{flex:0 0 auto;padding:10px 20px;margin:0;text-decoration:none;color:#4a4088;transition:background .1s ease-out}nav>*:hover{background:#f2f2f2}nav>*:active{background:#e9e9e9}nav>.play-cta{margin:0;padding:10px 20px;color:white}.btn{cursor:pointer;text-align:center;user-select:none;-moz-user-select:none;-ms-user-select:none}.btn.big{flex:1 0 auto;padding:18px 30px}.btn.rounded{border-radius:3px}.cta{cursor:pointer;text-decoration:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none;transition:background .1s ease-out}.cta.primary{background:#00b8f1;color:white}.cta.primary:hover{background:#009ee0}.cta.primary:active{background:#0079b1}.cta.secondary{background:#6b67ad;color:white}.cta.secondary:hover{background:#5b59a4}.cta.secondary:active{background:#4a4088}.cta.tertiary{background:#888a8f;color:white}.cta.tertiary:hover{background:#808284}.cta.tertiary:active{background:#787a7f}.contact-wrapper{display:flex;flex-direction:column;padding:0;position:relative;margin-bottom:60px;color:white}.contact{display:flex;flex-direction:row;max-width:960px;align-self:center;margin:auto;overflow:hidden;border-radius:3px;cursor:pointer;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none}.contact>*{flex:1 1 auto;align-self:stretch;max-width:320px;padding:30px;color:white!important;text-decoration:none;transition:background .1s ease-out}.contact h3{margin-bottom:20px;font-size:1.25rem}.contact>*:first-child{background:#6b67ad}.contact>*:first-child:hover{background:#7573be}.contact>*:first-child:active{background:#8e8cd7}.contact>*:nth-child(2){background:#5b59a4}.contact>*:nth-child(2):hover{background:#7573be}.contact>*:nth-child(2):active{background:#8e8cd7}.contact>*:last-child{background:#4a4088}.contact>*:last-child:hover{background:#7573be}.contact>*:last-child:active{background:#8e8cd7} \ No newline at end of file diff --git a/stylesheets/highlight/highlight.css b/stylesheets/highlight/highlight.css index 7255fa6..e887506 100644 --- a/stylesheets/highlight/highlight.css +++ b/stylesheets/highlight/highlight.css @@ -1,46 +1 @@ -.article pre { - color: black; - background-color: #f5f5f5; - border-left: 5px solid rgb(234, 234, 234); - padding-left: 15px; -} - -.kr { - color: black; -} - -.c1 { - color: #747474; -} - -.nt { - color: rgb(0, 118, 206); -} - -.s { - color: rgb(1, 165, 136); -} - -.m { - color: rgb(1, 165, 136); -} - -.l { - color: rgb(1, 165, 136); -} - -.p { - color: gray; -} - -.nf { - color: rgb(128, 128, 128); -} - -.s2 { - color: rgb(1, 165, 136); -} - -.x { - color: rgb(0, 0, 0); -} \ No newline at end of file +.article pre{color:black;background-color:#f5f5f5;border-left:5px solid #eaeaea;padding-left:15px}.kr{color:black}.c1{color:#747474}.nt{color:#0076ce}.s{color:#01a588}.m{color:#01a588}.l{color:#01a588}.p{color:gray}.nf{color:#808080}.s2{color:#01a588}.x{color:#000} \ No newline at end of file From 4649f2e7c5157ccd487c1112f32da08de4ff4b60 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Sun, 21 May 2017 22:54:27 -0700 Subject: [PATCH 011/109] change stylesheet --- guides/index.html | 2 +- handbook/index.html | 2 +- handbook/libraries/index.html | 2 +- index.html | 2 +- install/index.html | 2 +- quickstart.eve/index.html | 2 +- stylesheets/application.css | 281 +++++++++++++++++++++++++++- stylesheets/highlight/highlight.css | 47 ++++- syntaxreference/index.html | 2 +- tutorials/index.html | 2 +- 10 files changed, 334 insertions(+), 10 deletions(-) diff --git a/guides/index.html b/guides/index.html index cdb80b8..8bd94f4 100644 --- a/guides/index.html +++ b/guides/index.html @@ -45,7 +45,7 @@ } - + diff --git a/handbook/index.html b/handbook/index.html index 66a5bba..6f584a5 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -45,7 +45,7 @@ } - + diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html index b0f7a5d..b8ce771 100644 --- a/handbook/libraries/index.html +++ b/handbook/libraries/index.html @@ -45,7 +45,7 @@ } - + diff --git a/index.html b/index.html index 66f804f..3a7e759 100644 --- a/index.html +++ b/index.html @@ -45,7 +45,7 @@ } - + diff --git a/install/index.html b/install/index.html index 48572bc..3c05053 100644 --- a/install/index.html +++ b/install/index.html @@ -45,7 +45,7 @@ } - + diff --git a/quickstart.eve/index.html b/quickstart.eve/index.html index e3b3ff1..6e51108 100644 --- a/quickstart.eve/index.html +++ b/quickstart.eve/index.html @@ -45,7 +45,7 @@ } - + diff --git a/stylesheets/application.css b/stylesheets/application.css index d5d893f..3509bcd 100644 --- a/stylesheets/application.css +++ b/stylesheets/application.css @@ -1 +1,280 @@ -#eve-pallette{color:#4a4088;color:#5b59a4;color:#6b67ad;color:#0079b1;color:#009ee0;color:#00b8f1;color:#00738b;color:#0098a7;color:#00abbc;color:#8c3137;color:#b14349;color:#e24f5e;color:#558a7e;color:#71b1a2;color:#80c6b6;color:#99722d;color:#c69a3f;color:#f6c04e;color:#52813e;color:#6fa551;color:#81bf5f;color:#00718c;color:#0097a7;color:#00aabe;color:#3c3082;color:#504fa1;color:#625ea9;color:#9e2265;color:#d8418c;color:#ee519e;color:#b94915;color:#d8631b;color:#f47721;color:#c57215;color:#f89e24;color:#fbb031;color:#7c2676;color:#a93b96;color:#c83896;color:#5b227f;color:#7e3c97;color:#a45fa7;color:#979689;color:#b7b6a7;color:#cccab9;color:#588496;color:#7ba4b6;color:#91c0d6}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}body{display:flex;flex-direction:column;margin:0;background:white;color:#555;line-height:1.7;font-family:"Open Sans",Avenir,"Helvetica neue",sans-serif}pre{background-color:#262626;padding:20px;padding-left:10px;overflow:auto}code{color:#0079d3}blockquote{color:#7d7d7d;border-left:3px solid #c8c8c8;padding-left:10px}p{line-height:25px}ul,ol{line-height:25px}h1{font-size:35px;padding-top:0;margin-top:0;margin-bottom:20px}h2{font-size:25px;padding-top:0;margin-top:20px;margin-bottom:20px}.main{display:flex;align-items:stretch;min-height:100%}.drawer{color:#555;border-right:1px solid #f0f0f0;padding-left:10px;padding-right:50px;padding-bottom:20px}.highlight{margin-bottom:20px;margin-top:20px}.colored{font-weight:bold}.drawer a{color:#555}.article{padding-left:50px}.article a{color:#009ee0}.article a::hover{color:#5b59a4}.sidebar-menu{list-style:none;margin:0;padding:0}.sidebar-menu a{text-decoration:none}.sidebar-menu li{}.sub{margin:0;padding:0;padding-left:20px}.sub-menu{margin-top:20px}.selected a{color:#91c0d6}.active{}.active li{display:inherit}.dataTable{border:1px solid #000;border-collapse:collapse;width:100%}.dataTable th{font-weight:bold;border:1px solid #000}.dataTable td{border:1px solid #000;white-space:pre;font-family:monospace;padding:5px}.flex-spacer{flex:1}.flex-row{display:flex}.flex-row.spaced>*+*{margin-left:30px}.flex-row.double-spaced>*+*{margin-left:60px}.flex-row.stretched{align-self:stretch}.layer-wrapper{display:flex;flex-direction:column;align-items:center;margin-top:60px;padding:0 40px}.layer{max-width:100%;width:960px;display:flex;align-items:center}.toplayer{max-width:100%;width:960px;display:flex;align-items:top}.sub-layer{margin-top:30px}.header-wrapper{}.logo{display:flex;flex:0 0 auto;align-items:center;padding:0}.logo>img{max-width:60px}.logo>h1{margin:0;margin-left:18px;padding:0;height:26px;margin-top:-32px}.logo>h1>img{height:100%}nav{flex:none;display:flex;flex-direction:row-reverse}nav>*{flex:0 0 auto;padding:10px 20px;margin:0;text-decoration:none;color:#4a4088;transition:background .1s ease-out}nav>*:hover{background:#f2f2f2}nav>*:active{background:#e9e9e9}nav>.play-cta{margin:0;padding:10px 20px;color:white}.btn{cursor:pointer;text-align:center;user-select:none;-moz-user-select:none;-ms-user-select:none}.btn.big{flex:1 0 auto;padding:18px 30px}.btn.rounded{border-radius:3px}.cta{cursor:pointer;text-decoration:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none;transition:background .1s ease-out}.cta.primary{background:#00b8f1;color:white}.cta.primary:hover{background:#009ee0}.cta.primary:active{background:#0079b1}.cta.secondary{background:#6b67ad;color:white}.cta.secondary:hover{background:#5b59a4}.cta.secondary:active{background:#4a4088}.cta.tertiary{background:#888a8f;color:white}.cta.tertiary:hover{background:#808284}.cta.tertiary:active{background:#787a7f}.contact-wrapper{display:flex;flex-direction:column;padding:0;position:relative;margin-bottom:60px;color:white}.contact{display:flex;flex-direction:row;max-width:960px;align-self:center;margin:auto;overflow:hidden;border-radius:3px;cursor:pointer;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none}.contact>*{flex:1 1 auto;align-self:stretch;max-width:320px;padding:30px;color:white!important;text-decoration:none;transition:background .1s ease-out}.contact h3{margin-bottom:20px;font-size:1.25rem}.contact>*:first-child{background:#6b67ad}.contact>*:first-child:hover{background:#7573be}.contact>*:first-child:active{background:#8e8cd7}.contact>*:nth-child(2){background:#5b59a4}.contact>*:nth-child(2):hover{background:#7573be}.contact>*:nth-child(2):active{background:#8e8cd7}.contact>*:last-child{background:#4a4088}.contact>*:last-child:hover{background:#7573be}.contact>*:last-child:active{background:#8e8cd7} \ No newline at end of file +#eve-pallette { + /* Default */ + color: rgb(74,64,136); + color: rgb(91,89,164); + color: rgb(107,103,173); + color: rgb(0,121,177); + color: rgb(0,158,224); + color: rgb(0,184,241); + + /* Style 1 */ + color: rgb(0, 115, 139); + color: rgb(0, 152, 167); + color: rgb(0, 171, 188); + color: rgb(140, 49, 55); + color: rgb(177, 67, 73); + color: rgb(226, 79, 94); + + /* Style 2 */ + color: rgb(85, 138, 126); + color: rgb(113, 177, 162); + color: rgb(128, 198, 182); + color: rgb(153, 114, 45); + color: rgb(198, 154, 63); + color: rgb(246, 192, 78); + + /* Style 3 */ + color: rgb(82, 129, 62); + color: rgb(111, 165, 81); + color: rgb(129, 191, 95); + color: rgb(0, 113, 140); + color: rgb(0, 151, 167); + color: rgb(0, 170, 190); + + /* Style 4 */ + color: rgb(60, 48, 130); + color: rgb(80, 79, 161); + color: rgb(98, 94, 169); + color: rgb(158, 34, 101); + color: rgb(216, 65, 140); + color: rgb(238, 81, 158); + + /* Style 5 */ + color: rgb(185, 73, 21); + color: rgb(216, 99, 27); + color: rgb(244, 119, 33); + color: rgb(197, 114, 21); + color: rgb(248, 158, 36); + color: rgb(251, 176, 49); + + /* Style 6 */ + color: rgb(124, 38, 118); + color: rgb(169, 59, 150); + color: rgb(200, 56, 150); + color: rgb(91, 34, 127); + color: rgb(126, 60, 151); + color: rgb(164, 95, 167); + + /* Style 7 */ + color: rgb(151, 150, 137); + color: rgb(183, 182, 167); + color: rgb(204, 202, 185); + color: rgb(88, 132, 150); + color: rgb(123, 164, 182); + color: rgb(145, 192, 214); +} + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} + +body { display: flex; flex-direction: column; margin: 0; background: white; color: #555; line-height: 1.7; font-family: "Open Sans", Avenir, "Helvetica neue", sans-serif;} + + +pre { + background-color: rgb(38,38,38); + padding: 20px; + padding-left: 10px; + overflow: auto; +} + +code { + color: rgb(0, 121, 211); +} + +blockquote { + color: rgb(125,125,125); + border-left: 3px solid rgb(200,200,200); + padding-left: 10px; +} + +p { + line-height: 25px; +} + +ul, ol { + line-height: 25px; +} + +h1 { + font-size: 35px; + padding-top: 0px; + margin-top:0px; + margin-bottom: 20px; +} + +h2 { + font-size: 25px; + padding-top: 0px; + margin-top: 20px; + margin-bottom: 20px; +} + +.main { + display: flex; + align-items: stretch; + min-height: 100%; +} + +.drawer { + color: rgb(85, 85, 85); + border-right: 1px solid #f0f0f0; + padding-left: 10px; + padding-right: 50px; + padding-bottom: 20px; + +} + +.highlight { + margin-bottom: 20px; + margin-top: 20px; +} + +.colored { + font-weight: bold; +} + +.drawer a { + color: rgb(85, 85, 85); +} + +.article { + padding-left: 50px; +} + +.article a { + color: rgb(0,158,224); +} + +.article a::hover { + color: rgb(91,89,164); +} + +.sidebar-menu { + list-style: none; + margin: 0px; + padding: 0px; +} + +.sidebar-menu a { + text-decoration: none; +} + +.sidebar-menu li { + +} + +.sub { + margin: 0px; + padding: 0px; + padding-left: 20px; +} + +.sub-menu { + margin-top: 20px; +} + +.selected a { + color: rgb(145, 192, 214); +} + +.active { + +} + +.active li { + display: inherit; +} + +.dataTable { + border: 1px solid #000; + border-collapse: collapse; + width: 100%; +} + +.dataTable th { + font-weight: bold; + border: 1px solid #000; +} + +.dataTable td { + border: 1px solid #000; + white-space: pre; + font-family: monospace; + padding: 5px; +} + +.flex-spacer { flex: 1; } +.flex-row { display: flex; } +.flex-row.spaced > * + * { margin-left: 30px; } +.flex-row.double-spaced > * + * { margin-left: 60px; } +.flex-row.stretched { align-self: stretch; } + +.layer-wrapper { display: flex; flex-direction: column; align-items: center; margin-top: 60px; padding: 0 40px; } +.layer { max-width: 100%; width: 960px; display: flex; align-items: center; } +.toplayer { max-width: 100%; width: 960px; display: flex; align-items: top; } +.sub-layer { margin-top: 30px; } + +.header-wrapper { } +.logo { display: flex; flex: 0 0 auto; align-items: center; padding: 0; } +.logo > img { max-width: 60px; } +.logo > h1 { margin: 0; margin-left: 18px; padding: 0; height: 26px; margin-top: -32px; } +.logo > h1 > img { height: 100%; } + +nav { flex: none; display: flex; flex-direction: row-reverse; } +nav > * { flex: 0 0 auto; padding: 10px 20px; margin: 0; text-decoration: none; color: rgb(74, 64, 136); transition: background 0.1s ease-out; } +nav > *:hover { background: #f2f2f2; } +nav > *:active { background: #e9e9e9; } +nav > .play-cta { margin: 0; padding: 10px 20px; color: white; } + +.btn { cursor: pointer; text-align: center; user-select: none; -moz-user-select: none; -ms-user-select: none; } +.btn.big { flex: 1 0 auto; padding: 18px 30px; } +.btn.rounded { border-radius: 3px; } + +.cta { cursor: pointer; text-decoration: none; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; transition: background 0.1s ease-out; } + +.cta.primary { background: rgb(0, 184, 241); color: white; } +.cta.primary:hover { background: rgb(0, 158, 224); } +.cta.primary:active { background: rgb(0, 121, 177); } + +.cta.secondary { background: rgb(107, 103, 173); color: white; } +.cta.secondary:hover { background: rgb(91, 89, 164); } +.cta.secondary:active { background: rgb(74, 64, 136); } + +.cta.tertiary { background: #888a8f; color: white; } +.cta.tertiary:hover { background: #808284; } +.cta.tertiary:active { background: #787a7f; } + +.contact-wrapper { display: flex; flex-direction: column; padding: 0; position: relative; margin-bottom: 60px; color: white; } +.contact { display: flex; flex-direction: row; max-width: 960px; align-self: center; margin: auto; overflow: hidden; border-radius: 3px; cursor: pointer; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; } +.contact > * { flex: 1 1 auto; align-self: stretch; max-width: 320px; padding: 30px; color: white !important; text-decoration: none; transition: background 0.1s ease-out; } +.contact h3 { margin-bottom: 20px; font-size: 1.25rem; } + +.contact > *:first-child { background: rgb(107, 103, 173); } +.contact > *:first-child:hover { background: rgb(117, 115, 190); } +.contact > *:first-child:active { background: rgb(142, 140, 215); } + +.contact > *:nth-child(2) { background: rgb(91, 89, 164); } +.contact > *:nth-child(2):hover { background: rgb(117, 115, 190); } +.contact > *:nth-child(2):active { background: rgb(142, 140, 215); } + +.contact > *:last-child { background: rgb(74, 64, 136); } +.contact > *:last-child:hover { background: rgb(117, 115, 190); } +.contact > *:last-child:active { background: rgb(142, 140, 215); } \ No newline at end of file diff --git a/stylesheets/highlight/highlight.css b/stylesheets/highlight/highlight.css index e887506..7255fa6 100644 --- a/stylesheets/highlight/highlight.css +++ b/stylesheets/highlight/highlight.css @@ -1 +1,46 @@ -.article pre{color:black;background-color:#f5f5f5;border-left:5px solid #eaeaea;padding-left:15px}.kr{color:black}.c1{color:#747474}.nt{color:#0076ce}.s{color:#01a588}.m{color:#01a588}.l{color:#01a588}.p{color:gray}.nf{color:#808080}.s2{color:#01a588}.x{color:#000} \ No newline at end of file +.article pre { + color: black; + background-color: #f5f5f5; + border-left: 5px solid rgb(234, 234, 234); + padding-left: 15px; +} + +.kr { + color: black; +} + +.c1 { + color: #747474; +} + +.nt { + color: rgb(0, 118, 206); +} + +.s { + color: rgb(1, 165, 136); +} + +.m { + color: rgb(1, 165, 136); +} + +.l { + color: rgb(1, 165, 136); +} + +.p { + color: gray; +} + +.nf { + color: rgb(128, 128, 128); +} + +.s2 { + color: rgb(1, 165, 136); +} + +.x { + color: rgb(0, 0, 0); +} \ No newline at end of file diff --git a/syntaxreference/index.html b/syntaxreference/index.html index 111dc1a..b761261 100644 --- a/syntaxreference/index.html +++ b/syntaxreference/index.html @@ -45,7 +45,7 @@ } - + diff --git a/tutorials/index.html b/tutorials/index.html index d7c1b62..83543e9 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -45,7 +45,7 @@ } - + From c09f9a130aff36d78fc7c857b8c4fe6a4a8d04b9 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Sun, 21 May 2017 22:58:55 -0700 Subject: [PATCH 012/109] update highlight link --- guides/index.html | 2 +- handbook/index.html | 2 +- handbook/libraries/index.html | 2 +- index.html | 2 +- install/index.html | 2 +- quickstart.eve/index.html | 2 +- syntaxreference/index.html | 2 +- tutorials/index.html | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/guides/index.html b/guides/index.html index 8bd94f4..33c3adc 100644 --- a/guides/index.html +++ b/guides/index.html @@ -48,7 +48,7 @@ - + diff --git a/handbook/index.html b/handbook/index.html index 6f584a5..b086c98 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -48,7 +48,7 @@ - + diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html index b8ce771..c5ea6d2 100644 --- a/handbook/libraries/index.html +++ b/handbook/libraries/index.html @@ -48,7 +48,7 @@ - + diff --git a/index.html b/index.html index 3a7e759..15a4574 100644 --- a/index.html +++ b/index.html @@ -48,7 +48,7 @@ - + diff --git a/install/index.html b/install/index.html index 3c05053..7c4b97d 100644 --- a/install/index.html +++ b/install/index.html @@ -48,7 +48,7 @@ - + diff --git a/quickstart.eve/index.html b/quickstart.eve/index.html index 6e51108..26efdfa 100644 --- a/quickstart.eve/index.html +++ b/quickstart.eve/index.html @@ -48,7 +48,7 @@ - + diff --git a/syntaxreference/index.html b/syntaxreference/index.html index b761261..598367f 100644 --- a/syntaxreference/index.html +++ b/syntaxreference/index.html @@ -48,7 +48,7 @@ - + diff --git a/tutorials/index.html b/tutorials/index.html index 83543e9..b69107f 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -48,7 +48,7 @@ - + From 7dc306d7c5a4af852905ccc772995d11f465b777 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Tue, 23 May 2017 22:48:43 -0700 Subject: [PATCH 013/109] update site --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..e825467 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +docs.witheve.com \ No newline at end of file From 19fc7949628f48752cf061e473958e75e7084495 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Tue, 23 May 2017 22:50:41 -0700 Subject: [PATCH 014/109] change CNAME --- CNAME | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CNAME b/CNAME index e825467..e886149 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -docs.witheve.com \ No newline at end of file +cmontella.github.io/docs \ No newline at end of file From 15c646e43776da96398b4168d7ace371e00d308b Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Tue, 23 May 2017 22:52:06 -0700 Subject: [PATCH 015/109] change CNAME --- CNAME | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CNAME b/CNAME index e886149..7137bb4 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -cmontella.github.io/docs \ No newline at end of file +https://cmontella.github.io/docs/ \ No newline at end of file From f98d9c84e614030d7a5bb43f802ca284a8846177 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Tue, 23 May 2017 22:53:53 -0700 Subject: [PATCH 016/109] Update site --- guides/index.html | 8 +- handbook/index.html | 12 +-- handbook/index.xml | 4 +- handbook/libraries/index.html | 32 ++----- index.html | 35 ++------ index.xml | 128 +++++++++++++++++++++++++--- install/index.html | 28 ++---- quickstart.eve/index.html | 28 ++---- sitemap.xml | 12 ++- stylesheets/application.css | 17 +++- syntaxreference/index.html | 28 ++---- tutorials/index.html | 14 ++- tutorials/index.xml | 100 ++++++++++++++++++++++ tutorials/quickstart.eve/index.html | 77 +++++++---------- 14 files changed, 323 insertions(+), 200 deletions(-) diff --git a/guides/index.html b/guides/index.html index 33c3adc..df8c83b 100644 --- a/guides/index.html +++ b/guides/index.html @@ -45,10 +45,10 @@ } - + - + @@ -118,7 +118,7 @@

    EVE

  • Installation
  • -
  • Quickstart
  • +
  • Quickstart
  • Syntax Ref
  • @@ -132,7 +132,7 @@

    EVE

  • - Standard Library + Library
  • diff --git a/handbook/index.html b/handbook/index.html index b086c98..05d9f8c 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -45,10 +45,10 @@ } - + - + @@ -118,7 +118,7 @@

    EVE

  • Installation
  • -
  • Quickstart
  • +
  • Quickstart
  • Syntax Ref
  • @@ -132,7 +132,7 @@

    EVE

  • - Standard Library + Library
  • @@ -162,8 +162,8 @@


    - -

    +
    +

    Standard Library


    diff --git a/handbook/index.xml b/handbook/index.xml index b45c018..6ec0cb3 100644 --- a/handbook/index.xml +++ b/handbook/index.xml @@ -27,7 +27,7 @@ - + Standard Library http://cmontella.github.io/docs/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 @@ -38,6 +38,8 @@ <link rel="stylesheet" type="text/css" href="style.css"> </head></p> +<h1 id="standard-library">Standard Library</h1> + <h2 id="aggregates">Aggregates</h2> <table> diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html index c5ea6d2..8be9442 100644 --- a/handbook/libraries/index.html +++ b/handbook/libraries/index.html @@ -9,7 +9,7 @@ - - Eve Documentation + Standard Library - Eve Documentation @@ -45,10 +45,10 @@ } - + - + @@ -121,7 +121,7 @@

    EVE

  • Installation
  • -
  • Quickstart
  • +
  • Quickstart
  • Syntax Ref
  • @@ -135,7 +135,7 @@

    EVE

  • - Standard Library + Library
  • @@ -156,6 +156,8 @@

    EVE

    +

    Standard Library

    +

    Aggregates

    @@ -614,22 +616,4 @@

    string/codepoint-length

    - - - - + \ No newline at end of file diff --git a/index.html b/index.html index 15a4574..571a3ce 100644 --- a/index.html +++ b/index.html @@ -45,10 +45,10 @@ } - + - + @@ -124,7 +124,7 @@

    EVE

  • Installation
  • -
  • Quickstart
  • +
  • Quickstart
  • Syntax Ref
  • @@ -138,7 +138,7 @@

    EVE

  • - Standard Library + Library
  • @@ -158,19 +158,19 @@

    EVE

    Install guide

    -

    Need to install Eve on your machine? Head here for step-by-step directions.

    +

    Need to install Eve on your machine? Head here for step-by-step directions.

    Quickstart

    -

    If you’re new to Eve and want a hands-on demo to learn the language, you can jump right in with a 5 minute quickstart guide that shows you how to build a simple incrementing counter.

    +

    If you’re new to Eve and want a hands-on demo to learn the language, you can jump right in with a 5 minute quickstart guide that shows you how to build a simple incrementing counter.

    Syntax reference

    -

    Want a reminder how the syntax works or to get an overview of Eve without going through the quickstart? The syntax reference is a good place to start.

    +

    Want a reminder how the syntax works or to get an overview of Eve without going through the quickstart? The syntax reference is a good place to start.

    Libraries

    -

    Want to know everything Eve can do? Here’s a list of all the functions, operators, and watchers available in the language.

    +

    Want to know everything Eve can do? Here’s a list of all the functions, operators, and watchers available in the language.

    Stuck?

    @@ -195,21 +195,4 @@

    Want to learn more?

    - - - \ No newline at end of file + \ No newline at end of file diff --git a/index.xml b/index.xml index 7de7fc9..2886d9e 100644 --- a/index.xml +++ b/index.xml @@ -44,6 +44,106 @@ npm install + + Quickstart + http://cmontella.github.io/docs/tutorials/quickstart.eve/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://cmontella.github.io/docs/tutorials/quickstart.eve/ + + +<h1 id="quickstart">Quickstart</h1> + +<p>In this guide we&rsquo;re going to give you a 5 minute introduction to the essential concepts in Eve. If you&rsquo;ve never used Eve before, you&rsquo;re in the right place.</p> + +<h2 id="adding-records-to-eve">Adding records to Eve</h2> + +<p>Eve represents data as records, which are key value pairs attached to a unique ID. Eve programs are made up of small composable blocks that search for and create records. Let&rsquo;s start with a block that adds a record to Eve:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">greeting</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;hello world&quot;</span><span class="p">]</span> +</code></pre></div> + +<p>This record is tagged <code>#greeting</code>, and has an attribute &ldquo;text&rdquo; with the value &ldquo;hello world&rdquo;. Although tags have a special syntax, they are attributes like any other. We encourage you to classify groups of related records with tags.</p> + +<h2 id="finding-records-in-eve">Finding records in Eve</h2> + +<p>Eve finds every record that matches the supplied patterns, then binds new records to them. If no records match the search, then the block does not run at all. A block will only run if every pattern in a search matches at least one record. Let&rsquo;s search for the <code>#greeting</code> we just committed, and then display it in a text container:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="p">[</span><span class="err">#</span><span class="nv">greeting</span> <span class="nv">text</span><span class="p">]</span> + +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="p">]</span> +</code></pre></div> + +<p>Variables with the same name are equivalent within a block; because they have the same name, the <code>text</code> in <code>[#greeting text]</code> and <code>[#ui/text text]</code> are equivalent. Go ahead and add another <code>#greeting</code> record to the first block to see what happens when more than one record matches the search.</p> + +<h2 id="records-update-as-data-changes">Records update as data changes</h2> + +<p>Blocks in Eve react automatically to changes in data. When a record changes, any bound records are automatically updated. Let&rsquo;s search for the current time, and display it in a div:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="p">[</span><span class="err">#</span><span class="nv">time</span> <span class="nv">seconds</span><span class="p">]</span> + +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="nf">:</span> <span class="nv">seconds</span><span class="p">]</span> +</code></pre></div> + +<p>As the time changes, the output updates to reflect the current state of the <code>#time</code> record. Records can be committed instead of bound, but the behavior is a little different &ndash; committed records persist until they are removed explicitly. Try changing <code>bind</code> to <code>commit</code> in the above block and see what happens.</p> + +<h2 id="reacting-to-events">Reacting to events</h2> + +<p>Let&rsquo;s draw a button on the screen:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">button</span> <span class="err">#</span><span class="nv">increment</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;+1&quot;</span><span class="p">]</span> +</code></pre></div> + +<p>When you click anywhere on the screen, Eve creates an <code>#html/event/click</code> record representing the click. You can react to clicks on the <code>#increment</code> button by searching for the <code>#html/event/click</code> record, where the element attribute is the button:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="nv">event</span> <span class="nf">=</span> <span class="p">[</span><span class="err">#</span><span class="nv">html</span><span class="nf">/</span><span class="nv">event</span><span class="nf">/</span><span class="nv">click</span> <span class="nv">element</span><span class="nf">:</span> <span class="p">[</span><span class="err">#</span><span class="nv">increment</span><span class="p">]]</span> + +<span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">clicked</span> <span class="nv">event</span><span class="p">]</span> +</code></pre></div> + +<p>Clicks only last for an instant, but we want to create a permanent record of each click so we can search for them later. This block commits a <code>#clicked</code> record that will persist until it&rsquo;s explicitly removed. Much like the <code>#greeting</code> text we bound to the <code>#ui</code>, variables with the same name are equivalent, so the variable <code>event</code> in the <code>#clicked</code> record is a reference to the <code>#html/event/click</code> on the <code>#increment</code> button.</p> + +<p>The identity of a record is determined by its attribute/value pairs. Two records with the same attributes and values are identical in Eve. We included the <code>event</code> attribute in the <code>#clicked</code> record to differentiate each record. Without this differentiation, we could only ever create a single <code>#clicked</code> record. Try removing <code>event</code> from the record and click the button to test this out.</p> + +<h2 id="count-the-number-of-clicks">Count the number of clicks</h2> + +<p>Now let&rsquo;s count the number of times the button has been clicked. Make sure <code>event</code> is back in <code>#clicked</code>, and then we can count those records directly:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="nv">how</span><span class="nf">-</span><span class="nv">many</span> <span class="nf">=</span> <span class="nv">gather</span><span class="nf">/</span><span class="nv">count</span><span class="p">[</span><span class="nv">for</span><span class="nf">:</span> <span class="p">[</span><span class="err">#</span><span class="nv">clicked</span><span class="p">]]</span> + +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;The button has been clicked {{how-many}} times&quot;</span><span class="p">]</span> +</code></pre></div> + +<p>This block searches for every unique <code>#clicked</code>, counts them, and returns that value in <code>how-many</code>. Then we display this value in a text container using the operator <code>{{ ... }}</code>, which inserts the value of the contained variable into the string. An important thing to remember here is that this block will only run when the button has been clicked at least once. Before then, this block will not run because there are no <code>#clicked</code> records to count.</p> + +<h2 id="summary">Summary</h2> + +<p>That&rsquo;s it for the 5 minute introduction to Eve. To summarize:</p> + +<ul> +<li>Eve programs are made up of blocks.</li> +<li>Data are represented by records, key value pairs associated to a unique ID.</li> +<li>There are two sections of a block: one where you search for records, and one where you bind or commit records.</li> +<li>Blocks update records automatically to reflect changes in data.</li> +<li>Bound records are replaced when data changes, while committed records must be removed manually.</li> +<li>Records are unique, uniqueness is determined by a record&rsquo;s attributes and their values.</li> +</ul> + +<p>This will get you started with Eve, but there&rsquo;s still more to learn. From here, you can:</p> + +<ul> +<li>Advance to Level 2 of the introductory tutorial.</li> +<li>View the syntax reference or the Eve handbook.</li> +<li>Explore already made examples.</li> +<li>Or dive right in to the editor and try out the concepts you&rsquo;ve just learned.</li> +</ul> + + + Quickstart http://cmontella.github.io/docs/quickstart.eve/ @@ -154,19 +254,19 @@ npm install <h2 id="install-guide">Install guide</h2> -<p>Need to install Eve on your machine? <a href="../install">Head here</a> for step-by-step directions.</p> +<p>Need to install Eve on your machine? <a href="install">Head here</a> for step-by-step directions.</p> <h2 id="quickstart">Quickstart</h2> -<p>If you’re new to Eve and want a hands-on demo to learn the language, you can jump right in with a 5 minute <a href="../quickstart">quickstart guide</a> that shows you how to build a simple incrementing counter.</p> +<p>If you’re new to Eve and want a hands-on demo to learn the language, you can jump right in with a 5 minute <a href="tutorials/quickstart.eve">quickstart guide</a> that shows you how to build a simple incrementing counter.</p> <h2 id="syntax-reference">Syntax reference</h2> -<p>Want a reminder how the syntax works or to get an overview of Eve without going through the quickstart? The <a href="../syntax">syntax reference</a> is a good place to start.</p> +<p>Want a reminder how the syntax works or to get an overview of Eve without going through the quickstart? The <a href="syntaxreference">syntax reference</a> is a good place to start.</p> <h2 id="libraries">Libraries</h2> -<p>Want to know everything Eve can do? <a href="../library">Here’s a list</a> of all the functions, operators, and watchers available in the language.</p> +<p>Want to know everything Eve can do? <a href="handbook/libraries/">Here’s a list</a> of all the functions, operators, and watchers available in the language.</p> <h2 id="stuck">Stuck?</h2> @@ -505,6 +605,15 @@ chris := none</code></td> + http://cmontella.github.io/docs/tutorials/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://cmontella.github.io/docs/tutorials/ + + + + + Standard Library http://cmontella.github.io/docs/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 @@ -515,6 +624,8 @@ chris := none</code></td> <link rel="stylesheet" type="text/css" href="style.css"> </head></p> +<h1 id="standard-library">Standard Library</h1> + <h2 id="aggregates">Aggregates</h2> <table> @@ -971,14 +1082,5 @@ length-in-js = string/codepoint_length[text: string]</code> - - - http://cmontella.github.io/docs/tutorials/ - Mon, 01 Jan 0001 00:00:00 +0000 - - http://cmontella.github.io/docs/tutorials/ - - - \ No newline at end of file diff --git a/install/index.html b/install/index.html index 7c4b97d..db86ab8 100644 --- a/install/index.html +++ b/install/index.html @@ -45,10 +45,10 @@ } - + - + @@ -121,7 +121,7 @@

    EVE

  • Installation
  • -
  • Quickstart
  • +
  • Quickstart
  • Syntax Ref
  • @@ -135,7 +135,7 @@

    EVE

  • - Standard Library + Library
  • @@ -182,22 +182,4 @@

    Usage

    - - - - + \ No newline at end of file diff --git a/quickstart.eve/index.html b/quickstart.eve/index.html index 26efdfa..ee8835d 100644 --- a/quickstart.eve/index.html +++ b/quickstart.eve/index.html @@ -45,10 +45,10 @@ } - + - + @@ -121,7 +121,7 @@

    EVE

  • Installation
  • -
  • Quickstart
  • +
  • Quickstart
  • Syntax Ref
  • @@ -135,7 +135,7 @@

    EVE

  • - Standard Library + Library
  • @@ -246,22 +246,4 @@

    Summary

    - - - - + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 3a8f27a..c35efaa 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -5,6 +5,10 @@ http://cmontella.github.io/docs/install/ + + http://cmontella.github.io/docs/tutorials/quickstart.eve/ + + http://cmontella.github.io/docs/quickstart.eve/ @@ -33,10 +37,6 @@ http://cmontella.github.io/docs/handbook/ - - http://cmontella.github.io/docs/handbook/libraries/ - - http://cmontella.github.io/docs/tutorials/ @@ -56,6 +56,10 @@ 0 + + http://cmontella.github.io/docs/handbook/libraries/ + + http://cmontella.github.io/docs/tutorials/ 0 diff --git a/stylesheets/application.css b/stylesheets/application.css index 3509bcd..c37a50b 100644 --- a/stylesheets/application.css +++ b/stylesheets/application.css @@ -93,6 +93,7 @@ pre { padding: 20px; padding-left: 10px; overflow: auto; + margin-bottom: 20px; } code { @@ -107,9 +108,12 @@ blockquote { p { line-height: 25px; + margin-bottom: 20px; } ul, ol { + margin-top: 20px; + margin-bottom: 20px; line-height: 25px; } @@ -127,6 +131,10 @@ h2 { margin-bottom: 20px; } +li { + margin-left: 20px; +} + .main { display: flex; align-items: stretch; @@ -135,9 +143,8 @@ h2 { .drawer { color: rgb(85, 85, 85); - border-right: 1px solid #f0f0f0; padding-left: 10px; - padding-right: 50px; + padding-right: 60px; padding-bottom: 20px; } @@ -184,7 +191,11 @@ h2 { .sub { margin: 0px; padding: 0px; - padding-left: 20px; + margin-bottom: 20px; +} + +.sub li { + margin: 0px; } .sub-menu { diff --git a/syntaxreference/index.html b/syntaxreference/index.html index 598367f..1aee6d7 100644 --- a/syntaxreference/index.html +++ b/syntaxreference/index.html @@ -45,10 +45,10 @@ } - + - + @@ -121,7 +121,7 @@

    EVE

  • Installation
  • -
  • Quickstart
  • +
  • Quickstart
  • Syntax Ref
  • @@ -135,7 +135,7 @@

    EVE

  • - Standard Library + Library
  • @@ -406,22 +406,4 @@

    Update Operators

    - - - - + \ No newline at end of file diff --git a/tutorials/index.html b/tutorials/index.html index b69107f..2dd1cce 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -45,10 +45,10 @@ } - + - + @@ -118,7 +118,7 @@

    EVE

  • Installation
  • -
  • Quickstart
  • +
  • Quickstart
  • Syntax Ref
  • @@ -132,7 +132,7 @@

    EVE

  • - Standard Library + Library
  • @@ -156,6 +156,12 @@


    + +

    Quickstart

    +
    + +
    + diff --git a/tutorials/index.xml b/tutorials/index.xml index 00504ba..bbfd354 100644 --- a/tutorials/index.xml +++ b/tutorials/index.xml @@ -17,5 +17,105 @@
    + + Quickstart + http://cmontella.github.io/docs/tutorials/quickstart.eve/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://cmontella.github.io/docs/tutorials/quickstart.eve/ + + +<h1 id="quickstart">Quickstart</h1> + +<p>In this guide we&rsquo;re going to give you a 5 minute introduction to the essential concepts in Eve. If you&rsquo;ve never used Eve before, you&rsquo;re in the right place.</p> + +<h2 id="adding-records-to-eve">Adding records to Eve</h2> + +<p>Eve represents data as records, which are key value pairs attached to a unique ID. Eve programs are made up of small composable blocks that search for and create records. Let&rsquo;s start with a block that adds a record to Eve:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">greeting</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;hello world&quot;</span><span class="p">]</span> +</code></pre></div> + +<p>This record is tagged <code>#greeting</code>, and has an attribute &ldquo;text&rdquo; with the value &ldquo;hello world&rdquo;. Although tags have a special syntax, they are attributes like any other. We encourage you to classify groups of related records with tags.</p> + +<h2 id="finding-records-in-eve">Finding records in Eve</h2> + +<p>Eve finds every record that matches the supplied patterns, then binds new records to them. If no records match the search, then the block does not run at all. A block will only run if every pattern in a search matches at least one record. Let&rsquo;s search for the <code>#greeting</code> we just committed, and then display it in a text container:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="p">[</span><span class="err">#</span><span class="nv">greeting</span> <span class="nv">text</span><span class="p">]</span> + +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="p">]</span> +</code></pre></div> + +<p>Variables with the same name are equivalent within a block; because they have the same name, the <code>text</code> in <code>[#greeting text]</code> and <code>[#ui/text text]</code> are equivalent. Go ahead and add another <code>#greeting</code> record to the first block to see what happens when more than one record matches the search.</p> + +<h2 id="records-update-as-data-changes">Records update as data changes</h2> + +<p>Blocks in Eve react automatically to changes in data. When a record changes, any bound records are automatically updated. Let&rsquo;s search for the current time, and display it in a div:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="p">[</span><span class="err">#</span><span class="nv">time</span> <span class="nv">seconds</span><span class="p">]</span> + +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="nf">:</span> <span class="nv">seconds</span><span class="p">]</span> +</code></pre></div> + +<p>As the time changes, the output updates to reflect the current state of the <code>#time</code> record. Records can be committed instead of bound, but the behavior is a little different &ndash; committed records persist until they are removed explicitly. Try changing <code>bind</code> to <code>commit</code> in the above block and see what happens.</p> + +<h2 id="reacting-to-events">Reacting to events</h2> + +<p>Let&rsquo;s draw a button on the screen:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">button</span> <span class="err">#</span><span class="nv">increment</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;+1&quot;</span><span class="p">]</span> +</code></pre></div> + +<p>When you click anywhere on the screen, Eve creates an <code>#html/event/click</code> record representing the click. You can react to clicks on the <code>#increment</code> button by searching for the <code>#html/event/click</code> record, where the element attribute is the button:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="nv">event</span> <span class="nf">=</span> <span class="p">[</span><span class="err">#</span><span class="nv">html</span><span class="nf">/</span><span class="nv">event</span><span class="nf">/</span><span class="nv">click</span> <span class="nv">element</span><span class="nf">:</span> <span class="p">[</span><span class="err">#</span><span class="nv">increment</span><span class="p">]]</span> + +<span class="kr">commit</span> + <span class="p">[</span><span class="err">#</span><span class="nv">clicked</span> <span class="nv">event</span><span class="p">]</span> +</code></pre></div> + +<p>Clicks only last for an instant, but we want to create a permanent record of each click so we can search for them later. This block commits a <code>#clicked</code> record that will persist until it&rsquo;s explicitly removed. Much like the <code>#greeting</code> text we bound to the <code>#ui</code>, variables with the same name are equivalent, so the variable <code>event</code> in the <code>#clicked</code> record is a reference to the <code>#html/event/click</code> on the <code>#increment</code> button.</p> + +<p>The identity of a record is determined by its attribute/value pairs. Two records with the same attributes and values are identical in Eve. We included the <code>event</code> attribute in the <code>#clicked</code> record to differentiate each record. Without this differentiation, we could only ever create a single <code>#clicked</code> record. Try removing <code>event</code> from the record and click the button to test this out.</p> + +<h2 id="count-the-number-of-clicks">Count the number of clicks</h2> + +<p>Now let&rsquo;s count the number of times the button has been clicked. Make sure <code>event</code> is back in <code>#clicked</code>, and then we can count those records directly:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span> + <span class="nv">how</span><span class="nf">-</span><span class="nv">many</span> <span class="nf">=</span> <span class="nv">gather</span><span class="nf">/</span><span class="nv">count</span><span class="p">[</span><span class="nv">for</span><span class="nf">:</span> <span class="p">[</span><span class="err">#</span><span class="nv">clicked</span><span class="p">]]</span> + +<span class="kr">bind</span> + <span class="p">[</span><span class="err">#</span><span class="nv">ui</span><span class="nf">/</span><span class="nv">text</span> <span class="nv">text</span><span class="nf">:</span> <span class="s">&quot;The button has been clicked {{how-many}} times&quot;</span><span class="p">]</span> +</code></pre></div> + +<p>This block searches for every unique <code>#clicked</code>, counts them, and returns that value in <code>how-many</code>. Then we display this value in a text container using the operator <code>{{ ... }}</code>, which inserts the value of the contained variable into the string. An important thing to remember here is that this block will only run when the button has been clicked at least once. Before then, this block will not run because there are no <code>#clicked</code> records to count.</p> + +<h2 id="summary">Summary</h2> + +<p>That&rsquo;s it for the 5 minute introduction to Eve. To summarize:</p> + +<ul> +<li>Eve programs are made up of blocks.</li> +<li>Data are represented by records, key value pairs associated to a unique ID.</li> +<li>There are two sections of a block: one where you search for records, and one where you bind or commit records.</li> +<li>Blocks update records automatically to reflect changes in data.</li> +<li>Bound records are replaced when data changes, while committed records must be removed manually.</li> +<li>Records are unique, uniqueness is determined by a record&rsquo;s attributes and their values.</li> +</ul> + +<p>This will get you started with Eve, but there&rsquo;s still more to learn. From here, you can:</p> + +<ul> +<li>Advance to Level 2 of the introductory tutorial.</li> +<li>View the syntax reference or the Eve handbook.</li> +<li>Explore already made examples.</li> +<li>Or dive right in to the editor and try out the concepts you&rsquo;ve just learned.</li> +</ul> + + + \ No newline at end of file diff --git a/tutorials/quickstart.eve/index.html b/tutorials/quickstart.eve/index.html index fbcb634..856fb55 100644 --- a/tutorials/quickstart.eve/index.html +++ b/tutorials/quickstart.eve/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -110,33 +110,36 @@

    EVE

    -
  • - - - Index - -
  • - - - + +
  • + + + Library + +
  • + + @@ -243,22 +246,4 @@

    Summary

    - - - - + \ No newline at end of file From a83cc986468913e129b2285a0852c687122ff8c9 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Tue, 23 May 2017 22:59:24 -0700 Subject: [PATCH 017/109] remove CNAME --- CNAME | 1 - 1 file changed, 1 deletion(-) delete mode 100644 CNAME diff --git a/CNAME b/CNAME deleted file mode 100644 index 7137bb4..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -https://cmontella.github.io/docs/ \ No newline at end of file From e8956e132a7a3b20c54148946293ceb7ae88e979 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Tue, 23 May 2017 23:07:31 -0700 Subject: [PATCH 018/109] update site name --- guides/dsl/index.html | 742 +++++++++++++++++++++++ guides/for-programmers/index.html | 414 +++++++++++++ guides/index.html | 46 +- guides/index.xml | 8 +- guides/style/index.html | 542 +++++++++++++++++ handbook/actions/index.html | 418 +++++++++++++ handbook/add/index.html | 452 ++++++++++++++ handbook/aggregates/index.html | 420 +++++++++++++ handbook/bind/index.html | 638 +++++++++++++++++++ handbook/blocks/index.html | 533 ++++++++++++++++ handbook/browser/index.html | 396 ++++++++++++ handbook/commit/index.html | 642 ++++++++++++++++++++ handbook/commonmark/index.html | 464 ++++++++++++++ handbook/core/index.html | 400 ++++++++++++ handbook/databases/index.html | 492 +++++++++++++++ handbook/datetime/index.html | 400 ++++++++++++ handbook/datetime/time/index.html | 451 ++++++++++++++ handbook/docker/index.html | 423 +++++++++++++ handbook/ebnf/index.html | 502 +++++++++++++++ handbook/equality/index.html | 449 ++++++++++++++ handbook/equivalence/index.html | 406 +++++++++++++ handbook/event/change/index.html | 439 ++++++++++++++ handbook/event/click/index.html | 435 +++++++++++++ handbook/event/index.html | 404 ++++++++++++ handbook/event/keydown/index.html | 426 +++++++++++++ handbook/event/keyup/index.html | 426 +++++++++++++ handbook/expressions/index.html | 408 +++++++++++++ handbook/functions/index.html | 453 ++++++++++++++ handbook/general/index.html | 400 ++++++++++++ handbook/general/sort/index.html | 533 ++++++++++++++++ handbook/glossary/index.html | 428 +++++++++++++ handbook/help/index.html | 425 +++++++++++++ handbook/http/index.html | 396 ++++++++++++ handbook/if-then/index.html | 472 ++++++++++++++ handbook/index.html | 50 +- handbook/index.xml | 16 +- handbook/inequality/index.html | 457 ++++++++++++++ handbook/installation/index.html | 409 +++++++++++++ handbook/intro/index.html | 418 +++++++++++++ handbook/is/index.html | 429 +++++++++++++ handbook/joins/index.html | 416 +++++++++++++ handbook/libraries/index.html | 40 +- handbook/linux/index.html | 417 +++++++++++++ handbook/literate-programming/index.html | 433 +++++++++++++ handbook/mac/index.html | 408 +++++++++++++ handbook/math/abs/index.html | 428 +++++++++++++ handbook/math/ceil/index.html | 428 +++++++++++++ handbook/math/cos/index.html | 432 +++++++++++++ handbook/math/fix/index.html | 440 ++++++++++++++ handbook/math/floor/index.html | 428 +++++++++++++ handbook/math/index.html | 447 ++++++++++++++ handbook/math/mod/index.html | 431 +++++++++++++ handbook/math/range/index.html | 463 ++++++++++++++ handbook/math/round/index.html | 431 +++++++++++++ handbook/math/sin/index.html | 432 +++++++++++++ handbook/math/sum/index.html | 446 ++++++++++++++ handbook/math/tan/index.html | 429 +++++++++++++ handbook/merge/index.html | 420 +++++++++++++ handbook/model/index.html | 415 +++++++++++++ handbook/not/index.html | 420 +++++++++++++ handbook/npm/index.html | 407 +++++++++++++ handbook/programs/index.html | 402 ++++++++++++ handbook/records/index.html | 514 ++++++++++++++++ handbook/remove/index.html | 413 +++++++++++++ handbook/running/index.html | 454 ++++++++++++++ handbook/search/index.html | 429 +++++++++++++ handbook/session/index.html | 396 ++++++++++++ handbook/set/index.html | 432 +++++++++++++ handbook/sets/index.html | 435 +++++++++++++ handbook/standard-library/index.html | 408 +++++++++++++ handbook/statistics/count/index.html | 499 +++++++++++++++ handbook/statistics/index.html | 406 +++++++++++++ handbook/statistics/random/index.html | 453 ++++++++++++++ handbook/string-interpolation/index.html | 433 +++++++++++++ handbook/strings/convert/index.html | 438 +++++++++++++ handbook/strings/find/index.html | 449 ++++++++++++++ handbook/strings/index.html | 405 +++++++++++++ handbook/strings/join/index.html | 469 ++++++++++++++ handbook/strings/length/index.html | 452 ++++++++++++++ handbook/strings/split/index.html | 437 +++++++++++++ handbook/strings/substring/index.html | 430 +++++++++++++ handbook/strings/urlencode/index.html | 427 +++++++++++++ handbook/tags/index.html | 453 ++++++++++++++ handbook/update-operators/index.html | 420 +++++++++++++ handbook/view/index.html | 396 ++++++++++++ handbook/windows/index.html | 408 +++++++++++++ index.html | 44 +- index.xml | 48 +- install/index.html | 40 +- quickstart.eve/index.html | 40 +- sitemap.xml | 30 +- syntaxreference/index.html | 40 +- tutorials/index.html | 48 +- tutorials/index.xml | 12 +- tutorials/quickstart.eve/index.html | 40 +- tutorials/quickstart/index.html | 620 +++++++++++++++++++ 96 files changed, 36842 insertions(+), 251 deletions(-) create mode 100644 guides/dsl/index.html create mode 100644 guides/for-programmers/index.html create mode 100644 guides/style/index.html create mode 100644 handbook/actions/index.html create mode 100644 handbook/add/index.html create mode 100644 handbook/aggregates/index.html create mode 100644 handbook/bind/index.html create mode 100644 handbook/blocks/index.html create mode 100644 handbook/browser/index.html create mode 100644 handbook/commit/index.html create mode 100644 handbook/commonmark/index.html create mode 100644 handbook/core/index.html create mode 100644 handbook/databases/index.html create mode 100644 handbook/datetime/index.html create mode 100644 handbook/datetime/time/index.html create mode 100644 handbook/docker/index.html create mode 100644 handbook/ebnf/index.html create mode 100644 handbook/equality/index.html create mode 100644 handbook/equivalence/index.html create mode 100644 handbook/event/change/index.html create mode 100644 handbook/event/click/index.html create mode 100644 handbook/event/index.html create mode 100644 handbook/event/keydown/index.html create mode 100644 handbook/event/keyup/index.html create mode 100644 handbook/expressions/index.html create mode 100644 handbook/functions/index.html create mode 100644 handbook/general/index.html create mode 100644 handbook/general/sort/index.html create mode 100644 handbook/glossary/index.html create mode 100644 handbook/help/index.html create mode 100644 handbook/http/index.html create mode 100644 handbook/if-then/index.html create mode 100644 handbook/inequality/index.html create mode 100644 handbook/installation/index.html create mode 100644 handbook/intro/index.html create mode 100644 handbook/is/index.html create mode 100644 handbook/joins/index.html create mode 100644 handbook/linux/index.html create mode 100644 handbook/literate-programming/index.html create mode 100644 handbook/mac/index.html create mode 100644 handbook/math/abs/index.html create mode 100644 handbook/math/ceil/index.html create mode 100644 handbook/math/cos/index.html create mode 100644 handbook/math/fix/index.html create mode 100644 handbook/math/floor/index.html create mode 100644 handbook/math/index.html create mode 100644 handbook/math/mod/index.html create mode 100644 handbook/math/range/index.html create mode 100644 handbook/math/round/index.html create mode 100644 handbook/math/sin/index.html create mode 100644 handbook/math/sum/index.html create mode 100644 handbook/math/tan/index.html create mode 100644 handbook/merge/index.html create mode 100644 handbook/model/index.html create mode 100644 handbook/not/index.html create mode 100644 handbook/npm/index.html create mode 100644 handbook/programs/index.html create mode 100644 handbook/records/index.html create mode 100644 handbook/remove/index.html create mode 100644 handbook/running/index.html create mode 100644 handbook/search/index.html create mode 100644 handbook/session/index.html create mode 100644 handbook/set/index.html create mode 100644 handbook/sets/index.html create mode 100644 handbook/standard-library/index.html create mode 100644 handbook/statistics/count/index.html create mode 100644 handbook/statistics/index.html create mode 100644 handbook/statistics/random/index.html create mode 100644 handbook/string-interpolation/index.html create mode 100644 handbook/strings/convert/index.html create mode 100644 handbook/strings/find/index.html create mode 100644 handbook/strings/index.html create mode 100644 handbook/strings/join/index.html create mode 100644 handbook/strings/length/index.html create mode 100644 handbook/strings/split/index.html create mode 100644 handbook/strings/substring/index.html create mode 100644 handbook/strings/urlencode/index.html create mode 100644 handbook/tags/index.html create mode 100644 handbook/update-operators/index.html create mode 100644 handbook/view/index.html create mode 100644 handbook/windows/index.html create mode 100644 tutorials/quickstart/index.html diff --git a/guides/dsl/index.html b/guides/dsl/index.html new file mode 100644 index 0000000..75ddd76 --- /dev/null +++ b/guides/dsl/index.html @@ -0,0 +1,742 @@ + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Eve JavaScript/TypeScript DSL

    + +

    The forthcoming v0.3 release of Eve supports a domain specific language (DSL) that interacts with the Eve runtime, allowing you to intermix Javascript and Eve code. There are several benefits to using the DSL:

    + +

    1) The syntax is native Javascript, so if you know JS you can write in the DSL +2) You can interact with Javascript functions and libraries +3) The DSL can be used “a la carte”, so you can use as much of Eve as you need to for your project. Thus you can write an entire application in Eve, just use it as a datastore, or anywhere between. This makes it easy to integrate Eve with an existing Javascript application. +4) You can easily import data into Eve. If you can get your data in Javascript, you can use it in Eve.

    + +

    This DSL guide is for users who are already familiar with Eve semantics. For those new to Eve, we’ll have more fundamental guides released in the near future.

    + +

    Summary of DSL

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    JavaScript/TypeScript DSLEve
    find a recordfind("person", {salary})[#person salary]
    bind/commit a recordrecord("person", {salary})[#person salary]
    notnot(() => person.salary)not(person.salary)
    choosechoose(() => { person.salary; return 1; }, () => 0)if person.salary then 1 else 0
    unionunion(() => person.salary, () => person.wage)if person.salary then person.salary if person.wage then person.wage
    Add a valueperson.add("salary", 10)person.salary += 10
    Remove a valueperson.remove("salary, 10)person.salary -= 10
    Set a valueperson.remove("salary").add("salary", 10)person.salary := 10
    Remove an attributeperson.remove("salary")person.salary := none
    Remove a recordperson.remove()person := none
    functionslib.math.sin(number)sin[degrees: number]
    aggregatesgather(person).per(person.dept).count()count[given: person, per: person.dept]
    + +

    Using the DSL

    + +

    This guide is written for ES6. For added readability, we make frequent use of destructuring and arrow functions. We recommend using TypeScript 2.1.0 or later.

    + +

    To use the DSL, import it into your application.

    +
    import {Program} from "witheve";
    +
    + +

    Then you instantiate a new Eve program, naming it however you want.

    +
    let program = new Program("program name");
    +
    + +

    Writing DSL code is similar to writing native Eve code; you attach blocks to the program, which search for records and then return records. Blocks in the DSL operate as a either a bind or commit. Let’s look at the DSL block syntax in the case of bind:

    +
    program.bind("block description", ({find, record}) => {
    +  // search for records tagged "person"
    +  let person = find("person");
    +  return [
    +    // bind a record tagged "greeting" with an attribute "message"
    +    record("greeting", {message: `Hello ${person.name}`})
    +  ];
    +});
    +
    + +

    The equivalent Eve block would be

    +
    search
    +  person = [#person]
    +
    +bind
    +  [#greeting message: "Hello {{person.name}}"]
    +
    + +

    The identity of a record() is established by everything within the parentheses. Therefore, the record record("greeting", {message: `Hello ${person.name}`}) will create one record for every person.name.

    + +

    If you would like to commit records instead of binding them, you can use the commit() method in place of bind(). The implication here is that you can no longer create blocks which both commit and bind records at the same time.

    + +

    The DSL supports methods which mirror a couple of the Eve update operators. They are:

    + +

    add()

    + +

    Adds attribute/value pairs to a record. These added values do not contribute to the identity of a record, allowing you to add multiple values to a single record. This is equivalent to the Eve += operator. For example:

    +
    program.bind("Invite classmates to my party", ({find, record}) => {
    +  // search for records tagged "friend"
    +  let student = find("student");
    +  return [
    +    // bind a single record tagged "guest-list", with every student as a guest
    +    record("guest-list").add({guest: student})
    +  ];
    +});
    +
    + +

    remove()

    + +

    Removes attribute/value pairs from a record. This is equivalent to the Eve -= operator. Remove should only be used in the context of a commit block. For example:

    +
    program.commit("blacklisted people cannot come to the party", ({find, record}) => {
    +  let blacklisted = find("blacklisted");
    +  let guests = find("guest-list")
    +  return [
    +    // remove anyone blacklisted from the guest list
    +    guests.remove({guest: blacklisted})
    +  ];
    +});
    +
    + +

    You can also use remove() to completely delete records or attributes on a record. This is equivalent to := none in Eve. For example:

    +
    // completely remove the target record
    +record.remove() 
    +// remove the attribute on the target record
    +record.remove("attribute")
    +
    + +

    The DSL does not contain an equivalent for the Eve set operator :=, but you can mimic its behavior by chaining the add() and remove() operators. For example:

    +
    program.bind("Reassign Artemis' teacher", ({find, record}) => {
    +  let artemis = find("student", {name: "Artemis"});
    +  let teacher = find("teacher", {name: "Smith"});
    +  return [
    +    artemis.remove("teacher").add("teacher", teacher)
    +  ];
    +});
    +
    + +

    Sub-Blocks

    + +

    In the DSL not(), union(), and choose() are sub-blocks, which have their own body. Let’s look at each of these.

    + +

    not()

    + +

    The not() sub block works similarly to not() from the Eve syntax; it performs an anti-join on the records inside and outside of the not(). To use not, include it in the parameter list at the beginning of the block.

    +
    program.bind("Tag students without any citations.", ({find, record, not}) => {
    +    let students = find("student");
    +    not(() => {
    +        find("student", {citation});
    +    });
    +    return [
    +        students.add("tag","good-standing")
    +    ];
    +})
    +
    + +

    choose()

    + +

    Choose() and union() expressions are behind the mechanics of the if expression in the Eve syntax. In the DSL, we expose these directly. First, choose() takes a list of sub-blocks, which contain any valid Eve code to join, filter, or compute their results. Each sub-block is executed in order until one is found valid. This return value of the first valid sub-block is taken as the return value.

    +
    program.commit("Assign a letter grade.", ({find, choose}) => {
    +    let student = find("student");
    +    let [grade] = choose(
    +        () => { student.grade >= 90; return "A"; },
    +        () => { student.grade >= 80; return "B"; },
    +        () => { student.grade >= 70; return "C"; },
    +        () => { student.grade >= 60; return "D"; },
    +        () => "F"
    +    )
    +    return [
    +        student.add("letter-grade", {grade}),
    +    ];
    +});
    +
    + +

    union()

    + +

    Similarly, union() takes a body of sub-blocks, but the return for each valid sub-block (instead of just the first as with choose()) is taken as the return for the union. One common use of union is to normalize records from different data sources.

    +
    program.bind("display the student's full names", ({find, record, union}) => {
    +  let east = find("student", {school: "West HS"});
    +  let west = find("student", {school: "East HS"});
    +  let [fullName] = union(
    +    () => { east.name; return east.name},
    +    () => { west.firstName; return `${{west.firstName}} ${{west.lastName}}`},
    +  );
    +  return [
    +    record("html/element", {tagname: "div", text: fullName}),
    +  ];
    +});
    +
    + +

    Functions

    + +

    The standard library in Eve has been redone in the DSL. To use library functions, you must now bring in “lib” explicitly when defining your block. From lib you can access the various standard library functions supported by the runtime so far.

    +
    program.bind("display the student's full names", ({find, record, lib}) => {
    +  find("angle" degrees)
    +  let result = lib.math.sin(degrees)
    +  return [
    +    record("html/element", {tagname: "div", text: result})
    +  ];
    +});
    +
    + +

    for now you can find a list of functions in src/runtime/stdlib.ts

    + +

    The interface for wrapping functions for use within Eve is also revamped for the new runtime. When writing a function wrapper, you must ensure that the function is reverentially transparent, meaning given the same input, the function returns the same output.

    + +

    Functions are wrapped using makeFunction() e.g.:

    +
    makeFunction({
    +  name: "math/sin",             
    +  args: {a: "number"},
    +  returns: {result: "number"},
    +  apply: (a:number) => {
    +    return [Math.sin(a/180 * Math.PI)];
    +  }
    +});
    +
    + +

    Aggregates

    + +

    Aggregates like sum(), count(), and sort() are accessed through the gather() function. This function defines the input set to the aggregate. You can optionally group the input set with the per() function. For example, here is count() at work:

    +
    program.bind("count the number of students in each class", ({find, record, gather}) => {
    +  let student = find("student")
    +  let classSize = gather(student).per(student.teacher).count()
    +  return [
    +    record("html/element", {tagname: "div", text: `${student.teacher} ${classSize}`})
    +  ];
    +});
    +
    + +

    The input set to the count() aggregate is the student records, and they are groups according to their teacher attribute. Then, the size of each group is counted and returned in classSize, which has the same number of elements as there are teachers.

    + +

    Aggregates can take arguments as well. For instance, sort() takes as arguments the direction by which to sort the input set. Here is sort() in use:

    +
    program.bind("sort the students by last name, then first name per teacher", ({find, record, gather}) => {
    +  let student = find("student")
    +  let ix = gather(student.firstName, student.lastName).per(student.teacher).sort("up", "down")
    +  return [
    +    record("html/element", {tagname: "div", sort: ix, text: `${student.firstName} ${student.lastName}`})
    +  ];
    +});
    +
    + +

    Importing and Exporting Records

    + +

    Getting Data Into Eve - inputEAVs()

    + +

    You can import raw EAVs into Eve with the inputEAVs() function. Currently, inputEAVs() mut be called at least once to initialize your program, and it can only be used after you define all blocks. These limitations will be lifted in future versions.

    + +

    inputEAVs() takes as input a list of entity, attribute, value triples. The entity value identifies the record to which the attribute and value belong, so it must be unique to that record. For example:

    +
    program.inputEAVs([[0,"tag","person"], [0,"name","Archibald"]]);
    +
    + +

    This will create a record tagged “person” with the name attribute “Archibald”.

    + +

    The appendAsEAVs() function allows you to destructure an object into a uniquely identified set of EAVs, which can then be input into Eve:

    +
    import {appendAsEAVs} from "witheve";
    +let inputs = [];
    +let archibald = {tag: "person", name: "Archibald"};
    +appendAsEAVs(inputs, archibald);
    +program.inputEAVs(inputs);
    +
    + +

    Getting Records out of Eve - Watchers

    + +

    Watchers are a third type of block available in the DSL. These allow you to monitor changes in specific records and react to them with a callback function:

    +
    program.watch("Export information about students", ({find, lookup, record}) => {
    +  // search for records tagged student
    +  let student = find("student");
    +  // lookup attributes and values related to each student
    +  let {attribute, value} = lookup(student);
    +  return [
    +    // Add these attributes and values to the student, creating a diff to which we can react
    +    student.add(attribute, value)
    +  ];
    +})
    +// React to each addition or removal
    +.asDiffs((diff) => {
    +  for(let [e, a, v] of diff.adds) {
    +    // ... do something ...
    +  }
    +  for(let [e, a, v] of diff.removes) {
    +    // ... do something ...
    +  }
    +});
    +
    + +

    If you care about specific attributes, if may be more convenient to write a watcher with asObjects() instead of asDiffs():

    +
    program.watch("Export student GPA", ({find, lookup, record}) => {
    +  // search for records tagged student
    +  let student = find("student" {name, GPA});
    +  return [
    +    // Add these attributes and values to the student, which creates a diff to which we can react
    +    record("grade", {name, GPA})
    +  ];
    +})
    +// Handle adds and removes as objects
    +.asObjects<{name: string, GPA: RawValue}>(({adds, removes}) => {
    +  for(let id in adds) {
    +    let {name, GPA} = adds[id];
    +    // ... do something ...
    +  }
    +  for(let id in removes) {
    +    let {name, GPA} = removes[id];
    +    // ... do something ...
    +  }
    +})
    +
    + +

    Type annotations (between the angle braces <>) are necessary for TypeScript, but they can be omitted when using Javascript.

    + + + + + + \ No newline at end of file diff --git a/guides/for-programmers/index.html b/guides/for-programmers/index.html new file mode 100644 index 0000000..dd23990 --- /dev/null +++ b/guides/for-programmers/index.html @@ -0,0 +1,414 @@ + + + + + + + + + + + + Eve for Programmers - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Eve for Programmers

    + +

    As a programmer, you probably find it easy to switch between different programming langauges. If you know Javascript, you probably wouldn’t have a hard time learning similar langauges like C++, Java, or Python. That’s because despite syntactic differences, these languages largely conform to the same programming model. When we program in languages like these, we use similar abstractions between them – loops, functions, and input/output patterns have become a staple of every programmer’s toolbox. When we solve problems, we usually reach a solution in terms of these primitive operations.

    + +

    Eve is a different kind of programming langauge from Javascript or Python, so programmers new to Eve may feel a little lost at first. How do you get anything done in a language without loops? How do you compose code without functions? The purpose of this guide is to provide a mapping from the common tools you know, to the Eve way of solving problems. We’ll look at some programs written in Javascript, and see how they Eve can solve them.

    + +

    Functions

    + +

    Functions are the fundamental unit of code reuse in most conventional programming languages. These langauges typically start from a “main” function, and branch

    + +

    Looping

    + +

    Map

    + +

    Reduce

    + +

    Recursion

    + +

    I/O

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/guides/index.html b/guides/index.html index df8c83b..21f3fcc 100644 --- a/guides/index.html +++ b/guides/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,7 +150,7 @@

    EVE

    Pages in Guide

    - +

    diff --git a/guides/index.xml b/guides/index.xml index 0a331fa..f7ab2fb 100644 --- a/guides/index.xml +++ b/guides/index.xml @@ -2,18 +2,18 @@ Guides on Eve Documentation - http://cmontella.github.io/docs/guides/index.xml + https://cmontella.github.io/docs/guides/index.xml Recent content in Guides on Eve Documentation Hugo -- gohugo.io en-us - + - http://cmontella.github.io/docs/guides/ + https://cmontella.github.io/docs/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/guides/ + https://cmontella.github.io/docs/guides/ diff --git a/guides/style/index.html b/guides/style/index.html new file mode 100644 index 0000000..46af76e --- /dev/null +++ b/guides/style/index.html @@ -0,0 +1,542 @@ + + + + + + + + + + + + Style Guide - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Eve Style Guide

    + +

    Comments

    + +

    Add a space after the comment marker to make comments more readable

    +
    // This is correct
    +//This is incorrect
    +
    + +

    Naming

    + +

    As much as possible, don’t abbreviate names. The goal in writing an Eve program is to be as readable as possible. An abbreviation that makes sense to you might not make sense to someone else, or even yourself when you revisit the program in a year.

    + +

    Multi-word names should be joined by dashes -, not underscores _.

    + +

    Program layout

    + +

    Blocks should be preceded by at least a one line comment, indicating the purpose of the block.

    + +

    Commas

    + +

    Although Eve treats commas as white-space, they should be used to enhance readability as needed:

    + +

    In records, separate attributes with commas after a bind

    +
    // More readable
    +[#person name age: 30, height: 5, hair-color: "brown"]
    +
    +// Less readable
    +[#person name age: 30 height: 5 hair-color: "brown"]
    +
    + +

    Commas should also be used to separate items contained in parenthesis, such as in a multiple return.

    +
    // More readable
    +(val1, val2) = if [#tag1] then (1, false)
    +               else (0, true)
    +total = count[given: attr1, per: (attr2, attr3)]
    +
    +// Less readable
    +(val1 val2) = if [#tag1] then (1 false)
    +               else (0 true)
    +total = count[given: attr1 per: (attr2 attr3)]
    +
    + +

    Indention

    + +

    Eve does not enforce indention, but it is important for readability

    + +

    Blocks

    + +

    search. commit, and bind should be the only lines at zero indention. Everything else should be indented.

    +
    // Good
    +search
    +  [...]
    +
    +bind
    +  [...]
    +
    + +

    But not this:

    +
    // Not good
    +search
    +[...]
    +
    +bind
    +[...]
    +
    + +

    If-Then

    + +

    Each arm of an if-then statement should be at the same indention level. The then portion of the statement can be on a new line if the if portion is exceptionally long, but it should be indented once.

    +
    // Good if layout
    +value = if bar then baz
    +        if bar2 then baz2
    +        else baz3
    +
    +// Okay, especially if the branch is long
    +value = if [#long-record attr1 attr2 attr3]
    +          then baz
    +        if [#long-record2 attr1 attr2 attr3]
    +          then baz2
    +        else baz3
    +
    +// Less readable "if" formatting
    +value = if bar then baz
    +if bar2 then baz2
    +else baz3
    +
    +// Less readable "if" formatting
    +value = if bar then baz if bar2 then baz2 else baz3
    +
    + +

    Nested records

    + +

    When nested records are placed on a new line, they should be indented once past the parent record. Where possible, nested records should be the final attribute in the parent record.

    + +

    Nested records should appear on their own line if you are nesting more than one.

    +
    // Okay, but only do this for one level of nesting
    +[#div text: "hello", children: [#div text: "world"]]
    +
    +// More readable
    +[#div text: "hello", children:
    +  [#div text: "world"]]
    +
    +// Also good
    +[#div children:
    +  [#div text: "div1"]
    +  [#div text: "div2" children:
    +    [#div text: "div3"]]]
    +
    +// Not good
    +[#div children: [#div text: "div2"] [#div text: "div2"]]
    +
    +// Also not good
    +[#div children:
    +  [#div text: "world"], text: "hello"]
    +
    + +

    Newlines

    + +

    Newlines should precede and follow every code block.

    + +

    Within code blocks, a newline should be added between every action. This enhances readability, especially in the case where multiple actions are needed. For instance, the following code block:

    +
    search @studentDB
    +  students = [#students]
    +
    +search @schoolDB
    +  schools = [#school]
    +  schools.name = student.school
    +
    +bind @browser
    +  [#div text: students.name]
    +
    +commit
    +  [#new-record]
    +
    + +

    is more readable than this code block:

    +
    search @studentDB
    +  students = [#students]
    +search @schoolDB
    +  schools = [#school]
    +  schools.name = student.school
    +bind @browser
    +  [#div text: students.name]
    +commit
    +  [#new-record]
    +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/actions/index.html b/handbook/actions/index.html new file mode 100644 index 0000000..f9781f0 --- /dev/null +++ b/handbook/actions/index.html @@ -0,0 +1,418 @@ + + + + + + + + + + + + Actions - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Actions

    + +

    Description

    + +

    There are three actions in Eve: search, bind, and commit.

    + +

    search is used when you want to gather records from one or more databases. These records are called “supporting records”, because they are used as a basis for bound or committed records.

    + +

    bind and commit actions are used when you want to update records in one or more databases, but they differ in the way the updates are performed.

    + +
      +
    • bound records last only as long as their supporting records. When supporting records changes, then bound records changes accordingly, replacing any previously bound records.

    • + +
    • committed records persist past the lifetime of their supporting records. When supporting records change, then a new record is committed, leaving any previously committed records still intact.

    • +
    + +

    Examples

    +
    
    +
    + +

    See Also

    + +

    search | bind | commit

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/add/index.html b/handbook/add/index.html new file mode 100644 index 0000000..071b183 --- /dev/null +++ b/handbook/add/index.html @@ -0,0 +1,452 @@ + + + + + + + + + + + + Add: += - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Add Operator

    + +

    adds a value to an attribute on a record

    + +

    Syntax

    +
    // Add a value to an attribute
    +record.attribute += value
    +
    +// Add a tag to a record
    +record += #tag
    +
    + +

    Description

    + +

    record.attribute += value adds value to attribute. If record already has an attribute with a value, then value will be added to the set. Otherwise, if record doesn’t have an attribute with this name already, then += will create the attribute and set it to value. As Eve variables are sets, if the value already exists on the attribute, the value cannot be added again.

    + +

    attribute can be an attribute already on the record, or it can be a new attribute.

    + +

    value can be a string or number literal, a variable bound to one of these, or a record.

    + +

    record += #tag adds #tag to record. This is shorthand for record.tag += "tag".

    + +

    Examples

    + +

    Add the current second to a record. Since Eve works in sets, time-history can only ever hold then numbers 0 through 60. This means after one minute passes, no new elements will be added to tracker.time-history.

    +
    search
    +  tracker = [#seconds-tracker]
    +  [#time seconds]
    +
    +commit
    +  tracker.time-history += seconds
    +
    + +

    We can get around this by adding a record:

    +
    search
    +  tracker = [#seconds-tracker]
    +  [#time seconds]
    +
    +commit
    +  tracker.time-history += [seconds]
    +
    + +

    Now, instead of adding numbers to time-history we are adding records, which are associated with a unique ID. So after the first minute passes, time-history will contain duplicate seconds, but the record ID will ensure each one is unique.

    + +
    + +

    Add the #honor-student tag to any #student with a GPA greater than 3.75:

    +
    search
    +  student = [#student gpa > 3.75]
    +  
    +bind
    +  student += #honor-student
    +
    + +

    See Also

    + +

    set operator | remove operator | merge operator | bind | commit

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/aggregates/index.html b/handbook/aggregates/index.html new file mode 100644 index 0000000..c91c039 --- /dev/null +++ b/handbook/aggregates/index.html @@ -0,0 +1,420 @@ + + + + + + + + + + + + Aggregates - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Aggregates

    + +

    aggregates reduce a set of values to a single value

    + +

    Description

    + +

    Aggregates are functions that take an input set and produce an output set, typically with a different cardinality than the input set. Examples of aggregates include sum, count, and average. Each of these takes a set of numbers as an input, and typically produces a single number as output.

    + +

    Aggregates are called just like other functions in Eve. For instance, the count aggregate is called like so:

    +
    employee-count = count[given: employees]
    +
    + +

    Aggregates don’t always produce a single output value. In some instances, you may want to group your input according to a desired dimension (department, grade, state, country, zip code, etc.) and then aggregate based on those groupings. Extending the example above, we could count the employees in each department:

    +
    employee-count = count[given: employees, per: department]
    +
    + +

    Now, employee-count will have a count for each department, instead of a single count over all departments. For more complete examples, see the doc files for specific aggregates.

    + +

    Tip

    + +

    Aggregates have similar behavior to the reduce() function in many other langauges.

    + +

    See Also

    + +

    count

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/bind/index.html b/handbook/bind/index.html new file mode 100644 index 0000000..8179506 --- /dev/null +++ b/handbook/bind/index.html @@ -0,0 +1,638 @@ + + + + + + + + + + + + bind - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    bind

    + +

    updates or creates records, syncing them with matched records

    + +

    Syntax

    +
    bind
    +
    +bind @database1, ..., @databaseN
    +
    + +

    Description

    + +

    bind updates or creates new records with a lifetime equal to matched records within the block. Matched records are any records found in a search action. If matched records change during program execution, all bound records change accordingly. If any matched records are removed (i.e. they no longer match the search), bound records and updates are removed as well.

    + +

    By default, bound records are directed to a default local database.

    + +

    bind @database1, ..., @databaseN directs bound records to one or more databases.

    + +

    Bind vs. Commit

    + +

    While bind and commit both update records in a database, they do so with slightly different behavior; a bound record has the same lifetime as its supporting records, whereas a committed record exists in the database until it is removed intentionally. Let’s take a closer look at this distinction and what the implications are.

    + +

    Consider the following block that reads the current time, and prints it to the screen:

    +
    search
    +  [#time seconds]
    +
    +bind @browser
    +  [#div text: seconds]
    +
    + +

    In this block we search for the current time and bind it to a message that displays it. The message exists as long as the current time stays the same (1 second obviously). When the time changes, the current message disappears and is replaced with a new message, displaying the new time. This is the behavior of bind; bound records persist only as long as their matching records.

    + +

    Now let’s look at what commit does in contrast:

    +
    search
    +  [#time seconds]
    +
    +commit @browser
    +  [#div text: seconds]
    +
    + +

    Compared to the previous block, we only changed bind to commit. When you run this block, at first you’ll see a single message like before. However, you’ll notice that messages begin to accumulate every second. Unlike with bind, committed records persist in the database until they are intentionally removed.

    + +

    To make things very concrete, we can actually mimic the behavior of a bind using two blocks that commit. We’ve already got the first one (the one just above), that commits messages to @browser. Now all we need is a second block, one that removes old committed messages from @browser:

    +
    search 
    +  [#time seconds]
    +
    +search @browser
    +  s = seconds - 1
    +  // Do some math to handle the roll over at 60 seconds
    +  last-time = s - 60 * floor[value: s / 60]
    +  msg = [#div text: last-time]
    +  
    +commit @browser
    +  msg := none
    +
    + +

    This block searches for the message that was displayed during the previous second, and sets it to none, thereby removing it from @browser. Therefore, only the message bound to the the current time is displayed on the screen. This behavior is identical to that of the block that binds these messages instead of committing them!

    + +

    An Execution Perspective

    + +

    Another way to understand bind vs. commit is by looking at how the databases change over each tick of the Eve evaluator. We’ll consider the same program as before, looking at how its state changes over time. First, consider the bind case. When the program starts, there’s nothing in any databases; the program is a blank slate. At t1 the first #time is added to @session. This addition is bound to a #div, which is added to @browser. These changes are summarized in the first column of the table below.

    + +

    At t2, a new #time is added to @session, and the one from t1 is removed. Since we used a bind, this causes the existing #div to be removed from @browser, but it is replaced with a new #div reflecting the current time. At t3, the same operations takes place, and this process continues until the program is terminated.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +t0 + +t1 + +t2 + +t3 +
    +delta + + + ++ [#time seconds: 39] ++ [#div text: "39"] + ++ [#time seconds: 40] +- [#time seconds: 39] ++ [#div text: "40"] +- [#div text: "39"] + ++ [#time seconds: 41] +- [#time seconds: 40] ++ [#div text: "41"] +- [#div text: "40"] +
    +@session + +[ ] + +[[#time seconds: 39]] + +[[#time seconds: 40]] + +[[#time seconds: 41]] +
    +@browser + +[ ] + +[[#div text: 39]] + +[[#div text: 40]] + +[[#div text: 41]] +
    + +

    Let’s perform the same analysis in the commit case. In this program, things start off the same; initially the database is empty, and at t1 a #time and a #div are added to their respective databases. At t2, things get more interesting. While the old #time is still replaced, the #div displaying the old time is not replaced since we committed it to @browser. Indeed, in subsequent rounds of execution, the contents of @browser keeps growing.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +t0 + +t1 + +t2 + +t3 +
    +delta + + ++ [#time seconds: 39] ++ [#div text: "39"] + ++ [#time seconds: 40] +- [#time seconds: 39] ++ [#div text: "40"] + ++ [#time seconds: 41] +- [#time seconds: 40] ++ [#div text: "41"] +
    +@session + +[ ] + +[[#time seconds: 39]] + +[[#time seconds: 40]] + +[[#time seconds: 41]] +
    +@browser + +[ ] + +[[#div text: 39]] + +[[#div text: 39], + [#div text: 40]] + +[[#div text: 39], + [#div text: 40], + [#div text: 41]] +
    + +

    Tips

    + +

    When you want to display data in an interface element like a #div, a bind is usually the more appropriate choice compared to a commit. A bind will keep the interface element always up-to-date, whereas a commit will leave lingering elements that no longer reflect the current state of the program.

    + +

    When searching for an event like a #click, a commit is usually more appropriate than bind. When an event occurs, a record representing the event is added to a database. That record exists for exactly one “instant”, and then it is removed from the database. During that “instant”, any block searching for that event will be satisfied and can execute a bind or commit action. If you bind on the event, then the result will disappear as soon as the event does. However, if you commit on the event, then that result will persist after the event has been removed.

    + +

    Examples

    + +

    Display a formatted time:

    +
    search
    +  [#time hours minutes seconds]
    +  (am/pm, adjusted-hours) = if hours >= 12 then ("PM", hours - 12)
    +                            else if hours = 0 then ("AM", 12)
    +                            else ("AM", hours)
    +bind @browser
    +  [#div text: "The current time is {{adjusted-hours}}:{{minutes}}:{{seconds}} {{am/pm}}"]
    +
    + +

    See Also

    + +

    commit | databases | search

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/blocks/index.html b/handbook/blocks/index.html new file mode 100644 index 0000000..f9177e1 --- /dev/null +++ b/handbook/blocks/index.html @@ -0,0 +1,533 @@ + + + + + + + + + + + + Blocks - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Blocks

    + +

    blocks compose Eve programs

    + +

    Syntax

    +
    // Blocks contain Eve code and can execute actions
    +```
    +search
    +  .....
    +
    +bind
    +  .....
    +
    +commit
    +  .....
    +```
    +
    +// Blocks that are disabled are not executed
    +```eve disabled
    +search
    +  ....
    +```
    +
    +// Non-Eve blocks are not parsed or executed
    +```javascript
    +function() {
    +  ...
    +}
    +```
    +
    +// Blocks that omit the search action are satisfied by default
    +```
    +bind
    +  .....
    +```
    +
    +```
    +commit
    +  .....
    +```
    +
    + +

    Description

    + +

    A block is the fundamental unit of Eve code. Eve programs are made up of a series of blocks, each of which can perform actions:

    + +
      +
    1. A block searches one or more databases for records.
    2. +
    3. A block binds or commits new records in one or more databases.
    4. +
    + +

    Blocks execute when the records they search for exist or change. If a block doesn’t search for any records, then the block executes by default, but it can never update bound or committed records.

    + +

    Blocks can have any number of search, commit, and bind actions, each of which can reference any number of databases. If a block has multiple search actions, it will only execute if all searches are satisfied.

    + +

    Blocks automatically keep bound and committed records up-to-date with matched records. When a record matching a search changes, those changes are reflected automatically in bound and committed records within that block.

    + +

    Specifying a Block

    + +

    Blocks are specified using two fences to delineate the beginning and end of the block. Code fences are matching pairs of either three consecutive ticks (```) or tildes (~~~). This style of code block is the same as supported by CommonMark. However, we don’t currently support specifying code blocks via indentation.

    + +

    Info Strings

    + +

    You can specify the type of code within a block with an info string, written directly after the block’s opening code fence. By default, any block without an info string are assumed to contain Eve code.

    + +
    ```
    +// An implicit block of Eve code. This block is parsed and executed
    +  ...
    +```
    +
    +```eve
    +// An explicit block of Eve code. This block is parsed and executed
    +  ...
    +```
    +
    +```eve disabled
    +// An explicit block of Eve code. This block is parsed, but not executed
    +  ...
    +```
    +
    +```javascript
    +// An explicit block of Javascript code. This block is ignored
    +// by the Eve compiler entirely
    +  ...
    +```
    +
    + +

    Tips

    + +

    Although they are similar, it’s important not to think of blocks like functions in other languages. Blocks don’t have a name, and you don’t “call” them like you do functions. Instead, you “use” a block by searching for the records it creates.

    + +

    Likewise, there is no “main” block. Since Eve is declarative and there is no order, there is no particular starting point for a program. As a close analog, any block that does not search for records will be the first to execute when the program starts. For instance:

    +
    commit
    +  [#student name: "Sally"]
    +  [#student name: "Ingrid"]
    +
    + +

    This block has no search action, so it doesn’t depend on any other records. Thus, it can be viewed as a “root” of the program. A program may contain many such root blocks.

    + +

    Examples

    + +

    A block with search and bind actions. The bind action adds the #div to the @browser database.

    +
    search
    +  [name]
    +
    +bind @browser
    +  [#div text: name]
    +
    + +

    A block with only a commit action:

    +
    commit
    +  [name: "Roger"]
    +
    + +
    + +

    Search for a #click in @event, create a #request in @http

    +
    search @event
    +  [#click]
    +
    +commit @http
    +  [#request #google url: "https://jsonplaceholder.typicode.com/posts/"]
    +
    + +

    Search for a #request with a response, display it in the browser

    +
    search @http
    +  [#request #google response: [json]]
    +  json = [#array]
    +  lookup[record: json, attribute, value: [title body]]
    +
    +bind @browser
    +  [#div text: "{{title}}"]
    +  [#div text: "{{body}}"]
    +
    + +

    See Also

    + +

    search | bind | commit | databases

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/browser/index.html b/handbook/browser/index.html new file mode 100644 index 0000000..4dc330e --- /dev/null +++ b/handbook/browser/index.html @@ -0,0 +1,396 @@ + + + + + + + + + + + + @browser - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    @browser

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/commit/index.html b/handbook/commit/index.html new file mode 100644 index 0000000..42b61b0 --- /dev/null +++ b/handbook/commit/index.html @@ -0,0 +1,642 @@ + + + + + + + + + + + + commit - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    commit

    + +

    updates or creates records that persist until intentionally removed

    + +

    Syntax

    +
    commit
    +
    +commit @database1, ..., @databaseN
    +
    + +

    Description

    + +

    commit updates or creates new records that persist in a database until they are intentionally removed. If supporting records change or are removed, the original committed records remain in tact, and can still be searched by other blocks. By default, committed records are directed to a local database.

    + +

    commit @database1, ..., @databaseN directs committed records one or more databases.

    + +

    Bind vs. Commit

    + +

    While bind and commit both update records in a database, they do so with slightly different behavior; a bound record has the same lifetime as its supporting records, whereas a committed record exists in the database until it is removed intentionally. Let’s take a closer look at this distinction and what the implications are.

    + +

    Consider the following block that reads the current time, and prints it to the screen:

    +
    search
    +  [#time seconds]
    +
    +bind @browser
    +  [#div text: seconds]
    +
    + +

    In this block we search for the current time and bind it to a message that displays it. The message exists as long as the current time stays the same (1 second obviously). When the time changes, the current message disappears and is replaced with a new message, displaying the new time. This is the behavior of bind; bound records persist only as long as their matching records.

    + +

    Now let’s look at what commit does in contrast:

    +
    search
    +  [#time seconds]
    +
    +commit @browser
    +  [#div text: seconds]
    +
    + +

    Compared to the previous block, we only changed bind to commit. When you run this block, at first you’ll see a single message like before. However, you’ll notice that messages begin to accumulate every second. Unlike with bind, committed records persist in the database until they are intentionally removed.

    + +

    To make things very concrete, we can actually mimic the behavior of a bind using two blocks that commit. We’ve already got the first one (the one just above), that commits messages to @browser. Now all we need is a second block, one that removes old committed messages from @browser:

    +
    search 
    +  [#time seconds]
    +
    +search @browser
    +  s = seconds - 1
    +  // Do some math to handle the roll over at 60 seconds
    +  last-time = s - 60 * floor[value: s / 60]
    +  msg = [#div text: last-time]
    +  
    +commit @browser
    +  msg := none
    +
    + +

    This block searches for the message that was displayed during the previous second, and sets it to none, thereby removing it from @browser. Therefore, only the message bound to the the current time is displayed on the screen. This behavior is identical to that of the block that binds these messages instead of committing them!

    + +

    An Execution Perspective

    + +

    Another way to understand bind vs. commit is by looking at how the databases change over each tick of the Eve evaluator. We’ll consider the same program as before, looking at how its state changes over time. First, consider the bind case. When the program starts, there’s nothing in any databases; the program is a blank slate. At t1 the first #time is added to @session. This addition is bound to a #div, which is added to @browser. These changes are summarized in the first column of the table below.

    + +

    At t2, a new #time is added to @session, and the one from t1 is removed. Since we used a bind, this causes the existing #div to be removed from @browser, but it is replaced with a new #div reflecting the current time. At t3, the same operations takes place, and this process continues until the program is terminated.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +t0 + +t1 + +t2 + +t3 +
    +delta + + + ++ [#time seconds: 39] ++ [#div text: "39"] + ++ [#time seconds: 40] +- [#time seconds: 39] ++ [#div text: "40"] +- [#div text: "39"] + ++ [#time seconds: 41] +- [#time seconds: 40] ++ [#div text: "41"] +- [#div text: "40"] +
    +@session + +[ ] + +[[#time seconds: 39]] + +[[#time seconds: 40]] + +[[#time seconds: 41]] +
    +@browser + +[ ] + +[[#div text: 39]] + +[[#div text: 40]] + +[[#div text: 41]] +
    + +

    Let’s perform the same analysis in the commit case. In this program, things start off the same; initially the database is empty, and at t1 a #time and a #div are added to their respective databases. At t2, things get more interesting. While the old #time is still replaced, the #div displaying the old time is not replaced since we committed it to @browser. Indeed, in subsequent rounds of execution, the contents of @browser keeps growing.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +t0 + +t1 + +t2 + +t3 +
    +delta + + ++ [#time seconds: 39] ++ [#div text: "39"] + ++ [#time seconds: 40] +- [#time seconds: 39] ++ [#div text: "40"] + ++ [#time seconds: 41] +- [#time seconds: 40] ++ [#div text: "41"] +
    +@session + +[ ] + +[[#time seconds: 39]] + +[[#time seconds: 40]] + +[[#time seconds: 41]] +
    +@browser + +[ ] + +[[#div text: 39]] + +[[#div text: 39], + [#div text: 40]] + +[[#div text: 39], + [#div text: 40], + [#div text: 41]] +
    + +

    Tips

    + +

    When you want to display data in an interface element like a #div, a bind is usually the more appropriate choice compared to a commit. A bind will keep the interface element always up-to-date, whereas a commit will leave lingering elements that no longer reflect the current state of the program.

    + +

    When searching for an event like a #click, a commit is usually more appropriate than bind. When an event occurs, a record representing the event is added to a database. That record exists for exactly one “instant”, and then it is removed from the database. During that “instant”, any block searching for that event will be satisfied and can execute a bind or commit action. If you bind on the event, then the result will disappear as soon as the event does. However, if you commit on the event, then that result will persist after the event has been removed.

    + +

    Examples

    + +

    Initialize a counter when a session connects

    +
    search
    +  [#session-connect]
    +
    +commit
    +  [#counter count: 0]
    +
    + +

    Increment a counter when a button is clicked

    +
    search
    +  [#click element: [#count-button diff counter]]
    +
    +commit
    +  counter.count := counter.count + diff
    +
    + +

    See Also

    + +

    bind | databases | search

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/commonmark/index.html b/handbook/commonmark/index.html new file mode 100644 index 0000000..fc0a94f --- /dev/null +++ b/handbook/commonmark/index.html @@ -0,0 +1,464 @@ + + + + + + + + + + + + CommonMark - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    CommonMark

    + +

    Eve documents are compatible with CommonMark

    + +

    Syntax

    + +

    Headings

    + +
    # heading1
    +## heading2
    +### heading3
    +
    + +

    Emphasis

    + +
    *italic*
    +_italic_
    +**bold**
    +__bold__
    +
    + + + +
    [link](address)
    +
    +[link][ref]
    +[ref] : address
    +
    + +

    Lists

    + +
    - list item
    +- list item2
    +  - sublist item
    +
    +* list item
    +* list item2
    +  * sublist item
    +
    +1. ordered list1
    +2. ordered list2
    +
    +1) ordered list1
    +2) ordered list2
    +
    + +

    Quotes

    + +
    > blockquote
    +
    + +

    Code

    + +
    ```
    +  a block of code
    +```
    +
    +`Inline code` with backticks
    +
    + +

    Description

    + +

    CommonMark is an effort to standardize and remove ambiguity from the Markdown language. Eve uses CommonMark as the basis for formatting and rendering prose contained in Eve files. Eve code is written as code blocks within a document specified in CommonMark. Code blocks are delinated by code fences, three backtics before and after Eve code. Everything within a code block is treated as Eve code.

    + +

    Examples

    + +

    See Also

    + +

    literate programming | blocks | programming model

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/core/index.html b/handbook/core/index.html new file mode 100644 index 0000000..88717d1 --- /dev/null +++ b/handbook/core/index.html @@ -0,0 +1,400 @@ + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/handbook/databases/index.html b/handbook/databases/index.html new file mode 100644 index 0000000..e484434 --- /dev/null +++ b/handbook/databases/index.html @@ -0,0 +1,492 @@ + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Databases

    + +

    Databases contain records

    + +

    Syntax

    +
    // search action
    +search @database1, ..., @databaseN
    +
    +// Commit action
    +commit @database1, ..., @databaseN
    +
    +// Bind action
    +bind @database1, ..., @databaseN
    +
    + +

    Description

    + +

    <action> @database performs the given action, one of search, bind, or commit, on the union of the provided databases.

    + +

    If no database is provided with an action, then that action is performed on the default @session database.

    + +

    Creating and Searching Databases

    + +

    You can create databases on-demand by simply committing a record to one. e.g.

    + +
    commit @my-database
    +  [#my-record]
    +
    + +

    This block will create a new database called “my-database”, which will contain the newly committed record. You can now search for this record in your new database:

    + +
    search @my-database
    +  [#my-record]
    +
    +bind @browser
    +  [#div text: "Found a record!"]
    +
    + +

    Special Databases

    + +

    Eve has some built-in databases that have meaning to the runtime.

    + +
      +
    • @session - the default database when no database is specified with an action.
    • +
    • @view - records committed to @view are used to visualize data.
    • +
    • @event - contains events originating from the DOM
    • +
    • @browser - Eve clients running in the browser render applicable records in this @browser as HTML elements.
    • +
    • @http - Stores records representing HTTP requests and responses
    • +
    + +

    Examples

    + +

    Display the element that was clicked in the DOM

    +
    search @event
    +  [#click #direct-target element]
    +
    +commit @browser
    +  [#div text: "{{element}} was clicked."]
    +
    + +

    Commit some data in @session, and then display it on a button click.

    + +
    commit
    +  [#for-display text: "Hello"]
    +
    + +

    We are searching over three databases to complete this block.

    + +
      +
    • the #click is in @event
    • +
    • the #button is in @browser
    • +
    • the text for display is in @session. This needs to be made explicit; since we are searching in other databases, @session is not searched implicitly.
    • +
    + +
    search @event @browser @session
    +  [#click element: [#button]]
    +  [#for-display text]
    +
    +commit @browser
    +  [#div text]
    +
    + +

    This block could have been written with two searches for the same effect:

    + +
    search @event @browser
    +  [#click element: [#button]]
    +
    +search
    +  [#for-display text]
    +
    +commit @browser
    +  [#div text]
    +
    + +

    See Also

    + +

    search | bind | commit

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/datetime/index.html b/handbook/datetime/index.html new file mode 100644 index 0000000..18f218f --- /dev/null +++ b/handbook/datetime/index.html @@ -0,0 +1,400 @@ + + + + + + + + + + + + Date & Time - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Date & Time

    + +
      +
    • time - The current system time
    • +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/datetime/time/index.html b/handbook/datetime/time/index.html new file mode 100644 index 0000000..2a0a8ff --- /dev/null +++ b/handbook/datetime/time/index.html @@ -0,0 +1,451 @@ + + + + + + + + + + + + time - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    time

    + +

    provides the current time

    + +

    Syntax

    +
    [#time year 
    +       month 
    +       day 
    +       hours 
    +       hours-24 
    +       minutes 
    +       seconds 
    +       time-string 
    +       time seconds 
    +       frames 
    +       ampm]
    +
    + +

    Attributes

    + +
      +
    • year - the current year
    • +
    • month - the current month from 0 to 11
    • +
    • day - the current day of the month from 1 to 31
    • +
    • hours - current hour from 0 to 11
    • +
    • hours-24 - current hour from 0 to 23
    • +
    • minutes - current minute from 0 to 59
    • +
    • seconds - current second from 0 to 59
    • +
    • time-string - the current time in a string of the form HH:MM AM/PM
    • +
    • timestamp - the number of milliseconds since midnight January 1, 1970
    • +
    • ampm - a string indicating morning or evening
    • +
    • frames - the number of frames elapsed since the program began. This fastest updating attribute on #time, refreshing evey 16 milliseconds.
    • +
    + +

    Description

    + +

    Provides the current time as reported by the system clock.

    + +

    Time updates at the frequency of the smallest unit of time selected in the record.

    + +

    Examples

    + +

    Prints the current time as a formatted string.

    +
    search
    +  [#time hours minutes seconds]
    +
    +bind @browser
    +  [#div text: "The time is {{hours}}:{{minutes}}:{{seconds}}"]
    +
    + +

    Example Usage

    + + + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/docker/index.html b/handbook/docker/index.html new file mode 100644 index 0000000..49ecadc --- /dev/null +++ b/handbook/docker/index.html @@ -0,0 +1,423 @@ + + + + + + + + + + + + Docker - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Eve in Docker

    + +

    A Docker container for Eve is available on Docker Hub. After installing Docker for your platform, you can download our container with the following command:

    + +
    docker pull witheve/eve
    +
    + +

    Windows Users - Docker for Windows requires Microsoft Hyper-V, which requires Windows 10.

    + +

    Examples

    + +

    To run the Docker container, execute:

    + +
    docker run -p [port]:8080 witheve/eve
    +
    + +

    [port] is an available port on your local machine. It can be 8080 or any other port you would like. Then direct your browser to http://localhost:[port] to access the editor.

    + +

    [eve_file] is a path to a *.eve file you would like to build. The working directory of the container is eve/build, so to run a program in the eve/examples directory, you need to provide a relative path e.g.

    + +
    docker -p 8080:8080 witheve/eve
    +
    + +

    To pass Eve files on your local machine into the container, you’ll need to mount a docker volume.

    + +

    See also

    + +

    linux | mac | windows | npm |running

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/ebnf/index.html b/handbook/ebnf/index.html new file mode 100644 index 0000000..2a1d664 --- /dev/null +++ b/handbook/ebnf/index.html @@ -0,0 +1,502 @@ + + + + + + + + + + + + Grammar - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Eve EBNF grammar

    + +

    The following specification is expressed in Extended Backus–Naur Form

    + +

    Basics

    +
    newline = "\n"
    +whitespace =  " " | "\t" | "," | newline;
    +unicode = ? all unicode chars - whitespace ?;
    +specials = "@" | "#" | "." | "," | "(" | ")" | "[" | "]" | "{" | "}" | "⦑" | "⦒" | ":" | "\"";
    +non-special = unicode - specials;
    +
    + +

    Values

    +
    none = "none";
    +boolean = "true" | "false";
    +numeric = "0" .. "9";
    +number = ["-"] {numeric} ["." {numeric}];
    +string-interpolation = "{{" expression "}}";
    +string = "\"" {string-interpolation | unicode - "\"" | "\\\"" | whitespace} "\"";
    +uuid ="⦑" (unicode - specials)  "⦒"
    +
    + +

    Keywords and Identifiers

    +
    search = "search";
    +action = "bind" | "commit";
    +if = "if";
    +then = "then";
    +else = "else";
    +is = "is";
    +not = "not";
    +none = "none";
    +keyword = search | action | if | then | else | boolean | is | not | none
    +non-special-non-numeric = non-special - numeric
    +identifier = (non-special-non-numeric {non-special}) - keyword - "```";
    +
    + +

    Comparisons

    +
    equality = ":" | "=";
    +comparator = equality | ">" | "<" | ">=" | "<=" | "!=";
    +comparison = expression whitespace+ comparator whitespace+ expression;
    +
    + +

    Functions

    +
    infix-op = "*" | "+" | "-" | "/";
    +infix = expression infix-op expression;
    +function = identifier "[" [attribute] {whitespace+ attribute} "]";
    +
    + +

    Records and Attributes

    +
    record = "[" [attribute] {whitespace+ attribute} "]"
    +attribute = name | tag | attribute-not | identifier {whitespace+ comparator whitespace+ expression};
    +name = "@" (identifier | string);
    +tag = "#" (identifier | string);
    +attribute-not = not "(" whitespace* identifier [comparator whitespace+ expression] ")";
    +attribute-access = identifier whitespace* {"." whitespace* identifier}+
    +
    + +

    Special Forms

    +
    not-statement = not "(" statement {whitespace+ statement} ")";
    +is-expression = is "(" comparison ")";
    +
    + +

    Expression

    +
    expression = number | identifier | function | infix | record | attribute-access;
    +
    + +

    Statements

    +
    comment = "//" {unicode | whitespace - newline} newline
    +statement = record | function | not-statement | if-statement | comparison | comment
    +
    + +

    Action Statements

    +
    create-action = (identifier whitespace+ equality whitespace+ record) | record
    +merge-action = (identifier | attribute-access) whitespace+ "<-" whitespace+ record
    +name-tag-action = (identifier | attribute-access) whitespace+ ("+=" | "-=") whitespace+ (name | tag)
    +remove-action = (identifier | attribute-access) whitespace+ ":=" whitespace+ none
    +attribute-action = attribute-access whitespace+ (":=" | "+=" | "-=") whitespace+ expression
    +action-operation = create-action | merge-action | name-tag-action | remove-action | attribute-action
    +
    + +

    If-Then

    +
    group = "(" expression {whitespace+ expression} ")"
    +binding-group = "(" identifier {whitespace+ identifier} ")"
    +if-result = (group | expression);
    +if-expression = if whitespace+ {statement whitespace+} then whitespace+ if-result;
    +else-if-expression = else whitespace+ if whitespace+ {statement whitespace+} then whitespace+ if-result;
    +else-expression = else whitespace+ if-result
    +if-statement = (identifier | binding-group) whitespace+ equality whitespace+
    +               if-expression
    +               {whitespace+ (if-expression | else-if-expression)}
    +               [else-expression]
    +
    + +

    Sections

    +
    database-declaration = name | "(" {name whitespace+} ")"
    +match-section = search whitespace+ [database-declaration whitespace+] {statement whitespace}
    +action-section = action whitespace+ [database-declaration whitespace+] {action-statement whitespace}
    +section = match-sectiong | action-section
    +
    + +

    Program and Blocks

    +
    fence-symbol = "```"
    +start-fence = newline fence-symbol [whitespace* (unicode - newline)] newline
    +end-fence = newline fence-symbol newline
    +block = start-fence {section} end-fence
    +program = {unicode | whitespace | block}
    +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/equality/index.html b/handbook/equality/index.html new file mode 100644 index 0000000..5c00183 --- /dev/null +++ b/handbook/equality/index.html @@ -0,0 +1,449 @@ + + + + + + + + + + + + Equality - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Equality

    + +

    = and : assert the equality of two values

    + +

    Syntax

    +
    // Use : in a record to bind an attribute to a value
    +[attribute: value]
    +
    +// Use = outside a record to bind an attribute to a value
    +[attribute]
    +attribute = value
    +
    + +

    Description

    + +

    [attribute: value] binds value to attribute, so that only records with attributes of the given value are returned. For instance, [name: "John"] selects all records with a name attribute equal to “John”. You can achieve the same effect with the = operator by first searching for a record. For instance:

    +
    [name]
    +name = "John"
    +
    + +

    This example further demonstrates that in Eve, variables with the same name are equivalent. Here, name inside the record and name on the second line are the same. This has particular implications, especially in the context of joining records. For instance:

    +
    search
    +  [#student name school: name]
    +  [#school name address]
    +
    + +

    This block searches for #students and #schools with the same name. This means if you have a school named “South High School”, it won’t match unless there is also a student named “South High School”. If you want to use attributes, but don’t want to join on them, you can access them via dot notation.

    +
    search
    +  [#student name school: schools.name]
    +  schools = [#school address]
    +
    + +

    This will correctly allow us to relate students and the addresses of the schools they attend.

    + +

    Tips

    + +

    Eve has two identical equivalency operators, : and =. They have the same semantic meaning, and could be used interchangeably. However, for readability reasons we encourage you to use : to express equality within records, and = outside of records. For example [attribute: value] is good, while we don’t encourage [attribute = value], even though it is semantically equivalent.

    + +

    Examples

    + +

    The following block will never execute the bind action because of a contradiction in the search:

    +
    search
    +  x = 10
    +  x = 20
    +
    +bind @browser
    +  [#div text: "This will never display"]
    +
    + +

    The search action says that x = 10 and x = 20, which is never true. Since there is no order or assignment in Eve, this statement does not first set x to 10 and then to 20. To see this more clearly, these two statements could be written as one:x = 10 = 20.

    + +

    See Also

    + +

    inequality | joins

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/equivalence/index.html b/handbook/equivalence/index.html new file mode 100644 index 0000000..ef938a0 --- /dev/null +++ b/handbook/equivalence/index.html @@ -0,0 +1,406 @@ + + + + + + + + + + + + Equivalence - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Equivalence

    + +
      +
    • Equality - Expresses when two statements are equality
    • +
    • Inequality - Expresses the relationship between two statements when they are not equality
    • +
    • Joins - Relate disjoint records by binding attributes from one with the other.
    • +
    + +

    See Also

    + +

    equality | inequality | joins

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/event/change/index.html b/handbook/event/change/index.html new file mode 100644 index 0000000..d935b5a --- /dev/null +++ b/handbook/event/change/index.html @@ -0,0 +1,439 @@ + + + + + + + + + + + + change - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    change

    + +

    change event

    + +

    Syntax

    + +
    [#change]
    +[#change element]
    +[#change #direct-target element]
    +
    + +

    Attributes

    + +
      +
    • #direct-target - selects only directly changed elements, as opposed to elements to which the event bubbles.
    • +
    • element - the element that changed.
    • +
    + +

    Description

    + +

    When an element in the DOM has changed, a #change record is created in the @event database.

    + +

    Examples

    + +

    Initialize the DOM with a select element:

    +
    commit @browser
    +  [#select #countries children: 
    +    [#option text: "italy"] 
    +    [#option text: "france"] 
    +    [#option text: "spain"]
    +  ]
    +
    + +

    Listen for change event emitted from select element when a country has been selected:

    +
    search @session @browser @event
    +  element = [#change element: [#select #countries]]
    +
    +commit @view
    +  [#value | value: "{{element.value}}"] // it will print "italy", "france" or "spain"
    +
    + +

    See Also

    + +

    click

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/event/click/index.html b/handbook/event/click/index.html new file mode 100644 index 0000000..7bc9520 --- /dev/null +++ b/handbook/event/click/index.html @@ -0,0 +1,435 @@ + + + + + + + + + + + + click - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    click

    + +

    click event

    + +

    Syntax

    + +
    [#click]
    +[#click element]
    +[#click #direct-target element]
    +
    + +

    Attributes

    + +
      +
    • #direct-target - selects only directly clicked elements, as opposed to elements to which the event bubbles.
    • +
    • element - the element that was clicked.
    • +
    + +

    Description

    + +

    When an element in the DOM is clicked, a #click record is created in the @event database.

    + +

    Examples

    + +

    Initialize the DOM with a button element:

    +
    commit @browser
    +  [#button #btnHello text: "Click Me"]
    +
    + +

    Listen for click event emitted from button element it gets clicked:

    +
    search @session @browser @event
    +  [#click element: [#button #btnHello]]
    +
    +commit @view
    +  [#value | value: "The button has been clicked"]
    +
    + +

    See Also

    + +

    change

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/event/index.html b/handbook/event/index.html new file mode 100644 index 0000000..1fcf921 --- /dev/null +++ b/handbook/event/index.html @@ -0,0 +1,404 @@ + + + + + + + + + + + + @event - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    @event

    + +

    click - a left-button mouse click event

    + +

    change - an element change event

    + +

    keydown - a key down event

    + +

    keyup - a key up event

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/event/keydown/index.html b/handbook/event/keydown/index.html new file mode 100644 index 0000000..2f9837d --- /dev/null +++ b/handbook/event/keydown/index.html @@ -0,0 +1,426 @@ + + + + + + + + + + + + keydown - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    keydown

    + +

    key down event

    + +

    Syntax

    + +
    [#keydown]
    +[#keydown element]
    +
    + +

    Attributes

    + +
      +
    • element - the element on which the key was pressed.
    • +
    + +

    Description

    + +

    When a key is pressed when an element in the DOM is focused, a #keydown record is created in the @event database.

    + +

    Examples

    +
    search @event
    +  event = [#keydown key]
    +
    +commit @browser
    +  [#span text: "key pressed: {{key}}" event]
    +
    + +

    See Also

    + +

    keyup

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/event/keyup/index.html b/handbook/event/keyup/index.html new file mode 100644 index 0000000..03aa7c6 --- /dev/null +++ b/handbook/event/keyup/index.html @@ -0,0 +1,426 @@ + + + + + + + + + + + + keyup - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    keyup

    + +

    key up event

    + +

    Syntax

    + +
    [#keyup]
    +[#keyup element]
    +
    + +

    Attributes

    + +
      +
    • element - the element on which the key was released.
    • +
    + +

    Description

    + +

    When a key is released when an element in the DOM is focused, a #keyup record is created in the @event database.

    + +

    Examples

    +
    search @event
    +  event = [#keyup key]
    +
    +commit @browser
    +  [#span text: "key released: {{key}}" event]
    +
    + +

    See Also

    + +

    keydown

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/expressions/index.html b/handbook/expressions/index.html new file mode 100644 index 0000000..559be7a --- /dev/null +++ b/handbook/expressions/index.html @@ -0,0 +1,408 @@ + + + + + + + + + + + + Expressions - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/handbook/functions/index.html b/handbook/functions/index.html new file mode 100644 index 0000000..84009d5 --- /dev/null +++ b/handbook/functions/index.html @@ -0,0 +1,453 @@ + + + + + + + + + + + + Functions - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Functions

    + +

    Functions map one or more arguments to one or more values.

    + +

    Syntax

    +
    // A typical function call
    +value = fn[argument]
    +
    +// A function call with multiple arguments
    +value = fn[argument1, ..., argumentN]
    +
    +// A function call with multiple arguments and multiple return values
    +(value1, value2) = fn[argument1, ..., argumentN]
    +
    +// A desugared function call
    +[#fn #function argument1, ... argumentN, value1, ..., valueN]
    +
    + +

    Description

    + +

    Functions as they exist in other languages are mostly obviated by Eve’s tag semantics. Consider the following function call in a C-family language.

    +
    // A typical function call
    +x = sin(1.5);                              
    +
    + +

    In Eve, we could match a record that operates similarly:

    +
    [#sin #function radians: 1.5, return: x]
    +
    + +

    These statements accomplish the same objective: store the sine of an angle in a result variable. The Eve syntax is at a disadvantage though, because it cannot be composed into an expression like a typical function. Therefore, specific Eve records can be used as traditional functions:

    +
    x = sin[radians: 1.5]
    +
    + +

    Let’s look at what makes Eve functions different.

    + +

    Explicit Arguments

    + +

    A function’s arguments are enclosed in square brackets to draw attention to the fact that functions in Eve are just regular records. Also like records, arguments are stated explicitly. This has several advantages over typical calling patterns:

    + +
      +
    • Explicit arguments are self-documenting, so a reader unfamiliar with the function can understand more about the function without looking up exactly how it works. In the case of sin, you don’t have to know whether the inputs have to be in radians or degrees; the call-site tells you.

    • + +
    • Eve provides alternative calling patterns for functions. Some languages have two sin functions, one for angles in radians and another for angles in degrees. By contrast, Eve has a single sin function. If your angles are in radians, you call sin[radians], whereas if your angles are in degrees, you call sin[degrees].

    • + +
    • Like all records, you can state arguments in any order. This opens up an easy path for optional arguments: include the arguments you want and leave out the ones you don’t.

    • +
    + +

    Referential Transparency

    + +

    All expressions in Eve are referentially transparent, meaning you can replace the expression with its result and the behavior of the program will not change. This in turn means that expressions are side-effect free, and the only thing they depend on is their input arguments. Referential transparency is key to enabling some key features in Eve, like time travel debugging and provenance.

    + +

    Set Semantics

    + +

    In Eve, functions work over sets, meaning that a function will be applied to all elements of the input sets, resulting in an output that is itself a set. For more, see the document on set semantics.

    + +

    See Also

    + +

    aggregate | set semantics

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/general/index.html b/handbook/general/index.html new file mode 100644 index 0000000..92ce1f2 --- /dev/null +++ b/handbook/general/index.html @@ -0,0 +1,400 @@ + + + + + + + + + + + + General - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    General

    + +
      +
    • sort - Orders elements in a set
    • +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/general/sort/index.html b/handbook/general/sort/index.html new file mode 100644 index 0000000..0e9f8d1 --- /dev/null +++ b/handbook/general/sort/index.html @@ -0,0 +1,533 @@ + + + + + + + + + + + + sort - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    sort

    + +

    generates an ordering for a set

    + +

    Syntax

    +
    // Sort one or more values
    +index = sort[value]
    +index = sort[value: (value1, value2, ...)]
    +
    +// Sort one or more values, and specify the direction for each
    +index = sort[value direction]
    +index = sort[value: (value1, value2, ...), direction: ("up", "down", ...)]
    +
    +// Sort according to some grouping
    +index = sort[value per]
    +index = sort[value direction per]
    +
    + +

    Arguments

    + +
      +
    • value - one or more variables to sort. More than one variable can be provided using a list e.g. sort[value: (value1, ..., valueN)], and they will be sorted in turn.
    • +
    • direction - _optional_ - one or more directions by which to sort value. If no direction is provided, all variables are sorted from smallest to largest. Possible values are: + +
        +
      • “up” for sorting from smallest to largest.
      • +
      • “down” for sorting from largest to smallest.
      • +
    • +
    • per - _optional_ - Instead of sorting the whole set, per allows you to divide the set into groups and sort each one.
    • +
    + +

    The output is a set of indices, each of which maps to an element of the sorted variable. For example, if the value is ("A", "C", "D", "B"), then index is (1, 3, 4, 2).

    + +

    Description

    + +

    Sort generates an index that describes the ordering of an input value. It’s important to remember that variables in Eve are sets, and therefore have no ordering. Because of this, sort does not reorder value, but it generates a set of indices, each of which maps to an element in value.

    + +

    Sort is flexible, and can generate an ordering over multiple dimensions, directions, and groupings.

    + +

    index = sort[value] generates an ordering of value from smallest to largest.

    + +

    index = sort[value direction] generates an ordering of value in a given direction. Acceptable values are “up” and “down”.

    + +

    index = sort[value: (value1, ... , valueN)] generates an ordering of a list of values, ordering by value1 first, then value2, and so on. For example, if you have #person records with name, age and height attributes, you could sort as follows:

    +
    search
    +  [#person name age height]
    +  index = sort[value: (age, name, height)]
    +
    + +

    This will sort the people first by age, then by name, then by height.

    + +

    index = sort[value: (value1, ... , valueN), direction: (direction1, ... , directionN)] does the same as above, but you can specify the direction you sort each variable. Acceptable value for direction are “up” and “down”. By default, values are sorted in the “up” direction.

    + +

    index = sort[value per] sorts value, grouped by per. This divides value into groups according to the elements of per, and each one is sorted.

    + +

    Examples

    + +

    We have #student records with grade (1 - 12), teacher, GPA (0.0 - 4.0) attributes. We can sort the students by grade:

    +
    search
    +  [#student name grade]
    +  index = sort[value: grade]
    +
    +bind @browser
    +  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    +
    + +

    The browser handles the task of rendering the divs in the order specified by the sortattribute. Taking this further, we can choose the direction of the sortted set, whether “up” or “down”. The default direction is “up” when none is specified.

    +
    search
    +  [#student name grade]
    +  index = sort[value: grade, direction: "down"]
    +  
    +bind @browser
    +  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    +
    + +

    You can also sort across multiple axes of a record. For instance, we can sort grade from 9 to 12, then sort by name from Z - A.

    +
    search
    +  [#student name grade]
    +  index = sort[value: (grade, name) , direction: ("up","down")]
    +
    +bind @browser
    +  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    +
    + +

    This can be extended to sort any number of attributes

    +
    search
    +  [#student name grade teacher GPA]
    +  index = sort[value: (grade, teacher, name, GPA) , direction: ("up", "down", "up", "down")]
    +
    +bind @browser
    +  [#div sort: index, text: "{{index}} - {{name}} {{grade}} {{teacher}} {{GPA}}"]
    +
    + +

    Finally, we can group sorted attributes with the per argument. Here you can see the difference between sorting by name then grade, and sorting by name per grade.

    +
    search
    +  [#student name grade GPA]
    +  index = sort[value: (GPA, name), per: grade]
    +  
    +bind @browser
    +  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    +
    + +

    When you sort per grade, then name is first grouped by grade, and each of those groups is then sorted. This is why index goes from 1-6 instead of 1-20 as in the other examples; Although there are still 20 elements in index, the maximum is 6 because no grade has more than 6 students. You might want to sort data this way in order to display it in a nested structure, such as this:

    +
    search
    +    [#student name grade teacher]
    +  index = sort[value: name, per: grade]
    +  
    +bind @browser
    +  [#div grade children: 
    +    [#h3 sort: 0, text: "Grade: {{grade}}"]
    +    [#div sort: index, text: "{{index}} {{name}}"]]
    +
    + +
    + +

    Commit some test data

    +
    commit
    +  [#student name: "Mach", grade: 9, teacher: "Mr. Black", GPA: "1.0"]
    +  [#student name: "Pok", grade: 9, teacher: "Mrs. Brown", GPA: "3.4"]
    +  [#student name: "Karima", grade: 9, teacher: "Mr. Black", GPA: "2.4"]
    +  [#student name: "Garth", grade: 9, teacher: "Mrs. Brown", GPA: "2.8"]
    +  [#student name: "Berta", grade: 9, teacher: "Mr. Black", GPA: "2.7"]
    +  [#student name: "Maxine", grade: 10, teacher: "Mr. Red", GPA: "4.0"]
    +  [#student name: "Gwyn", grade: 10, teacher: "Mrs. Blue", GPA: "2.5"]
    +  [#student name: "Ilse", grade: 10, teacher: "Mr. Red", GPA: "3.0"]
    +  [#student name: "Hobert", grade: 11, teacher: "Ms. Green", GPA: "3.2"]
    +  [#student name: "Arlean", grade: 10, teacher: "Mr. Red", GPA: "2.4"]
    +  [#student name: "Ty", grade: 10, teacher: "Mrs. Blue", GPA: "1.7"]
    +  [#student name: "Kermit", grade: 11, teacher: "Ms. Green", GPA: "2.9"]
    +  [#student name: "Cortez", grade: 11, teacher: "Mrs. Orange", GPA: "2.3"]
    +  [#student name: "Polly", grade: 11, teacher: "Ms. Green", GPA: "2.1"]
    +  [#student name: "Damion", grade: 12, teacher: "Mrs. Purple", GPA: "3.8"]
    +  [#student name: "Gretchen", grade: 12, teacher: "Mrs. Yellow", GPA: "2.8"]
    +  [#student name: "Octavio", grade: 12, teacher: "Mrs. Purple", GPA: "3.4"]
    +  [#student name: "Pa", grade: 12, teacher: "Mrs. Yellow", GPA: "3.5"]
    +  [#student name: "Elwanda", grade: 10, teacher: "Mrs. Blue", GPA: "1.3"]
    +  [#student name: "Guadalupe", grade: 11, teacher: "Mrs. Orange", GPA: "3.7"]
    +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/glossary/index.html b/handbook/glossary/index.html new file mode 100644 index 0000000..581f1db --- /dev/null +++ b/handbook/glossary/index.html @@ -0,0 +1,428 @@ + + + + + + + + + + + + Glossary - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Glossary

    + +

    Cardinality

    + +

    Cardinality is the number of elements in a set. For example, the set (5, 4, 2) contains three elements, so the cardinality of the set is 3.

    + +

    Cartesian Product

    + +

    The Cartesian product A × B of two sets A and B is the set of ordered pairs (a,b) where a ∈ A and b ∈ B. For example, if A = (1, 2) and B = ("A", "B"), then A x B = ((1,"A"), (1, "B"), (2, "A"), (2, "B")).

    + +

    Entity

    + +

    Entities are unique IDs in the Eve DB. An entity can represent anything - a person, a business, a message, an application, a button, etc.

    + +

    Fact

    + +

    Facts describe entities. Each fact is composed of an attribute and a value, and is associated with a specific entity. Facts might be a person’s age, an employee’s salary, a department’s budget, etc.

    + +

    Provenance

    + +

    Provenance is the record and history of data and its place of origin. In Eve, provenance tells you how a value is calculated by looking back at the history of its computation. Provenance can be used to precisely identify the cause of unexpected data in your application.

    + +

    Record

    + +

    Records are composed of facts. In Eve, you select records from the database by supplying a pattern of attributes, and any records matching that pattern are returned to you. For example, a record might be the ages, salaries, and departments of employees.

    + +

    Referential Transparency

    + +

    An expression is referentially transparency if it can be replaced with its result without changing the behavior of the program. Expression that are not referentially transparent tend to have side effects, or rely on state that is not supplied as part of the input arguments, but through a side channel.

    + +

    Set

    + +

    In mathematics, a set is a collection of elements where each element is unique. Sets have no order, so position in the set does not imply uniqueness. For example (1, 2, 3) is a set, whereas (1, 2, 1, 3) is not a set, because 1 appears twice. Furthermore, this means that (1, 2, 3) is equivalent to (3, 1, 2), (3, 2, 1), and (1, 3, 2) because they have the same elements regardless of order. Elements of a set can be anything, and therefore can be sets themselves. To make the previous collection a set we could do the following: ((1,A), (2,B), (1,C), (3,D)).

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/help/index.html b/handbook/help/index.html new file mode 100644 index 0000000..74c3091 --- /dev/null +++ b/handbook/help/index.html @@ -0,0 +1,425 @@ + + + + + + + + + + + + Getting Help - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Getting Help

    + +

    If you have any questions or get stuck while you are learning Eve, there are several ways to get help:

    + +

    Before reaching out, make sure you’ve looked at the following resources:

    + +
      +
    • Read the quick start guide. It contains everything you’ll need to build your first Eve program.
    • +
    • Read the syntax reference. It summarizes the syntax of Eve on a single sheet of paper.
    • +
    + +

    If you’re still stuck, you can get in touch with Eve developers and the community through these channels:

    + +
      +
    • Send a message to the mailing list. We generally respond to messages within a day.
    • +
    • Send a tweet to @with_eve.
    • +
    • Submit an issue to our GitHub repository.
    • +
    • Join the Eve Slack channel to talk with Eve developers and the community in real time (coming soon)
    • +
    + +

    Hare are some more resources to help you learn Eve:

    + +
      +
    • Browse our growing catalog of example applications for something similar to what you’re doing.
    • +
    • Read our development blog to learn more about what goes on behind the scenes at Eve.
    • +
    + +

    See Also

    + +

    guides | tutorials | mailing list | @with_eve | GitHub

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/http/index.html b/handbook/http/index.html new file mode 100644 index 0000000..747b3be --- /dev/null +++ b/handbook/http/index.html @@ -0,0 +1,396 @@ + + + + + + + + + + + + @http - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    @http

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/if-then/index.html b/handbook/if-then/index.html new file mode 100644 index 0000000..a4c4316 --- /dev/null +++ b/handbook/if-then/index.html @@ -0,0 +1,472 @@ + + + + + + + + + + + + if-then - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    If-Then

    + +

    Conditional equivalence

    + +

    Syntax

    +
    result = if record then value
    +  
    +result = if record then value
    +         else value
    +
    +result = if record then value
    +         if record then value
    +
    +result = if record then value
    +         else if record then value
    +
    +result = if record then value
    +         else if record then value
    +         else value
    +
    +(result1, ..., resultN) = if record then (value, ..., valueN)
    +
    +(result1, ..., resultN) = if record then (value, ..., valueN)
    +                          else (value, ..., valueN)
    +
    +(result1, ..., resultN) = if record1 then (value, ..., valueN)
    +                          if record2 then (value, ..., valueN)
    +
    +(result1, ..., resultN) = if record1 then (value, ..., valueN)
    +                          else if record2 then (value, ..., valueN)
    +
    +(result1, ..., resultN) = if record1 then (value, ..., valueN)
    +                          else if record2 then (value, ..., valueN)
    +                          else (value, ..., valueN)                                          
    +
    + +

    Description

    + +

    If allows conditional equivalence, and works a lot like if in other languages. Our if has two components: The keyword if followed by a conditional; and the keyword then followed by one or more return objects. An optional else keyword indicates the default value:

    + +

    This block is used to switch between the singular and plural for displaying the number of burgers each guest is eating. If statements can be composed, permitting the creation of complex conditional statements. For instance, instead of inviting friends and their spouses in two blocks (the first two blocks in the example program), I could have done it in a single block using an if statement:

    + +

    This is equivalent to a union/and operator, which combines elements from disparate sets into the same set. The second way to use if is in conjunction with the else keyword:

    + +

    This is equivalent to a choose/or operator, selecting only the first branch with a non-empty body. A bug in this program is that if some guest is tagged both #hungry and #vegetarian, that guest will actually receive two burgers. Therefore, while order of statements usually does not matter in Eve, if statements are one area where it does.

    + +

    A final feature of the if statement is multiple returns. For instance, we could have done this:

    + +

    Examples

    + +

    Basic usage

    +
    burger-switch = if guest.burgers = 1 then "burger"
    +                else "burgers"
    +
    +
    [@"my party" date]
    +friend = [#friend busy-dates != date]
    +guest = if friend then friend
    +        if friend.spouse then friend.spouse
    +
    + +

    Using else if

    +
    burgers = if guest = [@Arthur] then 3
    +          else if guest = [#hungry] then 2
    +          else if guest = [#vegetarian] then 0
    +          else 1
    +
    + +

    Multiple returns

    +
    (burgers, status) = if guest = [@Arthur] then (3, #fed)
    +                    else if guest = [#hungry] then (2, #fed)
    +                    else if guest = [#vegetarian] then (0, #needsfood)
    +                    else (1, #fed)
    +
    + +

    See Also

    + +

    expressions | records | functions

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/index.html b/handbook/index.html index 05d9f8c..c41df68 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,19 +150,19 @@

    EVE

    Pages in Handbook

    - +


    - +


    - +

    Standard Library

    diff --git a/handbook/index.xml b/handbook/index.xml index 6ec0cb3..5d016ba 100644 --- a/handbook/index.xml +++ b/handbook/index.xml @@ -2,36 +2,36 @@ Handbooks on Eve Documentation - http://cmontella.github.io/docs/handbook/index.xml + https://cmontella.github.io/docs/handbook/index.xml Recent content in Handbooks on Eve Documentation Hugo -- gohugo.io en-us - + - http://cmontella.github.io/docs/handbook/core/ + https://cmontella.github.io/docs/handbook/core/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/handbook/core/ + https://cmontella.github.io/docs/handbook/core/ - http://cmontella.github.io/docs/handbook/ + https://cmontella.github.io/docs/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/handbook/ + https://cmontella.github.io/docs/handbook/ Standard Library - http://cmontella.github.io/docs/handbook/libraries/ + https://cmontella.github.io/docs/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/handbook/libraries/ + https://cmontella.github.io/docs/handbook/libraries/ <p><head> diff --git a/handbook/inequality/index.html b/handbook/inequality/index.html new file mode 100644 index 0000000..b262c05 --- /dev/null +++ b/handbook/inequality/index.html @@ -0,0 +1,457 @@ + + + + + + + + + + + + Inequality - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Inequality

    + +

    inequality operators filter records

    + +

    Syntax

    +
    // Inequality Operators
    +>, >=, <, <=, !=
    +
    +// Inside of records
    +[attribute >= value]
    +[attribute >= variable]
    +
    +// Outside of records
    +variable >= value
    +variable >= variable
    +
    +// Satisfy multiple constraints in a single line
    +value <= variable <= value   
    +variable <= variable <= variable
    +
    + +

    Description

    + +

    Attributes can be filtered using inequality operators, including >, >=, <, <= and !=.

    + +

    >, >=, <, <= can only filter using values that can be sorted. For instance, you can use these operators to filter numbers, but you cannot filter records this way.

    + +

    != tests only for inequality, and doesn’t compare whether an attribute is greater or less than a particular value. Therefore, != can be used to filter any value.

    + +

    You can use inequality operators inside records or outside of them. Inside of records, you can filter an attribute on a single value. Outside of records, you have more freedom to filter on multiple values. For instance, if you want only records with an attribute between a maximum and minimum value, you can write something like min-value < variable < max-value.

    + +

    Examples

    + +

    Select students with a low GPA

    +
    search @test-data
    +  [#student name GPA < 2.0]
    +
    +bind @browser
    +  [#div text: "{{name}} needs a tutor."]
    +
    + +

    Select students with a GPA over 2.0 but less than 3.0

    +
    search @test-data
    +  [#student name GPA]
    +  2.0 <= GPA < 3.0
    +
    +bind @browser
    +  [#div text: "{{name}} is doing fine"]
    +
    + +

    You can be very specific with filters. Select students named “John” in 11th or 12th grade with a GPA between 2.0 and 3.0, and who don’t attend “West” high school.

    +
    search @test-data
    +  students = [#student name: "John", grade >= 11, school != "West" ]
    +  2.0 <= students.GPA < 3.0
    +
    +bind @browser
    +  [#div text: "{{name}} is doing fine"]  
    +
    + +

    See Also

    + +

    equality | joins | equivalence

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/installation/index.html b/handbook/installation/index.html new file mode 100644 index 0000000..ae669ac --- /dev/null +++ b/handbook/installation/index.html @@ -0,0 +1,409 @@ + + + + + + + + + + + + Getting Eve - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/handbook/intro/index.html b/handbook/intro/index.html new file mode 100644 index 0000000..5394c67 --- /dev/null +++ b/handbook/intro/index.html @@ -0,0 +1,418 @@ + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Introduction

    + +

    Notable Features

    + +
      +
    • Eve programs aren’t talking to a database, they are the database. That means no plumbing, no impedance mismatch, and no extra infrastructure is needed.

    • + +
    • Everything is data. The file system, http requests, the DOM… That means everything can be queried and everything can be reacted to.

    • + +
    • Eve’s semantics were built for concurrency, asynchrony, and distribution. There are no promises, or thread synchronizations, or borrows.

    • + +
    • Eve programs practice literate programming, since there’s no incidental ordering imposed by the language.

    • + +
    • Another result of a lack of ordering is that programs grow very organically through composition.

    • + +
    • Eve programs are naturally tiny.

    • + +
    • Correctness can be defined globally through integrity constraints, allowing people to safely contribute to an application without worrying about checking every possible invariant locally.

    • +
    + +

    See Also

    + +

    getting eve | running eve | eve programs | core language

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/is/index.html b/handbook/is/index.html new file mode 100644 index 0000000..3aa6e0d --- /dev/null +++ b/handbook/is/index.html @@ -0,0 +1,429 @@ + + + + + + + + + + + + is - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    is

    + +

    Tests the truth of a statement

    + +

    Syntax

    +
    y = is( ... )
    +
    + +

    Description

    + +

    y = is( ... ) tests the truth of the statement contained in the parentheses. If the statement is true, then is returns the value true, otherwise it returns false.

    + +

    Examples

    +
    search
    +  x = 10
    +  y = is(20 = x)
    +  z = is(20 = x * 2)
    +
    +bind @browser
    +  [#div text: "y is {{y}}"]
    +  [#div text: "z is {{z}}"]
    +
    + +

    The output shows that y is false while z is true.

    + +

    Example Usage

    + + + +

    See Also

    + +

    not | records | expressions

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/joins/index.html b/handbook/joins/index.html new file mode 100644 index 0000000..a6b4a35 --- /dev/null +++ b/handbook/joins/index.html @@ -0,0 +1,416 @@ + + + + + + + + + + + + Joins - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Joins

    + +

    joins allow you to relate two records

    + +

    Syntax

    +
    // Join two records using a bind
    +[#record1 attribute1]
    +[#record2 attribute2: attribute1]
    +
    +// Join two records using a name
    +[#record1 attribute]
    +[#record2 attribute]
    +
    + +

    Description

    + +

    Examples

    + +

    See Also

    + +

    equality | inequality | records

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html index 8be9442..7e7c873 100644 --- a/handbook/libraries/index.html +++ b/handbook/libraries/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/handbook/linux/index.html b/handbook/linux/index.html new file mode 100644 index 0000000..005f499 --- /dev/null +++ b/handbook/linux/index.html @@ -0,0 +1,417 @@ + + + + + + + + + + + + Linux - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Installing Eve on Linux

    + +

    First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

    + +
    npm install
    +npm start
    +
    + +

    Then open http://localhost:8080/ in your browser.

    + +

    Tips

    + +

    Some distributions (most notably Ubuntu) have renamed node to nodejs. If this is the case, you’ll need to create a symlink that remaps nodejs back to node. e.g.

    + +
    ln -s /usr/bin/nodejs /usr/bin/node
    +
    + +

    Then proceed with the installation as usual

    + +

    See also

    + +

    mac | windows | docker | running

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/literate-programming/index.html b/handbook/literate-programming/index.html new file mode 100644 index 0000000..db93ee1 --- /dev/null +++ b/handbook/literate-programming/index.html @@ -0,0 +1,433 @@ + + + + + + + + + + + + Literate Programming - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Literate Programming

    + +

    In the spirit of literate programming, Eve programs are primarily prose, interleaved with Eve code. Donald Knuth explains literate programming in his influential paper:

    + +
    +

    The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. Such an author … strives for a program that is comprehensible because its concepts have been introduced in an order that is best for human understanding, using a mixture of formal and informal methods that reinforce each other.

    +
    + +

    This description fits with the ethos of Eve - that programming is primarily meant to communicate with other humans, not the computer. You’ll notice the above Eve program is actually written in two languages: Markdown, used to format the prose; and Eve, which is delineated by standard Markdown code blocks. Only the content within a block is compiled, while everything else is disregarded as a comment.

    + +

    Writing code this way has several properties that result in higher quality programs:

    + +
      +
    • Literate programming forces you to consider a human audience. While this is usually the first step in writing any document, in programming the audience is typically a machine. For an Eve program, the audience might be your collaborators, your boss, or even your future self when revisiting the program in a year. By considering the audience of your program source, you create an anchor from which the narrative of your program flows, leading to a more coherent document.

    • + +
    • The human brain is wired to engage with and remember stories. Think back to a book you read (or maybe a show you watched) last year. You probably remember in great detail all of the characters and their personalities, the pivotal moments of the plot, the descriptions of the various settings, etc. But how much can you remember of a piece of code you haven’t looked at for a year? Literate programming adds another dimension to your code that will help you keep more of your program in working memory.

    • + +
    • Since Eve code blocks can be arranged in any order, literate programming encourages the programmer to arrange them in a way that makes narrative sense. Code can have a beginning, middle, and end just like a short story. Or like an epic novel, code can have many interwoven storylines. Either way, the structure of the code should follow an order imposed by a narrative, not one imposed by the compiler.

    • + +
    • Literate programming can help you think about your program more thoroughly. Through practicing literate programming, you can reveal edge cases, incorrect assumptions, gaps in understanding the problem domain, and shaky implementation details before any code is even written.

    • +
    + +

    Literate programming is a first-class design concept in Eve. We will be writing all of our programs in this manner, and will encourage others to do the same for the reasons above. That said, there is nothing in the syntax that specifically requires literate programming; you can write your program as a series of code blocks without any prose, and it will be perfectly valid.

    + +

    CommonMark

    + +

    Eve is CommonMark compatible.

    + +

    Examples

    + + + +

    See Also

    + +

    blocks | programming model | CommonMark

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/mac/index.html b/handbook/mac/index.html new file mode 100644 index 0000000..1ccc400 --- /dev/null +++ b/handbook/mac/index.html @@ -0,0 +1,408 @@ + + + + + + + + + + + + Mac - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Installing Eve on Mac

    + +

    First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

    + +
    npm install
    +npm start
    +
    + +

    Then open http://localhost:8080/ in your browser.

    + +

    See also

    + +

    linux | windows | docker | npm | running

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/abs/index.html b/handbook/math/abs/index.html new file mode 100644 index 0000000..79d3fd7 --- /dev/null +++ b/handbook/math/abs/index.html @@ -0,0 +1,428 @@ + + + + + + + + + + + + abs - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    abs

    + +

    The absolute value of a number

    + +

    Syntax

    +
    y = abs[value]
    +
    + +

    Attributes

    + +
      +
    • value - a set of numbers
    • +
    + +

    Description

    + +

    y = abs[value] returns the absolute value of the elements in value. Every positive number is kept positive, but every negative number is made positive.

    + +

    Examples

    + +

    Get the absolute value of a number

    +
    search
    +  y = abs[value: -3]
    +  
    +bind @browser
    +  [#div text: y]
    +
    + +

    Displays the number 3.

    + +

    See Also

    + +

    sign

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/ceil/index.html b/handbook/math/ceil/index.html new file mode 100644 index 0000000..fab4b9b --- /dev/null +++ b/handbook/math/ceil/index.html @@ -0,0 +1,428 @@ + + + + + + + + + + + + ceiling - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    ceiling

    + +

    Round a number up to the nearest integer.

    + +

    Syntax

    +
    y = ceiling[value]
    +
    + +

    Attributes

    + +
      +
    • value - a set of numbers
    • +
    + +

    Description

    + +

    y = ceiling[value] rounds the elements of value up to the nearest integers.

    + +

    Examples

    + +

    Calculate the ceiling of 34.2

    +
    search
    +  y = ceiling[value: 34.2]
    +  
    +bind @browser
    +  [#div text: y]
    +
    + +

    The result is 35.

    + +

    See Also

    + +

    floor | fix | round

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/cos/index.html b/handbook/math/cos/index.html new file mode 100644 index 0000000..209de71 --- /dev/null +++ b/handbook/math/cos/index.html @@ -0,0 +1,432 @@ + + + + + + + + + + + + cos - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    cos

    + +

    Calculate the cosine of an angle

    + +

    Syntax

    +
    y = cos[radians]
    +y = cos[degrees]
    +
    + +

    Attributes

    + +
      +
    • radians - the angle in radians
    • +
    • degrees - the angle in degrees
    • +
    + +

    Description

    + +

    y = cos[degrees] calculates the cosine of an input in degrees.

    + +

    y = cos[radians] calculates the cosine of an input in radians.

    + +

    cos operates element-wise on its inputs.

    + +

    Examples

    + +

    Calculate the cosine of 90 degrees

    +
    search
    +  y = cos[degrees: 90]
    +  
    +bind @browser
    +  [#div text: y]
    +
    + +

    See Also

    + +

    sin | tan

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/fix/index.html b/handbook/math/fix/index.html new file mode 100644 index 0000000..e33f3fc --- /dev/null +++ b/handbook/math/fix/index.html @@ -0,0 +1,440 @@ + + + + + + + + + + + + fix - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    fix

    + +

    Round a number toward zero.

    + +

    Syntax

    +
    y = fix[value]
    +
    + +

    Attributes

    + +
      +
    • value - a set of numbers
    • +
    + +

    Description

    + +

    y = fix[value] rounds the elements of value toward zero. This means that negative numbers will be rounded up to the nearest integer, while positive numbers will be rounded down.

    + +

    Examples

    + +

    Calculate the fix of 34.7 and -34.7

    +
    search
    +  y = fix[value: 34.7]
    +  z = fix[value: -34.7]
    +
    +bind @browser
    +  [#div text: "The fix of 34.7 is {{y}}"]
    +  [#div text: "The fix of -34.7 is {{z}}"]
    +
    + +

    We see that the fix of 34.7 is 34, while the fix of -34.7 is -34. Compare this to rounding the numbers:

    +
    search
    +  y = round[value: 34.7]
    +  z = round[value: -34.7]
    +
    +bind @browser
    +  [#div text: "The round of 34.7 is {{y}}"]
    +  [#div text: "The round of -34.7 is {{z}}"]
    +
    + +

    We see that the round of 34.7 is 35, while the round of -34.7 is -35.

    + +

    See Also

    + +

    floor | ceil | round

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/floor/index.html b/handbook/math/floor/index.html new file mode 100644 index 0000000..9434230 --- /dev/null +++ b/handbook/math/floor/index.html @@ -0,0 +1,428 @@ + + + + + + + + + + + + floor - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    floor

    + +

    Round a number down to the nearest integer.

    + +

    Syntax

    +
    y = floor[value]
    +
    + +

    Attributes

    + +
      +
    • value - a set of numbers
    • +
    + +

    Description

    + +

    y = floor[value] rounds the elements of value down to the nearest integers.

    + +

    Examples

    + +

    Calculate the floor of 34.2

    +
    search
    +  y = floor[value: 34.2]
    +
    +bind @browser
    +  [#div text: y]
    +
    + +

    The result is 34.

    + +

    See Also

    + +

    ceil | fix | round

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/index.html b/handbook/math/index.html new file mode 100644 index 0000000..c20873c --- /dev/null +++ b/handbook/math/index.html @@ -0,0 +1,447 @@ + + + + + + + + + + + + Math - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Math

    + +

    Arithmetic

    + +
      +
    • plus ( + ) - Add two numbers
    • +
    • minus ( - ) - Subtract two numbers
    • +
    • times ( * ) - Multiply two numbers
    • +
    • divide ( / ) - Divide two numbers
    • +
    + +

    General Math

    + +
      +
    • abs - Absolute value
    • +
    • ceiling - Round a number up
    • +
    • floor - Round a number down
    • +
    • round - Round a number
    • +
    • fix - Calculate the fix of a number
    • +
    • mod - Modulo division
    • +
    • exp - The number e raised to a power
    • +
    • log - Calculate the logarithm of a number
    • +
    + +

    Trigonometric Functions

    + +
      +
    • sin - Sine of an angle
    • +
    • cos - Cosine of an angle
    • +
    • tan - Tangent of an angle
    • +
    • asin - Arc sine of an angle
    • +
    • acos - Arc cosine of an angle
    • +
    • atan - Arc tangent of an angle
    • +
    • atan2 - Arc tangent using sign to determine quadrant
    • +
    + +

    Hyperbolic Functions

    + +
      +
    • sinh - Hyperbolic sine of an angle
    • +
    • cosh - Hyperbolic cosine of an angle
    • +
    • tanh - Hyperbolic tangent of an angle
    • +
    • asinh - Hyperbolic arc sine of an angle
    • +
    • acosh - Hyperbolic arc cosine of an angle
    • +
    • atanh - Hyperbolic arc tangent of an angle
    • +
    + +

    Other Functions

    + +
      +
    • range - Generates a range of numbers
    • +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/mod/index.html b/handbook/math/mod/index.html new file mode 100644 index 0000000..ef9b363 --- /dev/null +++ b/handbook/math/mod/index.html @@ -0,0 +1,431 @@ + + + + + + + + + + + + mod - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    mod

    + +

    Return the modulus after division

    + +

    Syntax

    +
    y = mod[value, by]
    +
    + +

    Attributes

    + +
      +
    • value - the number to be divided
    • +
    • by - the number by which to divide value
    • +
    + +

    Description

    + +

    Modulo division calculates the modulus (the remainder) after dividing value by by. If value is a set of size N, then by can either be a scalar or another set of size N.

    + +

    Examples

    + +

    Keeps the value of an angle between the range [π, -π]:

    +
    search
    +  value = 30
    +  angle = mod[value, by: 2 * pi[]]
    +  pi2pi = if angle > pi[] then angle - 2 * pi[]
    +          if angle < pi[] * -1 then angle + 2 * pi[]
    +          else angle
    +        
    +bind @view
    +  [#value | value: "{{value}} -> {{pi2pi}}"]
    +
    + +

    See Also

    + +

    ceil | floor | round

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/range/index.html b/handbook/math/range/index.html new file mode 100644 index 0000000..4324e8c --- /dev/null +++ b/handbook/math/range/index.html @@ -0,0 +1,463 @@ + + + + + + + + + + + + range - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    range

    + +

    Generates a set of numbers between two values

    + +

    Syntax

    +
    y = range[from, to]
    +y = range[from, to, increment]
    +
    + +

    Attributes

    + +
      +
    • from - the start of the range. Does not need to be an integer.
    • +
    • to - the end of the range. Does not need to be an integer.
    • +
    • increment - specifies the increment by which the elements are separated. By default, this value is 1.
    • +
    + +

    Description

    + +

    y = range[from, to] generates a set of numbers starting at from and ending at to, in increments of 1. The range generated includes from and to.

    + +

    y = range[from, to, increment] generates a set of numbers starting at from and ending at to inclusive, at a specified increment. The range generated will start at from and include as many elements as possible until the next element exceeds to. Depending on the chosen increment, this could potentially exclude to from the generated range.

    + +

    Examples

    + +

    Generate and display the integers between 1 and 10. In this example, y = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10):

    +
    search
    +  y = range[from: 1, to: 10]
    +
    +bind @browser
    +  [#div sort: y, text: y]
    +
    + +

    Generate and display the odd integers between 1 and 10. In this example, y = (1, 3, 5, 7, 9). Notice the set does not include 10 in this case.

    +
    search
    +  y = range[from: 1, to: 10, increment: 2]
    +
    +bind @browser
    +  [#div sort: y, text: y]
    +
    + +

    We can use range and Eve’s join semantics to generate indicies for a grid of cells.

    +
    search
    +  i = range[from: 1 to: 5]
    +  j = range[from: 1 to: 5]
    +  coordinate = "({{i}}, {{j}})"
    +
    +bind @browser
    +  [#div sort: coordinate, text: coordinate]
    +
    + +

    Will display:

    + +
    (1, 1)
    +(1, 2)
    +(1, 3)
    +...
    +(5, 4)
    +(5, 5)
    +
    + +

    Example Usage

    + + + +

    See Also

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/round/index.html b/handbook/math/round/index.html new file mode 100644 index 0000000..b65c3cf --- /dev/null +++ b/handbook/math/round/index.html @@ -0,0 +1,431 @@ + + + + + + + + + + + + round - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    round

    + +

    Round a number to the nearest integer

    + +

    Syntax

    +
    y = round[value]
    +
    + +

    Attributes

    + +
      +
    • value - a set of numbers
    • +
    + +

    Description

    + +

    y = round[value] rounds the elements of value toward the nearest integers.

    + +
      +
    • For positive numbers - if the fractional part of the number is greater than or equal to 0.5, then the number is rounded up. Otherwise, it is rounded down.
    • +
    • For negative numbers - if the fractional part of the number is greater than or equal to -0.5, then the number is rounded down to the nearest negative integer. Otherwise, it is rounded up.
    • +
    + +

    Examples

    +
    search
    +  y = round[value: 34.5]
    +  z = round[value: 34.4]
    +  
    +bind @browser
    +  [#div text: "The round of 34.5 is {{y}}"]
    +  [#div text: "The round of 34.4 is {{z}}"]
    +
    + +

    See Also

    + +

    floor | ceil | fix

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/sin/index.html b/handbook/math/sin/index.html new file mode 100644 index 0000000..58cf242 --- /dev/null +++ b/handbook/math/sin/index.html @@ -0,0 +1,432 @@ + + + + + + + + + + + + sin - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    sin

    + +

    Calculate the sine of an angle

    + +

    Syntax

    +
    y = sin[radians]
    +y = sin[degrees]
    +
    + +

    Attributes

    + +
      +
    • radians - the angle in radians
    • +
    • degrees - the angle in degrees
    • +
    + +

    Description

    + +

    y = sin[degrees] calculates the sine of an input in degrees.

    + +

    y = sin[radians] calculates the sine of an input in radians.

    + +

    sin operates element-wise on its inputs.

    + +

    Examples

    +
    search
    +  y = sin[degrees: 90]
    +  x = sin[radians: 3.14 / 2]
    +  
    +bind @browser
    +  [#div text: y]
    +  [#div text: x]
    +
    + +

    See Also

    + +

    cos | tan

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/sum/index.html b/handbook/math/sum/index.html new file mode 100644 index 0000000..955f22c --- /dev/null +++ b/handbook/math/sum/index.html @@ -0,0 +1,446 @@ + + + + + + + + + + + + sum - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    sum

    + +

    Sum the elements in a set

    + +

    Syntax

    +
    y = sum[value, given]
    +y = sum[value, given, per]
    +
    + +

    Arguments

    + +
      +
    • value - the variable or attribute to be summed
    • +
    • given - the record from which the value can be accessed
    • +
    • per - optional - specifies the set over which you are summing
    • +
    + +

    Description

    + +

    y = sum[value, given] returns the sum of elements in a set. The set must be entirely numeric or a runtime-error occurs.

    + +

    Examples

    + +

    Context data:

    +
    commit
    +  [#employee salary: 100, department: "hunting"]
    +  [#employee salary: 200, department: "hunting"]
    +  [#employee salary: 300, department: "gathering"]
    +
    + +

    Get sum of all matching records:

    +
    search
    +  employee = [#employee salary department]
    +  total-salary = sum[value:salary, given: employee]
    +
    +bind @browser
    +  [#div text: "Total: {{ total-salary }}" ]
    +
    + +

    Get sum of matching records grouped by department:

    +
    search
    +  employee = [#employee salary department]
    +  total-salary = sum[value:salary, given: employee, per: department]
    +
    +bind @browser
    +  [#div text: "{{department}} : {{ total-salary }}" ]
    +
    + +

    See Also

    + +

    count | aggregates

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/math/tan/index.html b/handbook/math/tan/index.html new file mode 100644 index 0000000..06de81c --- /dev/null +++ b/handbook/math/tan/index.html @@ -0,0 +1,429 @@ + + + + + + + + + + + + tan - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    tan

    + +

    Calculate the tangent of an angle

    + +

    Syntax

    +
    y = tan[radians]
    +y = tan[degrees]
    +
    + +

    Attributes

    + +
      +
    • radians - the angle in radians
    • +
    • degrees - the angle in degrees
    • +
    + +

    Description

    + +

    y = tan[degrees] calculates the tangent of an input in degrees.

    + +

    y = tan[radians] calculates the tangent of an input in radians.

    + +

    tan operates element-wise on its inputs.

    + +

    Examples

    +
    match
    +  y = tan[degrees: 90]
    +bind @browser
    +  [#div text: y]
    +
    + +

    See Also

    + +

    cos | sin

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/merge/index.html b/handbook/merge/index.html new file mode 100644 index 0000000..53ddc80 --- /dev/null +++ b/handbook/merge/index.html @@ -0,0 +1,420 @@ + + + + + + + + + + + + Merge <- - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Merge Operator

    + +

    Merges one record into another

    + +

    Syntax

    +
    record <- [attribute: value, ... ]
    +
    + +

    Description

    + +

    record <- [attribute: value, ... ] merges the anonymous record [attribute: value, ... ] into the record bound to record. Merge is useful for setting multiple attributes on a record at once.

    + +

    Examples

    + +

    Search for a record and merge another record into it.

    +
    search
    +  celia = [#Celia]
    +
    +bind
    +  celia <- [#student grade: 10, school: "East"]
    +
    + +

    See Also

    + +

    set operator | add operator | remove operator | action phase

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/model/index.html b/handbook/model/index.html new file mode 100644 index 0000000..749421d --- /dev/null +++ b/handbook/model/index.html @@ -0,0 +1,415 @@ + + + + + + + + + + + + Programming Model - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Programming Model

    + +

    At its core, Eve only responds to two commands:

    + +
      +
    1. What facts do you know about this “record”?
    2. +
    3. Remember a new fact about this “record”.
    4. +
    + +

    Communication with Eve happens through “records”, which are key-value pairs attached to a unique ID.

    + +

    Computation occurs as a result of relationships between records. For example, I might model myself as a record with an age and a birth-year. There might also be a record representing the current-year. Then I could compute my age as my birth-year subtracted from the current-year.

    + +

    A key concept here is that age is a derived fact, supported by two other facts: birth-year and current-year. If either of those supporting facts are removed from Eve, then age can no longer be computed. For intuition, think about modeling this calculation in a spreadsheet using three cells.

    + +

    One last thing to note about control flow is that we have no concept of a loop in Eve. Recursion is one way to recover looping, but set semantics and aggregates often removes the need for recursion. In Eve, every value is actually a set. With operators defined over sets (think map()) and aggregation (think reduce()) we can actually do away with most cases where we would be tempted to use a loop.

    + +

    See also

    + +

    blocks | literate programming | sets | records

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/not/index.html b/handbook/not/index.html new file mode 100644 index 0000000..3c030d7 --- /dev/null +++ b/handbook/not/index.html @@ -0,0 +1,420 @@ + + + + + + + + + + + + not - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    not

    + +

    excludes records from the results

    + +

    Syntax

    +
    not([ ... ])
    +
    + +

    Description

    + +

    Not is an anti-join operator, which takes a body of records. For example, we can get a list of people who are not invited to the party:

    +
    // friends not invited to the party
    +search
    +  friends = [#friend]
    +  not(friends = [#invited])
    +
    +bind @view
    +  [#value | value: "{{friends.name}} wasn't invited to the party"]
    +
    + +

    Examples

    + +

    See Also

    + +

    is | records | match

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/npm/index.html b/handbook/npm/index.html new file mode 100644 index 0000000..0329e59 --- /dev/null +++ b/handbook/npm/index.html @@ -0,0 +1,407 @@ + + + + + + + + + + + + npm - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Eve on npm

    + +

    A package for Eve is available on npm. After installing npm for your platform, you can download our package with the following command:

    + +
    npm install -g witheve
    +
    + +

    This will give you a global Eve installation that you can invoke with the command eve from any folder. Doing so will launch an Eve server at http://localhost:8080.

    + +

    See also

    + +

    linux | mac | windows | docker | running

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/programs/index.html b/handbook/programs/index.html new file mode 100644 index 0000000..d208970 --- /dev/null +++ b/handbook/programs/index.html @@ -0,0 +1,402 @@ + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/handbook/records/index.html b/handbook/records/index.html new file mode 100644 index 0000000..e79da57 --- /dev/null +++ b/handbook/records/index.html @@ -0,0 +1,514 @@ + + + + + + + + + + + + Records - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Records

    + +

    Records are attribute: value pairs associated to a unique ID

    + +

    Syntax

    +
    // A record with an attribute
    +[attribute]
    +
    +// A record with an attribute of given value
    +[attribute: value]
    +
    +// A record with N attributes of given values
    +[attribute1: value1, ... , attributeN: valueN]
    +
    +// A record nested within another record
    +[attribute1: [attribute2: value]]
    +
    +// Equates a record and a variable
    +r = [attribute ...]
    +
    +// Accessing an attribute on a record
    +r.attribute
    +
    +// Join two records
    +[attribute1: attribute2]
    +[attribute2]
    +
    + +

    Description

    + +

    Records are the predominant datatype in Eve. Records are used in two ways:

    + +
      +
    1. In a search you supply a pattern of attributes to match records in a supplied database.
    2. +
    3. In a bind or commit, you supply a pattern of attributes to insert into a database.
    4. +
    + +

    [attribute] matches all records with the given attribute.

    + +

    [attribute1 ... attributeN] matches all records with the given attributes.

    + +

    [attribute1: variable1, ... , attributeN: variableN] the expanded form of the above pattern. If the variable assignment is omitted, then the attribute values are assigned to variables equaling their name. If the variable assignment is included, the variables can be used to access their respective attributes instead of the attributes’ names.

    + +

    [attribute: value] matches all records with the given attribute bound to specified value.

    + +

    [attribute > value] matches all records with the given attribute bound filtered on a value. The inequality > can be one of the inequality operators.

    + +

    [attribute1: value1, ... , attributeN: valueN] is the general case for records. This matches all records with all of the given attributes filtered on the given values.

    + +

    [attribute1: [attribute2: value]] nests a record within another record.

    + +

    r = [attribute ...] equates a record to a variable r.

    + +

    r.attribute accesses the value of attribute on variable r.

    + +

    Examples

    + +

    Match all records with a name, and bind a #div for each one.

    +
    search
    +  [name]
    +
    +bind @browser
    +  [#div text: name]
    +
    + +

    Records can have multiple attributes

    +
    search
    +  [#student name grade school]
    +
    +bind @browser
    +  [#div text: "{{name}} is in {{grade}}th grade at {{school}}"]
    +
    + +

    Join records by binding attributes from one record into another record. Equate records with variables. Access record attributes using dot notation.

    +
    search
    +  school = [#school name address]
    +  student = [#student school: name]
    +
    +bind @browser
    +  [#div text: "{{student.name}} attends {{school.name}} at {{address}}"]
    +
    + +

    Records can be nested.

    +
    commit
    +  [name: "Jeremy" spouse: [name: "Wendy"]]
    +
    + +

    Dot notation can be composed for deep access to records

    +
    search
    +  Jeremy = [name: "Jeremy"]
    +
    +bind @browser
    +  [#div text: "{{Jeremy.name}} is married to {{Jeremy.spouse.name}}"]
    +
    + +

    Using dot notation to access record attributes means conditioning the block to have those attributes available. +These two following blocks point to the same results:

    + +

    without dot notation

    +
    search
    +  [#student name grade school]
    +
    +bind @browser
    +  [#div text: "{{name}} is in {{grade}}th grade at {{school}}"]
    +
    + +

    with dot notation

    +
    search
    +  [#student]
    +
    +bind @browser
    +  [#div text: "{{student.name}} is in {{student.grade}}th grade at {{student.school}}"]
    +
    + +

    They get executed only if there’s at least one student with a name, a grade and a school attribute.

    + +

    See Also

    + +

    search | bind | commit | tags | databases | equality | inequality | joins

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/remove/index.html b/handbook/remove/index.html new file mode 100644 index 0000000..bfff80b --- /dev/null +++ b/handbook/remove/index.html @@ -0,0 +1,413 @@ + + + + + + + + + + + + Remove: -= - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/handbook/running/index.html b/handbook/running/index.html new file mode 100644 index 0000000..027feff --- /dev/null +++ b/handbook/running/index.html @@ -0,0 +1,454 @@ + + + + + + + + + + + + Running Eve - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Running Eve

    + +

    If you’ve downloaded and installed Eve via npm, you can launch Eve with the eve command.

    + +
    eve
    +
    + +

    This launches an Eve server running in the Eve root directory at http://localhost:8080. From here, you’ll be directed to quickstart.eve, and have access to the Eve examples directory from within the editor.

    + +

    Running an Eve File

    + +

    If you want to run a specific Eve program, you can provide its path after the eve command:

    + +
    eve ~/myDir/myEveFile.eve
    +
    + +

    Then you navigate to Eve in your browser to access the specified program. If you like, you can also recover the editor with a flag:

    + +
    eve ~/myEveDir/myEveFile.eve --editor
    +
    + +

    This will run the supplied Eve program with the editor visible

    + +

    Running Eve in Server mode

    + +

    Eve can be started in server mode using the --server flag:

    + +
    eve --server
    +
    + +

    Without this flag, execution of Eve programs happens within the browser, with the Eve server acting only as a file server between the browser and your local system. In server mode, Eve will instead execute your program on the server. Currently written programs will operate exactly as before, but this is a preliminary step in order to get networked Eve applications going (like a chat server or a multiplayer game). There is still work needed to be done there

    + +

    Eve Workspaces

    + +

    You can run Eve in a custom workspace. To create a new Eve workspace, create a folder with an empty file named package.json, then start Eve from within this folder. Eve recognizes that it is starting an Eve workspace, and will serve *.eve files from within this directory instead of the Eve examples folder. Furthermore, you can serve various assets, like images or CSS, by placing them in an “assets” sub-folder.

    + +

    Flags

    + +
      +
    • server - run Eve in server execution mode.
    • +
    • editor - run Eve with the editor visible. This defaults to false, except when Eve is started in an Eve project folder.
    • +
    • port - specify the port on which to run the Eve server. Alternatively, the running port can be specified with the PORT environment variable, which takes precedence over the port flag.
    • +
    + +

    Running Eve from Source

    + +

    To run Eve from source, you invoke the following command in the extracted Eve folder:

    + +
    npm start
    +
    + +

    You can apply the above flags to this command, but you’ll need an extra -- to do so. e.g.

    + +
    npm start -- --port 1234
    +
    + +

    See Also

    + +

    linux | mac | windows | docker | npm

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/search/index.html b/handbook/search/index.html new file mode 100644 index 0000000..c520a71 --- /dev/null +++ b/handbook/search/index.html @@ -0,0 +1,429 @@ + + + + + + + + + + + + search - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    search

    + +

    signifies the beginning of the search phase

    + +

    Syntax

    +
    search
    +
    +search @database1, ..., @databaseN
    +
    + +

    Description

    + +

    search signifies the beginning of the search phase of a block. By default, searched records are drawn from a default local database.

    + +

    search @database1, ... @databaseN draws searched records from one or more databases.

    + +

    Examples

    + +

    search a record

    +
    search
    +  [name]
    +  
    +bind
    +  [#div text: name]  
    +
    + +

    Omit the search phase

    +
    bind
    +  [#div text: "Hello, world"]
    +
    + +

    See Also

    + +

    bind | commit | databases | records

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/session/index.html b/handbook/session/index.html new file mode 100644 index 0000000..88b3923 --- /dev/null +++ b/handbook/session/index.html @@ -0,0 +1,396 @@ + + + + + + + + + + + + @session - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    @session

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/set/index.html b/handbook/set/index.html new file mode 100644 index 0000000..bbd4386 --- /dev/null +++ b/handbook/set/index.html @@ -0,0 +1,432 @@ + + + + + + + + + + + + Set: := - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Set Operator

    + +

    Sets the value of an attribute on a record

    + +

    Syntax

    +
    // Set attribute to value
    +record.attribute := value
    +
    +// Remove attribute
    +record.attribute := none
    +
    + +

    Description

    + +

    record.attribute := value sets attribute to value. If record already has an attribute with a value, then this will overwrite it. Otherwise, if record doesn’t have an attribute with this name already, then := will create the attribute and set it to value.

    + +

    attribute can be an attribute already on the record, or it can be a new attribute.

    + +

    value can be a string or number literal, a record, or a variable bound to one of these.

    + +

    record.attribute := none sets the value of attribute to the special value none, which is the empty set (a set with no elements).

    + +

    Examples

    + +

    Set the age of #students that don’t already have an age.

    +
    search
    +  student = [#student]
    +  age = if student.age then student.age
    +        else if student.grade then student.grade + 6
    +        
    +bind
    +  student.age := age
    +
    + +

    See Also

    + +

    add operator | remove operator | merge operator

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/sets/index.html b/handbook/sets/index.html new file mode 100644 index 0000000..1825cc5 --- /dev/null +++ b/handbook/sets/index.html @@ -0,0 +1,435 @@ + + + + + + + + + + + + Sets - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Set Semantics

    + +

    Expressions and actions in Eve work over sets.

    + +

    Description

    + +

    Sets are unordered collections where every element of the collection is unique. For example, ("a", "b", "c") is a set, while ("a", "a", "b", "c") is not. Furthermoer, ("a", "b", "c") and ("c", "b", "a") are equivalent sets, even though the order of elements is different.

    + +

    Examples

    + +
    (1, 2, 3, 4) // Every element is unique           
    +(1, 2, 3, 1) // One is repeated twice, so this is not a set
    +(4, 3, 2, 1) // This set is the same as the first, despite the order of elements
    +("Steve", 1, (1, 2)) // Elements can be nonhomogeneous, as long as each one is unique
    +(("a", 1), ("a", 2), ("a", 3)) // Sets within sets can be used to repeat values
    +
    + +

    Set Example in Eve

    +
    commit
    +  [#point x: 5, y: 4]
    +  [#point x: 3, y: 7]
    +  [#point x: 1, y: 2]
    +
    + +

    We can calculate the distance from each of these points to every other point:

    +
    search
    +  p1 = [#point x: x1, y: y1]
    +  p2 = [#point x: x2, y: y2]
    +  dx = x1 - x2 
    +  dy = y1 - y2
    +  
    +bind @browser
    + [#div sort: x1, text: "({{x1}}, {{y1}}) - ({{x2}}, {{y2}}) = ({{dx}}, {{dy}})"]
    +
    + +

    In imperative languages, you would need a nested loop to cover all of the combinations. In Eve, functions (and infix operators like +, which are just sugar for a function) operate over sets, so this loop is implicitly handled by Eve.

    + +

    See Also

    + +

    programming model | functions | aggregates | cartesian product

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/standard-library/index.html b/handbook/standard-library/index.html new file mode 100644 index 0000000..6eb1b6a --- /dev/null +++ b/handbook/standard-library/index.html @@ -0,0 +1,408 @@ + + + + + + + + + + + + Standard Library - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Standard Library

    + +

    The Eve standard library of functions is globally available, meaning you don’t have to reference a specific database to use these functions.

    + +

    Description

    + +
      +
    • general - General functions
    • +
    • math - General mathematical and trigonometric functions
    • +
    • strings - Functions that manipulate strings
    • +
    • statistics - Functions that calculate statistical measures on values
    • +
    • date & time - Functions that get and manipulate date and time
    • +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/statistics/count/index.html b/handbook/statistics/count/index.html new file mode 100644 index 0000000..06b5c58 --- /dev/null +++ b/handbook/statistics/count/index.html @@ -0,0 +1,499 @@ + + + + + + + + + + + + count - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    count

    + +

    Returns the number of elements in a set

    + +

    Syntax

    +
    // Counts the elements in given
    +y = count[given]
    +
    +// Counts the elements established by the set (var1, ... , varN)
    +y = count[given: (var1, ... , varN)]
    +
    +// Group given by the values in per, and count each group
    +y = count[given, per]
    +
    + +

    Attributes

    + +
      +
    • given - establishes the set to count over.
    • +
    • per - optional - one or more attributes by which to group given.
    • +
    + +

    Description

    + +

    y = count[given] counts the number of elements in given.

    + +

    y = count[given: ()] counts the number of elements in given.

    + +

    y = count[given, per] counts the number of elements in given, grouped by the attribute(s) provided in per. For instance, class-size = count[given: students, per: grade] would count the number of students in each grade. You can group along multiple axes; the previous example could be extended to work across multiple schools by doing class-size = count[given: students, per: (grade, school)]. See the examples section to see these in action.

    + +

    Counting Zero

    + +

    Eve’s semantics prevent count from ever returning 0; For count[] to run, a search must match at least one record. If a search doesn’t match any records, then the entire block will not execute. In order to actually get a 0 result, you have to condition the count with an if expression:

    +
    search
    +    total-items = if c = count[given: [#item]] then c
    +                else 0
    +bind @view
    +    [#value | value: "total items: {{total-items}}"]
    +
    + +

    This block searches for [#item] records. If any are found, then count[] is able to proceed. If none are found, then the if expression allows the block to execute nonetheless, so the total items is correctly reported as 0.

    + +

    Examples

    + +

    Before we get to the count[] examples, let’s add some students. Each #student has a grade and a school. Grades are one of 10, 11, or 12. Schools are one of “West” and “East”.

    +
    commit
    +  [#student name: "Diedra" grade: 10 school: "West"]
    +  [#student name: "Celia" grade: 10 school: "West"]
    +  [#student name: "Michaela" grade: 11 school: "West"]
    +  [#student name: "Jermaine" grade: 11 school: "West"]
    +  [#student name: "Issac" grade: 12 school: "West"]
    +  [#student name: "Jamar" grade: 12 school: "West"]
    +  [#student name: "Yee" grade: 10 school: "East"]
    +  [#student name: "Johanne" grade: 10 school: "East"]
    +  [#student name: "Mertie" grade: 10 school: "East"]
    +  [#student name: "Elmira" grade: 11 school: "East"]
    +
    + +

    First let’s count the total number of students in the school district.

    +
    search
    +  students = [#student]
    +  enrollment = count[given: students]
    +
    +bind @view
    +  [#value | value: "There are {{enrollment}} students in the district"]
    +
    + +

    Now let’s count the number of students in each school.

    +
    search
    +  students = [#student school]
    +  school-enrollment = count[given: students, per: school]
    +
    +bind @view
    +  [#value | value: "{{school-enrollment}} attend {{school}}"]
    +
    + +

    We could have similarly counted the number of students in each grade across the district.

    +
    search
    +  students = [#student grade]
    +  grade-enrollment = count[given: students, per: grade]
    +
    +bind @view
    +  [#value | value: "{{grade-enrollment}} students are in {{grade}}th grade"]
    +
    + +

    Finally, we can count the number of students per grade, per school.

    +
    search
    +  students = [#student grade school]
    +  grade-school-enrollment = count[given: students, per: (grade, school)]
    +
    +bind @view
    +  [#value | value: "{{grade-school-enrollment}} students are in {{grade}}th grade at {{school}}"]
    +
    + +

    Example Usage

    + + + +

    See Also

    + +

    sum | aggregates

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/statistics/index.html b/handbook/statistics/index.html new file mode 100644 index 0000000..e814ae1 --- /dev/null +++ b/handbook/statistics/index.html @@ -0,0 +1,406 @@ + + + + + + + + + + + + Statistics - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Statistics

    + +
      +
    • count - counts the number of elements in a set
    • +
    + +

    Random Functions

    + +
      +
    • random - Generates a random number between 0 and 1
    • +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/statistics/random/index.html b/handbook/statistics/random/index.html new file mode 100644 index 0000000..58baf5a --- /dev/null +++ b/handbook/statistics/random/index.html @@ -0,0 +1,453 @@ + + + + + + + + + + + + random - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    random

    + +

    generates a random number between 0 and 1

    + +

    Syntax

    +
    y = random[seed]
    +
    + +

    Attributes

    + +
      +
    • seed - initializes the random number generator. The seed itself does not need to be random.
    • +
    + +

    Description

    + +

    y = random[seed] generates a pseudorandom number drawn from the standard uniform distribution, meaning the generated number is restricted to be between 0 and 1. To generate a number between a custom range, see the examples. +random requires a seed as an argument because there is no such thing as a truely random number generator. Instead, “random number generators” are equations that produce results (based on original numbers) that are unpredicatble to humans, but repeatable. For instance, 7 * i % 11 is a simple pseudorandom number generator: the numbers it produces seem to have no relation at all with i itself. Therefore it is functionally random to humans, but with the same value for i, the same output is produced. In this example, i is the seed. A good value to use as a seed is the time in milliseconds, since it is always changing, insuring that you will almost never get the same seed twice (this does not mean you will always get a different number, however).

    + +

    Examples

    + +

    Prints a random number every second. The time attribute in #div is used to make each generated number unique for display purposes.

    +
    search 
    +  [#time minutes seconds]
    +  x = random[seed: seconds]
    +
    +commit @browser
    +  [#div time: "{{minutes}}{{seconds}}"  text: x]
    +
    + +

    Generate a random number between min and max

    +
    search
    +  min = 5
    +  max = 10
    +  x = random[seed: 1] * (max - min) + min
    +
    +bind @browser
    +  [#div text: x]
    +
    + +

    Generate 10 random numbers

    +
    search
    +  i = range[from: 1, to: 10]
    +  x = random[seed: i]
    +
    +bind @browser
    +  [#div text: x]
    +
    + +

    Example Usage

    + + + +

    See Also

    + +

    [gaussian][../gaussian]

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/string-interpolation/index.html b/handbook/string-interpolation/index.html new file mode 100644 index 0000000..1389cde --- /dev/null +++ b/handbook/string-interpolation/index.html @@ -0,0 +1,433 @@ + + + + + + + + + + + + String Interpolation - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    String Interpolation

    + +

    injects the value of an attribute or variable into a string

    + +

    Syntax

    +
    "{{ variable }}"
    +
    + +

    Description

    + +

    "{{ variable }}" embeds the value of variable within a string. Variable should be an attribute on a record or the result of an expression.

    + +

    String interpolation works element-wise on its input. This means the string will be repeated for every unique value in variable.

    + +

    Multiple variables can be interpolated into strings. If the variables have no relation to each other (i.e. they are not joined or part of the same record), then string interpolation is applied to the cartesian product of the sets.

    + +

    Examples

    + +

    Display student name, grade and school:

    +
    search
    +  [#student name grade school]
    +
    +bind @browser
    +  [#div text: "{{name}} is a {{grade}}th grade student at {{school}}."]
    +
    + +

    Use string interpolation to display pairs of numbers:

    +
    search 
    +  i = range[from: 1, to: 10]
    +  j = range[from: 1, to: 10]
    +
    +bind @browser
    +  [#div text: "({{ i }}, {{ j }})"]
    +
    + +

    See Also

    + +

    strings | expressions

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/strings/convert/index.html b/handbook/strings/convert/index.html new file mode 100644 index 0000000..301cdc3 --- /dev/null +++ b/handbook/strings/convert/index.html @@ -0,0 +1,438 @@ + + + + + + + + + + + + convert - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    convert

    + +

    converts a number into a string or vice versa.

    + +

    Syntax

    +
    converted = convert[value, to]
    +
    + +

    Attributes

    + +
      +
    • converted - the resulting converted value
    • +
    • value - the value to be converted
    • +
    • to - a string that specifies the target value type, either “number” or “string”
    • +
    + +

    Description

    + +

    converted = convert[value, to] converts value from a number to a string if to is set to "string", or if to is set to "number" converts value from a string to a number.

    + +

    Examples

    + +

    Convert a string to a number, multiplies it

    +
    search
    +  x = convert[value: "1", to: "number"]
    +  y = x * 2
    +  
    +bind @browser
    +  [#div text: y]
    +
    + +

    Convert a number to a string, gets its length

    +
    search
    +  str = convert[value: "42", to: "number"]
    +  c = length[str]
    +  
    +bind @browser
    +  [#div text: c]
    +
    + +

    See Also

    + +

    concat | join | char-at | substring | length | replace | split

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/strings/find/index.html b/handbook/strings/find/index.html new file mode 100644 index 0000000..a8a51bd --- /dev/null +++ b/handbook/strings/find/index.html @@ -0,0 +1,449 @@ + + + + + + + + + + + + find - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    find

    + +

    finds a string within a larger string (optinally case-sensitive), starting from the starting index (which defaults to 1).

    + +

    Syntax

    +
    (string-position, result-index) = find[text, subtext, case-sensitive, from]
    +
    + +

    Attributes

    + +
      +
    • text - the larger text to be searched within
    • +
    • subtext - the string to find in text
    • +
    • case-sensitive - the recovered tokens after the split
    • +
    • string-position - the positions of the occurences of subtext in the original text
    • +
    • result-index - the index of this occurence in all occurences of subtext in text
    • +
    + +

    Description

    + +

    (string-position, result-index) = find[text, subtext, case-sensitive, from] finds all the occurences of subtext in text, by default case-insensitively. For each match, it returns the position in the string (index starting at one) and the number of the match (for instance, the first match is one, the second match is two). If from is specified, it starts the search at that index, inclusively.

    + +

    Examples

    + +

    Find all occurences of the string “hello” in str (case-insensitive, starting at the first index)

    +
    search
    +  str = "ahellobhellochello"
    +  (a, b) = find[text: str, subtext: "hello"]
    +
    +bind @browser
    +  [#div text: "{{a}}, {{b}}"]
    +
    + +

    Find all occurences of a capital ‘X’ in a string

    +
    search
    +  str = "xxxXxxXxXXX"
    +  (a, b) = find[text: str, subtext: "X", case-sensitive: true]
    +
    +bind @browser
    +  [#div text: "{{a}}, {{b}}"]
    +
    + +

    Find occurences of ‘X’ after the first one

    +
    search
    +  str = "xxxXxxXxXXX"
    +  (a, b) = find[text: str, subtext: "X", case-sensitive: true, from: 5]
    +
    +bind @browser
    +  [#div text: "{{a}}, {{b}}"]
    +
    + +

    See Also

    + +

    concat | join | char-at | substring | length | replace | split

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/strings/index.html b/handbook/strings/index.html new file mode 100644 index 0000000..5910289 --- /dev/null +++ b/handbook/strings/index.html @@ -0,0 +1,405 @@ + + + + + + + + + + + + Strings - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Strings

    + +
      +
    • split - split a string into tokens
    • +
    • join - join tokens into a string
    • +
    • length - return the length of a string
    • +
    • substring - return a substring of another string
    • +
    • find - return a substring of another string
    • +
    • convert - return a substring of another string
    • +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/strings/join/index.html b/handbook/strings/join/index.html new file mode 100644 index 0000000..219f60d --- /dev/null +++ b/handbook/strings/join/index.html @@ -0,0 +1,469 @@ + + + + + + + + + + + + join - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    join

    + +

    Joins a set of tokens into one or more contiguous strings

    + +

    Syntax

    +
    // join tokens into a string
    +text = join[token, given, index, with]
    +
    +// group tokens before joining
    +text = join[token, given, index, with, per]
    +
    + +

    Attributes

    + +
      +
    • token - set of strings to be joined
    • +
    • given - establishes the set being joined. If tokens are not unique, you can add attributes here that will make them unique. Must at least provide token as part of the given set, or only the first one will be returned.
    • +
    • index - indicates where each token is ordered in text.
    • +
    • with - inserted between every element in token.
    • +
    • per - optional - one or more attributes by which to group token.
    • +
    + +

    Description

    + +

    text = join[token, given, index, with] joins elements of token in an order specified by index, inserting with between each token. Returns the joined string.

    + +

    text = join[token, given, index, with, per] groups token according to the values of per before joining.

    + +

    Examples

    + +

    Split a sentence into tokens, and join the tokens into a sentence again

    +
    search
    +  // Split the sentence into words
    +  (token, index) = split[text: "the quick brown fox", by: " "]
    +
    +  // Join the words back into a sentence, but with hyphens instead of spaces
    +  text = join[token given: token, index with: "-"]
    +
    +bind @view
    +  [#value | value: text] // Expected "the-quick-brown-fox"
    +
    + +
    + +

    Since join is an aggregate, set semantics play an important part here; if we don’t specify what makes each token unique, then the results can be surprising. The following example will demonstrate this.

    + +

    Let’s split the phrase “hello world” into letters:

    +
    search
    +  //token = (h, e, l, l, o, w, o, r, l, d)
    +  (token, index) = split[text: "hello world", by: ""]
    +
    +bind
    +  [#phrase token index]
    +
    +bind @view
    +  [#value | value: token]
    +
    + +

    Let’s join this phrase back together. Like last time, we’ll join with a -. Notice that some tokens (“l” and “o”) should appear multiple times in the phrase. To correctly join them, we add index as part of the given set:

    +
    search
    +  [#phrase token index]
    +  // given = (("h", 1), ("e", 2), ("l", 3), ("l", 4) ... ("l", 10), ("d", 11)) 
    +  // without including index, the result is "h-e-l-o- -w-r-d". Try it and see!
    +  text = join[token given: (token, index) index with: "-"]
    +
    +bind @view
    +  [#value | value: text]
    +
    + +

    The result expected result is “h-e-l-l-o- -w-o-r-l-d”.

    + +

    See Also

    + +

    split

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/strings/length/index.html b/handbook/strings/length/index.html new file mode 100644 index 0000000..6eea6cd --- /dev/null +++ b/handbook/strings/length/index.html @@ -0,0 +1,452 @@ + + + + + + + + + + + + length - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    length

    + +

    Returns the length of a string

    + +

    Syntax

    +
    len = length[text]
    +len = length[text, as]
    +
    + +

    Attributes

    + +
      +
    • text - set of strings to be joined
    • +
    • as optional - sets the method by which to count characters. Can be one of + +
        +
      • “symbols” (default) - counts the visible symbols in the string. Characters that span multiple bytes (such as Unicode characters) are counted as a single symbol.
      • +
      • “code-points” - counts the characters as code-points
      • +
      • “bytes” (not yet implemented) - counts the characters as bytes
      • +
    • +
    + +

    Description

    + +

    len = length[text] returns the number of symbols in a string.

    + +

    len = length[text, as] returns the number of characters in a string, determined by as.

    + +

    Examples

    + +

    Count the number of characters in a string. We expect a len of 5:

    +
    search
    +  len = length[text: "Hello"]
    +
    +bind @view
    +  [#value | value: len]
    +
    + +

    This time, let’s throw a Unicode snowman in the mix. In symbols, this is counted as a single character. We expect a len of 9 here:

    +
    search
    +  len = length[text: "Poodle: 🐩", as "symbols"]
    +
    +bind @view
    +  [#value | value: len]
    +
    + +

    But when we count code-points, the poodle is counted as 2. We expect a len of 10 here:

    +
    search
    +  len = length[text: "Poodle: 🐩", as: "code-points"]
    +
    +bind @view
    +  [#value | value: len]
    +
    + +

    See Also

    + +

    split | split

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/strings/split/index.html b/handbook/strings/split/index.html new file mode 100644 index 0000000..06ac367 --- /dev/null +++ b/handbook/strings/split/index.html @@ -0,0 +1,437 @@ + + + + + + + + + + + + split - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    split

    + +

    splits a string at the given delimiter

    + +

    Syntax

    +
    (token, index) = split[text, by]
    +
    + +

    Attributes

    + +
      +
    • text - the text to be split
    • +
    • by - the delimiter at which to split the text. An empty string will split the text at every character.
    • +
    • token - the recovered tokens after the split
    • +
    • index - the indices of the tokens in the original text
    • +
    + +

    Description

    + +

    (token, index) = split[text, by] splits a text into tokens according to the given delimiter, by. Returns token and index of those tokens in the original string.

    + +

    Examples

    + +

    Splits a string at every character

    +
    search
    +  (token, index) = split[text: "hello, world", by: ""]
    +  
    +bind @browser
    +  [#div text: "{{token}} {{index}}"]
    +
    + +

    Split a sentence into words and display them in order

    +
    search
    +  (token, index) = split[text: "the quick brown fox", by: " "]
    +  
    +bind @browser
    +  [#div sort: index, text: token]
    +
    + +

    See Also

    + +

    concat | join | char-at | find | length | replace

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/strings/substring/index.html b/handbook/strings/substring/index.html new file mode 100644 index 0000000..4f55610 --- /dev/null +++ b/handbook/strings/substring/index.html @@ -0,0 +1,430 @@ + + + + + + + + + + + + substring - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    substring

    + +

    gets the substring of the provided string starting at the specified index (or 1 if not specified) and ending at the other specified index (required).

    + +

    Syntax

    +
    substr = substring[text, from, to]
    +
    + +

    Attributes

    + +
      +
    • text - the text to substring
    • +
    • to - the maximum index of the substring, inclusive.
    • +
    • from - the starting index of the substring, starting at one, inclusive
    • +
    • substr - the final substring
    • +
    + +

    Description

    + +

    substr = substring[text, from, to] gets a substring of text stretching from from to to, inclusively on both sides: [from, to]. +Note: String indexing starts at one. If you are an experienced programmer, this might trip you up.

    + +

    Examples

    + +

    Extracts the word “hello” from the string

    +
    search
    +  greeting = substring[text: "ahellob", from: 2, to: 6]
    +
    +bind @browser
    +  [#div text: greeting]
    +
    + +

    See Also

    + +

    concat | join | char-at | find | length | replace | split

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/strings/urlencode/index.html b/handbook/strings/urlencode/index.html new file mode 100644 index 0000000..c2d3b8f --- /dev/null +++ b/handbook/strings/urlencode/index.html @@ -0,0 +1,427 @@ + + + + + + + + + + + + urlencode - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    urlencode

    + +

    the urlencoded, websafe, version of a string.

    + +

    Syntax

    +
    safe = urlencode[text]
    +
    + +

    Attributes

    + +
      +
    • text - the string to be encoded
    • +
    • safe - a url-safe, encoded string
    • +
    + +

    Description

    + +

    safe = urlencode[text] converts text into a url-safe string (e.g. replacing a space with %20), returning it to safe.

    + +

    Examples

    + +

    Urlencodes a mathematical expression

    +
    search
    +  z = urlencode[text: "x * 2"]
    +  
    +bind @browser
    +  [#div text: z]
    +
    + +

    See Also

    + +

    concat | join | char-at | substring | length | replace | split

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/tags/index.html b/handbook/tags/index.html new file mode 100644 index 0000000..312730f --- /dev/null +++ b/handbook/tags/index.html @@ -0,0 +1,453 @@ + + + + + + + + + + + + Tags - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Tag Selector

    + +

    The tag selector is a shortcut for the tag attribute on records

    + +

    Syntax

    +
    #tag
    +
    +#"tag with spaces"
    +
    + +

    Description

    + +

    The tag selector # is a shortcut for the tag attribute, e.g. [#person] is a shortcut for [tag: "person"].

    + +

    The tag selector is useful for selecting a group of similar records.

    + +

    Tags are useful for making a record unique. For instance, in a single database, many disparate records might have an age attribute. e.g. [age] might select unrelated records if you’re only interested in ages of employees. A more specific record would be [#employee age], which would match only records that are both tagged “employee” and have an age attribute.

    + +

    Multiple tags can be used to further specify a record. For instance:

    +
    [#employee wage]
    +[#employee #part-time wage]
    +
    + +

    The first record matches all #employees, while the second matches only those who are also #part-time. Any number of tags can be used in this way.

    + +

    Tips

    + +

    Tags are useful for creating switches. Add a tag to a record to include it in a set. Then, when you don’t want that record in the set anymore, just remove the tag. The record will no longer match the set.

    + +

    Examples

    + +

    Search for students and display their names and the grade they’re in.

    +
    search
    +  [#student name grade]
    +
    +bind @browser
    +  [#div text: "{{name}} is in {{grade}}th grade."]
    +
    + +

    Add students with good marks to the honor roll. When a student’s GPA falls below 3.5, he or she will not make the honor roll because this block will not add the #honor-roll tag.

    +
    search
    +  students = [#student gpa >= 3.5]
    +
    +bind
    +  students += #honor-roll
    +
    + +

    Display the honor roll

    +
    search
    +  [#student #honor-roll name]
    +
    +bind @browser
    +  [#div text: "{{name}} is a smarty pants"]
    +
    + +

    See Also

    + +

    records | search | sets

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/update-operators/index.html b/handbook/update-operators/index.html new file mode 100644 index 0000000..eba601b --- /dev/null +++ b/handbook/update-operators/index.html @@ -0,0 +1,420 @@ + + + + + + + + + + + + Update Operators - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Update Operators

    + +

    Update operates are used to modify records

    + +

    Syntax

    +
    // Add operator
    +record.attribute += value
    +
    +// Remove operator
    +record.attribute -= value
    +
    +// Set operator
    +record.attribute := value
    +
    +// Merge operator
    +record <- [ ... ]
    +
    + +

    Description

    + +

    Examples

    + +

    See Also

    + +

    add | remove | set | merge | bind | commit

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/view/index.html b/handbook/view/index.html new file mode 100644 index 0000000..8141446 --- /dev/null +++ b/handbook/view/index.html @@ -0,0 +1,396 @@ + + + + + + + + + + + + @view - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    @view

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/handbook/windows/index.html b/handbook/windows/index.html new file mode 100644 index 0000000..1763648 --- /dev/null +++ b/handbook/windows/index.html @@ -0,0 +1,408 @@ + + + + + + + + + + + + Windows - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Installing Eve on Windows

    + +

    First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

    + +
    npm install
    +npm start
    +
    + +

    Then open http://localhost:8080/ in your browser.

    + +

    See also

    + +

    linux | mac | docker | npm | running

    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/index.html b/index.html index 571a3ce..12a7371 100644 --- a/index.html +++ b/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -114,20 +114,20 @@

    EVE

  • - + Library diff --git a/index.xml b/index.xml index 2886d9e..fc67067 100644 --- a/index.xml +++ b/index.xml @@ -2,18 +2,18 @@ Eve Documentation - http://cmontella.github.io/docs/index.xml + https://cmontella.github.io/docs/index.xml Recent content on Eve Documentation Hugo -- gohugo.io en-us - + Installation - http://cmontella.github.io/docs/install/ + https://cmontella.github.io/docs/install/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/install/ + https://cmontella.github.io/docs/install/ <h1 id="installation">Installation</h1> @@ -46,10 +46,10 @@ npm install Quickstart - http://cmontella.github.io/docs/tutorials/quickstart.eve/ + https://cmontella.github.io/docs/tutorials/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/tutorials/quickstart.eve/ + https://cmontella.github.io/docs/tutorials/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> @@ -146,10 +146,10 @@ npm install Quickstart - http://cmontella.github.io/docs/quickstart.eve/ + https://cmontella.github.io/docs/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/quickstart.eve/ + https://cmontella.github.io/docs/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> @@ -246,10 +246,10 @@ npm install Index - http://cmontella.github.io/docs/ + https://cmontella.github.io/docs/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/ + https://cmontella.github.io/docs/ <h2 id="install-guide">Install guide</h2> @@ -290,10 +290,10 @@ npm install Syntax Ref - http://cmontella.github.io/docs/syntaxreference/ + https://cmontella.github.io/docs/syntaxreference/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/syntaxreference/ + https://cmontella.github.io/docs/syntaxreference/ <p><link rel="stylesheet" type="text/css" href="style.css"></p> @@ -550,10 +550,10 @@ chris := none</code></td> - http://cmontella.github.io/docs/README/ + https://cmontella.github.io/docs/README/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/README/ + https://cmontella.github.io/docs/README/ <p align="center"> @@ -578,46 +578,46 @@ chris := none</code></td> - http://cmontella.github.io/docs/guides/ + https://cmontella.github.io/docs/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/guides/ + https://cmontella.github.io/docs/guides/ - http://cmontella.github.io/docs/handbook/core/ + https://cmontella.github.io/docs/handbook/core/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/handbook/core/ + https://cmontella.github.io/docs/handbook/core/ - http://cmontella.github.io/docs/handbook/ + https://cmontella.github.io/docs/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/handbook/ + https://cmontella.github.io/docs/handbook/ - http://cmontella.github.io/docs/tutorials/ + https://cmontella.github.io/docs/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/tutorials/ + https://cmontella.github.io/docs/tutorials/ Standard Library - http://cmontella.github.io/docs/handbook/libraries/ + https://cmontella.github.io/docs/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/handbook/libraries/ + https://cmontella.github.io/docs/handbook/libraries/ <p><head> diff --git a/install/index.html b/install/index.html index db86ab8..3c38b86 100644 --- a/install/index.html +++ b/install/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/quickstart.eve/index.html b/quickstart.eve/index.html index ee8835d..e39f941 100644 --- a/quickstart.eve/index.html +++ b/quickstart.eve/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/sitemap.xml b/sitemap.xml index c35efaa..cd2d8c7 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,66 +2,66 @@ - http://cmontella.github.io/docs/install/ + https://cmontella.github.io/docs/install/ - http://cmontella.github.io/docs/tutorials/quickstart.eve/ + https://cmontella.github.io/docs/tutorials/quickstart.eve/ - http://cmontella.github.io/docs/quickstart.eve/ + https://cmontella.github.io/docs/quickstart.eve/ - http://cmontella.github.io/docs/ + https://cmontella.github.io/docs/ - http://cmontella.github.io/docs/syntaxreference/ + https://cmontella.github.io/docs/syntaxreference/ - http://cmontella.github.io/docs/README/ + https://cmontella.github.io/docs/README/ - http://cmontella.github.io/docs/guides/ + https://cmontella.github.io/docs/guides/ - http://cmontella.github.io/docs/handbook/core/ + https://cmontella.github.io/docs/handbook/core/ - http://cmontella.github.io/docs/handbook/ + https://cmontella.github.io/docs/handbook/ - http://cmontella.github.io/docs/tutorials/ + https://cmontella.github.io/docs/tutorials/ - http://cmontella.github.io/docs/ + https://cmontella.github.io/docs/ 0 - http://cmontella.github.io/docs/guides/ + https://cmontella.github.io/docs/guides/ 0 - http://cmontella.github.io/docs/handbook/ + https://cmontella.github.io/docs/handbook/ 0 - http://cmontella.github.io/docs/handbook/libraries/ + https://cmontella.github.io/docs/handbook/libraries/ - http://cmontella.github.io/docs/tutorials/ + https://cmontella.github.io/docs/tutorials/ 0 diff --git a/syntaxreference/index.html b/syntaxreference/index.html index 1aee6d7..8a67ad6 100644 --- a/syntaxreference/index.html +++ b/syntaxreference/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/tutorials/index.html b/tutorials/index.html index 2dd1cce..b9eb66a 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,13 +150,13 @@

    EVE

    Pages in Tutorial

    - +


    - +

    Quickstart

    diff --git a/tutorials/index.xml b/tutorials/index.xml index bbfd354..8de1ec3 100644 --- a/tutorials/index.xml +++ b/tutorials/index.xml @@ -2,27 +2,27 @@ Tutorials on Eve Documentation - http://cmontella.github.io/docs/tutorials/index.xml + https://cmontella.github.io/docs/tutorials/index.xml Recent content in Tutorials on Eve Documentation Hugo -- gohugo.io en-us - + - http://cmontella.github.io/docs/tutorials/ + https://cmontella.github.io/docs/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/tutorials/ + https://cmontella.github.io/docs/tutorials/ Quickstart - http://cmontella.github.io/docs/tutorials/quickstart.eve/ + https://cmontella.github.io/docs/tutorials/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - http://cmontella.github.io/docs/tutorials/quickstart.eve/ + https://cmontella.github.io/docs/tutorials/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> diff --git a/tutorials/quickstart.eve/index.html b/tutorials/quickstart.eve/index.html index 856fb55..5899523 100644 --- a/tutorials/quickstart.eve/index.html +++ b/tutorials/quickstart.eve/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/tutorials/quickstart/index.html b/tutorials/quickstart/index.html new file mode 100644 index 0000000..e4f2956 --- /dev/null +++ b/tutorials/quickstart/index.html @@ -0,0 +1,620 @@ + + + + + + + + + + + + Quickstart - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + +

    Eve Quick Start Tutorial

    +
    ```
    +bind @browser
    +  [tag: "div", text: "Hello, world"]
    +```
    +
    + +

    Hello world! At its core, Eve is a pattern matching language. You match patterns of data by searching a database, then update or create new data according to what you’ve found. In this example, we created a record that has two attributes: a tag attribute with the value "div", and a text attribute with the value "Hello, world". We bound this record to the browser, which is how we displayed our venerable message.

    + +

    The three backticks ``` are called a code fence, and they allow us to denote blocks of code. This gives us the ability to embed Eve code in normal documents written in Markdown. This is how Eve programs are written: everything in a code fence is a block of Eve code, while everything outside is prose describing the program. In fact, this quick start tutorial is an example of an executable Eve program! In the subsequent blocks, you won’t see any code fences, but they still exist in the document’s source.

    + +

    So far we’ve created a record that displays “Hello, world!” but as I said, Eve is a pattern matching language. Let’s explore that by searching for something:

    +
    search
    +  [name]
    +
    +bind @browser
    +  [tag: "div", text: "Hello, world"]
    +
    + +

    Our message disappeared! Before, we bound without searching, so the message displayed by default. Now we’re binding in the presence of a search action, so the bound record only exists if all the searched records are matched. Here, we’re searching for all records with a name attribute, but we haven’t added any records like that to Eve so none are matched. With no matching records, the bind cannot execute, and the message disappears from the screen.

    + +

    This is the flow of an Eve block: you search for records in a database, and if all the records you searched for are matched, you can modify the matched records or create new ones. If any part of your search is not matched, then no records will be created or updated.

    + +

    To get our message back, all we need is a record with a name attribute. We can create one permanently with the commit action:

    +
    commit
    +  [name: "Celia"]
    +
    + +

    Hello, world… again! Commit permanently updates or creates a record that will persist even if its matched records (the records matched in a search action) change. Since we aren’t searching for anything in this block, the commit executes by default and adds a record with a name attribute of "Celia". The addition of this new record satisfies the search in the previous block, so “Hello, world!” appears on the screen again.

    + +

    But what else can you do with matched records? For starters, we can use them to create new records:

    +
    search
    +  [name]
    +
    +bind @browser
    +  [#div text: "Hello, {{name}}"]
    +
    + +

    Since we matched on a record with a name attribute, we now have a reference to that name, and we can inject it into a string using {{ ... }} embedding. We can also swap out tag: "div" for the sugared #div. Tags are used a lot in Eve to talk about collections of related records. For example, we could search for all records with a #student tag, with name, grade, and school attributes.

    +
    search
    +  [#student name grade school]
    +
    +bind @browser
    +  [#div text: "{{name}} is a {{grade}}th grade student at {{school}}."]
    +
    + +

    Since we’re matching on more attributes, this block is no longer satisfied by the record we added earlier; we’re missing a #student tag, as well as grade and school attributes. Even though these are currently missing, we can still write the code that would display them.

    + +

    Let’s display this new message by adding the missing attributes to Celia. We could add them to the block where we comitted Celia originally, but we can also do it programatically:

    +
    search
    +  celia = [name: Celia]
    +
    +bind
    +  celia <- [#student grade: 10, school: "East", age: 16]
    +
    + +

    You can define variables within blocks, which act as handles on records that allow you to change them. In this case, we’re using the merge operator <- to combine two records. With the addition of this block, the sentence “Celia is a 10th grade student at East.” appears in the browser.

    + +

    Celia is cool and all, but let’s add some more students to our database:

    +
    commit
    +  [#student name: Diedra, grade: 12, school: "West"]
    +  [#student name: Michelle, grade: 11, school: "West"]
    +  [#student name: Jermaine, grade: 9]
    +
    + +

    Three sentences are now printed, one for each student that matches the search. Eve works on sets, so when we search for [#student name grade school], we find all records that match the given pattern. This includes Celia, Diedra and Michelle (but not Jermaine, as he has no school in his record). Therefore, when we bind the record [#div text: "{{name}} is a ... "], we are actually binding three records, one for each matching #student.

    + +

    If you re-compile the program a couple times, you’ll see the order of sentences may change. This is because there is no ordering in Eve - blocks are not ordered, statements are not ordered, and results are not ordered. If you want to order elements, you must impose an ordering yourself. We can ask the browser to draw elements in an order with the “sort” attribute:

    +
    search
    +  [#student name grade school]
    +
    +bind @browser
    +  [#div sort: name, text: "{{name}} is a {{grade}}th grade student at {{school}}."]
    +
    + +

    This time when you recompile your program, the order will stay fixed, sorted alphabetically by name.

    + +

    Let’s make things a little more interesting by adding some records about the schools the students attend:

    +
    commit
    +  [#school name: West, address: "1234 Main Street"]
    +  [#school name: East, address: "5678 Broad Street"]
    +
    + +

    What if we want to display the address of the school each student attends? Although #students and #schools are in different records, we can relate two records by associating attributes from one record with attributes from the other. This is an operation known as joining. In this case, we want to relate the name attribute on #schools with the school attribute on #students. This compares the values of the attributes between records, and matches up those with the same value. For instance, since Celia’s school is “East”, she can join with the #school named “East”.

    + +

    Our first attempt may come out looking a little something like this:

    +
    search
    +  school = [#school name address]
    +  student = [#student name school: name] 
    +
    +bind @browser
    +  [#div text: "{{student.name}} attends {{school.name}} at {{address}}"]
    +
    + +

    But that didn’t work. How come? In Eve, things with the same name are equivalent. In this block, we’ve used “name” three times, which says that the school’s name, the student’s name, and the student’s school are all the same. Of course, there is no combination of students and schools that match this search, so nothing is displayed.

    + +

    Instead, we can use the dot operator to specifically ask for the name attribute in the #school records, and rename our variables to get a correct block:

    +
    search
    +  schools = [#school address]
    +  students = [#student school: school.name]
    +
    +bind @browser
    +  [#div text: "{{students.name}} attends {{schools.name}} at {{address}}"]
    +
    + +

    This creates an implicit join over the school name without mixing up the names of the students and the names of the schools, giving us our desired output. You can actually bind attributes to any name you want to avoid collisions in a block:

    +
    search
    +  [#school name: school-name address]
    +  [#student name: student-name school: school-name]
    +
    +bind @browser
    +  [#div text: "{{student-name}} attends {{school-name}} at {{address}}"]
    +
    + +

    Advanced Eve

    + +

    Recall when we added our students, Celia was the only one we added an age to. Therefore, the following block only displays Celia’s age, even though we ask for all the #students:

    +
    search
    +  [#student name age]
    +
    +bind @browser
    +  [#div text: "{{name}} is {{age}} years old"]
    +
    + +

    Let’s pretend that all students enter first grade at six years old. Therefore, if we know a student’s grade, we can calculate their age and add it to the student’s record:

    +
    search
    +  student = [#student]
    +  calculated-age = if student.age then student.age
    +                   else if student.grade then student.grade + 5
    +
    +bind @browser
    +  student.age := calculated-age
    +
    + +

    This block selects all students, and uses and if-then expression to set the student’s calculated age. If the student already has an age, we set it to that. Otherwise, if the student has no age, we can calculate it with some arithmetic. The set operator := sets an attribute to a specified value regardless of what it was before the block executed. That value can be anything, from a number to a string to another record.

    + +

    Aggregates

    + +

    So far everything we’ve done has used one record at a time, but what happens when we want to work over a group of records, such as counting how many students there are? To solve such a problem, we’ll need to use an aggregate. Aggregates take a set of values and turn them into a single value, akin to “fold” or “reduce” functions in other languages. In this case, we’ll use the aggregate count to figure out how many #students are in the school district:  

    +
    search
    +  students = [#student]
    +  total-students = count[given: students]
    +
    +bind 
    +  [#div text: "{{total-students}} are in the school district"]
    +
    + +

    A quick note on the syntax for count - it feels a lot like a function in other languages, since it has a return value and can be used inline in expressions. Under the hood, functions and aggregates are actually records; total = count[given: students] is shorthand for [#count #function given: students, value: total]. This distinction won’t materially change the way you use count, but it goes to show that everything in Eve reduces to working with records.

    + +

    While given is a required argument in count, aggregates (and functions in general) can also have optional arguments. Let’s say we want to know how many students attend each school. We can use the optional argument per to count students grouped by the school they attend:

    +
    search
    +  students = [#student school]
    +  students-per-school = count[given: students, per: school]
    +
    +bind
    +  [#div text: "{{students-per-school}} attend {{school}}"]
    +
    + +

    All function-like records in Eve specify their arguments as attributes. This means you specify the argument and its value, unlike in other languages, where the order of the values determines the attribute to which they belong. As with everything else in Eve, order doesn’t matter.

    + +

    Extra Credit

    + +

    At this point, you know everything necessary about Eve to complete this extra credit portion (the only additional knowledge you need is domain knowledge of HTML and forms). Let’s review some of the key concepts:

    + +
      +
    • Eve programs are composed of blocks of code that search for and update records.
    • +
    • Records are sets of attribute: value pairs attached to a unique ID.
    • +
    • Eve works with sets, which have no ordering and contain unique elements.
    • +
    • Things with the same name are equivalent.
    • +
    + +

    Your extra credit task is to build a web-based form that allows you to add students to the database. Take a moment to think about how this might be done in Eve, given everything we’ve learned so far.

    + +

    First, let’s make the form. We’ve already displayed a #div, and in the same way we can draw #inputs and a #button:

    +
    bind @browser
    +  [#div children: 
    +    [#div sort: 1, text: "Name:"]
    +    [#input #name-input sort: 2]
    +    [#div sort: 3, text: "Grade:"]
    +    [#input #grade-input sort: 4]
    +    [#div sort: 5, text: "School:"]
    +    [#input #school-input sort: 6]
    +    [#button #submit sort: 7 text: "submit"]]
    +
    + +

    We’ve added some tags to the inputs and the button to distinguish them, so we can easily search for them from other blocks. Now that we have a form, we need to define what happens when the submit button is clicked.

    + +

    Remember, everything in Eve is a record, so the #click event is no different. When a user clicks the mouse in the browser, Eve records that click in the database.

    + +

    This record exists only for an instant, but we can react to it by searching for [#click element: [#submit]]. This record represents a #click on our #submit button. Then, all we need to do is capture the values of the input boxes and save them as a #student record:

    +
    search
    +  [#click element: [#submit]]
    +  name = [#name-input]
    +  grade = [#grade-input]
    +  school = [#school-input]
    +
    +commit
    +  // save the new student
    +  [#student name: name.value, grade: grade.value, school: school.value]
    +  // reset the form
    +  name.value := ""
    +  grade.value := ""
    +  school.value := ""
    +
    + +

    Learning more

    + +

    If you want to learn more about Eve, we have some resources to help with that:

    + +
      +
    • Example applications - See some working programs and explore how they work.
    • +
    • Tutorials - Step by step instructions on building Eve applications.
    • +
    • The Eve Handbook - Everything you need to know about Eve.
    • +
    • Eve syntax reference - Eve’s syntax in one page.
    • +
    • Guides - In-depth documents on topics relating to Eve.
    • +
    + +

    We also invite you to join the Eve community! There are several ways to get involved:

    + + + + +
    +
    +
    +
    \ No newline at end of file From b3e9f7f6b9d66631ebbc500e0cea4defdba7261c Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Tue, 23 May 2017 23:08:38 -0700 Subject: [PATCH 019/109] Update domain name --- guides/dsl/index.html | 742 ----------------------- guides/for-programmers/index.html | 414 ------------- guides/style/index.html | 542 ----------------- handbook/actions/index.html | 418 ------------- handbook/add/index.html | 452 -------------- handbook/aggregates/index.html | 420 ------------- handbook/bind/index.html | 638 ------------------- handbook/blocks/index.html | 533 ---------------- handbook/browser/index.html | 396 ------------ handbook/commit/index.html | 642 -------------------- handbook/commonmark/index.html | 464 -------------- handbook/core/index.html | 400 ------------ handbook/databases/index.html | 492 --------------- handbook/datetime/index.html | 400 ------------ handbook/datetime/time/index.html | 451 -------------- handbook/docker/index.html | 423 ------------- handbook/ebnf/index.html | 502 --------------- handbook/equality/index.html | 449 -------------- handbook/equivalence/index.html | 406 ------------- handbook/event/change/index.html | 439 -------------- handbook/event/click/index.html | 435 ------------- handbook/event/index.html | 404 ------------ handbook/event/keydown/index.html | 426 ------------- handbook/event/keyup/index.html | 426 ------------- handbook/expressions/index.html | 408 ------------- handbook/functions/index.html | 453 -------------- handbook/general/index.html | 400 ------------ handbook/general/sort/index.html | 533 ---------------- handbook/glossary/index.html | 428 ------------- handbook/help/index.html | 425 ------------- handbook/http/index.html | 396 ------------ handbook/if-then/index.html | 472 -------------- handbook/inequality/index.html | 457 -------------- handbook/installation/index.html | 409 ------------- handbook/intro/index.html | 418 ------------- handbook/is/index.html | 429 ------------- handbook/joins/index.html | 416 ------------- handbook/libraries/stdlib/index.html | 467 -------------- handbook/libraries/style.css | 1 - handbook/linux/index.html | 417 ------------- handbook/literate-programming/index.html | 433 ------------- handbook/mac/index.html | 408 ------------- handbook/math/abs/index.html | 428 ------------- handbook/math/ceil/index.html | 428 ------------- handbook/math/cos/index.html | 432 ------------- handbook/math/fix/index.html | 440 -------------- handbook/math/floor/index.html | 428 ------------- handbook/math/index.html | 447 -------------- handbook/math/mod/index.html | 431 ------------- handbook/math/range/index.html | 463 -------------- handbook/math/round/index.html | 431 ------------- handbook/math/sin/index.html | 432 ------------- handbook/math/sum/index.html | 446 -------------- handbook/math/tan/index.html | 429 ------------- handbook/merge/index.html | 420 ------------- handbook/model/index.html | 415 ------------- handbook/not/index.html | 420 ------------- handbook/npm/index.html | 407 ------------- handbook/programs/index.html | 402 ------------ handbook/records/index.html | 514 ---------------- handbook/remove/index.html | 413 ------------- handbook/running/index.html | 454 -------------- handbook/search/index.html | 429 ------------- handbook/session/index.html | 396 ------------ handbook/set/index.html | 432 ------------- handbook/sets/index.html | 435 ------------- handbook/standard-library/index.html | 408 ------------- handbook/statistics/count/index.html | 499 --------------- handbook/statistics/index.html | 406 ------------- handbook/statistics/random/index.html | 453 -------------- handbook/string-interpolation/index.html | 433 ------------- handbook/strings/convert/index.html | 438 ------------- handbook/strings/find/index.html | 449 -------------- handbook/strings/index.html | 405 ------------- handbook/strings/join/index.html | 469 -------------- handbook/strings/length/index.html | 452 -------------- handbook/strings/split/index.html | 437 ------------- handbook/strings/substring/index.html | 430 ------------- handbook/strings/urlencode/index.html | 427 ------------- handbook/tags/index.html | 453 -------------- handbook/update-operators/index.html | 420 ------------- handbook/view/index.html | 396 ------------ handbook/windows/index.html | 408 ------------- tutorials/quickstart/index.html | 620 ------------------- 84 files changed, 37059 deletions(-) delete mode 100644 guides/dsl/index.html delete mode 100644 guides/for-programmers/index.html delete mode 100644 guides/style/index.html delete mode 100644 handbook/actions/index.html delete mode 100644 handbook/add/index.html delete mode 100644 handbook/aggregates/index.html delete mode 100644 handbook/bind/index.html delete mode 100644 handbook/blocks/index.html delete mode 100644 handbook/browser/index.html delete mode 100644 handbook/commit/index.html delete mode 100644 handbook/commonmark/index.html delete mode 100644 handbook/core/index.html delete mode 100644 handbook/databases/index.html delete mode 100644 handbook/datetime/index.html delete mode 100644 handbook/datetime/time/index.html delete mode 100644 handbook/docker/index.html delete mode 100644 handbook/ebnf/index.html delete mode 100644 handbook/equality/index.html delete mode 100644 handbook/equivalence/index.html delete mode 100644 handbook/event/change/index.html delete mode 100644 handbook/event/click/index.html delete mode 100644 handbook/event/index.html delete mode 100644 handbook/event/keydown/index.html delete mode 100644 handbook/event/keyup/index.html delete mode 100644 handbook/expressions/index.html delete mode 100644 handbook/functions/index.html delete mode 100644 handbook/general/index.html delete mode 100644 handbook/general/sort/index.html delete mode 100644 handbook/glossary/index.html delete mode 100644 handbook/help/index.html delete mode 100644 handbook/http/index.html delete mode 100644 handbook/if-then/index.html delete mode 100644 handbook/inequality/index.html delete mode 100644 handbook/installation/index.html delete mode 100644 handbook/intro/index.html delete mode 100644 handbook/is/index.html delete mode 100644 handbook/joins/index.html delete mode 100644 handbook/libraries/stdlib/index.html delete mode 100644 handbook/libraries/style.css delete mode 100644 handbook/linux/index.html delete mode 100644 handbook/literate-programming/index.html delete mode 100644 handbook/mac/index.html delete mode 100644 handbook/math/abs/index.html delete mode 100644 handbook/math/ceil/index.html delete mode 100644 handbook/math/cos/index.html delete mode 100644 handbook/math/fix/index.html delete mode 100644 handbook/math/floor/index.html delete mode 100644 handbook/math/index.html delete mode 100644 handbook/math/mod/index.html delete mode 100644 handbook/math/range/index.html delete mode 100644 handbook/math/round/index.html delete mode 100644 handbook/math/sin/index.html delete mode 100644 handbook/math/sum/index.html delete mode 100644 handbook/math/tan/index.html delete mode 100644 handbook/merge/index.html delete mode 100644 handbook/model/index.html delete mode 100644 handbook/not/index.html delete mode 100644 handbook/npm/index.html delete mode 100644 handbook/programs/index.html delete mode 100644 handbook/records/index.html delete mode 100644 handbook/remove/index.html delete mode 100644 handbook/running/index.html delete mode 100644 handbook/search/index.html delete mode 100644 handbook/session/index.html delete mode 100644 handbook/set/index.html delete mode 100644 handbook/sets/index.html delete mode 100644 handbook/standard-library/index.html delete mode 100644 handbook/statistics/count/index.html delete mode 100644 handbook/statistics/index.html delete mode 100644 handbook/statistics/random/index.html delete mode 100644 handbook/string-interpolation/index.html delete mode 100644 handbook/strings/convert/index.html delete mode 100644 handbook/strings/find/index.html delete mode 100644 handbook/strings/index.html delete mode 100644 handbook/strings/join/index.html delete mode 100644 handbook/strings/length/index.html delete mode 100644 handbook/strings/split/index.html delete mode 100644 handbook/strings/substring/index.html delete mode 100644 handbook/strings/urlencode/index.html delete mode 100644 handbook/tags/index.html delete mode 100644 handbook/update-operators/index.html delete mode 100644 handbook/view/index.html delete mode 100644 handbook/windows/index.html delete mode 100644 tutorials/quickstart/index.html diff --git a/guides/dsl/index.html b/guides/dsl/index.html deleted file mode 100644 index 75ddd76..0000000 --- a/guides/dsl/index.html +++ /dev/null @@ -1,742 +0,0 @@ - - - - - - - - - - - - - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Eve JavaScript/TypeScript DSL

    - -

    The forthcoming v0.3 release of Eve supports a domain specific language (DSL) that interacts with the Eve runtime, allowing you to intermix Javascript and Eve code. There are several benefits to using the DSL:

    - -

    1) The syntax is native Javascript, so if you know JS you can write in the DSL -2) You can interact with Javascript functions and libraries -3) The DSL can be used “a la carte”, so you can use as much of Eve as you need to for your project. Thus you can write an entire application in Eve, just use it as a datastore, or anywhere between. This makes it easy to integrate Eve with an existing Javascript application. -4) You can easily import data into Eve. If you can get your data in Javascript, you can use it in Eve.

    - -

    This DSL guide is for users who are already familiar with Eve semantics. For those new to Eve, we’ll have more fundamental guides released in the near future.

    - -

    Summary of DSL

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    JavaScript/TypeScript DSLEve
    find a recordfind("person", {salary})[#person salary]
    bind/commit a recordrecord("person", {salary})[#person salary]
    notnot(() => person.salary)not(person.salary)
    choosechoose(() => { person.salary; return 1; }, () => 0)if person.salary then 1 else 0
    unionunion(() => person.salary, () => person.wage)if person.salary then person.salary if person.wage then person.wage
    Add a valueperson.add("salary", 10)person.salary += 10
    Remove a valueperson.remove("salary, 10)person.salary -= 10
    Set a valueperson.remove("salary").add("salary", 10)person.salary := 10
    Remove an attributeperson.remove("salary")person.salary := none
    Remove a recordperson.remove()person := none
    functionslib.math.sin(number)sin[degrees: number]
    aggregatesgather(person).per(person.dept).count()count[given: person, per: person.dept]
    - -

    Using the DSL

    - -

    This guide is written for ES6. For added readability, we make frequent use of destructuring and arrow functions. We recommend using TypeScript 2.1.0 or later.

    - -

    To use the DSL, import it into your application.

    -
    import {Program} from "witheve";
    -
    - -

    Then you instantiate a new Eve program, naming it however you want.

    -
    let program = new Program("program name");
    -
    - -

    Writing DSL code is similar to writing native Eve code; you attach blocks to the program, which search for records and then return records. Blocks in the DSL operate as a either a bind or commit. Let’s look at the DSL block syntax in the case of bind:

    -
    program.bind("block description", ({find, record}) => {
    -  // search for records tagged "person"
    -  let person = find("person");
    -  return [
    -    // bind a record tagged "greeting" with an attribute "message"
    -    record("greeting", {message: `Hello ${person.name}`})
    -  ];
    -});
    -
    - -

    The equivalent Eve block would be

    -
    search
    -  person = [#person]
    -
    -bind
    -  [#greeting message: "Hello {{person.name}}"]
    -
    - -

    The identity of a record() is established by everything within the parentheses. Therefore, the record record("greeting", {message: `Hello ${person.name}`}) will create one record for every person.name.

    - -

    If you would like to commit records instead of binding them, you can use the commit() method in place of bind(). The implication here is that you can no longer create blocks which both commit and bind records at the same time.

    - -

    The DSL supports methods which mirror a couple of the Eve update operators. They are:

    - -

    add()

    - -

    Adds attribute/value pairs to a record. These added values do not contribute to the identity of a record, allowing you to add multiple values to a single record. This is equivalent to the Eve += operator. For example:

    -
    program.bind("Invite classmates to my party", ({find, record}) => {
    -  // search for records tagged "friend"
    -  let student = find("student");
    -  return [
    -    // bind a single record tagged "guest-list", with every student as a guest
    -    record("guest-list").add({guest: student})
    -  ];
    -});
    -
    - -

    remove()

    - -

    Removes attribute/value pairs from a record. This is equivalent to the Eve -= operator. Remove should only be used in the context of a commit block. For example:

    -
    program.commit("blacklisted people cannot come to the party", ({find, record}) => {
    -  let blacklisted = find("blacklisted");
    -  let guests = find("guest-list")
    -  return [
    -    // remove anyone blacklisted from the guest list
    -    guests.remove({guest: blacklisted})
    -  ];
    -});
    -
    - -

    You can also use remove() to completely delete records or attributes on a record. This is equivalent to := none in Eve. For example:

    -
    // completely remove the target record
    -record.remove() 
    -// remove the attribute on the target record
    -record.remove("attribute")
    -
    - -

    The DSL does not contain an equivalent for the Eve set operator :=, but you can mimic its behavior by chaining the add() and remove() operators. For example:

    -
    program.bind("Reassign Artemis' teacher", ({find, record}) => {
    -  let artemis = find("student", {name: "Artemis"});
    -  let teacher = find("teacher", {name: "Smith"});
    -  return [
    -    artemis.remove("teacher").add("teacher", teacher)
    -  ];
    -});
    -
    - -

    Sub-Blocks

    - -

    In the DSL not(), union(), and choose() are sub-blocks, which have their own body. Let’s look at each of these.

    - -

    not()

    - -

    The not() sub block works similarly to not() from the Eve syntax; it performs an anti-join on the records inside and outside of the not(). To use not, include it in the parameter list at the beginning of the block.

    -
    program.bind("Tag students without any citations.", ({find, record, not}) => {
    -    let students = find("student");
    -    not(() => {
    -        find("student", {citation});
    -    });
    -    return [
    -        students.add("tag","good-standing")
    -    ];
    -})
    -
    - -

    choose()

    - -

    Choose() and union() expressions are behind the mechanics of the if expression in the Eve syntax. In the DSL, we expose these directly. First, choose() takes a list of sub-blocks, which contain any valid Eve code to join, filter, or compute their results. Each sub-block is executed in order until one is found valid. This return value of the first valid sub-block is taken as the return value.

    -
    program.commit("Assign a letter grade.", ({find, choose}) => {
    -    let student = find("student");
    -    let [grade] = choose(
    -        () => { student.grade >= 90; return "A"; },
    -        () => { student.grade >= 80; return "B"; },
    -        () => { student.grade >= 70; return "C"; },
    -        () => { student.grade >= 60; return "D"; },
    -        () => "F"
    -    )
    -    return [
    -        student.add("letter-grade", {grade}),
    -    ];
    -});
    -
    - -

    union()

    - -

    Similarly, union() takes a body of sub-blocks, but the return for each valid sub-block (instead of just the first as with choose()) is taken as the return for the union. One common use of union is to normalize records from different data sources.

    -
    program.bind("display the student's full names", ({find, record, union}) => {
    -  let east = find("student", {school: "West HS"});
    -  let west = find("student", {school: "East HS"});
    -  let [fullName] = union(
    -    () => { east.name; return east.name},
    -    () => { west.firstName; return `${{west.firstName}} ${{west.lastName}}`},
    -  );
    -  return [
    -    record("html/element", {tagname: "div", text: fullName}),
    -  ];
    -});
    -
    - -

    Functions

    - -

    The standard library in Eve has been redone in the DSL. To use library functions, you must now bring in “lib” explicitly when defining your block. From lib you can access the various standard library functions supported by the runtime so far.

    -
    program.bind("display the student's full names", ({find, record, lib}) => {
    -  find("angle" degrees)
    -  let result = lib.math.sin(degrees)
    -  return [
    -    record("html/element", {tagname: "div", text: result})
    -  ];
    -});
    -
    - -

    for now you can find a list of functions in src/runtime/stdlib.ts

    - -

    The interface for wrapping functions for use within Eve is also revamped for the new runtime. When writing a function wrapper, you must ensure that the function is reverentially transparent, meaning given the same input, the function returns the same output.

    - -

    Functions are wrapped using makeFunction() e.g.:

    -
    makeFunction({
    -  name: "math/sin",             
    -  args: {a: "number"},
    -  returns: {result: "number"},
    -  apply: (a:number) => {
    -    return [Math.sin(a/180 * Math.PI)];
    -  }
    -});
    -
    - -

    Aggregates

    - -

    Aggregates like sum(), count(), and sort() are accessed through the gather() function. This function defines the input set to the aggregate. You can optionally group the input set with the per() function. For example, here is count() at work:

    -
    program.bind("count the number of students in each class", ({find, record, gather}) => {
    -  let student = find("student")
    -  let classSize = gather(student).per(student.teacher).count()
    -  return [
    -    record("html/element", {tagname: "div", text: `${student.teacher} ${classSize}`})
    -  ];
    -});
    -
    - -

    The input set to the count() aggregate is the student records, and they are groups according to their teacher attribute. Then, the size of each group is counted and returned in classSize, which has the same number of elements as there are teachers.

    - -

    Aggregates can take arguments as well. For instance, sort() takes as arguments the direction by which to sort the input set. Here is sort() in use:

    -
    program.bind("sort the students by last name, then first name per teacher", ({find, record, gather}) => {
    -  let student = find("student")
    -  let ix = gather(student.firstName, student.lastName).per(student.teacher).sort("up", "down")
    -  return [
    -    record("html/element", {tagname: "div", sort: ix, text: `${student.firstName} ${student.lastName}`})
    -  ];
    -});
    -
    - -

    Importing and Exporting Records

    - -

    Getting Data Into Eve - inputEAVs()

    - -

    You can import raw EAVs into Eve with the inputEAVs() function. Currently, inputEAVs() mut be called at least once to initialize your program, and it can only be used after you define all blocks. These limitations will be lifted in future versions.

    - -

    inputEAVs() takes as input a list of entity, attribute, value triples. The entity value identifies the record to which the attribute and value belong, so it must be unique to that record. For example:

    -
    program.inputEAVs([[0,"tag","person"], [0,"name","Archibald"]]);
    -
    - -

    This will create a record tagged “person” with the name attribute “Archibald”.

    - -

    The appendAsEAVs() function allows you to destructure an object into a uniquely identified set of EAVs, which can then be input into Eve:

    -
    import {appendAsEAVs} from "witheve";
    -let inputs = [];
    -let archibald = {tag: "person", name: "Archibald"};
    -appendAsEAVs(inputs, archibald);
    -program.inputEAVs(inputs);
    -
    - -

    Getting Records out of Eve - Watchers

    - -

    Watchers are a third type of block available in the DSL. These allow you to monitor changes in specific records and react to them with a callback function:

    -
    program.watch("Export information about students", ({find, lookup, record}) => {
    -  // search for records tagged student
    -  let student = find("student");
    -  // lookup attributes and values related to each student
    -  let {attribute, value} = lookup(student);
    -  return [
    -    // Add these attributes and values to the student, creating a diff to which we can react
    -    student.add(attribute, value)
    -  ];
    -})
    -// React to each addition or removal
    -.asDiffs((diff) => {
    -  for(let [e, a, v] of diff.adds) {
    -    // ... do something ...
    -  }
    -  for(let [e, a, v] of diff.removes) {
    -    // ... do something ...
    -  }
    -});
    -
    - -

    If you care about specific attributes, if may be more convenient to write a watcher with asObjects() instead of asDiffs():

    -
    program.watch("Export student GPA", ({find, lookup, record}) => {
    -  // search for records tagged student
    -  let student = find("student" {name, GPA});
    -  return [
    -    // Add these attributes and values to the student, which creates a diff to which we can react
    -    record("grade", {name, GPA})
    -  ];
    -})
    -// Handle adds and removes as objects
    -.asObjects<{name: string, GPA: RawValue}>(({adds, removes}) => {
    -  for(let id in adds) {
    -    let {name, GPA} = adds[id];
    -    // ... do something ...
    -  }
    -  for(let id in removes) {
    -    let {name, GPA} = removes[id];
    -    // ... do something ...
    -  }
    -})
    -
    - -

    Type annotations (between the angle braces <>) are necessary for TypeScript, but they can be omitted when using Javascript.

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/guides/for-programmers/index.html b/guides/for-programmers/index.html deleted file mode 100644 index dd23990..0000000 --- a/guides/for-programmers/index.html +++ /dev/null @@ -1,414 +0,0 @@ - - - - - - - - - - - - Eve for Programmers - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Eve for Programmers

    - -

    As a programmer, you probably find it easy to switch between different programming langauges. If you know Javascript, you probably wouldn’t have a hard time learning similar langauges like C++, Java, or Python. That’s because despite syntactic differences, these languages largely conform to the same programming model. When we program in languages like these, we use similar abstractions between them – loops, functions, and input/output patterns have become a staple of every programmer’s toolbox. When we solve problems, we usually reach a solution in terms of these primitive operations.

    - -

    Eve is a different kind of programming langauge from Javascript or Python, so programmers new to Eve may feel a little lost at first. How do you get anything done in a language without loops? How do you compose code without functions? The purpose of this guide is to provide a mapping from the common tools you know, to the Eve way of solving problems. We’ll look at some programs written in Javascript, and see how they Eve can solve them.

    - -

    Functions

    - -

    Functions are the fundamental unit of code reuse in most conventional programming languages. These langauges typically start from a “main” function, and branch

    - -

    Looping

    - -

    Map

    - -

    Reduce

    - -

    Recursion

    - -

    I/O

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/guides/style/index.html b/guides/style/index.html deleted file mode 100644 index 46af76e..0000000 --- a/guides/style/index.html +++ /dev/null @@ -1,542 +0,0 @@ - - - - - - - - - - - - Style Guide - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Eve Style Guide

    - -

    Comments

    - -

    Add a space after the comment marker to make comments more readable

    -
    // This is correct
    -//This is incorrect
    -
    - -

    Naming

    - -

    As much as possible, don’t abbreviate names. The goal in writing an Eve program is to be as readable as possible. An abbreviation that makes sense to you might not make sense to someone else, or even yourself when you revisit the program in a year.

    - -

    Multi-word names should be joined by dashes -, not underscores _.

    - -

    Program layout

    - -

    Blocks should be preceded by at least a one line comment, indicating the purpose of the block.

    - -

    Commas

    - -

    Although Eve treats commas as white-space, they should be used to enhance readability as needed:

    - -

    In records, separate attributes with commas after a bind

    -
    // More readable
    -[#person name age: 30, height: 5, hair-color: "brown"]
    -
    -// Less readable
    -[#person name age: 30 height: 5 hair-color: "brown"]
    -
    - -

    Commas should also be used to separate items contained in parenthesis, such as in a multiple return.

    -
    // More readable
    -(val1, val2) = if [#tag1] then (1, false)
    -               else (0, true)
    -total = count[given: attr1, per: (attr2, attr3)]
    -
    -// Less readable
    -(val1 val2) = if [#tag1] then (1 false)
    -               else (0 true)
    -total = count[given: attr1 per: (attr2 attr3)]
    -
    - -

    Indention

    - -

    Eve does not enforce indention, but it is important for readability

    - -

    Blocks

    - -

    search. commit, and bind should be the only lines at zero indention. Everything else should be indented.

    -
    // Good
    -search
    -  [...]
    -
    -bind
    -  [...]
    -
    - -

    But not this:

    -
    // Not good
    -search
    -[...]
    -
    -bind
    -[...]
    -
    - -

    If-Then

    - -

    Each arm of an if-then statement should be at the same indention level. The then portion of the statement can be on a new line if the if portion is exceptionally long, but it should be indented once.

    -
    // Good if layout
    -value = if bar then baz
    -        if bar2 then baz2
    -        else baz3
    -
    -// Okay, especially if the branch is long
    -value = if [#long-record attr1 attr2 attr3]
    -          then baz
    -        if [#long-record2 attr1 attr2 attr3]
    -          then baz2
    -        else baz3
    -
    -// Less readable "if" formatting
    -value = if bar then baz
    -if bar2 then baz2
    -else baz3
    -
    -// Less readable "if" formatting
    -value = if bar then baz if bar2 then baz2 else baz3
    -
    - -

    Nested records

    - -

    When nested records are placed on a new line, they should be indented once past the parent record. Where possible, nested records should be the final attribute in the parent record.

    - -

    Nested records should appear on their own line if you are nesting more than one.

    -
    // Okay, but only do this for one level of nesting
    -[#div text: "hello", children: [#div text: "world"]]
    -
    -// More readable
    -[#div text: "hello", children:
    -  [#div text: "world"]]
    -
    -// Also good
    -[#div children:
    -  [#div text: "div1"]
    -  [#div text: "div2" children:
    -    [#div text: "div3"]]]
    -
    -// Not good
    -[#div children: [#div text: "div2"] [#div text: "div2"]]
    -
    -// Also not good
    -[#div children:
    -  [#div text: "world"], text: "hello"]
    -
    - -

    Newlines

    - -

    Newlines should precede and follow every code block.

    - -

    Within code blocks, a newline should be added between every action. This enhances readability, especially in the case where multiple actions are needed. For instance, the following code block:

    -
    search @studentDB
    -  students = [#students]
    -
    -search @schoolDB
    -  schools = [#school]
    -  schools.name = student.school
    -
    -bind @browser
    -  [#div text: students.name]
    -
    -commit
    -  [#new-record]
    -
    - -

    is more readable than this code block:

    -
    search @studentDB
    -  students = [#students]
    -search @schoolDB
    -  schools = [#school]
    -  schools.name = student.school
    -bind @browser
    -  [#div text: students.name]
    -commit
    -  [#new-record]
    -
    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/actions/index.html b/handbook/actions/index.html deleted file mode 100644 index f9781f0..0000000 --- a/handbook/actions/index.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - - - - - Actions - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Actions

    - -

    Description

    - -

    There are three actions in Eve: search, bind, and commit.

    - -

    search is used when you want to gather records from one or more databases. These records are called “supporting records”, because they are used as a basis for bound or committed records.

    - -

    bind and commit actions are used when you want to update records in one or more databases, but they differ in the way the updates are performed.

    - -
      -
    • bound records last only as long as their supporting records. When supporting records changes, then bound records changes accordingly, replacing any previously bound records.

    • - -
    • committed records persist past the lifetime of their supporting records. When supporting records change, then a new record is committed, leaving any previously committed records still intact.

    • -
    - -

    Examples

    -
    
    -
    - -

    See Also

    - -

    search | bind | commit

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/add/index.html b/handbook/add/index.html deleted file mode 100644 index 071b183..0000000 --- a/handbook/add/index.html +++ /dev/null @@ -1,452 +0,0 @@ - - - - - - - - - - - - Add: += - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Add Operator

    - -

    adds a value to an attribute on a record

    - -

    Syntax

    -
    // Add a value to an attribute
    -record.attribute += value
    -
    -// Add a tag to a record
    -record += #tag
    -
    - -

    Description

    - -

    record.attribute += value adds value to attribute. If record already has an attribute with a value, then value will be added to the set. Otherwise, if record doesn’t have an attribute with this name already, then += will create the attribute and set it to value. As Eve variables are sets, if the value already exists on the attribute, the value cannot be added again.

    - -

    attribute can be an attribute already on the record, or it can be a new attribute.

    - -

    value can be a string or number literal, a variable bound to one of these, or a record.

    - -

    record += #tag adds #tag to record. This is shorthand for record.tag += "tag".

    - -

    Examples

    - -

    Add the current second to a record. Since Eve works in sets, time-history can only ever hold then numbers 0 through 60. This means after one minute passes, no new elements will be added to tracker.time-history.

    -
    search
    -  tracker = [#seconds-tracker]
    -  [#time seconds]
    -
    -commit
    -  tracker.time-history += seconds
    -
    - -

    We can get around this by adding a record:

    -
    search
    -  tracker = [#seconds-tracker]
    -  [#time seconds]
    -
    -commit
    -  tracker.time-history += [seconds]
    -
    - -

    Now, instead of adding numbers to time-history we are adding records, which are associated with a unique ID. So after the first minute passes, time-history will contain duplicate seconds, but the record ID will ensure each one is unique.

    - -
    - -

    Add the #honor-student tag to any #student with a GPA greater than 3.75:

    -
    search
    -  student = [#student gpa > 3.75]
    -  
    -bind
    -  student += #honor-student
    -
    - -

    See Also

    - -

    set operator | remove operator | merge operator | bind | commit

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/aggregates/index.html b/handbook/aggregates/index.html deleted file mode 100644 index c91c039..0000000 --- a/handbook/aggregates/index.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - - - - - - Aggregates - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Aggregates

    - -

    aggregates reduce a set of values to a single value

    - -

    Description

    - -

    Aggregates are functions that take an input set and produce an output set, typically with a different cardinality than the input set. Examples of aggregates include sum, count, and average. Each of these takes a set of numbers as an input, and typically produces a single number as output.

    - -

    Aggregates are called just like other functions in Eve. For instance, the count aggregate is called like so:

    -
    employee-count = count[given: employees]
    -
    - -

    Aggregates don’t always produce a single output value. In some instances, you may want to group your input according to a desired dimension (department, grade, state, country, zip code, etc.) and then aggregate based on those groupings. Extending the example above, we could count the employees in each department:

    -
    employee-count = count[given: employees, per: department]
    -
    - -

    Now, employee-count will have a count for each department, instead of a single count over all departments. For more complete examples, see the doc files for specific aggregates.

    - -

    Tip

    - -

    Aggregates have similar behavior to the reduce() function in many other langauges.

    - -

    See Also

    - -

    count

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/bind/index.html b/handbook/bind/index.html deleted file mode 100644 index 8179506..0000000 --- a/handbook/bind/index.html +++ /dev/null @@ -1,638 +0,0 @@ - - - - - - - - - - - - bind - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    bind

    - -

    updates or creates records, syncing them with matched records

    - -

    Syntax

    -
    bind
    -
    -bind @database1, ..., @databaseN
    -
    - -

    Description

    - -

    bind updates or creates new records with a lifetime equal to matched records within the block. Matched records are any records found in a search action. If matched records change during program execution, all bound records change accordingly. If any matched records are removed (i.e. they no longer match the search), bound records and updates are removed as well.

    - -

    By default, bound records are directed to a default local database.

    - -

    bind @database1, ..., @databaseN directs bound records to one or more databases.

    - -

    Bind vs. Commit

    - -

    While bind and commit both update records in a database, they do so with slightly different behavior; a bound record has the same lifetime as its supporting records, whereas a committed record exists in the database until it is removed intentionally. Let’s take a closer look at this distinction and what the implications are.

    - -

    Consider the following block that reads the current time, and prints it to the screen:

    -
    search
    -  [#time seconds]
    -
    -bind @browser
    -  [#div text: seconds]
    -
    - -

    In this block we search for the current time and bind it to a message that displays it. The message exists as long as the current time stays the same (1 second obviously). When the time changes, the current message disappears and is replaced with a new message, displaying the new time. This is the behavior of bind; bound records persist only as long as their matching records.

    - -

    Now let’s look at what commit does in contrast:

    -
    search
    -  [#time seconds]
    -
    -commit @browser
    -  [#div text: seconds]
    -
    - -

    Compared to the previous block, we only changed bind to commit. When you run this block, at first you’ll see a single message like before. However, you’ll notice that messages begin to accumulate every second. Unlike with bind, committed records persist in the database until they are intentionally removed.

    - -

    To make things very concrete, we can actually mimic the behavior of a bind using two blocks that commit. We’ve already got the first one (the one just above), that commits messages to @browser. Now all we need is a second block, one that removes old committed messages from @browser:

    -
    search 
    -  [#time seconds]
    -
    -search @browser
    -  s = seconds - 1
    -  // Do some math to handle the roll over at 60 seconds
    -  last-time = s - 60 * floor[value: s / 60]
    -  msg = [#div text: last-time]
    -  
    -commit @browser
    -  msg := none
    -
    - -

    This block searches for the message that was displayed during the previous second, and sets it to none, thereby removing it from @browser. Therefore, only the message bound to the the current time is displayed on the screen. This behavior is identical to that of the block that binds these messages instead of committing them!

    - -

    An Execution Perspective

    - -

    Another way to understand bind vs. commit is by looking at how the databases change over each tick of the Eve evaluator. We’ll consider the same program as before, looking at how its state changes over time. First, consider the bind case. When the program starts, there’s nothing in any databases; the program is a blank slate. At t1 the first #time is added to @session. This addition is bound to a #div, which is added to @browser. These changes are summarized in the first column of the table below.

    - -

    At t2, a new #time is added to @session, and the one from t1 is removed. Since we used a bind, this causes the existing #div to be removed from @browser, but it is replaced with a new #div reflecting the current time. At t3, the same operations takes place, and this process continues until the program is terminated.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -t0 - -t1 - -t2 - -t3 -
    -delta - - - -+ [#time seconds: 39] -+ [#div text: "39"] - -+ [#time seconds: 40] -- [#time seconds: 39] -+ [#div text: "40"] -- [#div text: "39"] - -+ [#time seconds: 41] -- [#time seconds: 40] -+ [#div text: "41"] -- [#div text: "40"] -
    -@session - -[ ] - -[[#time seconds: 39]] - -[[#time seconds: 40]] - -[[#time seconds: 41]] -
    -@browser - -[ ] - -[[#div text: 39]] - -[[#div text: 40]] - -[[#div text: 41]] -
    - -

    Let’s perform the same analysis in the commit case. In this program, things start off the same; initially the database is empty, and at t1 a #time and a #div are added to their respective databases. At t2, things get more interesting. While the old #time is still replaced, the #div displaying the old time is not replaced since we committed it to @browser. Indeed, in subsequent rounds of execution, the contents of @browser keeps growing.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -t0 - -t1 - -t2 - -t3 -
    -delta - - -+ [#time seconds: 39] -+ [#div text: "39"] - -+ [#time seconds: 40] -- [#time seconds: 39] -+ [#div text: "40"] - -+ [#time seconds: 41] -- [#time seconds: 40] -+ [#div text: "41"] -
    -@session - -[ ] - -[[#time seconds: 39]] - -[[#time seconds: 40]] - -[[#time seconds: 41]] -
    -@browser - -[ ] - -[[#div text: 39]] - -[[#div text: 39], - [#div text: 40]] - -[[#div text: 39], - [#div text: 40], - [#div text: 41]] -
    - -

    Tips

    - -

    When you want to display data in an interface element like a #div, a bind is usually the more appropriate choice compared to a commit. A bind will keep the interface element always up-to-date, whereas a commit will leave lingering elements that no longer reflect the current state of the program.

    - -

    When searching for an event like a #click, a commit is usually more appropriate than bind. When an event occurs, a record representing the event is added to a database. That record exists for exactly one “instant”, and then it is removed from the database. During that “instant”, any block searching for that event will be satisfied and can execute a bind or commit action. If you bind on the event, then the result will disappear as soon as the event does. However, if you commit on the event, then that result will persist after the event has been removed.

    - -

    Examples

    - -

    Display a formatted time:

    -
    search
    -  [#time hours minutes seconds]
    -  (am/pm, adjusted-hours) = if hours >= 12 then ("PM", hours - 12)
    -                            else if hours = 0 then ("AM", 12)
    -                            else ("AM", hours)
    -bind @browser
    -  [#div text: "The current time is {{adjusted-hours}}:{{minutes}}:{{seconds}} {{am/pm}}"]
    -
    - -

    See Also

    - -

    commit | databases | search

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/blocks/index.html b/handbook/blocks/index.html deleted file mode 100644 index f9177e1..0000000 --- a/handbook/blocks/index.html +++ /dev/null @@ -1,533 +0,0 @@ - - - - - - - - - - - - Blocks - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Blocks

    - -

    blocks compose Eve programs

    - -

    Syntax

    -
    // Blocks contain Eve code and can execute actions
    -```
    -search
    -  .....
    -
    -bind
    -  .....
    -
    -commit
    -  .....
    -```
    -
    -// Blocks that are disabled are not executed
    -```eve disabled
    -search
    -  ....
    -```
    -
    -// Non-Eve blocks are not parsed or executed
    -```javascript
    -function() {
    -  ...
    -}
    -```
    -
    -// Blocks that omit the search action are satisfied by default
    -```
    -bind
    -  .....
    -```
    -
    -```
    -commit
    -  .....
    -```
    -
    - -

    Description

    - -

    A block is the fundamental unit of Eve code. Eve programs are made up of a series of blocks, each of which can perform actions:

    - -
      -
    1. A block searches one or more databases for records.
    2. -
    3. A block binds or commits new records in one or more databases.
    4. -
    - -

    Blocks execute when the records they search for exist or change. If a block doesn’t search for any records, then the block executes by default, but it can never update bound or committed records.

    - -

    Blocks can have any number of search, commit, and bind actions, each of which can reference any number of databases. If a block has multiple search actions, it will only execute if all searches are satisfied.

    - -

    Blocks automatically keep bound and committed records up-to-date with matched records. When a record matching a search changes, those changes are reflected automatically in bound and committed records within that block.

    - -

    Specifying a Block

    - -

    Blocks are specified using two fences to delineate the beginning and end of the block. Code fences are matching pairs of either three consecutive ticks (```) or tildes (~~~). This style of code block is the same as supported by CommonMark. However, we don’t currently support specifying code blocks via indentation.

    - -

    Info Strings

    - -

    You can specify the type of code within a block with an info string, written directly after the block’s opening code fence. By default, any block without an info string are assumed to contain Eve code.

    - -
    ```
    -// An implicit block of Eve code. This block is parsed and executed
    -  ...
    -```
    -
    -```eve
    -// An explicit block of Eve code. This block is parsed and executed
    -  ...
    -```
    -
    -```eve disabled
    -// An explicit block of Eve code. This block is parsed, but not executed
    -  ...
    -```
    -
    -```javascript
    -// An explicit block of Javascript code. This block is ignored
    -// by the Eve compiler entirely
    -  ...
    -```
    -
    - -

    Tips

    - -

    Although they are similar, it’s important not to think of blocks like functions in other languages. Blocks don’t have a name, and you don’t “call” them like you do functions. Instead, you “use” a block by searching for the records it creates.

    - -

    Likewise, there is no “main” block. Since Eve is declarative and there is no order, there is no particular starting point for a program. As a close analog, any block that does not search for records will be the first to execute when the program starts. For instance:

    -
    commit
    -  [#student name: "Sally"]
    -  [#student name: "Ingrid"]
    -
    - -

    This block has no search action, so it doesn’t depend on any other records. Thus, it can be viewed as a “root” of the program. A program may contain many such root blocks.

    - -

    Examples

    - -

    A block with search and bind actions. The bind action adds the #div to the @browser database.

    -
    search
    -  [name]
    -
    -bind @browser
    -  [#div text: name]
    -
    - -

    A block with only a commit action:

    -
    commit
    -  [name: "Roger"]
    -
    - -
    - -

    Search for a #click in @event, create a #request in @http

    -
    search @event
    -  [#click]
    -
    -commit @http
    -  [#request #google url: "https://jsonplaceholder.typicode.com/posts/"]
    -
    - -

    Search for a #request with a response, display it in the browser

    -
    search @http
    -  [#request #google response: [json]]
    -  json = [#array]
    -  lookup[record: json, attribute, value: [title body]]
    -
    -bind @browser
    -  [#div text: "{{title}}"]
    -  [#div text: "{{body}}"]
    -
    - -

    See Also

    - -

    search | bind | commit | databases

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/browser/index.html b/handbook/browser/index.html deleted file mode 100644 index 4dc330e..0000000 --- a/handbook/browser/index.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - - - - - - @browser - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    @browser

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/commit/index.html b/handbook/commit/index.html deleted file mode 100644 index 42b61b0..0000000 --- a/handbook/commit/index.html +++ /dev/null @@ -1,642 +0,0 @@ - - - - - - - - - - - - commit - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    commit

    - -

    updates or creates records that persist until intentionally removed

    - -

    Syntax

    -
    commit
    -
    -commit @database1, ..., @databaseN
    -
    - -

    Description

    - -

    commit updates or creates new records that persist in a database until they are intentionally removed. If supporting records change or are removed, the original committed records remain in tact, and can still be searched by other blocks. By default, committed records are directed to a local database.

    - -

    commit @database1, ..., @databaseN directs committed records one or more databases.

    - -

    Bind vs. Commit

    - -

    While bind and commit both update records in a database, they do so with slightly different behavior; a bound record has the same lifetime as its supporting records, whereas a committed record exists in the database until it is removed intentionally. Let’s take a closer look at this distinction and what the implications are.

    - -

    Consider the following block that reads the current time, and prints it to the screen:

    -
    search
    -  [#time seconds]
    -
    -bind @browser
    -  [#div text: seconds]
    -
    - -

    In this block we search for the current time and bind it to a message that displays it. The message exists as long as the current time stays the same (1 second obviously). When the time changes, the current message disappears and is replaced with a new message, displaying the new time. This is the behavior of bind; bound records persist only as long as their matching records.

    - -

    Now let’s look at what commit does in contrast:

    -
    search
    -  [#time seconds]
    -
    -commit @browser
    -  [#div text: seconds]
    -
    - -

    Compared to the previous block, we only changed bind to commit. When you run this block, at first you’ll see a single message like before. However, you’ll notice that messages begin to accumulate every second. Unlike with bind, committed records persist in the database until they are intentionally removed.

    - -

    To make things very concrete, we can actually mimic the behavior of a bind using two blocks that commit. We’ve already got the first one (the one just above), that commits messages to @browser. Now all we need is a second block, one that removes old committed messages from @browser:

    -
    search 
    -  [#time seconds]
    -
    -search @browser
    -  s = seconds - 1
    -  // Do some math to handle the roll over at 60 seconds
    -  last-time = s - 60 * floor[value: s / 60]
    -  msg = [#div text: last-time]
    -  
    -commit @browser
    -  msg := none
    -
    - -

    This block searches for the message that was displayed during the previous second, and sets it to none, thereby removing it from @browser. Therefore, only the message bound to the the current time is displayed on the screen. This behavior is identical to that of the block that binds these messages instead of committing them!

    - -

    An Execution Perspective

    - -

    Another way to understand bind vs. commit is by looking at how the databases change over each tick of the Eve evaluator. We’ll consider the same program as before, looking at how its state changes over time. First, consider the bind case. When the program starts, there’s nothing in any databases; the program is a blank slate. At t1 the first #time is added to @session. This addition is bound to a #div, which is added to @browser. These changes are summarized in the first column of the table below.

    - -

    At t2, a new #time is added to @session, and the one from t1 is removed. Since we used a bind, this causes the existing #div to be removed from @browser, but it is replaced with a new #div reflecting the current time. At t3, the same operations takes place, and this process continues until the program is terminated.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -t0 - -t1 - -t2 - -t3 -
    -delta - - - -+ [#time seconds: 39] -+ [#div text: "39"] - -+ [#time seconds: 40] -- [#time seconds: 39] -+ [#div text: "40"] -- [#div text: "39"] - -+ [#time seconds: 41] -- [#time seconds: 40] -+ [#div text: "41"] -- [#div text: "40"] -
    -@session - -[ ] - -[[#time seconds: 39]] - -[[#time seconds: 40]] - -[[#time seconds: 41]] -
    -@browser - -[ ] - -[[#div text: 39]] - -[[#div text: 40]] - -[[#div text: 41]] -
    - -

    Let’s perform the same analysis in the commit case. In this program, things start off the same; initially the database is empty, and at t1 a #time and a #div are added to their respective databases. At t2, things get more interesting. While the old #time is still replaced, the #div displaying the old time is not replaced since we committed it to @browser. Indeed, in subsequent rounds of execution, the contents of @browser keeps growing.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -t0 - -t1 - -t2 - -t3 -
    -delta - - -+ [#time seconds: 39] -+ [#div text: "39"] - -+ [#time seconds: 40] -- [#time seconds: 39] -+ [#div text: "40"] - -+ [#time seconds: 41] -- [#time seconds: 40] -+ [#div text: "41"] -
    -@session - -[ ] - -[[#time seconds: 39]] - -[[#time seconds: 40]] - -[[#time seconds: 41]] -
    -@browser - -[ ] - -[[#div text: 39]] - -[[#div text: 39], - [#div text: 40]] - -[[#div text: 39], - [#div text: 40], - [#div text: 41]] -
    - -

    Tips

    - -

    When you want to display data in an interface element like a #div, a bind is usually the more appropriate choice compared to a commit. A bind will keep the interface element always up-to-date, whereas a commit will leave lingering elements that no longer reflect the current state of the program.

    - -

    When searching for an event like a #click, a commit is usually more appropriate than bind. When an event occurs, a record representing the event is added to a database. That record exists for exactly one “instant”, and then it is removed from the database. During that “instant”, any block searching for that event will be satisfied and can execute a bind or commit action. If you bind on the event, then the result will disappear as soon as the event does. However, if you commit on the event, then that result will persist after the event has been removed.

    - -

    Examples

    - -

    Initialize a counter when a session connects

    -
    search
    -  [#session-connect]
    -
    -commit
    -  [#counter count: 0]
    -
    - -

    Increment a counter when a button is clicked

    -
    search
    -  [#click element: [#count-button diff counter]]
    -
    -commit
    -  counter.count := counter.count + diff
    -
    - -

    See Also

    - -

    bind | databases | search

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/commonmark/index.html b/handbook/commonmark/index.html deleted file mode 100644 index fc0a94f..0000000 --- a/handbook/commonmark/index.html +++ /dev/null @@ -1,464 +0,0 @@ - - - - - - - - - - - - CommonMark - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    CommonMark

    - -

    Eve documents are compatible with CommonMark

    - -

    Syntax

    - -

    Headings

    - -
    # heading1
    -## heading2
    -### heading3
    -
    - -

    Emphasis

    - -
    *italic*
    -_italic_
    -**bold**
    -__bold__
    -
    - - - -
    [link](address)
    -
    -[link][ref]
    -[ref] : address
    -
    - -

    Lists

    - -
    - list item
    -- list item2
    -  - sublist item
    -
    -* list item
    -* list item2
    -  * sublist item
    -
    -1. ordered list1
    -2. ordered list2
    -
    -1) ordered list1
    -2) ordered list2
    -
    - -

    Quotes

    - -
    > blockquote
    -
    - -

    Code

    - -
    ```
    -  a block of code
    -```
    -
    -`Inline code` with backticks
    -
    - -

    Description

    - -

    CommonMark is an effort to standardize and remove ambiguity from the Markdown language. Eve uses CommonMark as the basis for formatting and rendering prose contained in Eve files. Eve code is written as code blocks within a document specified in CommonMark. Code blocks are delinated by code fences, three backtics before and after Eve code. Everything within a code block is treated as Eve code.

    - -

    Examples

    - -

    See Also

    - -

    literate programming | blocks | programming model

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/core/index.html b/handbook/core/index.html deleted file mode 100644 index 88717d1..0000000 --- a/handbook/core/index.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    - -
    -
    \ No newline at end of file diff --git a/handbook/databases/index.html b/handbook/databases/index.html deleted file mode 100644 index e484434..0000000 --- a/handbook/databases/index.html +++ /dev/null @@ -1,492 +0,0 @@ - - - - - - - - - - - - - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Databases

    - -

    Databases contain records

    - -

    Syntax

    -
    // search action
    -search @database1, ..., @databaseN
    -
    -// Commit action
    -commit @database1, ..., @databaseN
    -
    -// Bind action
    -bind @database1, ..., @databaseN
    -
    - -

    Description

    - -

    <action> @database performs the given action, one of search, bind, or commit, on the union of the provided databases.

    - -

    If no database is provided with an action, then that action is performed on the default @session database.

    - -

    Creating and Searching Databases

    - -

    You can create databases on-demand by simply committing a record to one. e.g.

    - -
    commit @my-database
    -  [#my-record]
    -
    - -

    This block will create a new database called “my-database”, which will contain the newly committed record. You can now search for this record in your new database:

    - -
    search @my-database
    -  [#my-record]
    -
    -bind @browser
    -  [#div text: "Found a record!"]
    -
    - -

    Special Databases

    - -

    Eve has some built-in databases that have meaning to the runtime.

    - -
      -
    • @session - the default database when no database is specified with an action.
    • -
    • @view - records committed to @view are used to visualize data.
    • -
    • @event - contains events originating from the DOM
    • -
    • @browser - Eve clients running in the browser render applicable records in this @browser as HTML elements.
    • -
    • @http - Stores records representing HTTP requests and responses
    • -
    - -

    Examples

    - -

    Display the element that was clicked in the DOM

    -
    search @event
    -  [#click #direct-target element]
    -
    -commit @browser
    -  [#div text: "{{element}} was clicked."]
    -
    - -

    Commit some data in @session, and then display it on a button click.

    - -
    commit
    -  [#for-display text: "Hello"]
    -
    - -

    We are searching over three databases to complete this block.

    - -
      -
    • the #click is in @event
    • -
    • the #button is in @browser
    • -
    • the text for display is in @session. This needs to be made explicit; since we are searching in other databases, @session is not searched implicitly.
    • -
    - -
    search @event @browser @session
    -  [#click element: [#button]]
    -  [#for-display text]
    -
    -commit @browser
    -  [#div text]
    -
    - -

    This block could have been written with two searches for the same effect:

    - -
    search @event @browser
    -  [#click element: [#button]]
    -
    -search
    -  [#for-display text]
    -
    -commit @browser
    -  [#div text]
    -
    - -

    See Also

    - -

    search | bind | commit

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/datetime/index.html b/handbook/datetime/index.html deleted file mode 100644 index 18f218f..0000000 --- a/handbook/datetime/index.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - Date & Time - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Date & Time

    - -
      -
    • time - The current system time
    • -
    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/datetime/time/index.html b/handbook/datetime/time/index.html deleted file mode 100644 index 2a0a8ff..0000000 --- a/handbook/datetime/time/index.html +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - - - - - - - time - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    time

    - -

    provides the current time

    - -

    Syntax

    -
    [#time year 
    -       month 
    -       day 
    -       hours 
    -       hours-24 
    -       minutes 
    -       seconds 
    -       time-string 
    -       time seconds 
    -       frames 
    -       ampm]
    -
    - -

    Attributes

    - -
      -
    • year - the current year
    • -
    • month - the current month from 0 to 11
    • -
    • day - the current day of the month from 1 to 31
    • -
    • hours - current hour from 0 to 11
    • -
    • hours-24 - current hour from 0 to 23
    • -
    • minutes - current minute from 0 to 59
    • -
    • seconds - current second from 0 to 59
    • -
    • time-string - the current time in a string of the form HH:MM AM/PM
    • -
    • timestamp - the number of milliseconds since midnight January 1, 1970
    • -
    • ampm - a string indicating morning or evening
    • -
    • frames - the number of frames elapsed since the program began. This fastest updating attribute on #time, refreshing evey 16 milliseconds.
    • -
    - -

    Description

    - -

    Provides the current time as reported by the system clock.

    - -

    Time updates at the frequency of the smallest unit of time selected in the record.

    - -

    Examples

    - -

    Prints the current time as a formatted string.

    -
    search
    -  [#time hours minutes seconds]
    -
    -bind @browser
    -  [#div text: "The time is {{hours}}:{{minutes}}:{{seconds}}"]
    -
    - -

    Example Usage

    - - - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/docker/index.html b/handbook/docker/index.html deleted file mode 100644 index 49ecadc..0000000 --- a/handbook/docker/index.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - - - - - - - Docker - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Eve in Docker

    - -

    A Docker container for Eve is available on Docker Hub. After installing Docker for your platform, you can download our container with the following command:

    - -
    docker pull witheve/eve
    -
    - -

    Windows Users - Docker for Windows requires Microsoft Hyper-V, which requires Windows 10.

    - -

    Examples

    - -

    To run the Docker container, execute:

    - -
    docker run -p [port]:8080 witheve/eve
    -
    - -

    [port] is an available port on your local machine. It can be 8080 or any other port you would like. Then direct your browser to http://localhost:[port] to access the editor.

    - -

    [eve_file] is a path to a *.eve file you would like to build. The working directory of the container is eve/build, so to run a program in the eve/examples directory, you need to provide a relative path e.g.

    - -
    docker -p 8080:8080 witheve/eve
    -
    - -

    To pass Eve files on your local machine into the container, you’ll need to mount a docker volume.

    - -

    See also

    - -

    linux | mac | windows | npm |running

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/ebnf/index.html b/handbook/ebnf/index.html deleted file mode 100644 index 2a1d664..0000000 --- a/handbook/ebnf/index.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - - - - - - - - - Grammar - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Eve EBNF grammar

    - -

    The following specification is expressed in Extended Backus–Naur Form

    - -

    Basics

    -
    newline = "\n"
    -whitespace =  " " | "\t" | "," | newline;
    -unicode = ? all unicode chars - whitespace ?;
    -specials = "@" | "#" | "." | "," | "(" | ")" | "[" | "]" | "{" | "}" | "⦑" | "⦒" | ":" | "\"";
    -non-special = unicode - specials;
    -
    - -

    Values

    -
    none = "none";
    -boolean = "true" | "false";
    -numeric = "0" .. "9";
    -number = ["-"] {numeric} ["." {numeric}];
    -string-interpolation = "{{" expression "}}";
    -string = "\"" {string-interpolation | unicode - "\"" | "\\\"" | whitespace} "\"";
    -uuid ="⦑" (unicode - specials)  "⦒"
    -
    - -

    Keywords and Identifiers

    -
    search = "search";
    -action = "bind" | "commit";
    -if = "if";
    -then = "then";
    -else = "else";
    -is = "is";
    -not = "not";
    -none = "none";
    -keyword = search | action | if | then | else | boolean | is | not | none
    -non-special-non-numeric = non-special - numeric
    -identifier = (non-special-non-numeric {non-special}) - keyword - "```";
    -
    - -

    Comparisons

    -
    equality = ":" | "=";
    -comparator = equality | ">" | "<" | ">=" | "<=" | "!=";
    -comparison = expression whitespace+ comparator whitespace+ expression;
    -
    - -

    Functions

    -
    infix-op = "*" | "+" | "-" | "/";
    -infix = expression infix-op expression;
    -function = identifier "[" [attribute] {whitespace+ attribute} "]";
    -
    - -

    Records and Attributes

    -
    record = "[" [attribute] {whitespace+ attribute} "]"
    -attribute = name | tag | attribute-not | identifier {whitespace+ comparator whitespace+ expression};
    -name = "@" (identifier | string);
    -tag = "#" (identifier | string);
    -attribute-not = not "(" whitespace* identifier [comparator whitespace+ expression] ")";
    -attribute-access = identifier whitespace* {"." whitespace* identifier}+
    -
    - -

    Special Forms

    -
    not-statement = not "(" statement {whitespace+ statement} ")";
    -is-expression = is "(" comparison ")";
    -
    - -

    Expression

    -
    expression = number | identifier | function | infix | record | attribute-access;
    -
    - -

    Statements

    -
    comment = "//" {unicode | whitespace - newline} newline
    -statement = record | function | not-statement | if-statement | comparison | comment
    -
    - -

    Action Statements

    -
    create-action = (identifier whitespace+ equality whitespace+ record) | record
    -merge-action = (identifier | attribute-access) whitespace+ "<-" whitespace+ record
    -name-tag-action = (identifier | attribute-access) whitespace+ ("+=" | "-=") whitespace+ (name | tag)
    -remove-action = (identifier | attribute-access) whitespace+ ":=" whitespace+ none
    -attribute-action = attribute-access whitespace+ (":=" | "+=" | "-=") whitespace+ expression
    -action-operation = create-action | merge-action | name-tag-action | remove-action | attribute-action
    -
    - -

    If-Then

    -
    group = "(" expression {whitespace+ expression} ")"
    -binding-group = "(" identifier {whitespace+ identifier} ")"
    -if-result = (group | expression);
    -if-expression = if whitespace+ {statement whitespace+} then whitespace+ if-result;
    -else-if-expression = else whitespace+ if whitespace+ {statement whitespace+} then whitespace+ if-result;
    -else-expression = else whitespace+ if-result
    -if-statement = (identifier | binding-group) whitespace+ equality whitespace+
    -               if-expression
    -               {whitespace+ (if-expression | else-if-expression)}
    -               [else-expression]
    -
    - -

    Sections

    -
    database-declaration = name | "(" {name whitespace+} ")"
    -match-section = search whitespace+ [database-declaration whitespace+] {statement whitespace}
    -action-section = action whitespace+ [database-declaration whitespace+] {action-statement whitespace}
    -section = match-sectiong | action-section
    -
    - -

    Program and Blocks

    -
    fence-symbol = "```"
    -start-fence = newline fence-symbol [whitespace* (unicode - newline)] newline
    -end-fence = newline fence-symbol newline
    -block = start-fence {section} end-fence
    -program = {unicode | whitespace | block}
    -
    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/equality/index.html b/handbook/equality/index.html deleted file mode 100644 index 5c00183..0000000 --- a/handbook/equality/index.html +++ /dev/null @@ -1,449 +0,0 @@ - - - - - - - - - - - - Equality - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Equality

    - -

    = and : assert the equality of two values

    - -

    Syntax

    -
    // Use : in a record to bind an attribute to a value
    -[attribute: value]
    -
    -// Use = outside a record to bind an attribute to a value
    -[attribute]
    -attribute = value
    -
    - -

    Description

    - -

    [attribute: value] binds value to attribute, so that only records with attributes of the given value are returned. For instance, [name: "John"] selects all records with a name attribute equal to “John”. You can achieve the same effect with the = operator by first searching for a record. For instance:

    -
    [name]
    -name = "John"
    -
    - -

    This example further demonstrates that in Eve, variables with the same name are equivalent. Here, name inside the record and name on the second line are the same. This has particular implications, especially in the context of joining records. For instance:

    -
    search
    -  [#student name school: name]
    -  [#school name address]
    -
    - -

    This block searches for #students and #schools with the same name. This means if you have a school named “South High School”, it won’t match unless there is also a student named “South High School”. If you want to use attributes, but don’t want to join on them, you can access them via dot notation.

    -
    search
    -  [#student name school: schools.name]
    -  schools = [#school address]
    -
    - -

    This will correctly allow us to relate students and the addresses of the schools they attend.

    - -

    Tips

    - -

    Eve has two identical equivalency operators, : and =. They have the same semantic meaning, and could be used interchangeably. However, for readability reasons we encourage you to use : to express equality within records, and = outside of records. For example [attribute: value] is good, while we don’t encourage [attribute = value], even though it is semantically equivalent.

    - -

    Examples

    - -

    The following block will never execute the bind action because of a contradiction in the search:

    -
    search
    -  x = 10
    -  x = 20
    -
    -bind @browser
    -  [#div text: "This will never display"]
    -
    - -

    The search action says that x = 10 and x = 20, which is never true. Since there is no order or assignment in Eve, this statement does not first set x to 10 and then to 20. To see this more clearly, these two statements could be written as one:x = 10 = 20.

    - -

    See Also

    - -

    inequality | joins

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/equivalence/index.html b/handbook/equivalence/index.html deleted file mode 100644 index ef938a0..0000000 --- a/handbook/equivalence/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - - - - - - Equivalence - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Equivalence

    - -
      -
    • Equality - Expresses when two statements are equality
    • -
    • Inequality - Expresses the relationship between two statements when they are not equality
    • -
    • Joins - Relate disjoint records by binding attributes from one with the other.
    • -
    - -

    See Also

    - -

    equality | inequality | joins

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/event/change/index.html b/handbook/event/change/index.html deleted file mode 100644 index d935b5a..0000000 --- a/handbook/event/change/index.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - - - - - - - change - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    change

    - -

    change event

    - -

    Syntax

    - -
    [#change]
    -[#change element]
    -[#change #direct-target element]
    -
    - -

    Attributes

    - -
      -
    • #direct-target - selects only directly changed elements, as opposed to elements to which the event bubbles.
    • -
    • element - the element that changed.
    • -
    - -

    Description

    - -

    When an element in the DOM has changed, a #change record is created in the @event database.

    - -

    Examples

    - -

    Initialize the DOM with a select element:

    -
    commit @browser
    -  [#select #countries children: 
    -    [#option text: "italy"] 
    -    [#option text: "france"] 
    -    [#option text: "spain"]
    -  ]
    -
    - -

    Listen for change event emitted from select element when a country has been selected:

    -
    search @session @browser @event
    -  element = [#change element: [#select #countries]]
    -
    -commit @view
    -  [#value | value: "{{element.value}}"] // it will print "italy", "france" or "spain"
    -
    - -

    See Also

    - -

    click

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/event/click/index.html b/handbook/event/click/index.html deleted file mode 100644 index 7bc9520..0000000 --- a/handbook/event/click/index.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - - - - - - click - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    click

    - -

    click event

    - -

    Syntax

    - -
    [#click]
    -[#click element]
    -[#click #direct-target element]
    -
    - -

    Attributes

    - -
      -
    • #direct-target - selects only directly clicked elements, as opposed to elements to which the event bubbles.
    • -
    • element - the element that was clicked.
    • -
    - -

    Description

    - -

    When an element in the DOM is clicked, a #click record is created in the @event database.

    - -

    Examples

    - -

    Initialize the DOM with a button element:

    -
    commit @browser
    -  [#button #btnHello text: "Click Me"]
    -
    - -

    Listen for click event emitted from button element it gets clicked:

    -
    search @session @browser @event
    -  [#click element: [#button #btnHello]]
    -
    -commit @view
    -  [#value | value: "The button has been clicked"]
    -
    - -

    See Also

    - -

    change

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/event/index.html b/handbook/event/index.html deleted file mode 100644 index 1fcf921..0000000 --- a/handbook/event/index.html +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - @event - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    @event

    - -

    click - a left-button mouse click event

    - -

    change - an element change event

    - -

    keydown - a key down event

    - -

    keyup - a key up event

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/event/keydown/index.html b/handbook/event/keydown/index.html deleted file mode 100644 index 2f9837d..0000000 --- a/handbook/event/keydown/index.html +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - - - - - - - keydown - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    keydown

    - -

    key down event

    - -

    Syntax

    - -
    [#keydown]
    -[#keydown element]
    -
    - -

    Attributes

    - -
      -
    • element - the element on which the key was pressed.
    • -
    - -

    Description

    - -

    When a key is pressed when an element in the DOM is focused, a #keydown record is created in the @event database.

    - -

    Examples

    -
    search @event
    -  event = [#keydown key]
    -
    -commit @browser
    -  [#span text: "key pressed: {{key}}" event]
    -
    - -

    See Also

    - -

    keyup

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/event/keyup/index.html b/handbook/event/keyup/index.html deleted file mode 100644 index 03aa7c6..0000000 --- a/handbook/event/keyup/index.html +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - - - - - - - keyup - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    keyup

    - -

    key up event

    - -

    Syntax

    - -
    [#keyup]
    -[#keyup element]
    -
    - -

    Attributes

    - -
      -
    • element - the element on which the key was released.
    • -
    - -

    Description

    - -

    When a key is released when an element in the DOM is focused, a #keyup record is created in the @event database.

    - -

    Examples

    -
    search @event
    -  event = [#keyup key]
    -
    -commit @browser
    -  [#span text: "key released: {{key}}" event]
    -
    - -

    See Also

    - -

    keydown

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/expressions/index.html b/handbook/expressions/index.html deleted file mode 100644 index 559be7a..0000000 --- a/handbook/expressions/index.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - - - - - - Expressions - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    - -
    -
    \ No newline at end of file diff --git a/handbook/functions/index.html b/handbook/functions/index.html deleted file mode 100644 index 84009d5..0000000 --- a/handbook/functions/index.html +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - - - - - - - Functions - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Functions

    - -

    Functions map one or more arguments to one or more values.

    - -

    Syntax

    -
    // A typical function call
    -value = fn[argument]
    -
    -// A function call with multiple arguments
    -value = fn[argument1, ..., argumentN]
    -
    -// A function call with multiple arguments and multiple return values
    -(value1, value2) = fn[argument1, ..., argumentN]
    -
    -// A desugared function call
    -[#fn #function argument1, ... argumentN, value1, ..., valueN]
    -
    - -

    Description

    - -

    Functions as they exist in other languages are mostly obviated by Eve’s tag semantics. Consider the following function call in a C-family language.

    -
    // A typical function call
    -x = sin(1.5);                              
    -
    - -

    In Eve, we could match a record that operates similarly:

    -
    [#sin #function radians: 1.5, return: x]
    -
    - -

    These statements accomplish the same objective: store the sine of an angle in a result variable. The Eve syntax is at a disadvantage though, because it cannot be composed into an expression like a typical function. Therefore, specific Eve records can be used as traditional functions:

    -
    x = sin[radians: 1.5]
    -
    - -

    Let’s look at what makes Eve functions different.

    - -

    Explicit Arguments

    - -

    A function’s arguments are enclosed in square brackets to draw attention to the fact that functions in Eve are just regular records. Also like records, arguments are stated explicitly. This has several advantages over typical calling patterns:

    - -
      -
    • Explicit arguments are self-documenting, so a reader unfamiliar with the function can understand more about the function without looking up exactly how it works. In the case of sin, you don’t have to know whether the inputs have to be in radians or degrees; the call-site tells you.

    • - -
    • Eve provides alternative calling patterns for functions. Some languages have two sin functions, one for angles in radians and another for angles in degrees. By contrast, Eve has a single sin function. If your angles are in radians, you call sin[radians], whereas if your angles are in degrees, you call sin[degrees].

    • - -
    • Like all records, you can state arguments in any order. This opens up an easy path for optional arguments: include the arguments you want and leave out the ones you don’t.

    • -
    - -

    Referential Transparency

    - -

    All expressions in Eve are referentially transparent, meaning you can replace the expression with its result and the behavior of the program will not change. This in turn means that expressions are side-effect free, and the only thing they depend on is their input arguments. Referential transparency is key to enabling some key features in Eve, like time travel debugging and provenance.

    - -

    Set Semantics

    - -

    In Eve, functions work over sets, meaning that a function will be applied to all elements of the input sets, resulting in an output that is itself a set. For more, see the document on set semantics.

    - -

    See Also

    - -

    aggregate | set semantics

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/general/index.html b/handbook/general/index.html deleted file mode 100644 index 92ce1f2..0000000 --- a/handbook/general/index.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - General - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    General

    - -
      -
    • sort - Orders elements in a set
    • -
    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/general/sort/index.html b/handbook/general/sort/index.html deleted file mode 100644 index 0e9f8d1..0000000 --- a/handbook/general/sort/index.html +++ /dev/null @@ -1,533 +0,0 @@ - - - - - - - - - - - - sort - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    sort

    - -

    generates an ordering for a set

    - -

    Syntax

    -
    // Sort one or more values
    -index = sort[value]
    -index = sort[value: (value1, value2, ...)]
    -
    -// Sort one or more values, and specify the direction for each
    -index = sort[value direction]
    -index = sort[value: (value1, value2, ...), direction: ("up", "down", ...)]
    -
    -// Sort according to some grouping
    -index = sort[value per]
    -index = sort[value direction per]
    -
    - -

    Arguments

    - -
      -
    • value - one or more variables to sort. More than one variable can be provided using a list e.g. sort[value: (value1, ..., valueN)], and they will be sorted in turn.
    • -
    • direction - _optional_ - one or more directions by which to sort value. If no direction is provided, all variables are sorted from smallest to largest. Possible values are: - -
        -
      • “up” for sorting from smallest to largest.
      • -
      • “down” for sorting from largest to smallest.
      • -
    • -
    • per - _optional_ - Instead of sorting the whole set, per allows you to divide the set into groups and sort each one.
    • -
    - -

    The output is a set of indices, each of which maps to an element of the sorted variable. For example, if the value is ("A", "C", "D", "B"), then index is (1, 3, 4, 2).

    - -

    Description

    - -

    Sort generates an index that describes the ordering of an input value. It’s important to remember that variables in Eve are sets, and therefore have no ordering. Because of this, sort does not reorder value, but it generates a set of indices, each of which maps to an element in value.

    - -

    Sort is flexible, and can generate an ordering over multiple dimensions, directions, and groupings.

    - -

    index = sort[value] generates an ordering of value from smallest to largest.

    - -

    index = sort[value direction] generates an ordering of value in a given direction. Acceptable values are “up” and “down”.

    - -

    index = sort[value: (value1, ... , valueN)] generates an ordering of a list of values, ordering by value1 first, then value2, and so on. For example, if you have #person records with name, age and height attributes, you could sort as follows:

    -
    search
    -  [#person name age height]
    -  index = sort[value: (age, name, height)]
    -
    - -

    This will sort the people first by age, then by name, then by height.

    - -

    index = sort[value: (value1, ... , valueN), direction: (direction1, ... , directionN)] does the same as above, but you can specify the direction you sort each variable. Acceptable value for direction are “up” and “down”. By default, values are sorted in the “up” direction.

    - -

    index = sort[value per] sorts value, grouped by per. This divides value into groups according to the elements of per, and each one is sorted.

    - -

    Examples

    - -

    We have #student records with grade (1 - 12), teacher, GPA (0.0 - 4.0) attributes. We can sort the students by grade:

    -
    search
    -  [#student name grade]
    -  index = sort[value: grade]
    -
    -bind @browser
    -  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    -
    - -

    The browser handles the task of rendering the divs in the order specified by the sortattribute. Taking this further, we can choose the direction of the sortted set, whether “up” or “down”. The default direction is “up” when none is specified.

    -
    search
    -  [#student name grade]
    -  index = sort[value: grade, direction: "down"]
    -  
    -bind @browser
    -  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    -
    - -

    You can also sort across multiple axes of a record. For instance, we can sort grade from 9 to 12, then sort by name from Z - A.

    -
    search
    -  [#student name grade]
    -  index = sort[value: (grade, name) , direction: ("up","down")]
    -
    -bind @browser
    -  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    -
    - -

    This can be extended to sort any number of attributes

    -
    search
    -  [#student name grade teacher GPA]
    -  index = sort[value: (grade, teacher, name, GPA) , direction: ("up", "down", "up", "down")]
    -
    -bind @browser
    -  [#div sort: index, text: "{{index}} - {{name}} {{grade}} {{teacher}} {{GPA}}"]
    -
    - -

    Finally, we can group sorted attributes with the per argument. Here you can see the difference between sorting by name then grade, and sorting by name per grade.

    -
    search
    -  [#student name grade GPA]
    -  index = sort[value: (GPA, name), per: grade]
    -  
    -bind @browser
    -  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    -
    - -

    When you sort per grade, then name is first grouped by grade, and each of those groups is then sorted. This is why index goes from 1-6 instead of 1-20 as in the other examples; Although there are still 20 elements in index, the maximum is 6 because no grade has more than 6 students. You might want to sort data this way in order to display it in a nested structure, such as this:

    -
    search
    -    [#student name grade teacher]
    -  index = sort[value: name, per: grade]
    -  
    -bind @browser
    -  [#div grade children: 
    -    [#h3 sort: 0, text: "Grade: {{grade}}"]
    -    [#div sort: index, text: "{{index}} {{name}}"]]
    -
    - -
    - -

    Commit some test data

    -
    commit
    -  [#student name: "Mach", grade: 9, teacher: "Mr. Black", GPA: "1.0"]
    -  [#student name: "Pok", grade: 9, teacher: "Mrs. Brown", GPA: "3.4"]
    -  [#student name: "Karima", grade: 9, teacher: "Mr. Black", GPA: "2.4"]
    -  [#student name: "Garth", grade: 9, teacher: "Mrs. Brown", GPA: "2.8"]
    -  [#student name: "Berta", grade: 9, teacher: "Mr. Black", GPA: "2.7"]
    -  [#student name: "Maxine", grade: 10, teacher: "Mr. Red", GPA: "4.0"]
    -  [#student name: "Gwyn", grade: 10, teacher: "Mrs. Blue", GPA: "2.5"]
    -  [#student name: "Ilse", grade: 10, teacher: "Mr. Red", GPA: "3.0"]
    -  [#student name: "Hobert", grade: 11, teacher: "Ms. Green", GPA: "3.2"]
    -  [#student name: "Arlean", grade: 10, teacher: "Mr. Red", GPA: "2.4"]
    -  [#student name: "Ty", grade: 10, teacher: "Mrs. Blue", GPA: "1.7"]
    -  [#student name: "Kermit", grade: 11, teacher: "Ms. Green", GPA: "2.9"]
    -  [#student name: "Cortez", grade: 11, teacher: "Mrs. Orange", GPA: "2.3"]
    -  [#student name: "Polly", grade: 11, teacher: "Ms. Green", GPA: "2.1"]
    -  [#student name: "Damion", grade: 12, teacher: "Mrs. Purple", GPA: "3.8"]
    -  [#student name: "Gretchen", grade: 12, teacher: "Mrs. Yellow", GPA: "2.8"]
    -  [#student name: "Octavio", grade: 12, teacher: "Mrs. Purple", GPA: "3.4"]
    -  [#student name: "Pa", grade: 12, teacher: "Mrs. Yellow", GPA: "3.5"]
    -  [#student name: "Elwanda", grade: 10, teacher: "Mrs. Blue", GPA: "1.3"]
    -  [#student name: "Guadalupe", grade: 11, teacher: "Mrs. Orange", GPA: "3.7"]
    -
    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/glossary/index.html b/handbook/glossary/index.html deleted file mode 100644 index 581f1db..0000000 --- a/handbook/glossary/index.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - - - - - - Glossary - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Glossary

    - -

    Cardinality

    - -

    Cardinality is the number of elements in a set. For example, the set (5, 4, 2) contains three elements, so the cardinality of the set is 3.

    - -

    Cartesian Product

    - -

    The Cartesian product A × B of two sets A and B is the set of ordered pairs (a,b) where a ∈ A and b ∈ B. For example, if A = (1, 2) and B = ("A", "B"), then A x B = ((1,"A"), (1, "B"), (2, "A"), (2, "B")).

    - -

    Entity

    - -

    Entities are unique IDs in the Eve DB. An entity can represent anything - a person, a business, a message, an application, a button, etc.

    - -

    Fact

    - -

    Facts describe entities. Each fact is composed of an attribute and a value, and is associated with a specific entity. Facts might be a person’s age, an employee’s salary, a department’s budget, etc.

    - -

    Provenance

    - -

    Provenance is the record and history of data and its place of origin. In Eve, provenance tells you how a value is calculated by looking back at the history of its computation. Provenance can be used to precisely identify the cause of unexpected data in your application.

    - -

    Record

    - -

    Records are composed of facts. In Eve, you select records from the database by supplying a pattern of attributes, and any records matching that pattern are returned to you. For example, a record might be the ages, salaries, and departments of employees.

    - -

    Referential Transparency

    - -

    An expression is referentially transparency if it can be replaced with its result without changing the behavior of the program. Expression that are not referentially transparent tend to have side effects, or rely on state that is not supplied as part of the input arguments, but through a side channel.

    - -

    Set

    - -

    In mathematics, a set is a collection of elements where each element is unique. Sets have no order, so position in the set does not imply uniqueness. For example (1, 2, 3) is a set, whereas (1, 2, 1, 3) is not a set, because 1 appears twice. Furthermore, this means that (1, 2, 3) is equivalent to (3, 1, 2), (3, 2, 1), and (1, 3, 2) because they have the same elements regardless of order. Elements of a set can be anything, and therefore can be sets themselves. To make the previous collection a set we could do the following: ((1,A), (2,B), (1,C), (3,D)).

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/help/index.html b/handbook/help/index.html deleted file mode 100644 index 74c3091..0000000 --- a/handbook/help/index.html +++ /dev/null @@ -1,425 +0,0 @@ - - - - - - - - - - - - Getting Help - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Getting Help

    - -

    If you have any questions or get stuck while you are learning Eve, there are several ways to get help:

    - -

    Before reaching out, make sure you’ve looked at the following resources:

    - -
      -
    • Read the quick start guide. It contains everything you’ll need to build your first Eve program.
    • -
    • Read the syntax reference. It summarizes the syntax of Eve on a single sheet of paper.
    • -
    - -

    If you’re still stuck, you can get in touch with Eve developers and the community through these channels:

    - -
      -
    • Send a message to the mailing list. We generally respond to messages within a day.
    • -
    • Send a tweet to @with_eve.
    • -
    • Submit an issue to our GitHub repository.
    • -
    • Join the Eve Slack channel to talk with Eve developers and the community in real time (coming soon)
    • -
    - -

    Hare are some more resources to help you learn Eve:

    - -
      -
    • Browse our growing catalog of example applications for something similar to what you’re doing.
    • -
    • Read our development blog to learn more about what goes on behind the scenes at Eve.
    • -
    - -

    See Also

    - -

    guides | tutorials | mailing list | @with_eve | GitHub

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/http/index.html b/handbook/http/index.html deleted file mode 100644 index 747b3be..0000000 --- a/handbook/http/index.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - - - - - - @http - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    @http

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/if-then/index.html b/handbook/if-then/index.html deleted file mode 100644 index a4c4316..0000000 --- a/handbook/if-then/index.html +++ /dev/null @@ -1,472 +0,0 @@ - - - - - - - - - - - - if-then - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    If-Then

    - -

    Conditional equivalence

    - -

    Syntax

    -
    result = if record then value
    -  
    -result = if record then value
    -         else value
    -
    -result = if record then value
    -         if record then value
    -
    -result = if record then value
    -         else if record then value
    -
    -result = if record then value
    -         else if record then value
    -         else value
    -
    -(result1, ..., resultN) = if record then (value, ..., valueN)
    -
    -(result1, ..., resultN) = if record then (value, ..., valueN)
    -                          else (value, ..., valueN)
    -
    -(result1, ..., resultN) = if record1 then (value, ..., valueN)
    -                          if record2 then (value, ..., valueN)
    -
    -(result1, ..., resultN) = if record1 then (value, ..., valueN)
    -                          else if record2 then (value, ..., valueN)
    -
    -(result1, ..., resultN) = if record1 then (value, ..., valueN)
    -                          else if record2 then (value, ..., valueN)
    -                          else (value, ..., valueN)                                          
    -
    - -

    Description

    - -

    If allows conditional equivalence, and works a lot like if in other languages. Our if has two components: The keyword if followed by a conditional; and the keyword then followed by one or more return objects. An optional else keyword indicates the default value:

    - -

    This block is used to switch between the singular and plural for displaying the number of burgers each guest is eating. If statements can be composed, permitting the creation of complex conditional statements. For instance, instead of inviting friends and their spouses in two blocks (the first two blocks in the example program), I could have done it in a single block using an if statement:

    - -

    This is equivalent to a union/and operator, which combines elements from disparate sets into the same set. The second way to use if is in conjunction with the else keyword:

    - -

    This is equivalent to a choose/or operator, selecting only the first branch with a non-empty body. A bug in this program is that if some guest is tagged both #hungry and #vegetarian, that guest will actually receive two burgers. Therefore, while order of statements usually does not matter in Eve, if statements are one area where it does.

    - -

    A final feature of the if statement is multiple returns. For instance, we could have done this:

    - -

    Examples

    - -

    Basic usage

    -
    burger-switch = if guest.burgers = 1 then "burger"
    -                else "burgers"
    -
    -
    [@"my party" date]
    -friend = [#friend busy-dates != date]
    -guest = if friend then friend
    -        if friend.spouse then friend.spouse
    -
    - -

    Using else if

    -
    burgers = if guest = [@Arthur] then 3
    -          else if guest = [#hungry] then 2
    -          else if guest = [#vegetarian] then 0
    -          else 1
    -
    - -

    Multiple returns

    -
    (burgers, status) = if guest = [@Arthur] then (3, #fed)
    -                    else if guest = [#hungry] then (2, #fed)
    -                    else if guest = [#vegetarian] then (0, #needsfood)
    -                    else (1, #fed)
    -
    - -

    See Also

    - -

    expressions | records | functions

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/inequality/index.html b/handbook/inequality/index.html deleted file mode 100644 index b262c05..0000000 --- a/handbook/inequality/index.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - - - - - - - - Inequality - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Inequality

    - -

    inequality operators filter records

    - -

    Syntax

    -
    // Inequality Operators
    ->, >=, <, <=, !=
    -
    -// Inside of records
    -[attribute >= value]
    -[attribute >= variable]
    -
    -// Outside of records
    -variable >= value
    -variable >= variable
    -
    -// Satisfy multiple constraints in a single line
    -value <= variable <= value   
    -variable <= variable <= variable
    -
    - -

    Description

    - -

    Attributes can be filtered using inequality operators, including >, >=, <, <= and !=.

    - -

    >, >=, <, <= can only filter using values that can be sorted. For instance, you can use these operators to filter numbers, but you cannot filter records this way.

    - -

    != tests only for inequality, and doesn’t compare whether an attribute is greater or less than a particular value. Therefore, != can be used to filter any value.

    - -

    You can use inequality operators inside records or outside of them. Inside of records, you can filter an attribute on a single value. Outside of records, you have more freedom to filter on multiple values. For instance, if you want only records with an attribute between a maximum and minimum value, you can write something like min-value < variable < max-value.

    - -

    Examples

    - -

    Select students with a low GPA

    -
    search @test-data
    -  [#student name GPA < 2.0]
    -
    -bind @browser
    -  [#div text: "{{name}} needs a tutor."]
    -
    - -

    Select students with a GPA over 2.0 but less than 3.0

    -
    search @test-data
    -  [#student name GPA]
    -  2.0 <= GPA < 3.0
    -
    -bind @browser
    -  [#div text: "{{name}} is doing fine"]
    -
    - -

    You can be very specific with filters. Select students named “John” in 11th or 12th grade with a GPA between 2.0 and 3.0, and who don’t attend “West” high school.

    -
    search @test-data
    -  students = [#student name: "John", grade >= 11, school != "West" ]
    -  2.0 <= students.GPA < 3.0
    -
    -bind @browser
    -  [#div text: "{{name}} is doing fine"]  
    -
    - -

    See Also

    - -

    equality | joins | equivalence

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/installation/index.html b/handbook/installation/index.html deleted file mode 100644 index ae669ac..0000000 --- a/handbook/installation/index.html +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - - - - - - - Getting Eve - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    - -
    -
    \ No newline at end of file diff --git a/handbook/intro/index.html b/handbook/intro/index.html deleted file mode 100644 index 5394c67..0000000 --- a/handbook/intro/index.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - - - - - - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Introduction

    - -

    Notable Features

    - -
      -
    • Eve programs aren’t talking to a database, they are the database. That means no plumbing, no impedance mismatch, and no extra infrastructure is needed.

    • - -
    • Everything is data. The file system, http requests, the DOM… That means everything can be queried and everything can be reacted to.

    • - -
    • Eve’s semantics were built for concurrency, asynchrony, and distribution. There are no promises, or thread synchronizations, or borrows.

    • - -
    • Eve programs practice literate programming, since there’s no incidental ordering imposed by the language.

    • - -
    • Another result of a lack of ordering is that programs grow very organically through composition.

    • - -
    • Eve programs are naturally tiny.

    • - -
    • Correctness can be defined globally through integrity constraints, allowing people to safely contribute to an application without worrying about checking every possible invariant locally.

    • -
    - -

    See Also

    - -

    getting eve | running eve | eve programs | core language

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/is/index.html b/handbook/is/index.html deleted file mode 100644 index 3aa6e0d..0000000 --- a/handbook/is/index.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - - - - - - - is - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    is

    - -

    Tests the truth of a statement

    - -

    Syntax

    -
    y = is( ... )
    -
    - -

    Description

    - -

    y = is( ... ) tests the truth of the statement contained in the parentheses. If the statement is true, then is returns the value true, otherwise it returns false.

    - -

    Examples

    -
    search
    -  x = 10
    -  y = is(20 = x)
    -  z = is(20 = x * 2)
    -
    -bind @browser
    -  [#div text: "y is {{y}}"]
    -  [#div text: "z is {{z}}"]
    -
    - -

    The output shows that y is false while z is true.

    - -

    Example Usage

    - - - -

    See Also

    - -

    not | records | expressions

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/joins/index.html b/handbook/joins/index.html deleted file mode 100644 index a6b4a35..0000000 --- a/handbook/joins/index.html +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - - - - - - - Joins - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Joins

    - -

    joins allow you to relate two records

    - -

    Syntax

    -
    // Join two records using a bind
    -[#record1 attribute1]
    -[#record2 attribute2: attribute1]
    -
    -// Join two records using a name
    -[#record1 attribute]
    -[#record2 attribute]
    -
    - -

    Description

    - -

    Examples

    - -

    See Also

    - -

    equality | inequality | records

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/libraries/stdlib/index.html b/handbook/libraries/stdlib/index.html deleted file mode 100644 index 4e690da..0000000 --- a/handbook/libraries/stdlib/index.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - -

    - Aggregates -

    - - - - - - - - - - - - - - - - - - - -
    -

    gather/sort

    - Generates an ordering for a set -
    -
      -
    • for - the set to sort
    • -
    • per - (optional) - one or more attributes by which to group `for`
    • -
    • direction - (optional) - direction in which to sort `for`. Possible values are: -
        -
      • 'up' - smallest to largest; default option
      • -
      • 'down' - largest to smallest
      • -
      -
    • -
    -
    - // sorts the students by GPA - [#student GPA] - index = sort[value: GPA] -
    -

    gather/count

    - Returns the number of elements in a set -
    -
      -
    • for - the set to count over
    • -
    • per - (optional) - one or more attributes by which to group `for`
    • -
    -
    - // counts the number of citizens in each state - residents = [#citizen state] - population = count[given: residents, per: state] -
    -

    gather/sum

    - Returns the sum of values in a set of attributes -
    -
      -
    • for - the set to gather
    • -
    • value - the specific variable to be summed
    • -
    • per - (optional) - one or more attributes by which to group `for`
    • -
    -
    - // returns the sum of salaries for each department - employees = [#employee salary department] - expenses = gather/sum[for: employees, value: employees.salary, per: department] -
    - -

    - Math -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    +

    - Adds two numbers -
    -
      -
    • Infix notation
    • -
    -
    - total-debt = credit-card + debit-card -
    -

    -

    - Subtracts two numbers -
    -
      -
    • Infix notation
    • -
    -
    - remaining-debt = total-debt - amount_paid -
    -

    *

    - Multiplies two numbers -
    -
      -
    • Infix notation
    • -
    -
    - yearly-payments = monthly-payments * 12 -
    -

    /

    - Divides two numbers -
    -
      -
    • Infix notation
    • -
    -
    - monthly-payments = yearly-payments / 12 -
    -

    math/floor

    - Rounds a number down -
    -
      -
    • a - the number to be rounded down
    • -
    -
    - // x rounded down to 34 - x = math/floor[a: 34.2] -
    -

    math/ceil

    - Rounds a number up -
    -
      -
    • a - the number to be rounded up
    • -
    -
    - // x rounded up to 35 - x = math/floor[a: 34.2] -
    -

    math/round

    - Rounds a number to the nearest integer -
    -
      -
    • a - the number to be rounded to the nearest integer
    • -
    -
    - // x rounded to 34 - x = math/floor[a: 34.2] -
    -

    math/sin

    - Sine of an angle -
    -
      -
    • a - the angle in degrees
    • -
    -
    - // r calculated to 1 - r = math/sin[a: 90] -
    -

    math/cos

    - Cosine of an angle -
    -
      -
    • a - the angle in degrees
    • -
    -
    - // r calculated to 0 - r = math/cos[a: 90] -
    -

    math/tan

    - Tangent of an angle -
    -
      -
    • a - the angle in degrees
    • -
    -
    - // r calculated to 1 - r = math/tan[a: 45] -
    -

    math/max

    - The greater of two values -
    -
      -
    • a - a value to compare
    • -
    • b - another value to compare
    • -
    -
    - // takes the higher score - [#scores pac-man donkey-kong] - best-score = math/min[a: pac-man, b: donkey-kong] -
    -

    math/min

    - The lesser of two values -
    -
      -
    • a - a value to compare
    • -
    • b - another value to compare
    • -
    -
    - // takes the lower score - [#scores pac-man donkey-kong] - worst-score = math/min[a: pac-man, b: donkey-kong] -
    -

    math/mod

    - Modulo division -
    -
      -
    • a - the number to be divided (dividend)
    • -
    • b - the number by which to divide (divisor)
    • -
    -
    - // m is the remainder, 1 - m = math/mod[a: 5, b: 2] -
    -

    math/abs

    - Absolute value of a number -
    -
      -
    • a - the number whose absolute value is found
    • -
    -
    - // number of hours from the prime meridian - [#city latitude longitude] - hours-from-gmt = math/abs[a: latitude] / 15 -
    -

    math/to-fixed

    - Formats a number as a string to a certain number of decimal places -
    -
      -
    • a - the number to be formatted
    • -
    • b - the number of decimal places to which `a` will be formatted
    • -
    -
    - // pi represented as the string "3.14" - [#circle circumference diameter] - pi = math/to-fixed[a: (circumference / diameter), b: 2] -
    -

    math/range

    - Generates a range of numbers -
    -
      -
    • start - the start of the range
    • -
    • stop - the end of the range
    • -
    -
    - // generates integers 1 through 10 - y = math/range[start: 1, stop: 10] -
    -

    random/number

    - Generates a random number between 1 and 0 -
    -
      -
    • seed - a number used to initialize the random number generator
    • -
    -
    - // generates a random number every second - [#time minutes seconds] - x = random/number[seed: seconds] -
    - -

    - Strings -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    string/replace

    - Replaces a string of text with another -
    -
      -
    • text - the text in which to search for strings and replace them
    • -
    • replace - the string to be replaced
    • -
    • with - the string that will replace `replace`
    • -
    -
    - // Americanized version of British spelling - [#website body] - american-version = string/replace[text: body, replace: "flavour", with: "flavor"] -
    -

    string/get

    - Gets a character from a specific location in a string -
    -
      -
    • text - the text to be searched
    • -
    • at - the location to be searched
    • -
    -
    - // finds the 17th letter of the alphabet - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - letter = string/get[text: alphabet, at: 17] -
    -

    string/uppercase

    - Converts a string to uppercase -
    -
      -
    • text - the text to be converted
    • -
    -
    - funny = "lol" -really-funny = string/uppercase[text: funny] -
    -

    string/lowercase

    - Converts a string to lowercase -
    -
      -
    • text - the text to be converted
    • -
    -
    - really-funny = "LOL" -down-a-notch = string/uppercase[text: really-funny] -
    -

    string/index-of

    - Returns the position of the first occurrence of a specified value in a string -
    -
      -
    • text - the text to be searched
    • -
    • substring - the string to be found in `text`
    • -
    -
    - // Eve is in developers, starting at an index of 2 -index = string/index_of[text: "developers", substring: "eve" -
    -

    string/codepoint-length

    - Returns the length of a string in Unicode code points. -
    -
      -
    • text - the string whose length is found
    • -
    -
    - // the code point length of the word "unicode" -string = "unicode" -length-in-js = string/codepoint_length[text: string] -
    - - \ No newline at end of file diff --git a/handbook/libraries/style.css b/handbook/libraries/style.css deleted file mode 100644 index 19254f9..0000000 --- a/handbook/libraries/style.css +++ /dev/null @@ -1 +0,0 @@ -html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}*{box-sizing:border-box}body{display:flex;flex-direction:column;margin:0;background:white;color:#555;line-height:1.7;font-family:"Open Sans",Avenir,"Helvetica neue",sans-serif}h1{padding:0;margin:0;margin-bottom:15px;font-size:2em;font-weight:600}h2{padding:0;margin:0;margin-bottom:15px;font-size:1.5em}h3{padding:0;margin:0;margin-bottom:15px;font-size:1em;color}p{display:block;-webkit-margin-before:.5em;-webkit-margin-after:1em;-webkit-margin-start:0;-webkit-margin-end:0}a{color:#009ee0}a:hover{color:#00b8f1}a:active{color:#0079b1}ul{display:block;margin-left:2em}code{padding:.2em;background:#f0f2f7;white-space:pre-wrap;font-family:"Inconsolata","Monaco","Consolas","Ubuntu Mono",monospace;font-size:.9rem}strong{font-weight:600}table{border:1px black solid;margin-bottom:1em}td{border:1px black solid;width:20em} \ No newline at end of file diff --git a/handbook/linux/index.html b/handbook/linux/index.html deleted file mode 100644 index 005f499..0000000 --- a/handbook/linux/index.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - - - - - - Linux - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Installing Eve on Linux

    - -

    First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

    - -
    npm install
    -npm start
    -
    - -

    Then open http://localhost:8080/ in your browser.

    - -

    Tips

    - -

    Some distributions (most notably Ubuntu) have renamed node to nodejs. If this is the case, you’ll need to create a symlink that remaps nodejs back to node. e.g.

    - -
    ln -s /usr/bin/nodejs /usr/bin/node
    -
    - -

    Then proceed with the installation as usual

    - -

    See also

    - -

    mac | windows | docker | running

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/literate-programming/index.html b/handbook/literate-programming/index.html deleted file mode 100644 index db93ee1..0000000 --- a/handbook/literate-programming/index.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - - - - - - Literate Programming - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Literate Programming

    - -

    In the spirit of literate programming, Eve programs are primarily prose, interleaved with Eve code. Donald Knuth explains literate programming in his influential paper:

    - -
    -

    The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. Such an author … strives for a program that is comprehensible because its concepts have been introduced in an order that is best for human understanding, using a mixture of formal and informal methods that reinforce each other.

    -
    - -

    This description fits with the ethos of Eve - that programming is primarily meant to communicate with other humans, not the computer. You’ll notice the above Eve program is actually written in two languages: Markdown, used to format the prose; and Eve, which is delineated by standard Markdown code blocks. Only the content within a block is compiled, while everything else is disregarded as a comment.

    - -

    Writing code this way has several properties that result in higher quality programs:

    - -
      -
    • Literate programming forces you to consider a human audience. While this is usually the first step in writing any document, in programming the audience is typically a machine. For an Eve program, the audience might be your collaborators, your boss, or even your future self when revisiting the program in a year. By considering the audience of your program source, you create an anchor from which the narrative of your program flows, leading to a more coherent document.

    • - -
    • The human brain is wired to engage with and remember stories. Think back to a book you read (or maybe a show you watched) last year. You probably remember in great detail all of the characters and their personalities, the pivotal moments of the plot, the descriptions of the various settings, etc. But how much can you remember of a piece of code you haven’t looked at for a year? Literate programming adds another dimension to your code that will help you keep more of your program in working memory.

    • - -
    • Since Eve code blocks can be arranged in any order, literate programming encourages the programmer to arrange them in a way that makes narrative sense. Code can have a beginning, middle, and end just like a short story. Or like an epic novel, code can have many interwoven storylines. Either way, the structure of the code should follow an order imposed by a narrative, not one imposed by the compiler.

    • - -
    • Literate programming can help you think about your program more thoroughly. Through practicing literate programming, you can reveal edge cases, incorrect assumptions, gaps in understanding the problem domain, and shaky implementation details before any code is even written.

    • -
    - -

    Literate programming is a first-class design concept in Eve. We will be writing all of our programs in this manner, and will encourage others to do the same for the reasons above. That said, there is nothing in the syntax that specifically requires literate programming; you can write your program as a series of code blocks without any prose, and it will be perfectly valid.

    - -

    CommonMark

    - -

    Eve is CommonMark compatible.

    - -

    Examples

    - - - -

    See Also

    - -

    blocks | programming model | CommonMark

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/mac/index.html b/handbook/mac/index.html deleted file mode 100644 index 1ccc400..0000000 --- a/handbook/mac/index.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - - - - - - Mac - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Installing Eve on Mac

    - -

    First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

    - -
    npm install
    -npm start
    -
    - -

    Then open http://localhost:8080/ in your browser.

    - -

    See also

    - -

    linux | windows | docker | npm | running

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/abs/index.html b/handbook/math/abs/index.html deleted file mode 100644 index 79d3fd7..0000000 --- a/handbook/math/abs/index.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - - - - - - abs - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    abs

    - -

    The absolute value of a number

    - -

    Syntax

    -
    y = abs[value]
    -
    - -

    Attributes

    - -
      -
    • value - a set of numbers
    • -
    - -

    Description

    - -

    y = abs[value] returns the absolute value of the elements in value. Every positive number is kept positive, but every negative number is made positive.

    - -

    Examples

    - -

    Get the absolute value of a number

    -
    search
    -  y = abs[value: -3]
    -  
    -bind @browser
    -  [#div text: y]
    -
    - -

    Displays the number 3.

    - -

    See Also

    - -

    sign

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/ceil/index.html b/handbook/math/ceil/index.html deleted file mode 100644 index fab4b9b..0000000 --- a/handbook/math/ceil/index.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - - - - - - ceiling - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    ceiling

    - -

    Round a number up to the nearest integer.

    - -

    Syntax

    -
    y = ceiling[value]
    -
    - -

    Attributes

    - -
      -
    • value - a set of numbers
    • -
    - -

    Description

    - -

    y = ceiling[value] rounds the elements of value up to the nearest integers.

    - -

    Examples

    - -

    Calculate the ceiling of 34.2

    -
    search
    -  y = ceiling[value: 34.2]
    -  
    -bind @browser
    -  [#div text: y]
    -
    - -

    The result is 35.

    - -

    See Also

    - -

    floor | fix | round

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/cos/index.html b/handbook/math/cos/index.html deleted file mode 100644 index 209de71..0000000 --- a/handbook/math/cos/index.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - - - - - - - cos - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    cos

    - -

    Calculate the cosine of an angle

    - -

    Syntax

    -
    y = cos[radians]
    -y = cos[degrees]
    -
    - -

    Attributes

    - -
      -
    • radians - the angle in radians
    • -
    • degrees - the angle in degrees
    • -
    - -

    Description

    - -

    y = cos[degrees] calculates the cosine of an input in degrees.

    - -

    y = cos[radians] calculates the cosine of an input in radians.

    - -

    cos operates element-wise on its inputs.

    - -

    Examples

    - -

    Calculate the cosine of 90 degrees

    -
    search
    -  y = cos[degrees: 90]
    -  
    -bind @browser
    -  [#div text: y]
    -
    - -

    See Also

    - -

    sin | tan

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/fix/index.html b/handbook/math/fix/index.html deleted file mode 100644 index e33f3fc..0000000 --- a/handbook/math/fix/index.html +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - - - - - - - fix - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    fix

    - -

    Round a number toward zero.

    - -

    Syntax

    -
    y = fix[value]
    -
    - -

    Attributes

    - -
      -
    • value - a set of numbers
    • -
    - -

    Description

    - -

    y = fix[value] rounds the elements of value toward zero. This means that negative numbers will be rounded up to the nearest integer, while positive numbers will be rounded down.

    - -

    Examples

    - -

    Calculate the fix of 34.7 and -34.7

    -
    search
    -  y = fix[value: 34.7]
    -  z = fix[value: -34.7]
    -
    -bind @browser
    -  [#div text: "The fix of 34.7 is {{y}}"]
    -  [#div text: "The fix of -34.7 is {{z}}"]
    -
    - -

    We see that the fix of 34.7 is 34, while the fix of -34.7 is -34. Compare this to rounding the numbers:

    -
    search
    -  y = round[value: 34.7]
    -  z = round[value: -34.7]
    -
    -bind @browser
    -  [#div text: "The round of 34.7 is {{y}}"]
    -  [#div text: "The round of -34.7 is {{z}}"]
    -
    - -

    We see that the round of 34.7 is 35, while the round of -34.7 is -35.

    - -

    See Also

    - -

    floor | ceil | round

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/floor/index.html b/handbook/math/floor/index.html deleted file mode 100644 index 9434230..0000000 --- a/handbook/math/floor/index.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - - - - - - floor - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    floor

    - -

    Round a number down to the nearest integer.

    - -

    Syntax

    -
    y = floor[value]
    -
    - -

    Attributes

    - -
      -
    • value - a set of numbers
    • -
    - -

    Description

    - -

    y = floor[value] rounds the elements of value down to the nearest integers.

    - -

    Examples

    - -

    Calculate the floor of 34.2

    -
    search
    -  y = floor[value: 34.2]
    -
    -bind @browser
    -  [#div text: y]
    -
    - -

    The result is 34.

    - -

    See Also

    - -

    ceil | fix | round

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/index.html b/handbook/math/index.html deleted file mode 100644 index c20873c..0000000 --- a/handbook/math/index.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - - - - - - Math - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Math

    - -

    Arithmetic

    - -
      -
    • plus ( + ) - Add two numbers
    • -
    • minus ( - ) - Subtract two numbers
    • -
    • times ( * ) - Multiply two numbers
    • -
    • divide ( / ) - Divide two numbers
    • -
    - -

    General Math

    - -
      -
    • abs - Absolute value
    • -
    • ceiling - Round a number up
    • -
    • floor - Round a number down
    • -
    • round - Round a number
    • -
    • fix - Calculate the fix of a number
    • -
    • mod - Modulo division
    • -
    • exp - The number e raised to a power
    • -
    • log - Calculate the logarithm of a number
    • -
    - -

    Trigonometric Functions

    - -
      -
    • sin - Sine of an angle
    • -
    • cos - Cosine of an angle
    • -
    • tan - Tangent of an angle
    • -
    • asin - Arc sine of an angle
    • -
    • acos - Arc cosine of an angle
    • -
    • atan - Arc tangent of an angle
    • -
    • atan2 - Arc tangent using sign to determine quadrant
    • -
    - -

    Hyperbolic Functions

    - -
      -
    • sinh - Hyperbolic sine of an angle
    • -
    • cosh - Hyperbolic cosine of an angle
    • -
    • tanh - Hyperbolic tangent of an angle
    • -
    • asinh - Hyperbolic arc sine of an angle
    • -
    • acosh - Hyperbolic arc cosine of an angle
    • -
    • atanh - Hyperbolic arc tangent of an angle
    • -
    - -

    Other Functions

    - -
      -
    • range - Generates a range of numbers
    • -
    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/mod/index.html b/handbook/math/mod/index.html deleted file mode 100644 index ef9b363..0000000 --- a/handbook/math/mod/index.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - - - - - - mod - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    mod

    - -

    Return the modulus after division

    - -

    Syntax

    -
    y = mod[value, by]
    -
    - -

    Attributes

    - -
      -
    • value - the number to be divided
    • -
    • by - the number by which to divide value
    • -
    - -

    Description

    - -

    Modulo division calculates the modulus (the remainder) after dividing value by by. If value is a set of size N, then by can either be a scalar or another set of size N.

    - -

    Examples

    - -

    Keeps the value of an angle between the range [π, -π]:

    -
    search
    -  value = 30
    -  angle = mod[value, by: 2 * pi[]]
    -  pi2pi = if angle > pi[] then angle - 2 * pi[]
    -          if angle < pi[] * -1 then angle + 2 * pi[]
    -          else angle
    -        
    -bind @view
    -  [#value | value: "{{value}} -> {{pi2pi}}"]
    -
    - -

    See Also

    - -

    ceil | floor | round

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/range/index.html b/handbook/math/range/index.html deleted file mode 100644 index 4324e8c..0000000 --- a/handbook/math/range/index.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - - - - - - range - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    range

    - -

    Generates a set of numbers between two values

    - -

    Syntax

    -
    y = range[from, to]
    -y = range[from, to, increment]
    -
    - -

    Attributes

    - -
      -
    • from - the start of the range. Does not need to be an integer.
    • -
    • to - the end of the range. Does not need to be an integer.
    • -
    • increment - specifies the increment by which the elements are separated. By default, this value is 1.
    • -
    - -

    Description

    - -

    y = range[from, to] generates a set of numbers starting at from and ending at to, in increments of 1. The range generated includes from and to.

    - -

    y = range[from, to, increment] generates a set of numbers starting at from and ending at to inclusive, at a specified increment. The range generated will start at from and include as many elements as possible until the next element exceeds to. Depending on the chosen increment, this could potentially exclude to from the generated range.

    - -

    Examples

    - -

    Generate and display the integers between 1 and 10. In this example, y = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10):

    -
    search
    -  y = range[from: 1, to: 10]
    -
    -bind @browser
    -  [#div sort: y, text: y]
    -
    - -

    Generate and display the odd integers between 1 and 10. In this example, y = (1, 3, 5, 7, 9). Notice the set does not include 10 in this case.

    -
    search
    -  y = range[from: 1, to: 10, increment: 2]
    -
    -bind @browser
    -  [#div sort: y, text: y]
    -
    - -

    We can use range and Eve’s join semantics to generate indicies for a grid of cells.

    -
    search
    -  i = range[from: 1 to: 5]
    -  j = range[from: 1 to: 5]
    -  coordinate = "({{i}}, {{j}})"
    -
    -bind @browser
    -  [#div sort: coordinate, text: coordinate]
    -
    - -

    Will display:

    - -
    (1, 1)
    -(1, 2)
    -(1, 3)
    -...
    -(5, 4)
    -(5, 5)
    -
    - -

    Example Usage

    - - - -

    See Also

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/round/index.html b/handbook/math/round/index.html deleted file mode 100644 index b65c3cf..0000000 --- a/handbook/math/round/index.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - - - - - - round - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    round

    - -

    Round a number to the nearest integer

    - -

    Syntax

    -
    y = round[value]
    -
    - -

    Attributes

    - -
      -
    • value - a set of numbers
    • -
    - -

    Description

    - -

    y = round[value] rounds the elements of value toward the nearest integers.

    - -
      -
    • For positive numbers - if the fractional part of the number is greater than or equal to 0.5, then the number is rounded up. Otherwise, it is rounded down.
    • -
    • For negative numbers - if the fractional part of the number is greater than or equal to -0.5, then the number is rounded down to the nearest negative integer. Otherwise, it is rounded up.
    • -
    - -

    Examples

    -
    search
    -  y = round[value: 34.5]
    -  z = round[value: 34.4]
    -  
    -bind @browser
    -  [#div text: "The round of 34.5 is {{y}}"]
    -  [#div text: "The round of 34.4 is {{z}}"]
    -
    - -

    See Also

    - -

    floor | ceil | fix

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/sin/index.html b/handbook/math/sin/index.html deleted file mode 100644 index 58cf242..0000000 --- a/handbook/math/sin/index.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - - - - - - - sin - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    sin

    - -

    Calculate the sine of an angle

    - -

    Syntax

    -
    y = sin[radians]
    -y = sin[degrees]
    -
    - -

    Attributes

    - -
      -
    • radians - the angle in radians
    • -
    • degrees - the angle in degrees
    • -
    - -

    Description

    - -

    y = sin[degrees] calculates the sine of an input in degrees.

    - -

    y = sin[radians] calculates the sine of an input in radians.

    - -

    sin operates element-wise on its inputs.

    - -

    Examples

    -
    search
    -  y = sin[degrees: 90]
    -  x = sin[radians: 3.14 / 2]
    -  
    -bind @browser
    -  [#div text: y]
    -  [#div text: x]
    -
    - -

    See Also

    - -

    cos | tan

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/sum/index.html b/handbook/math/sum/index.html deleted file mode 100644 index 955f22c..0000000 --- a/handbook/math/sum/index.html +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - - - - - - - sum - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    sum

    - -

    Sum the elements in a set

    - -

    Syntax

    -
    y = sum[value, given]
    -y = sum[value, given, per]
    -
    - -

    Arguments

    - -
      -
    • value - the variable or attribute to be summed
    • -
    • given - the record from which the value can be accessed
    • -
    • per - optional - specifies the set over which you are summing
    • -
    - -

    Description

    - -

    y = sum[value, given] returns the sum of elements in a set. The set must be entirely numeric or a runtime-error occurs.

    - -

    Examples

    - -

    Context data:

    -
    commit
    -  [#employee salary: 100, department: "hunting"]
    -  [#employee salary: 200, department: "hunting"]
    -  [#employee salary: 300, department: "gathering"]
    -
    - -

    Get sum of all matching records:

    -
    search
    -  employee = [#employee salary department]
    -  total-salary = sum[value:salary, given: employee]
    -
    -bind @browser
    -  [#div text: "Total: {{ total-salary }}" ]
    -
    - -

    Get sum of matching records grouped by department:

    -
    search
    -  employee = [#employee salary department]
    -  total-salary = sum[value:salary, given: employee, per: department]
    -
    -bind @browser
    -  [#div text: "{{department}} : {{ total-salary }}" ]
    -
    - -

    See Also

    - -

    count | aggregates

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/math/tan/index.html b/handbook/math/tan/index.html deleted file mode 100644 index 06de81c..0000000 --- a/handbook/math/tan/index.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - - - - - - - tan - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    tan

    - -

    Calculate the tangent of an angle

    - -

    Syntax

    -
    y = tan[radians]
    -y = tan[degrees]
    -
    - -

    Attributes

    - -
      -
    • radians - the angle in radians
    • -
    • degrees - the angle in degrees
    • -
    - -

    Description

    - -

    y = tan[degrees] calculates the tangent of an input in degrees.

    - -

    y = tan[radians] calculates the tangent of an input in radians.

    - -

    tan operates element-wise on its inputs.

    - -

    Examples

    -
    match
    -  y = tan[degrees: 90]
    -bind @browser
    -  [#div text: y]
    -
    - -

    See Also

    - -

    cos | sin

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/merge/index.html b/handbook/merge/index.html deleted file mode 100644 index 53ddc80..0000000 --- a/handbook/merge/index.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - - - - - - Merge <- - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Merge Operator

    - -

    Merges one record into another

    - -

    Syntax

    -
    record <- [attribute: value, ... ]
    -
    - -

    Description

    - -

    record <- [attribute: value, ... ] merges the anonymous record [attribute: value, ... ] into the record bound to record. Merge is useful for setting multiple attributes on a record at once.

    - -

    Examples

    - -

    Search for a record and merge another record into it.

    -
    search
    -  celia = [#Celia]
    -
    -bind
    -  celia <- [#student grade: 10, school: "East"]
    -
    - -

    See Also

    - -

    set operator | add operator | remove operator | action phase

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/model/index.html b/handbook/model/index.html deleted file mode 100644 index 749421d..0000000 --- a/handbook/model/index.html +++ /dev/null @@ -1,415 +0,0 @@ - - - - - - - - - - - - Programming Model - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Programming Model

    - -

    At its core, Eve only responds to two commands:

    - -
      -
    1. What facts do you know about this “record”?
    2. -
    3. Remember a new fact about this “record”.
    4. -
    - -

    Communication with Eve happens through “records”, which are key-value pairs attached to a unique ID.

    - -

    Computation occurs as a result of relationships between records. For example, I might model myself as a record with an age and a birth-year. There might also be a record representing the current-year. Then I could compute my age as my birth-year subtracted from the current-year.

    - -

    A key concept here is that age is a derived fact, supported by two other facts: birth-year and current-year. If either of those supporting facts are removed from Eve, then age can no longer be computed. For intuition, think about modeling this calculation in a spreadsheet using three cells.

    - -

    One last thing to note about control flow is that we have no concept of a loop in Eve. Recursion is one way to recover looping, but set semantics and aggregates often removes the need for recursion. In Eve, every value is actually a set. With operators defined over sets (think map()) and aggregation (think reduce()) we can actually do away with most cases where we would be tempted to use a loop.

    - -

    See also

    - -

    blocks | literate programming | sets | records

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/not/index.html b/handbook/not/index.html deleted file mode 100644 index 3c030d7..0000000 --- a/handbook/not/index.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - - - - - - not - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    not

    - -

    excludes records from the results

    - -

    Syntax

    -
    not([ ... ])
    -
    - -

    Description

    - -

    Not is an anti-join operator, which takes a body of records. For example, we can get a list of people who are not invited to the party:

    -
    // friends not invited to the party
    -search
    -  friends = [#friend]
    -  not(friends = [#invited])
    -
    -bind @view
    -  [#value | value: "{{friends.name}} wasn't invited to the party"]
    -
    - -

    Examples

    - -

    See Also

    - -

    is | records | match

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/npm/index.html b/handbook/npm/index.html deleted file mode 100644 index 0329e59..0000000 --- a/handbook/npm/index.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - - - - - - npm - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Eve on npm

    - -

    A package for Eve is available on npm. After installing npm for your platform, you can download our package with the following command:

    - -
    npm install -g witheve
    -
    - -

    This will give you a global Eve installation that you can invoke with the command eve from any folder. Doing so will launch an Eve server at http://localhost:8080.

    - -

    See also

    - -

    linux | mac | windows | docker | running

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/programs/index.html b/handbook/programs/index.html deleted file mode 100644 index d208970..0000000 --- a/handbook/programs/index.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - - - - - - - - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    - -
    -
    \ No newline at end of file diff --git a/handbook/records/index.html b/handbook/records/index.html deleted file mode 100644 index e79da57..0000000 --- a/handbook/records/index.html +++ /dev/null @@ -1,514 +0,0 @@ - - - - - - - - - - - - Records - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Records

    - -

    Records are attribute: value pairs associated to a unique ID

    - -

    Syntax

    -
    // A record with an attribute
    -[attribute]
    -
    -// A record with an attribute of given value
    -[attribute: value]
    -
    -// A record with N attributes of given values
    -[attribute1: value1, ... , attributeN: valueN]
    -
    -// A record nested within another record
    -[attribute1: [attribute2: value]]
    -
    -// Equates a record and a variable
    -r = [attribute ...]
    -
    -// Accessing an attribute on a record
    -r.attribute
    -
    -// Join two records
    -[attribute1: attribute2]
    -[attribute2]
    -
    - -

    Description

    - -

    Records are the predominant datatype in Eve. Records are used in two ways:

    - -
      -
    1. In a search you supply a pattern of attributes to match records in a supplied database.
    2. -
    3. In a bind or commit, you supply a pattern of attributes to insert into a database.
    4. -
    - -

    [attribute] matches all records with the given attribute.

    - -

    [attribute1 ... attributeN] matches all records with the given attributes.

    - -

    [attribute1: variable1, ... , attributeN: variableN] the expanded form of the above pattern. If the variable assignment is omitted, then the attribute values are assigned to variables equaling their name. If the variable assignment is included, the variables can be used to access their respective attributes instead of the attributes’ names.

    - -

    [attribute: value] matches all records with the given attribute bound to specified value.

    - -

    [attribute > value] matches all records with the given attribute bound filtered on a value. The inequality > can be one of the inequality operators.

    - -

    [attribute1: value1, ... , attributeN: valueN] is the general case for records. This matches all records with all of the given attributes filtered on the given values.

    - -

    [attribute1: [attribute2: value]] nests a record within another record.

    - -

    r = [attribute ...] equates a record to a variable r.

    - -

    r.attribute accesses the value of attribute on variable r.

    - -

    Examples

    - -

    Match all records with a name, and bind a #div for each one.

    -
    search
    -  [name]
    -
    -bind @browser
    -  [#div text: name]
    -
    - -

    Records can have multiple attributes

    -
    search
    -  [#student name grade school]
    -
    -bind @browser
    -  [#div text: "{{name}} is in {{grade}}th grade at {{school}}"]
    -
    - -

    Join records by binding attributes from one record into another record. Equate records with variables. Access record attributes using dot notation.

    -
    search
    -  school = [#school name address]
    -  student = [#student school: name]
    -
    -bind @browser
    -  [#div text: "{{student.name}} attends {{school.name}} at {{address}}"]
    -
    - -

    Records can be nested.

    -
    commit
    -  [name: "Jeremy" spouse: [name: "Wendy"]]
    -
    - -

    Dot notation can be composed for deep access to records

    -
    search
    -  Jeremy = [name: "Jeremy"]
    -
    -bind @browser
    -  [#div text: "{{Jeremy.name}} is married to {{Jeremy.spouse.name}}"]
    -
    - -

    Using dot notation to access record attributes means conditioning the block to have those attributes available. -These two following blocks point to the same results:

    - -

    without dot notation

    -
    search
    -  [#student name grade school]
    -
    -bind @browser
    -  [#div text: "{{name}} is in {{grade}}th grade at {{school}}"]
    -
    - -

    with dot notation

    -
    search
    -  [#student]
    -
    -bind @browser
    -  [#div text: "{{student.name}} is in {{student.grade}}th grade at {{student.school}}"]
    -
    - -

    They get executed only if there’s at least one student with a name, a grade and a school attribute.

    - -

    See Also

    - -

    search | bind | commit | tags | databases | equality | inequality | joins

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/remove/index.html b/handbook/remove/index.html deleted file mode 100644 index bfff80b..0000000 --- a/handbook/remove/index.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - - - - - - Remove: -= - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    - -
    -
    \ No newline at end of file diff --git a/handbook/running/index.html b/handbook/running/index.html deleted file mode 100644 index 027feff..0000000 --- a/handbook/running/index.html +++ /dev/null @@ -1,454 +0,0 @@ - - - - - - - - - - - - Running Eve - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Running Eve

    - -

    If you’ve downloaded and installed Eve via npm, you can launch Eve with the eve command.

    - -
    eve
    -
    - -

    This launches an Eve server running in the Eve root directory at http://localhost:8080. From here, you’ll be directed to quickstart.eve, and have access to the Eve examples directory from within the editor.

    - -

    Running an Eve File

    - -

    If you want to run a specific Eve program, you can provide its path after the eve command:

    - -
    eve ~/myDir/myEveFile.eve
    -
    - -

    Then you navigate to Eve in your browser to access the specified program. If you like, you can also recover the editor with a flag:

    - -
    eve ~/myEveDir/myEveFile.eve --editor
    -
    - -

    This will run the supplied Eve program with the editor visible

    - -

    Running Eve in Server mode

    - -

    Eve can be started in server mode using the --server flag:

    - -
    eve --server
    -
    - -

    Without this flag, execution of Eve programs happens within the browser, with the Eve server acting only as a file server between the browser and your local system. In server mode, Eve will instead execute your program on the server. Currently written programs will operate exactly as before, but this is a preliminary step in order to get networked Eve applications going (like a chat server or a multiplayer game). There is still work needed to be done there

    - -

    Eve Workspaces

    - -

    You can run Eve in a custom workspace. To create a new Eve workspace, create a folder with an empty file named package.json, then start Eve from within this folder. Eve recognizes that it is starting an Eve workspace, and will serve *.eve files from within this directory instead of the Eve examples folder. Furthermore, you can serve various assets, like images or CSS, by placing them in an “assets” sub-folder.

    - -

    Flags

    - -
      -
    • server - run Eve in server execution mode.
    • -
    • editor - run Eve with the editor visible. This defaults to false, except when Eve is started in an Eve project folder.
    • -
    • port - specify the port on which to run the Eve server. Alternatively, the running port can be specified with the PORT environment variable, which takes precedence over the port flag.
    • -
    - -

    Running Eve from Source

    - -

    To run Eve from source, you invoke the following command in the extracted Eve folder:

    - -
    npm start
    -
    - -

    You can apply the above flags to this command, but you’ll need an extra -- to do so. e.g.

    - -
    npm start -- --port 1234
    -
    - -

    See Also

    - -

    linux | mac | windows | docker | npm

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/search/index.html b/handbook/search/index.html deleted file mode 100644 index c520a71..0000000 --- a/handbook/search/index.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - - - - - - - search - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    search

    - -

    signifies the beginning of the search phase

    - -

    Syntax

    -
    search
    -
    -search @database1, ..., @databaseN
    -
    - -

    Description

    - -

    search signifies the beginning of the search phase of a block. By default, searched records are drawn from a default local database.

    - -

    search @database1, ... @databaseN draws searched records from one or more databases.

    - -

    Examples

    - -

    search a record

    -
    search
    -  [name]
    -  
    -bind
    -  [#div text: name]  
    -
    - -

    Omit the search phase

    -
    bind
    -  [#div text: "Hello, world"]
    -
    - -

    See Also

    - -

    bind | commit | databases | records

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/session/index.html b/handbook/session/index.html deleted file mode 100644 index 88b3923..0000000 --- a/handbook/session/index.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - - - - - - @session - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    @session

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/set/index.html b/handbook/set/index.html deleted file mode 100644 index bbd4386..0000000 --- a/handbook/set/index.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - - - - - - - Set: := - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Set Operator

    - -

    Sets the value of an attribute on a record

    - -

    Syntax

    -
    // Set attribute to value
    -record.attribute := value
    -
    -// Remove attribute
    -record.attribute := none
    -
    - -

    Description

    - -

    record.attribute := value sets attribute to value. If record already has an attribute with a value, then this will overwrite it. Otherwise, if record doesn’t have an attribute with this name already, then := will create the attribute and set it to value.

    - -

    attribute can be an attribute already on the record, or it can be a new attribute.

    - -

    value can be a string or number literal, a record, or a variable bound to one of these.

    - -

    record.attribute := none sets the value of attribute to the special value none, which is the empty set (a set with no elements).

    - -

    Examples

    - -

    Set the age of #students that don’t already have an age.

    -
    search
    -  student = [#student]
    -  age = if student.age then student.age
    -        else if student.grade then student.grade + 6
    -        
    -bind
    -  student.age := age
    -
    - -

    See Also

    - -

    add operator | remove operator | merge operator

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/sets/index.html b/handbook/sets/index.html deleted file mode 100644 index 1825cc5..0000000 --- a/handbook/sets/index.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - - - - - - Sets - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Set Semantics

    - -

    Expressions and actions in Eve work over sets.

    - -

    Description

    - -

    Sets are unordered collections where every element of the collection is unique. For example, ("a", "b", "c") is a set, while ("a", "a", "b", "c") is not. Furthermoer, ("a", "b", "c") and ("c", "b", "a") are equivalent sets, even though the order of elements is different.

    - -

    Examples

    - -
    (1, 2, 3, 4) // Every element is unique           
    -(1, 2, 3, 1) // One is repeated twice, so this is not a set
    -(4, 3, 2, 1) // This set is the same as the first, despite the order of elements
    -("Steve", 1, (1, 2)) // Elements can be nonhomogeneous, as long as each one is unique
    -(("a", 1), ("a", 2), ("a", 3)) // Sets within sets can be used to repeat values
    -
    - -

    Set Example in Eve

    -
    commit
    -  [#point x: 5, y: 4]
    -  [#point x: 3, y: 7]
    -  [#point x: 1, y: 2]
    -
    - -

    We can calculate the distance from each of these points to every other point:

    -
    search
    -  p1 = [#point x: x1, y: y1]
    -  p2 = [#point x: x2, y: y2]
    -  dx = x1 - x2 
    -  dy = y1 - y2
    -  
    -bind @browser
    - [#div sort: x1, text: "({{x1}}, {{y1}}) - ({{x2}}, {{y2}}) = ({{dx}}, {{dy}})"]
    -
    - -

    In imperative languages, you would need a nested loop to cover all of the combinations. In Eve, functions (and infix operators like +, which are just sugar for a function) operate over sets, so this loop is implicitly handled by Eve.

    - -

    See Also

    - -

    programming model | functions | aggregates | cartesian product

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/standard-library/index.html b/handbook/standard-library/index.html deleted file mode 100644 index 6eb1b6a..0000000 --- a/handbook/standard-library/index.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - - - - - - Standard Library - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Standard Library

    - -

    The Eve standard library of functions is globally available, meaning you don’t have to reference a specific database to use these functions.

    - -

    Description

    - -
      -
    • general - General functions
    • -
    • math - General mathematical and trigonometric functions
    • -
    • strings - Functions that manipulate strings
    • -
    • statistics - Functions that calculate statistical measures on values
    • -
    • date & time - Functions that get and manipulate date and time
    • -
    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/statistics/count/index.html b/handbook/statistics/count/index.html deleted file mode 100644 index 06b5c58..0000000 --- a/handbook/statistics/count/index.html +++ /dev/null @@ -1,499 +0,0 @@ - - - - - - - - - - - - count - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    count

    - -

    Returns the number of elements in a set

    - -

    Syntax

    -
    // Counts the elements in given
    -y = count[given]
    -
    -// Counts the elements established by the set (var1, ... , varN)
    -y = count[given: (var1, ... , varN)]
    -
    -// Group given by the values in per, and count each group
    -y = count[given, per]
    -
    - -

    Attributes

    - -
      -
    • given - establishes the set to count over.
    • -
    • per - optional - one or more attributes by which to group given.
    • -
    - -

    Description

    - -

    y = count[given] counts the number of elements in given.

    - -

    y = count[given: ()] counts the number of elements in given.

    - -

    y = count[given, per] counts the number of elements in given, grouped by the attribute(s) provided in per. For instance, class-size = count[given: students, per: grade] would count the number of students in each grade. You can group along multiple axes; the previous example could be extended to work across multiple schools by doing class-size = count[given: students, per: (grade, school)]. See the examples section to see these in action.

    - -

    Counting Zero

    - -

    Eve’s semantics prevent count from ever returning 0; For count[] to run, a search must match at least one record. If a search doesn’t match any records, then the entire block will not execute. In order to actually get a 0 result, you have to condition the count with an if expression:

    -
    search
    -    total-items = if c = count[given: [#item]] then c
    -                else 0
    -bind @view
    -    [#value | value: "total items: {{total-items}}"]
    -
    - -

    This block searches for [#item] records. If any are found, then count[] is able to proceed. If none are found, then the if expression allows the block to execute nonetheless, so the total items is correctly reported as 0.

    - -

    Examples

    - -

    Before we get to the count[] examples, let’s add some students. Each #student has a grade and a school. Grades are one of 10, 11, or 12. Schools are one of “West” and “East”.

    -
    commit
    -  [#student name: "Diedra" grade: 10 school: "West"]
    -  [#student name: "Celia" grade: 10 school: "West"]
    -  [#student name: "Michaela" grade: 11 school: "West"]
    -  [#student name: "Jermaine" grade: 11 school: "West"]
    -  [#student name: "Issac" grade: 12 school: "West"]
    -  [#student name: "Jamar" grade: 12 school: "West"]
    -  [#student name: "Yee" grade: 10 school: "East"]
    -  [#student name: "Johanne" grade: 10 school: "East"]
    -  [#student name: "Mertie" grade: 10 school: "East"]
    -  [#student name: "Elmira" grade: 11 school: "East"]
    -
    - -

    First let’s count the total number of students in the school district.

    -
    search
    -  students = [#student]
    -  enrollment = count[given: students]
    -
    -bind @view
    -  [#value | value: "There are {{enrollment}} students in the district"]
    -
    - -

    Now let’s count the number of students in each school.

    -
    search
    -  students = [#student school]
    -  school-enrollment = count[given: students, per: school]
    -
    -bind @view
    -  [#value | value: "{{school-enrollment}} attend {{school}}"]
    -
    - -

    We could have similarly counted the number of students in each grade across the district.

    -
    search
    -  students = [#student grade]
    -  grade-enrollment = count[given: students, per: grade]
    -
    -bind @view
    -  [#value | value: "{{grade-enrollment}} students are in {{grade}}th grade"]
    -
    - -

    Finally, we can count the number of students per grade, per school.

    -
    search
    -  students = [#student grade school]
    -  grade-school-enrollment = count[given: students, per: (grade, school)]
    -
    -bind @view
    -  [#value | value: "{{grade-school-enrollment}} students are in {{grade}}th grade at {{school}}"]
    -
    - -

    Example Usage

    - - - -

    See Also

    - -

    sum | aggregates

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/statistics/index.html b/handbook/statistics/index.html deleted file mode 100644 index e814ae1..0000000 --- a/handbook/statistics/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - - - - - - Statistics - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Statistics

    - -
      -
    • count - counts the number of elements in a set
    • -
    - -

    Random Functions

    - -
      -
    • random - Generates a random number between 0 and 1
    • -
    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/statistics/random/index.html b/handbook/statistics/random/index.html deleted file mode 100644 index 58baf5a..0000000 --- a/handbook/statistics/random/index.html +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - - - - - - - random - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    random

    - -

    generates a random number between 0 and 1

    - -

    Syntax

    -
    y = random[seed]
    -
    - -

    Attributes

    - -
      -
    • seed - initializes the random number generator. The seed itself does not need to be random.
    • -
    - -

    Description

    - -

    y = random[seed] generates a pseudorandom number drawn from the standard uniform distribution, meaning the generated number is restricted to be between 0 and 1. To generate a number between a custom range, see the examples. -random requires a seed as an argument because there is no such thing as a truely random number generator. Instead, “random number generators” are equations that produce results (based on original numbers) that are unpredicatble to humans, but repeatable. For instance, 7 * i % 11 is a simple pseudorandom number generator: the numbers it produces seem to have no relation at all with i itself. Therefore it is functionally random to humans, but with the same value for i, the same output is produced. In this example, i is the seed. A good value to use as a seed is the time in milliseconds, since it is always changing, insuring that you will almost never get the same seed twice (this does not mean you will always get a different number, however).

    - -

    Examples

    - -

    Prints a random number every second. The time attribute in #div is used to make each generated number unique for display purposes.

    -
    search 
    -  [#time minutes seconds]
    -  x = random[seed: seconds]
    -
    -commit @browser
    -  [#div time: "{{minutes}}{{seconds}}"  text: x]
    -
    - -

    Generate a random number between min and max

    -
    search
    -  min = 5
    -  max = 10
    -  x = random[seed: 1] * (max - min) + min
    -
    -bind @browser
    -  [#div text: x]
    -
    - -

    Generate 10 random numbers

    -
    search
    -  i = range[from: 1, to: 10]
    -  x = random[seed: i]
    -
    -bind @browser
    -  [#div text: x]
    -
    - -

    Example Usage

    - - - -

    See Also

    - -

    [gaussian][../gaussian]

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/string-interpolation/index.html b/handbook/string-interpolation/index.html deleted file mode 100644 index 1389cde..0000000 --- a/handbook/string-interpolation/index.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - - - - - - String Interpolation - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    String Interpolation

    - -

    injects the value of an attribute or variable into a string

    - -

    Syntax

    -
    "{{ variable }}"
    -
    - -

    Description

    - -

    "{{ variable }}" embeds the value of variable within a string. Variable should be an attribute on a record or the result of an expression.

    - -

    String interpolation works element-wise on its input. This means the string will be repeated for every unique value in variable.

    - -

    Multiple variables can be interpolated into strings. If the variables have no relation to each other (i.e. they are not joined or part of the same record), then string interpolation is applied to the cartesian product of the sets.

    - -

    Examples

    - -

    Display student name, grade and school:

    -
    search
    -  [#student name grade school]
    -
    -bind @browser
    -  [#div text: "{{name}} is a {{grade}}th grade student at {{school}}."]
    -
    - -

    Use string interpolation to display pairs of numbers:

    -
    search 
    -  i = range[from: 1, to: 10]
    -  j = range[from: 1, to: 10]
    -
    -bind @browser
    -  [#div text: "({{ i }}, {{ j }})"]
    -
    - -

    See Also

    - -

    strings | expressions

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/strings/convert/index.html b/handbook/strings/convert/index.html deleted file mode 100644 index 301cdc3..0000000 --- a/handbook/strings/convert/index.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - - - - - - convert - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    convert

    - -

    converts a number into a string or vice versa.

    - -

    Syntax

    -
    converted = convert[value, to]
    -
    - -

    Attributes

    - -
      -
    • converted - the resulting converted value
    • -
    • value - the value to be converted
    • -
    • to - a string that specifies the target value type, either “number” or “string”
    • -
    - -

    Description

    - -

    converted = convert[value, to] converts value from a number to a string if to is set to "string", or if to is set to "number" converts value from a string to a number.

    - -

    Examples

    - -

    Convert a string to a number, multiplies it

    -
    search
    -  x = convert[value: "1", to: "number"]
    -  y = x * 2
    -  
    -bind @browser
    -  [#div text: y]
    -
    - -

    Convert a number to a string, gets its length

    -
    search
    -  str = convert[value: "42", to: "number"]
    -  c = length[str]
    -  
    -bind @browser
    -  [#div text: c]
    -
    - -

    See Also

    - -

    concat | join | char-at | substring | length | replace | split

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/strings/find/index.html b/handbook/strings/find/index.html deleted file mode 100644 index a8a51bd..0000000 --- a/handbook/strings/find/index.html +++ /dev/null @@ -1,449 +0,0 @@ - - - - - - - - - - - - find - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    find

    - -

    finds a string within a larger string (optinally case-sensitive), starting from the starting index (which defaults to 1).

    - -

    Syntax

    -
    (string-position, result-index) = find[text, subtext, case-sensitive, from]
    -
    - -

    Attributes

    - -
      -
    • text - the larger text to be searched within
    • -
    • subtext - the string to find in text
    • -
    • case-sensitive - the recovered tokens after the split
    • -
    • string-position - the positions of the occurences of subtext in the original text
    • -
    • result-index - the index of this occurence in all occurences of subtext in text
    • -
    - -

    Description

    - -

    (string-position, result-index) = find[text, subtext, case-sensitive, from] finds all the occurences of subtext in text, by default case-insensitively. For each match, it returns the position in the string (index starting at one) and the number of the match (for instance, the first match is one, the second match is two). If from is specified, it starts the search at that index, inclusively.

    - -

    Examples

    - -

    Find all occurences of the string “hello” in str (case-insensitive, starting at the first index)

    -
    search
    -  str = "ahellobhellochello"
    -  (a, b) = find[text: str, subtext: "hello"]
    -
    -bind @browser
    -  [#div text: "{{a}}, {{b}}"]
    -
    - -

    Find all occurences of a capital ‘X’ in a string

    -
    search
    -  str = "xxxXxxXxXXX"
    -  (a, b) = find[text: str, subtext: "X", case-sensitive: true]
    -
    -bind @browser
    -  [#div text: "{{a}}, {{b}}"]
    -
    - -

    Find occurences of ‘X’ after the first one

    -
    search
    -  str = "xxxXxxXxXXX"
    -  (a, b) = find[text: str, subtext: "X", case-sensitive: true, from: 5]
    -
    -bind @browser
    -  [#div text: "{{a}}, {{b}}"]
    -
    - -

    See Also

    - -

    concat | join | char-at | substring | length | replace | split

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/strings/index.html b/handbook/strings/index.html deleted file mode 100644 index 5910289..0000000 --- a/handbook/strings/index.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - - - - - - Strings - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Strings

    - -
      -
    • split - split a string into tokens
    • -
    • join - join tokens into a string
    • -
    • length - return the length of a string
    • -
    • substring - return a substring of another string
    • -
    • find - return a substring of another string
    • -
    • convert - return a substring of another string
    • -
    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/strings/join/index.html b/handbook/strings/join/index.html deleted file mode 100644 index 219f60d..0000000 --- a/handbook/strings/join/index.html +++ /dev/null @@ -1,469 +0,0 @@ - - - - - - - - - - - - join - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    join

    - -

    Joins a set of tokens into one or more contiguous strings

    - -

    Syntax

    -
    // join tokens into a string
    -text = join[token, given, index, with]
    -
    -// group tokens before joining
    -text = join[token, given, index, with, per]
    -
    - -

    Attributes

    - -
      -
    • token - set of strings to be joined
    • -
    • given - establishes the set being joined. If tokens are not unique, you can add attributes here that will make them unique. Must at least provide token as part of the given set, or only the first one will be returned.
    • -
    • index - indicates where each token is ordered in text.
    • -
    • with - inserted between every element in token.
    • -
    • per - optional - one or more attributes by which to group token.
    • -
    - -

    Description

    - -

    text = join[token, given, index, with] joins elements of token in an order specified by index, inserting with between each token. Returns the joined string.

    - -

    text = join[token, given, index, with, per] groups token according to the values of per before joining.

    - -

    Examples

    - -

    Split a sentence into tokens, and join the tokens into a sentence again

    -
    search
    -  // Split the sentence into words
    -  (token, index) = split[text: "the quick brown fox", by: " "]
    -
    -  // Join the words back into a sentence, but with hyphens instead of spaces
    -  text = join[token given: token, index with: "-"]
    -
    -bind @view
    -  [#value | value: text] // Expected "the-quick-brown-fox"
    -
    - -
    - -

    Since join is an aggregate, set semantics play an important part here; if we don’t specify what makes each token unique, then the results can be surprising. The following example will demonstrate this.

    - -

    Let’s split the phrase “hello world” into letters:

    -
    search
    -  //token = (h, e, l, l, o, w, o, r, l, d)
    -  (token, index) = split[text: "hello world", by: ""]
    -
    -bind
    -  [#phrase token index]
    -
    -bind @view
    -  [#value | value: token]
    -
    - -

    Let’s join this phrase back together. Like last time, we’ll join with a -. Notice that some tokens (“l” and “o”) should appear multiple times in the phrase. To correctly join them, we add index as part of the given set:

    -
    search
    -  [#phrase token index]
    -  // given = (("h", 1), ("e", 2), ("l", 3), ("l", 4) ... ("l", 10), ("d", 11)) 
    -  // without including index, the result is "h-e-l-o- -w-r-d". Try it and see!
    -  text = join[token given: (token, index) index with: "-"]
    -
    -bind @view
    -  [#value | value: text]
    -
    - -

    The result expected result is “h-e-l-l-o- -w-o-r-l-d”.

    - -

    See Also

    - -

    split

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/strings/length/index.html b/handbook/strings/length/index.html deleted file mode 100644 index 6eea6cd..0000000 --- a/handbook/strings/length/index.html +++ /dev/null @@ -1,452 +0,0 @@ - - - - - - - - - - - - length - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    length

    - -

    Returns the length of a string

    - -

    Syntax

    -
    len = length[text]
    -len = length[text, as]
    -
    - -

    Attributes

    - -
      -
    • text - set of strings to be joined
    • -
    • as optional - sets the method by which to count characters. Can be one of - -
        -
      • “symbols” (default) - counts the visible symbols in the string. Characters that span multiple bytes (such as Unicode characters) are counted as a single symbol.
      • -
      • “code-points” - counts the characters as code-points
      • -
      • “bytes” (not yet implemented) - counts the characters as bytes
      • -
    • -
    - -

    Description

    - -

    len = length[text] returns the number of symbols in a string.

    - -

    len = length[text, as] returns the number of characters in a string, determined by as.

    - -

    Examples

    - -

    Count the number of characters in a string. We expect a len of 5:

    -
    search
    -  len = length[text: "Hello"]
    -
    -bind @view
    -  [#value | value: len]
    -
    - -

    This time, let’s throw a Unicode snowman in the mix. In symbols, this is counted as a single character. We expect a len of 9 here:

    -
    search
    -  len = length[text: "Poodle: 🐩", as "symbols"]
    -
    -bind @view
    -  [#value | value: len]
    -
    - -

    But when we count code-points, the poodle is counted as 2. We expect a len of 10 here:

    -
    search
    -  len = length[text: "Poodle: 🐩", as: "code-points"]
    -
    -bind @view
    -  [#value | value: len]
    -
    - -

    See Also

    - -

    split | split

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/strings/split/index.html b/handbook/strings/split/index.html deleted file mode 100644 index 06ac367..0000000 --- a/handbook/strings/split/index.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - - - - - - split - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    split

    - -

    splits a string at the given delimiter

    - -

    Syntax

    -
    (token, index) = split[text, by]
    -
    - -

    Attributes

    - -
      -
    • text - the text to be split
    • -
    • by - the delimiter at which to split the text. An empty string will split the text at every character.
    • -
    • token - the recovered tokens after the split
    • -
    • index - the indices of the tokens in the original text
    • -
    - -

    Description

    - -

    (token, index) = split[text, by] splits a text into tokens according to the given delimiter, by. Returns token and index of those tokens in the original string.

    - -

    Examples

    - -

    Splits a string at every character

    -
    search
    -  (token, index) = split[text: "hello, world", by: ""]
    -  
    -bind @browser
    -  [#div text: "{{token}} {{index}}"]
    -
    - -

    Split a sentence into words and display them in order

    -
    search
    -  (token, index) = split[text: "the quick brown fox", by: " "]
    -  
    -bind @browser
    -  [#div sort: index, text: token]
    -
    - -

    See Also

    - -

    concat | join | char-at | find | length | replace

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/strings/substring/index.html b/handbook/strings/substring/index.html deleted file mode 100644 index 4f55610..0000000 --- a/handbook/strings/substring/index.html +++ /dev/null @@ -1,430 +0,0 @@ - - - - - - - - - - - - substring - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    substring

    - -

    gets the substring of the provided string starting at the specified index (or 1 if not specified) and ending at the other specified index (required).

    - -

    Syntax

    -
    substr = substring[text, from, to]
    -
    - -

    Attributes

    - -
      -
    • text - the text to substring
    • -
    • to - the maximum index of the substring, inclusive.
    • -
    • from - the starting index of the substring, starting at one, inclusive
    • -
    • substr - the final substring
    • -
    - -

    Description

    - -

    substr = substring[text, from, to] gets a substring of text stretching from from to to, inclusively on both sides: [from, to]. -Note: String indexing starts at one. If you are an experienced programmer, this might trip you up.

    - -

    Examples

    - -

    Extracts the word “hello” from the string

    -
    search
    -  greeting = substring[text: "ahellob", from: 2, to: 6]
    -
    -bind @browser
    -  [#div text: greeting]
    -
    - -

    See Also

    - -

    concat | join | char-at | find | length | replace | split

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/strings/urlencode/index.html b/handbook/strings/urlencode/index.html deleted file mode 100644 index c2d3b8f..0000000 --- a/handbook/strings/urlencode/index.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - - - - - - - - urlencode - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    urlencode

    - -

    the urlencoded, websafe, version of a string.

    - -

    Syntax

    -
    safe = urlencode[text]
    -
    - -

    Attributes

    - -
      -
    • text - the string to be encoded
    • -
    • safe - a url-safe, encoded string
    • -
    - -

    Description

    - -

    safe = urlencode[text] converts text into a url-safe string (e.g. replacing a space with %20), returning it to safe.

    - -

    Examples

    - -

    Urlencodes a mathematical expression

    -
    search
    -  z = urlencode[text: "x * 2"]
    -  
    -bind @browser
    -  [#div text: z]
    -
    - -

    See Also

    - -

    concat | join | char-at | substring | length | replace | split

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/tags/index.html b/handbook/tags/index.html deleted file mode 100644 index 312730f..0000000 --- a/handbook/tags/index.html +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - - - - - - - Tags - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Tag Selector

    - -

    The tag selector is a shortcut for the tag attribute on records

    - -

    Syntax

    -
    #tag
    -
    -#"tag with spaces"
    -
    - -

    Description

    - -

    The tag selector # is a shortcut for the tag attribute, e.g. [#person] is a shortcut for [tag: "person"].

    - -

    The tag selector is useful for selecting a group of similar records.

    - -

    Tags are useful for making a record unique. For instance, in a single database, many disparate records might have an age attribute. e.g. [age] might select unrelated records if you’re only interested in ages of employees. A more specific record would be [#employee age], which would match only records that are both tagged “employee” and have an age attribute.

    - -

    Multiple tags can be used to further specify a record. For instance:

    -
    [#employee wage]
    -[#employee #part-time wage]
    -
    - -

    The first record matches all #employees, while the second matches only those who are also #part-time. Any number of tags can be used in this way.

    - -

    Tips

    - -

    Tags are useful for creating switches. Add a tag to a record to include it in a set. Then, when you don’t want that record in the set anymore, just remove the tag. The record will no longer match the set.

    - -

    Examples

    - -

    Search for students and display their names and the grade they’re in.

    -
    search
    -  [#student name grade]
    -
    -bind @browser
    -  [#div text: "{{name}} is in {{grade}}th grade."]
    -
    - -

    Add students with good marks to the honor roll. When a student’s GPA falls below 3.5, he or she will not make the honor roll because this block will not add the #honor-roll tag.

    -
    search
    -  students = [#student gpa >= 3.5]
    -
    -bind
    -  students += #honor-roll
    -
    - -

    Display the honor roll

    -
    search
    -  [#student #honor-roll name]
    -
    -bind @browser
    -  [#div text: "{{name}} is a smarty pants"]
    -
    - -

    See Also

    - -

    records | search | sets

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/update-operators/index.html b/handbook/update-operators/index.html deleted file mode 100644 index eba601b..0000000 --- a/handbook/update-operators/index.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - - - - - - Update Operators - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Update Operators

    - -

    Update operates are used to modify records

    - -

    Syntax

    -
    // Add operator
    -record.attribute += value
    -
    -// Remove operator
    -record.attribute -= value
    -
    -// Set operator
    -record.attribute := value
    -
    -// Merge operator
    -record <- [ ... ]
    -
    - -

    Description

    - -

    Examples

    - -

    See Also

    - -

    add | remove | set | merge | bind | commit

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/view/index.html b/handbook/view/index.html deleted file mode 100644 index 8141446..0000000 --- a/handbook/view/index.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - - - - - - @view - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    @view

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/handbook/windows/index.html b/handbook/windows/index.html deleted file mode 100644 index 1763648..0000000 --- a/handbook/windows/index.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - - - - - - Windows - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Installing Eve on Windows

    - -

    First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

    - -
    npm install
    -npm start
    -
    - -

    Then open http://localhost:8080/ in your browser.

    - -

    See also

    - -

    linux | mac | docker | npm | running

    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/tutorials/quickstart/index.html b/tutorials/quickstart/index.html deleted file mode 100644 index e4f2956..0000000 --- a/tutorials/quickstart/index.html +++ /dev/null @@ -1,620 +0,0 @@ - - - - - - - - - - - - Quickstart - Eve Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - - -

    Eve Quick Start Tutorial

    -
    ```
    -bind @browser
    -  [tag: "div", text: "Hello, world"]
    -```
    -
    - -

    Hello world! At its core, Eve is a pattern matching language. You match patterns of data by searching a database, then update or create new data according to what you’ve found. In this example, we created a record that has two attributes: a tag attribute with the value "div", and a text attribute with the value "Hello, world". We bound this record to the browser, which is how we displayed our venerable message.

    - -

    The three backticks ``` are called a code fence, and they allow us to denote blocks of code. This gives us the ability to embed Eve code in normal documents written in Markdown. This is how Eve programs are written: everything in a code fence is a block of Eve code, while everything outside is prose describing the program. In fact, this quick start tutorial is an example of an executable Eve program! In the subsequent blocks, you won’t see any code fences, but they still exist in the document’s source.

    - -

    So far we’ve created a record that displays “Hello, world!” but as I said, Eve is a pattern matching language. Let’s explore that by searching for something:

    -
    search
    -  [name]
    -
    -bind @browser
    -  [tag: "div", text: "Hello, world"]
    -
    - -

    Our message disappeared! Before, we bound without searching, so the message displayed by default. Now we’re binding in the presence of a search action, so the bound record only exists if all the searched records are matched. Here, we’re searching for all records with a name attribute, but we haven’t added any records like that to Eve so none are matched. With no matching records, the bind cannot execute, and the message disappears from the screen.

    - -

    This is the flow of an Eve block: you search for records in a database, and if all the records you searched for are matched, you can modify the matched records or create new ones. If any part of your search is not matched, then no records will be created or updated.

    - -

    To get our message back, all we need is a record with a name attribute. We can create one permanently with the commit action:

    -
    commit
    -  [name: "Celia"]
    -
    - -

    Hello, world… again! Commit permanently updates or creates a record that will persist even if its matched records (the records matched in a search action) change. Since we aren’t searching for anything in this block, the commit executes by default and adds a record with a name attribute of "Celia". The addition of this new record satisfies the search in the previous block, so “Hello, world!” appears on the screen again.

    - -

    But what else can you do with matched records? For starters, we can use them to create new records:

    -
    search
    -  [name]
    -
    -bind @browser
    -  [#div text: "Hello, {{name}}"]
    -
    - -

    Since we matched on a record with a name attribute, we now have a reference to that name, and we can inject it into a string using {{ ... }} embedding. We can also swap out tag: "div" for the sugared #div. Tags are used a lot in Eve to talk about collections of related records. For example, we could search for all records with a #student tag, with name, grade, and school attributes.

    -
    search
    -  [#student name grade school]
    -
    -bind @browser
    -  [#div text: "{{name}} is a {{grade}}th grade student at {{school}}."]
    -
    - -

    Since we’re matching on more attributes, this block is no longer satisfied by the record we added earlier; we’re missing a #student tag, as well as grade and school attributes. Even though these are currently missing, we can still write the code that would display them.

    - -

    Let’s display this new message by adding the missing attributes to Celia. We could add them to the block where we comitted Celia originally, but we can also do it programatically:

    -
    search
    -  celia = [name: Celia]
    -
    -bind
    -  celia <- [#student grade: 10, school: "East", age: 16]
    -
    - -

    You can define variables within blocks, which act as handles on records that allow you to change them. In this case, we’re using the merge operator <- to combine two records. With the addition of this block, the sentence “Celia is a 10th grade student at East.” appears in the browser.

    - -

    Celia is cool and all, but let’s add some more students to our database:

    -
    commit
    -  [#student name: Diedra, grade: 12, school: "West"]
    -  [#student name: Michelle, grade: 11, school: "West"]
    -  [#student name: Jermaine, grade: 9]
    -
    - -

    Three sentences are now printed, one for each student that matches the search. Eve works on sets, so when we search for [#student name grade school], we find all records that match the given pattern. This includes Celia, Diedra and Michelle (but not Jermaine, as he has no school in his record). Therefore, when we bind the record [#div text: "{{name}} is a ... "], we are actually binding three records, one for each matching #student.

    - -

    If you re-compile the program a couple times, you’ll see the order of sentences may change. This is because there is no ordering in Eve - blocks are not ordered, statements are not ordered, and results are not ordered. If you want to order elements, you must impose an ordering yourself. We can ask the browser to draw elements in an order with the “sort” attribute:

    -
    search
    -  [#student name grade school]
    -
    -bind @browser
    -  [#div sort: name, text: "{{name}} is a {{grade}}th grade student at {{school}}."]
    -
    - -

    This time when you recompile your program, the order will stay fixed, sorted alphabetically by name.

    - -

    Let’s make things a little more interesting by adding some records about the schools the students attend:

    -
    commit
    -  [#school name: West, address: "1234 Main Street"]
    -  [#school name: East, address: "5678 Broad Street"]
    -
    - -

    What if we want to display the address of the school each student attends? Although #students and #schools are in different records, we can relate two records by associating attributes from one record with attributes from the other. This is an operation known as joining. In this case, we want to relate the name attribute on #schools with the school attribute on #students. This compares the values of the attributes between records, and matches up those with the same value. For instance, since Celia’s school is “East”, she can join with the #school named “East”.

    - -

    Our first attempt may come out looking a little something like this:

    -
    search
    -  school = [#school name address]
    -  student = [#student name school: name] 
    -
    -bind @browser
    -  [#div text: "{{student.name}} attends {{school.name}} at {{address}}"]
    -
    - -

    But that didn’t work. How come? In Eve, things with the same name are equivalent. In this block, we’ve used “name” three times, which says that the school’s name, the student’s name, and the student’s school are all the same. Of course, there is no combination of students and schools that match this search, so nothing is displayed.

    - -

    Instead, we can use the dot operator to specifically ask for the name attribute in the #school records, and rename our variables to get a correct block:

    -
    search
    -  schools = [#school address]
    -  students = [#student school: school.name]
    -
    -bind @browser
    -  [#div text: "{{students.name}} attends {{schools.name}} at {{address}}"]
    -
    - -

    This creates an implicit join over the school name without mixing up the names of the students and the names of the schools, giving us our desired output. You can actually bind attributes to any name you want to avoid collisions in a block:

    -
    search
    -  [#school name: school-name address]
    -  [#student name: student-name school: school-name]
    -
    -bind @browser
    -  [#div text: "{{student-name}} attends {{school-name}} at {{address}}"]
    -
    - -

    Advanced Eve

    - -

    Recall when we added our students, Celia was the only one we added an age to. Therefore, the following block only displays Celia’s age, even though we ask for all the #students:

    -
    search
    -  [#student name age]
    -
    -bind @browser
    -  [#div text: "{{name}} is {{age}} years old"]
    -
    - -

    Let’s pretend that all students enter first grade at six years old. Therefore, if we know a student’s grade, we can calculate their age and add it to the student’s record:

    -
    search
    -  student = [#student]
    -  calculated-age = if student.age then student.age
    -                   else if student.grade then student.grade + 5
    -
    -bind @browser
    -  student.age := calculated-age
    -
    - -

    This block selects all students, and uses and if-then expression to set the student’s calculated age. If the student already has an age, we set it to that. Otherwise, if the student has no age, we can calculate it with some arithmetic. The set operator := sets an attribute to a specified value regardless of what it was before the block executed. That value can be anything, from a number to a string to another record.

    - -

    Aggregates

    - -

    So far everything we’ve done has used one record at a time, but what happens when we want to work over a group of records, such as counting how many students there are? To solve such a problem, we’ll need to use an aggregate. Aggregates take a set of values and turn them into a single value, akin to “fold” or “reduce” functions in other languages. In this case, we’ll use the aggregate count to figure out how many #students are in the school district:  

    -
    search
    -  students = [#student]
    -  total-students = count[given: students]
    -
    -bind 
    -  [#div text: "{{total-students}} are in the school district"]
    -
    - -

    A quick note on the syntax for count - it feels a lot like a function in other languages, since it has a return value and can be used inline in expressions. Under the hood, functions and aggregates are actually records; total = count[given: students] is shorthand for [#count #function given: students, value: total]. This distinction won’t materially change the way you use count, but it goes to show that everything in Eve reduces to working with records.

    - -

    While given is a required argument in count, aggregates (and functions in general) can also have optional arguments. Let’s say we want to know how many students attend each school. We can use the optional argument per to count students grouped by the school they attend:

    -
    search
    -  students = [#student school]
    -  students-per-school = count[given: students, per: school]
    -
    -bind
    -  [#div text: "{{students-per-school}} attend {{school}}"]
    -
    - -

    All function-like records in Eve specify their arguments as attributes. This means you specify the argument and its value, unlike in other languages, where the order of the values determines the attribute to which they belong. As with everything else in Eve, order doesn’t matter.

    - -

    Extra Credit

    - -

    At this point, you know everything necessary about Eve to complete this extra credit portion (the only additional knowledge you need is domain knowledge of HTML and forms). Let’s review some of the key concepts:

    - -
      -
    • Eve programs are composed of blocks of code that search for and update records.
    • -
    • Records are sets of attribute: value pairs attached to a unique ID.
    • -
    • Eve works with sets, which have no ordering and contain unique elements.
    • -
    • Things with the same name are equivalent.
    • -
    - -

    Your extra credit task is to build a web-based form that allows you to add students to the database. Take a moment to think about how this might be done in Eve, given everything we’ve learned so far.

    - -

    First, let’s make the form. We’ve already displayed a #div, and in the same way we can draw #inputs and a #button:

    -
    bind @browser
    -  [#div children: 
    -    [#div sort: 1, text: "Name:"]
    -    [#input #name-input sort: 2]
    -    [#div sort: 3, text: "Grade:"]
    -    [#input #grade-input sort: 4]
    -    [#div sort: 5, text: "School:"]
    -    [#input #school-input sort: 6]
    -    [#button #submit sort: 7 text: "submit"]]
    -
    - -

    We’ve added some tags to the inputs and the button to distinguish them, so we can easily search for them from other blocks. Now that we have a form, we need to define what happens when the submit button is clicked.

    - -

    Remember, everything in Eve is a record, so the #click event is no different. When a user clicks the mouse in the browser, Eve records that click in the database.

    - -

    This record exists only for an instant, but we can react to it by searching for [#click element: [#submit]]. This record represents a #click on our #submit button. Then, all we need to do is capture the values of the input boxes and save them as a #student record:

    -
    search
    -  [#click element: [#submit]]
    -  name = [#name-input]
    -  grade = [#grade-input]
    -  school = [#school-input]
    -
    -commit
    -  // save the new student
    -  [#student name: name.value, grade: grade.value, school: school.value]
    -  // reset the form
    -  name.value := ""
    -  grade.value := ""
    -  school.value := ""
    -
    - -

    Learning more

    - -

    If you want to learn more about Eve, we have some resources to help with that:

    - -
      -
    • Example applications - See some working programs and explore how they work.
    • -
    • Tutorials - Step by step instructions on building Eve applications.
    • -
    • The Eve Handbook - Everything you need to know about Eve.
    • -
    • Eve syntax reference - Eve’s syntax in one page.
    • -
    • Guides - In-depth documents on topics relating to Eve.
    • -
    - -

    We also invite you to join the Eve community! There are several ways to get involved:

    - - - - -
    -
    -
    -
    \ No newline at end of file From 116b5ff54eda4b756b015f37d5e8e7e0b7f06f97 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Wed, 24 May 2017 16:31:50 -0700 Subject: [PATCH 020/109] Create CNAME --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..130052f --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +docs-next.witheve.com \ No newline at end of file From 38289d0af7611dcbffc4a19871696d2e2191de14 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Thu, 25 May 2017 18:43:25 -0700 Subject: [PATCH 021/109] update site --- handbook/index.xml | 313 +++++++++++++++++--------------- handbook/libraries/index.html | 313 +++++++++++++++++--------------- index.html | 1 - index.xml | 324 +++++++++++++++++++--------------- stylesheets/application.css | 25 ++- syntaxreference/index.html | 10 +- 6 files changed, 554 insertions(+), 432 deletions(-) diff --git a/handbook/index.xml b/handbook/index.xml index 5d016ba..2ff0a4a 100644 --- a/handbook/index.xml +++ b/handbook/index.xml @@ -34,20 +34,16 @@ https://cmontella.github.io/docs/handbook/libraries/ -<p><head> - <link rel="stylesheet" type="text/css" href="style.css"> -</head></p> - -<h1 id="standard-library">Standard Library</h1> - <h2 id="aggregates">Aggregates</h2> <table> + <tr> - <td> - <h3>gather/sort</h3> - Generates an ordering for a set + <td colspan="2"> + <h3>gather/sort</h3> - Generates an ordering for a set </td> + </tr> + <tr> <td> <ul> <li><strong>for</strong> - the set to sort</li> @@ -62,16 +58,17 @@ </td> <td> <code>// sorts the students by GPA -[#student GPA] -index = sort[value: GPA]</code> + [#student GPA] + index = sort[for: GPA]</code> </td> </tr> <tr> - <td> - <h3>gather/count</h3> - Returns the number of elements in a set + <td colspan="2"> + <h3>gather/count</h3> - Returns the number of elements in a set </td> + </tr> + <tr> <td> <ul> <li><strong>for</strong> - the set to count over</li> @@ -80,16 +77,18 @@ index = sort[value: GPA]</code> </td> <td> <code>// counts the number of citizens in each state -residents = [#citizen state] -population = count[given: residents, per: state]</code> + residents = [#citizen state] + population = count[given: residents, per: state]</code> </td> </tr> <tr> - <td> - <h3>gather/sum</h3> - Returns the sum of values in a set of attributes + <td colspan="2"> + <h3>gather/sum</h3> - Returns the sum of values in a set of attributes </td> + </tr> + + <tr> <td> <ul> <li><strong>for</strong> - the set to gather</li> @@ -99,8 +98,8 @@ population = count[given: residents, per: state]</code> </td> <td> <code>// returns the sum of salaries for each department -employees = [#employee salary department] -expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> + employees = [#employee salary department] + expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> </td> </tr> </table> @@ -109,14 +108,14 @@ expenses = gather/sum[for: employees, value: employees.salary, per: department]& <table> <tr> - <td> - <h3>+</h3> - Adds two numbers + <td colspan="2"> + <h3>+</h3> - Adds two numbers </td> + </tr> + + <tr> <td> - <ul> - <li>Infix notation</li> - </ul> + Infix notation </td> <td> <code>total-debt = credit-card + debit-card</code> @@ -124,14 +123,14 @@ expenses = gather/sum[for: employees, value: employees.salary, per: department]& </tr> <tr> - <td> - <h3>-</h3> - Subtracts two numbers + <td colspan="2"> + <h3>-</h3> - Subtracts two numbers </td> + </tr> + + <tr> <td> - <ul> - <li>Infix notation</li> - </ul> + Infix notation </td> <td> <code>remaining-debt = total-debt - amount_paid</code> @@ -139,14 +138,14 @@ expenses = gather/sum[for: employees, value: employees.salary, per: department]& </tr> <tr> - <td> - <h3>*</h3> - Multiplies two numbers + <td colspan="2"> + <h3>*</h3> - Multiplies two numbers </td> + </tr> + + <tr> <td> - <ul> - <li>Infix notation</li> - </ul> + Infix notation </td> <td> <code>yearly-payments = monthly-payments * 12</code> @@ -154,14 +153,14 @@ expenses = gather/sum[for: employees, value: employees.salary, per: department]& </tr> <tr> - <td> - <h3>/</h3> - Divides two numbers + <td colspan="2"> + <h3>/</h3> - Divides two numbers </td> + </tr> + + <tr> <td> - <ul> - <li>Infix notation</li> - </ul> + Infix notation </td> <td> <code>monthly-payments = yearly-payments / 12</code> @@ -169,106 +168,120 @@ expenses = gather/sum[for: employees, value: employees.salary, per: department]& </tr> <tr> - <td> - <h3>math/floor</h3> - Rounds a number down + <td colspan="2"> + <h3>math/floor</h3> - Rounds a number down </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the number to be rounded down</li> + <li><strong>value</strong> - the number to be rounded down</li> </ul> </td> <td> <code>// x rounded down to 34 -x = math/floor[a: 34.2]</code> + x = math/floor[value: 34.2]</code> </td> </tr> <tr> - <td> - <h3>math/ceil</h3> - Rounds a number up + <td colspan="2"> + <h3>math/ceiling</h3> - Rounds a number up </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the number to be rounded up</li> + <li><strong>value</strong> - the number to be rounded up</li> </ul> </td> <td> <code>// x rounded up to 35 -x = math/floor[a: 34.2]</code> + x = math/ceiling[value: 34.2]</code> </td> </tr> <tr> - <td> - <h3>math/round</h3> - Rounds a number to the nearest integer + <td colspan="2"> + <h3>math/round</h3> - Rounds a number to the nearest integer </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the number to be rounded to the nearest integer</li> + <li><strong>value</strong> - the number to be rounded to the nearest integer</li> </ul> </td> <td> <code>// x rounded to 34 -x = math/floor[a: 34.2]</code> + x = math/floor[value: 34.2]</code> </td> </tr> <tr> - <td> - <h3>math/sin</h3> - Sine of an angle + <td colspan="2"> + <h3>math/sin</h3> - Sine of an angle </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the angle in degrees</li> + <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 1 -r = math/sin[a: 90]</code> + r = math/sin[degrees: 90]</code> </td> </tr> <tr> - <td> - <h3>math/cos</h3> - Cosine of an angle + <td colspan="2"> + <h3>math/cos</h3> - Cosine of an angle </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the angle in degrees</li> + <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 0 -r = math/cos[a: 90]</code> + r = math/cos[degrees: 90]</code> </td> </tr> <tr> - <td> - <h3>math/tan</h3> - Tangent of an angle + <td colspan="2"> + <h3>math/tan</h3> - Tangent of an angle </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the angle in degrees</li> + <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 1 -r = math/tan[a: 45]</code> + r = math/tan[degrees: 45]</code> </td> </tr> <tr> - <td> - <h3>math/max</h3> - The greater of two values + <td colspan="2"> + <h3>math/max</h3> - The greater of two values </td> + </tr> + + <tr> <td> <ul> <li><strong>a</strong> - a value to compare</li> @@ -277,16 +290,18 @@ r = math/tan[a: 45]</code> </td> <td> <code>// takes the higher score -[#scores pac-man donkey-kong] -best-score = math/min[a: pac-man, b: donkey-kong]</code> + [#scores pac-man donkey-kong] + best-score = math/min[a: pac-man, b: donkey-kong]</code> </td> </tr> <tr> - <td> - <h3>math/min</h3> - The lesser of two values + <td colspan="2"> + <h3>math/min</h3> - The lesser of two values </td> + </tr> + + <tr> <td> <ul> <li><strong>a</strong> - a value to compare</li> @@ -295,50 +310,56 @@ best-score = math/min[a: pac-man, b: donkey-kong]</code> </td> <td> <code>// takes the lower score -[#scores pac-man donkey-kong] -worst-score = math/min[a: pac-man, b: donkey-kong]</code> + [#scores pac-man donkey-kong] + worst-score = math/min[a: pac-man, b: donkey-kong]</code> </td> </tr> <tr> - <td> - <h3>math/mod</h3> - Modulo division + <td colspan="2"> + <h3>math/mod</h3> - Modulo division </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the number to be divided (dividend)</li> - <li><strong>b</strong> - the number by which to divide (divisor)</li> + <li><strong>value</strong> - the number to be divided (dividend)</li> + <li><strong>by</strong> - the number by which to divide (divisor)</li> </ul> </td> <td> <code>// m is the remainder, 1 -m = math/mod[a: 5, b: 2]</code> + m = math/mod[value: 5, by: 2]</code> </td> </tr> <tr> - <td> - <h3>math/abs</h3> - Absolute value of a number + <td colspan="2"> + <h3>math/absolute</h3> - Absolute value of a number </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the number whose absolute value is found</li> + <li><strong>value</strong> - the number whose absolute value is found</li> </ul> </td> <td> <code>// number of hours from the prime meridian -[#city latitude longitude] -hours-from-gmt = math/abs[a: latitude] / 15</code> + [#city latitude longitude] + hours-from-gmt = math/absolute[value: latitude] / 15</code> </td> </tr> <tr> - <td> - <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places + <td colspan="2"> + <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places </td> + </tr> + + <tr> <td> <ul> <li><strong>a</strong> - the number to be formatted</li> @@ -347,16 +368,18 @@ hours-from-gmt = math/abs[a: latitude] / 15</code> </td> <td> <code>// pi represented as the string "3.14" -[#circle circumference diameter] -pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> + [#circle circumference diameter] + pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> </td> </tr> <tr> - <td> - <h3>math/range</h3> - Generates a range of numbers + <td colspan="2"> + <h3>math/range</h3> - Generates a range of numbers </td> + </tr> + + <tr> <td> <ul> <li><strong>start</strong> - the start of the range</li> @@ -365,15 +388,17 @@ pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> </td> <td> <code>// generates integers 1 through 10 -y = math/range[start: 1, stop: 10]</code> + y = math/range[start: 1, stop: 10]</code> </td> </tr> <tr> - <td> - <h3>random/number</h3> - Generates a random number between 1 and 0 + <td colspan="2"> + <h3>random/number</h3> - Generates a random number between 1 and 0 </td> + </tr> + + <tr> <td> <ul> <li><strong>seed</strong> - a number used to initialize the random number generator</li> @@ -381,8 +406,8 @@ y = math/range[start: 1, stop: 10]</code> </td> <td> <code>// generates a random number every second -[#time minutes seconds] -x = random/number[seed: seconds]</code> + [#time minutes seconds] + x = random/number[seed: seconds]</code> </td> </tr> </table> @@ -391,10 +416,12 @@ x = random/number[seed: seconds]</code> <table> <tr> - <td> - <h3>string/replace</h3> - Replaces a string of text with another + <td colspan="2"> + <h3>string/replace</h3> - Replaces a string of text with another </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the text in which to search for strings and replace them</li> @@ -404,16 +431,18 @@ x = random/number[seed: seconds]</code> </td> <td> <code>// Americanized version of British spelling -[#website body] -american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> + [#website body] + american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> </td> </tr> <tr> - <td> - <h3>string/get</h3> - Gets a character from a specific location in a string + <td colspan="2"> + <h3>string/get</h3> - Gets a character from a specific location in a string </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the text to be searched</li> @@ -422,16 +451,18 @@ american-version = string/replace[text: body, replace: "flavour", with: </td> <td> <code>// finds the 17th letter of the alphabet -alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -letter = string/get[text: alphabet, at: 17]</code> + alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + letter = string/get[text: alphabet, at: 17]</code> </td> </tr> <tr> - <td> - <h3>string/uppercase</h3> - Converts a string to uppercase + <td colspan="2"> + <h3>string/uppercase</h3> -Converts a string to uppercase </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the text to be converted</li> @@ -439,15 +470,17 @@ letter = string/get[text: alphabet, at: 17]</code> </td> <td> <code>funny = "lol" -really-funny = string/uppercase[text: funny]</code> + really-funny = string/uppercase[text: funny]</code> </td> </tr> <tr> - <td> - <h3>string/lowercase</h3> - Converts a string to lowercase + <td colspan="2"> + <h3>string/lowercase</h3> - Converts a string to lowercase </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the text to be converted</li> @@ -455,15 +488,17 @@ really-funny = string/uppercase[text: funny]</code> </td> <td> <code>really-funny = "LOL" -down-a-notch = string/uppercase[text: really-funny]</code> + down-a-notch = string/uppercase[text: really-funny]</code> </td> </tr> <tr> - <td> - <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string + <td colspan="2"> + <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the text to be searched</li> @@ -472,15 +507,17 @@ down-a-notch = string/uppercase[text: really-funny]</code> </td> <td> <code>// Eve is in developers, starting at an index of 2 -index = string/index_of[text: "developers", substring: "eve"</code> + index = string/index-of[text: "developers", substring: "eve"</code> </td> </tr> <tr> - <td> - <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. + <td colspan="2"> + <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the string whose length is found</li> @@ -488,8 +525,8 @@ index = string/index_of[text: "developers", substring: "eve"< </td> <td> <code>// the code point length of the word "unicode" -string = "unicode" -length-in-js = string/codepoint_length[text: string]</code> + string = "unicode" + length-in-js = string/codepoint-length[text: string]</code> </td> </tr> </table> diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html index 7e7c873..c0c9062 100644 --- a/handbook/libraries/index.html +++ b/handbook/libraries/index.html @@ -152,20 +152,16 @@

    EVE

    -

    - -

    - -

    Standard Library

    -

    Aggregates

    + - + + - + + - + + +
    -

    gather/sort

    - Generates an ordering for a set +
    +

    gather/sort

    - Generates an ordering for a set
    • for - the set to sort
    • @@ -180,16 +176,17 @@

      gather/sort

    // sorts the students by GPA -[#student GPA] -index = sort[value: GPA] + [#student GPA] + index = sort[for: GPA]
    -

    gather/count

    - Returns the number of elements in a set +
    +

    gather/count

    - Returns the number of elements in a set
    • for - the set to count over
    • @@ -198,16 +195,18 @@

      gather/count

    // counts the number of citizens in each state -residents = [#citizen state] -population = count[given: residents, per: state] + residents = [#citizen state] + population = count[given: residents, per: state]
    -

    gather/sum

    - Returns the sum of values in a set of attributes +
    +

    gather/sum

    - Returns the sum of values in a set of attributes
    • for - the set to gather
    • @@ -217,8 +216,8 @@

      gather/sum

    // returns the sum of salaries for each department -employees = [#employee salary department] -expenses = gather/sum[for: employees, value: employees.salary, per: department] + employees = [#employee salary department] + expenses = gather/sum[for: employees, value: employees.salary, per: department]
    @@ -227,14 +226,14 @@

    Math

    - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + +
    -

    +

    - Adds two numbers +
    +

    +

    - Adds two numbers
    -
      -
    • Infix notation
    • -
    + Infix notation
    total-debt = credit-card + debit-card @@ -242,14 +241,14 @@

    +

    -

    -

    - Subtracts two numbers +
    +

    -

    - Subtracts two numbers
    -
      -
    • Infix notation
    • -
    + Infix notation
    remaining-debt = total-debt - amount_paid @@ -257,14 +256,14 @@

    -

    -

    *

    - Multiplies two numbers +
    +

    *

    - Multiplies two numbers
    -
      -
    • Infix notation
    • -
    + Infix notation
    yearly-payments = monthly-payments * 12 @@ -272,14 +271,14 @@

    *

    -

    /

    - Divides two numbers +
    +

    /

    - Divides two numbers
    -
      -
    • Infix notation
    • -
    + Infix notation
    monthly-payments = yearly-payments / 12 @@ -287,106 +286,120 @@

    /

    -

    math/floor

    - Rounds a number down +
    +

    math/floor

    - Rounds a number down
      -
    • a - the number to be rounded down
    • +
    • value - the number to be rounded down
    // x rounded down to 34 -x = math/floor[a: 34.2] + x = math/floor[value: 34.2]
    -

    math/ceil

    - Rounds a number up +
    +

    math/ceiling

    - Rounds a number up
      -
    • a - the number to be rounded up
    • +
    • value - the number to be rounded up
    // x rounded up to 35 -x = math/floor[a: 34.2] + x = math/ceiling[value: 34.2]
    -

    math/round

    - Rounds a number to the nearest integer +
    +

    math/round

    - Rounds a number to the nearest integer
      -
    • a - the number to be rounded to the nearest integer
    • +
    • value - the number to be rounded to the nearest integer
    // x rounded to 34 -x = math/floor[a: 34.2] + x = math/floor[value: 34.2]
    -

    math/sin

    - Sine of an angle +
    +

    math/sin

    - Sine of an angle
      -
    • a - the angle in degrees
    • +
    • degrees - the angle in degrees
    // r calculated to 1 -r = math/sin[a: 90] + r = math/sin[degrees: 90]
    -

    math/cos

    - Cosine of an angle +
    +

    math/cos

    - Cosine of an angle
      -
    • a - the angle in degrees
    • +
    • degrees - the angle in degrees
    // r calculated to 0 -r = math/cos[a: 90] + r = math/cos[degrees: 90]
    -

    math/tan

    - Tangent of an angle +
    +

    math/tan

    - Tangent of an angle
      -
    • a - the angle in degrees
    • +
    • degrees - the angle in degrees
    // r calculated to 1 -r = math/tan[a: 45] + r = math/tan[degrees: 45]
    -

    math/max

    - The greater of two values +
    +

    math/max

    - The greater of two values
    • a - a value to compare
    • @@ -395,16 +408,18 @@

      math/max

    // takes the higher score -[#scores pac-man donkey-kong] -best-score = math/min[a: pac-man, b: donkey-kong] + [#scores pac-man donkey-kong] + best-score = math/min[a: pac-man, b: donkey-kong]
    -

    math/min

    - The lesser of two values +
    +

    math/min

    - The lesser of two values
    • a - a value to compare
    • @@ -413,50 +428,56 @@

      math/min

    // takes the lower score -[#scores pac-man donkey-kong] -worst-score = math/min[a: pac-man, b: donkey-kong] + [#scores pac-man donkey-kong] + worst-score = math/min[a: pac-man, b: donkey-kong]
    -

    math/mod

    - Modulo division +
    +

    math/mod

    - Modulo division
      -
    • a - the number to be divided (dividend)
    • -
    • b - the number by which to divide (divisor)
    • +
    • value - the number to be divided (dividend)
    • +
    • by - the number by which to divide (divisor)
    // m is the remainder, 1 -m = math/mod[a: 5, b: 2] + m = math/mod[value: 5, by: 2]
    -

    math/abs

    - Absolute value of a number +
    +

    math/absolute

    - Absolute value of a number
      -
    • a - the number whose absolute value is found
    • +
    • value - the number whose absolute value is found
    // number of hours from the prime meridian -[#city latitude longitude] -hours-from-gmt = math/abs[a: latitude] / 15 + [#city latitude longitude] + hours-from-gmt = math/absolute[value: latitude] / 15
    -

    math/to-fixed

    - Formats a number as a string to a certain number of decimal places +
    +

    math/to-fixed

    - Formats a number as a string to a certain number of decimal places
    • a - the number to be formatted
    • @@ -465,16 +486,18 @@

      math/to-fixed

    // pi represented as the string "3.14" -[#circle circumference diameter] -pi = math/to-fixed[a: (circumference / diameter), b: 2] + [#circle circumference diameter] + pi = math/to-fixed[a: (circumference / diameter), b: 2]
    -

    math/range

    - Generates a range of numbers +
    +

    math/range

    - Generates a range of numbers
    • start - the start of the range
    • @@ -483,15 +506,17 @@

      math/range

    // generates integers 1 through 10 -y = math/range[start: 1, stop: 10] + y = math/range[start: 1, stop: 10]
    -

    random/number

    - Generates a random number between 1 and 0 +
    +

    random/number

    - Generates a random number between 1 and 0
    • seed - a number used to initialize the random number generator
    • @@ -499,8 +524,8 @@

      random/number

    // generates a random number every second -[#time minutes seconds] -x = random/number[seed: seconds] + [#time minutes seconds] + x = random/number[seed: seconds]
    @@ -509,10 +534,12 @@

    Strings

    - + + + - + + + - + + + - + + + - + + + - + + +
    -

    string/replace

    - Replaces a string of text with another +
    +

    string/replace

    - Replaces a string of text with another
    • text - the text in which to search for strings and replace them
    • @@ -522,16 +549,18 @@

      string/replace

    // Americanized version of British spelling -[#website body] -american-version = string/replace[text: body, replace: "flavour", with: "flavor"] + [#website body] + american-version = string/replace[text: body, replace: "flavour", with: "flavor"]
    -

    string/get

    - Gets a character from a specific location in a string +
    +

    string/get

    - Gets a character from a specific location in a string
    • text - the text to be searched
    • @@ -540,16 +569,18 @@

      string/get

    // finds the 17th letter of the alphabet -alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -letter = string/get[text: alphabet, at: 17] + alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + letter = string/get[text: alphabet, at: 17]
    -

    string/uppercase

    - Converts a string to uppercase +
    +

    string/uppercase

    -Converts a string to uppercase
    • text - the text to be converted
    • @@ -557,15 +588,17 @@

      string/uppercase

    funny = "lol" -really-funny = string/uppercase[text: funny] + really-funny = string/uppercase[text: funny]
    -

    string/lowercase

    - Converts a string to lowercase +
    +

    string/lowercase

    - Converts a string to lowercase
    • text - the text to be converted
    • @@ -573,15 +606,17 @@

      string/lowercase

    really-funny = "LOL" -down-a-notch = string/uppercase[text: really-funny] + down-a-notch = string/uppercase[text: really-funny]
    -

    string/index-of

    - Returns the position of the first occurrence of a specified value in a string +
    +

    string/index-of

    - Returns the position of the first occurrence of a specified value in a string
    • text - the text to be searched
    • @@ -590,15 +625,17 @@

      string/index-of

    // Eve is in developers, starting at an index of 2 -index = string/index_of[text: "developers", substring: "eve" + index = string/index-of[text: "developers", substring: "eve"
    -

    string/codepoint-length

    - Returns the length of a string in Unicode code points. +
    +

    string/codepoint-length

    - Returns the length of a string in Unicode code points.
    • text - the string whose length is found
    • @@ -606,8 +643,8 @@

      string/codepoint-length

    // the code point length of the word "unicode" -string = "unicode" -length-in-js = string/codepoint_length[text: string] + string = "unicode" + length-in-js = string/codepoint-length[text: string]
    diff --git a/index.html b/index.html index 12a7371..675f18a 100644 --- a/index.html +++ b/index.html @@ -186,7 +186,6 @@

    Stuck?

    Want to learn more?

      -
    • Browse our gallery of examples from the Eve crew and the community to learn, to be inspired, or just for fun!
    • Read our blog to see what we’re up to, from our developer diary to essays, announcements, and more.
    diff --git a/index.xml b/index.xml index fc67067..a10f977 100644 --- a/index.xml +++ b/index.xml @@ -282,7 +282,6 @@ npm install <h2 id="want-to-learn-more">Want to learn more?</h2> <ul> -<li>Browse our <a href="../gallery">gallery</a> of examples from the Eve crew and the community to learn, to be inspired, or just for fun!</li> <li>Read our <a href="http://incidentalcomplexity.com">blog</a> to see what we’re up to, from our developer diary to essays, announcements, and more.</li> </ul>
    @@ -296,7 +295,7 @@ npm install https://cmontella.github.io/docs/syntaxreference/ -<p><link rel="stylesheet" type="text/css" href="style.css"></p> +<h1 id="syntax-reference">Syntax Reference</h1> <h2 id="records-and-patterns">Records and Patterns</h2> @@ -448,9 +447,9 @@ not(person = [#employee])</code></td> <h2 id="if-then-and-if-else">If&hellip;Then and If&hellip;Else</h2> -<table> +<p><code>If</code> lets your block try multiple branches for a variable. If every branch has no matches, the block fails.</p> - <tr><td><em><code>If</code> lets your block try multiple branches for a variable. If every branch has no matches, the block fails.</em></td></tr> +<table> <tr> <td><code>If … else</code> lets you express ordered choice. <strong>Only the first branch</strong> with matches will contribute values to the variable.</td> @@ -503,9 +502,9 @@ budgets = gather/sum[value: employee.salary, <h2 id="update-operators">Update Operators</h2> -<table> +<p>Besides creating new records, Eve has four operators to modify existing records in <code>bind</code> or <code>commit</code>.</p> - <tr><td><em>Besides creating new records, Eve has four operators to modify existing records in <code>bind</code> or <code>commit</code>.</em></td></tr> +<table> <tr> <td>(<code>+=</code>) Add value to attribute.</td> @@ -620,20 +619,16 @@ chris := none</code></td> https://cmontella.github.io/docs/handbook/libraries/ -<p><head> - <link rel="stylesheet" type="text/css" href="style.css"> -</head></p> - -<h1 id="standard-library">Standard Library</h1> - <h2 id="aggregates">Aggregates</h2> <table> + <tr> - <td> - <h3>gather/sort</h3> - Generates an ordering for a set + <td colspan="2"> + <h3>gather/sort</h3> - Generates an ordering for a set </td> + </tr> + <tr> <td> <ul> <li><strong>for</strong> - the set to sort</li> @@ -648,16 +643,17 @@ chris := none</code></td> </td> <td> <code>// sorts the students by GPA -[#student GPA] -index = sort[value: GPA]</code> + [#student GPA] + index = sort[for: GPA]</code> </td> </tr> <tr> - <td> - <h3>gather/count</h3> - Returns the number of elements in a set + <td colspan="2"> + <h3>gather/count</h3> - Returns the number of elements in a set </td> + </tr> + <tr> <td> <ul> <li><strong>for</strong> - the set to count over</li> @@ -666,16 +662,18 @@ index = sort[value: GPA]</code> </td> <td> <code>// counts the number of citizens in each state -residents = [#citizen state] -population = count[given: residents, per: state]</code> + residents = [#citizen state] + population = count[given: residents, per: state]</code> </td> </tr> <tr> - <td> - <h3>gather/sum</h3> - Returns the sum of values in a set of attributes + <td colspan="2"> + <h3>gather/sum</h3> - Returns the sum of values in a set of attributes </td> + </tr> + + <tr> <td> <ul> <li><strong>for</strong> - the set to gather</li> @@ -685,8 +683,8 @@ population = count[given: residents, per: state]</code> </td> <td> <code>// returns the sum of salaries for each department -employees = [#employee salary department] -expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> + employees = [#employee salary department] + expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> </td> </tr> </table> @@ -695,14 +693,14 @@ expenses = gather/sum[for: employees, value: employees.salary, per: department]& <table> <tr> - <td> - <h3>+</h3> - Adds two numbers + <td colspan="2"> + <h3>+</h3> - Adds two numbers </td> + </tr> + + <tr> <td> - <ul> - <li>Infix notation</li> - </ul> + Infix notation </td> <td> <code>total-debt = credit-card + debit-card</code> @@ -710,14 +708,14 @@ expenses = gather/sum[for: employees, value: employees.salary, per: department]& </tr> <tr> - <td> - <h3>-</h3> - Subtracts two numbers + <td colspan="2"> + <h3>-</h3> - Subtracts two numbers </td> + </tr> + + <tr> <td> - <ul> - <li>Infix notation</li> - </ul> + Infix notation </td> <td> <code>remaining-debt = total-debt - amount_paid</code> @@ -725,14 +723,14 @@ expenses = gather/sum[for: employees, value: employees.salary, per: department]& </tr> <tr> - <td> - <h3>*</h3> - Multiplies two numbers + <td colspan="2"> + <h3>*</h3> - Multiplies two numbers </td> + </tr> + + <tr> <td> - <ul> - <li>Infix notation</li> - </ul> + Infix notation </td> <td> <code>yearly-payments = monthly-payments * 12</code> @@ -740,14 +738,14 @@ expenses = gather/sum[for: employees, value: employees.salary, per: department]& </tr> <tr> - <td> - <h3>/</h3> - Divides two numbers + <td colspan="2"> + <h3>/</h3> - Divides two numbers </td> + </tr> + + <tr> <td> - <ul> - <li>Infix notation</li> - </ul> + Infix notation </td> <td> <code>monthly-payments = yearly-payments / 12</code> @@ -755,106 +753,120 @@ expenses = gather/sum[for: employees, value: employees.salary, per: department]& </tr> <tr> - <td> - <h3>math/floor</h3> - Rounds a number down + <td colspan="2"> + <h3>math/floor</h3> - Rounds a number down </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the number to be rounded down</li> + <li><strong>value</strong> - the number to be rounded down</li> </ul> </td> <td> <code>// x rounded down to 34 -x = math/floor[a: 34.2]</code> + x = math/floor[value: 34.2]</code> </td> </tr> <tr> - <td> - <h3>math/ceil</h3> - Rounds a number up + <td colspan="2"> + <h3>math/ceiling</h3> - Rounds a number up </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the number to be rounded up</li> + <li><strong>value</strong> - the number to be rounded up</li> </ul> </td> <td> <code>// x rounded up to 35 -x = math/floor[a: 34.2]</code> + x = math/ceiling[value: 34.2]</code> </td> </tr> <tr> - <td> - <h3>math/round</h3> - Rounds a number to the nearest integer + <td colspan="2"> + <h3>math/round</h3> - Rounds a number to the nearest integer </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the number to be rounded to the nearest integer</li> + <li><strong>value</strong> - the number to be rounded to the nearest integer</li> </ul> </td> <td> <code>// x rounded to 34 -x = math/floor[a: 34.2]</code> + x = math/floor[value: 34.2]</code> </td> </tr> <tr> - <td> - <h3>math/sin</h3> - Sine of an angle + <td colspan="2"> + <h3>math/sin</h3> - Sine of an angle </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the angle in degrees</li> + <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 1 -r = math/sin[a: 90]</code> + r = math/sin[degrees: 90]</code> </td> </tr> <tr> - <td> - <h3>math/cos</h3> - Cosine of an angle + <td colspan="2"> + <h3>math/cos</h3> - Cosine of an angle </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the angle in degrees</li> + <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 0 -r = math/cos[a: 90]</code> + r = math/cos[degrees: 90]</code> </td> </tr> <tr> - <td> - <h3>math/tan</h3> - Tangent of an angle + <td colspan="2"> + <h3>math/tan</h3> - Tangent of an angle </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the angle in degrees</li> + <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 1 -r = math/tan[a: 45]</code> + r = math/tan[degrees: 45]</code> </td> </tr> <tr> - <td> - <h3>math/max</h3> - The greater of two values + <td colspan="2"> + <h3>math/max</h3> - The greater of two values </td> + </tr> + + <tr> <td> <ul> <li><strong>a</strong> - a value to compare</li> @@ -863,16 +875,18 @@ r = math/tan[a: 45]</code> </td> <td> <code>// takes the higher score -[#scores pac-man donkey-kong] -best-score = math/min[a: pac-man, b: donkey-kong]</code> + [#scores pac-man donkey-kong] + best-score = math/min[a: pac-man, b: donkey-kong]</code> </td> </tr> <tr> - <td> - <h3>math/min</h3> - The lesser of two values + <td colspan="2"> + <h3>math/min</h3> - The lesser of two values </td> + </tr> + + <tr> <td> <ul> <li><strong>a</strong> - a value to compare</li> @@ -881,50 +895,56 @@ best-score = math/min[a: pac-man, b: donkey-kong]</code> </td> <td> <code>// takes the lower score -[#scores pac-man donkey-kong] -worst-score = math/min[a: pac-man, b: donkey-kong]</code> + [#scores pac-man donkey-kong] + worst-score = math/min[a: pac-man, b: donkey-kong]</code> </td> </tr> <tr> - <td> - <h3>math/mod</h3> - Modulo division + <td colspan="2"> + <h3>math/mod</h3> - Modulo division </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the number to be divided (dividend)</li> - <li><strong>b</strong> - the number by which to divide (divisor)</li> + <li><strong>value</strong> - the number to be divided (dividend)</li> + <li><strong>by</strong> - the number by which to divide (divisor)</li> </ul> </td> <td> <code>// m is the remainder, 1 -m = math/mod[a: 5, b: 2]</code> + m = math/mod[value: 5, by: 2]</code> </td> </tr> <tr> - <td> - <h3>math/abs</h3> - Absolute value of a number + <td colspan="2"> + <h3>math/absolute</h3> - Absolute value of a number </td> + </tr> + + <tr> <td> <ul> - <li><strong>a</strong> - the number whose absolute value is found</li> + <li><strong>value</strong> - the number whose absolute value is found</li> </ul> </td> <td> <code>// number of hours from the prime meridian -[#city latitude longitude] -hours-from-gmt = math/abs[a: latitude] / 15</code> + [#city latitude longitude] + hours-from-gmt = math/absolute[value: latitude] / 15</code> </td> </tr> <tr> - <td> - <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places + <td colspan="2"> + <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places </td> + </tr> + + <tr> <td> <ul> <li><strong>a</strong> - the number to be formatted</li> @@ -933,16 +953,18 @@ hours-from-gmt = math/abs[a: latitude] / 15</code> </td> <td> <code>// pi represented as the string "3.14" -[#circle circumference diameter] -pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> + [#circle circumference diameter] + pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> </td> </tr> <tr> - <td> - <h3>math/range</h3> - Generates a range of numbers + <td colspan="2"> + <h3>math/range</h3> - Generates a range of numbers </td> + </tr> + + <tr> <td> <ul> <li><strong>start</strong> - the start of the range</li> @@ -951,15 +973,17 @@ pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> </td> <td> <code>// generates integers 1 through 10 -y = math/range[start: 1, stop: 10]</code> + y = math/range[start: 1, stop: 10]</code> </td> </tr> <tr> - <td> - <h3>random/number</h3> - Generates a random number between 1 and 0 + <td colspan="2"> + <h3>random/number</h3> - Generates a random number between 1 and 0 </td> + </tr> + + <tr> <td> <ul> <li><strong>seed</strong> - a number used to initialize the random number generator</li> @@ -967,8 +991,8 @@ y = math/range[start: 1, stop: 10]</code> </td> <td> <code>// generates a random number every second -[#time minutes seconds] -x = random/number[seed: seconds]</code> + [#time minutes seconds] + x = random/number[seed: seconds]</code> </td> </tr> </table> @@ -977,10 +1001,12 @@ x = random/number[seed: seconds]</code> <table> <tr> - <td> - <h3>string/replace</h3> - Replaces a string of text with another + <td colspan="2"> + <h3>string/replace</h3> - Replaces a string of text with another </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the text in which to search for strings and replace them</li> @@ -990,16 +1016,18 @@ x = random/number[seed: seconds]</code> </td> <td> <code>// Americanized version of British spelling -[#website body] -american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> + [#website body] + american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> </td> </tr> <tr> - <td> - <h3>string/get</h3> - Gets a character from a specific location in a string + <td colspan="2"> + <h3>string/get</h3> - Gets a character from a specific location in a string </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the text to be searched</li> @@ -1008,16 +1036,18 @@ american-version = string/replace[text: body, replace: "flavour", with: </td> <td> <code>// finds the 17th letter of the alphabet -alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -letter = string/get[text: alphabet, at: 17]</code> + alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + letter = string/get[text: alphabet, at: 17]</code> </td> </tr> <tr> - <td> - <h3>string/uppercase</h3> - Converts a string to uppercase + <td colspan="2"> + <h3>string/uppercase</h3> -Converts a string to uppercase </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the text to be converted</li> @@ -1025,15 +1055,17 @@ letter = string/get[text: alphabet, at: 17]</code> </td> <td> <code>funny = "lol" -really-funny = string/uppercase[text: funny]</code> + really-funny = string/uppercase[text: funny]</code> </td> </tr> <tr> - <td> - <h3>string/lowercase</h3> - Converts a string to lowercase + <td colspan="2"> + <h3>string/lowercase</h3> - Converts a string to lowercase </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the text to be converted</li> @@ -1041,15 +1073,17 @@ really-funny = string/uppercase[text: funny]</code> </td> <td> <code>really-funny = "LOL" -down-a-notch = string/uppercase[text: really-funny]</code> + down-a-notch = string/uppercase[text: really-funny]</code> </td> </tr> <tr> - <td> - <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string + <td colspan="2"> + <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the text to be searched</li> @@ -1058,15 +1092,17 @@ down-a-notch = string/uppercase[text: really-funny]</code> </td> <td> <code>// Eve is in developers, starting at an index of 2 -index = string/index_of[text: "developers", substring: "eve"</code> + index = string/index-of[text: "developers", substring: "eve"</code> </td> </tr> <tr> - <td> - <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. + <td colspan="2"> + <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. </td> + </tr> + + <tr> <td> <ul> <li><strong>text</strong> - the string whose length is found</li> @@ -1074,8 +1110,8 @@ index = string/index_of[text: "developers", substring: "eve"< </td> <td> <code>// the code point length of the word "unicode" -string = "unicode" -length-in-js = string/codepoint_length[text: string]</code> + string = "unicode" + length-in-js = string/codepoint-length[text: string]</code> </td> </tr> </table> diff --git a/stylesheets/application.css b/stylesheets/application.css index c37a50b..de22d8c 100644 --- a/stylesheets/application.css +++ b/stylesheets/application.css @@ -127,7 +127,6 @@ h1 { h2 { font-size: 25px; padding-top: 0px; - margin-top: 20px; margin-bottom: 20px; } @@ -143,8 +142,6 @@ li { .drawer { color: rgb(85, 85, 85); - padding-left: 10px; - padding-right: 60px; padding-bottom: 20px; } @@ -164,6 +161,7 @@ li { .article { padding-left: 50px; + padding-bottom: 200px; } .article a { @@ -185,7 +183,7 @@ li { } .sidebar-menu li { - + margin-left: 0px; } .sub { @@ -199,7 +197,7 @@ li { } .sub-menu { - margin-top: 20px; + } .selected a { @@ -288,4 +286,19 @@ nav > .play-cta { margin: 0; padding: 10px 20px; color: white; } .contact > *:last-child { background: rgb(74, 64, 136); } .contact > *:last-child:hover { background: rgb(117, 115, 190); } -.contact > *:last-child:active { background: rgb(142, 140, 215); } \ No newline at end of file +.contact > *:last-child:active { background: rgb(142, 140, 215); } + +ul { display: block; margin-left: 2em; } + +code { padding: 0.2em; background: #f0f2f7; white-space: pre-wrap; font-family: "Inconsolata", "Monaco", "Consolas", "Ubuntu Mono", monospace; font-size: 0.9rem; } + +strong { font-weight: 600; } + +table { + border: 1px black solid; + margin-bottom: 1em; + min-width: 820px; + border-collapse: collapse; + border-spacing: 0; +} +td { border: 1px black solid; width: 20em; } \ No newline at end of file diff --git a/syntaxreference/index.html b/syntaxreference/index.html index 8a67ad6..11000e0 100644 --- a/syntaxreference/index.html +++ b/syntaxreference/index.html @@ -152,7 +152,7 @@

    EVE

    -

    +

    Syntax Reference

    Records and Patterns

    @@ -304,9 +304,9 @@

    Not

    If…Then and If…Else

    - +

    If lets your block try multiple branches for a variable. If every branch has no matches, the block fails.

    - +
    If lets your block try multiple branches for a variable. If every branch has no matches, the block fails.
    @@ -359,9 +359,9 @@

    Functions and Aggregates

    Update Operators

    -
    If … else lets you express ordered choice. Only the first branch with matches will contribute values to the variable.
    +

    Besides creating new records, Eve has four operators to modify existing records in bind or commit.

    - +
    Besides creating new records, Eve has four operators to modify existing records in bind or commit.
    From 6d024b2ba0bb9912c3eb3051ffcbfe89fd843fca Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Thu, 25 May 2017 18:47:51 -0700 Subject: [PATCH 022/109] change domain --- guides/index.html | 46 +- guides/index.xml | 8 +- handbook/index.html | 56 +-- handbook/index.xml | 595 +++++++++++++++++++++++-- handbook/libraries/index.html | 100 +++-- handbook/libraries/stdlib/index.html | 510 +++++++++++++++++++++ index.html | 45 +- index.xml | 638 ++++++++++++++++++++++++--- install/index.html | 40 +- quickstart.eve/index.html | 40 +- sitemap.xml | 34 +- syntaxreference/index.html | 50 +-- tutorials/index.html | 48 +- tutorials/index.xml | 12 +- tutorials/quickstart.eve/index.html | 40 +- 15 files changed, 1920 insertions(+), 342 deletions(-) create mode 100644 handbook/libraries/stdlib/index.html diff --git a/guides/index.html b/guides/index.html index 21f3fcc..aac0b41 100644 --- a/guides/index.html +++ b/guides/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,7 +150,7 @@

    EVE

    Pages in Guide

    - +

    diff --git a/guides/index.xml b/guides/index.xml index f7ab2fb..e53782e 100644 --- a/guides/index.xml +++ b/guides/index.xml @@ -2,18 +2,18 @@ Guides on Eve Documentation - https://cmontella.github.io/docs/guides/index.xml + https://docs-next.witheve.com/guides/index.xml Recent content in Guides on Eve Documentation Hugo -- gohugo.io en-us - + - https://cmontella.github.io/docs/guides/ + https://docs-next.witheve.com/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/guides/ + https://docs-next.witheve.com/guides/ diff --git a/handbook/index.html b/handbook/index.html index c41df68..e398751 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,19 +150,25 @@

    EVE

    Pages in Handbook

    - +


    - +


    - + +

    +
    + +
    + +

    Standard Library

    diff --git a/handbook/index.xml b/handbook/index.xml index 2ff0a4a..c9ac50e 100644 --- a/handbook/index.xml +++ b/handbook/index.xml @@ -2,47 +2,572 @@ Handbooks on Eve Documentation - https://cmontella.github.io/docs/handbook/index.xml + https://docs-next.witheve.com/handbook/index.xml Recent content in Handbooks on Eve Documentation Hugo -- gohugo.io en-us - + - https://cmontella.github.io/docs/handbook/core/ + https://docs-next.witheve.com/handbook/core/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/handbook/core/ + https://docs-next.witheve.com/handbook/core/ - https://cmontella.github.io/docs/handbook/ + https://docs-next.witheve.com/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/handbook/ + https://docs-next.witheve.com/handbook/ + + + https://docs-next.witheve.com/handbook/libraries/stdlib/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://docs-next.witheve.com/handbook/libraries/stdlib/ + <head> + <link rel="stylesheet" type="text/css" href="style.css"> +</head> + +<body> + + <h2> + Aggregates + </h2> + + <table> + <tr> + <td> + <h3>gather/sort</h3> - Generates an ordering for a set + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>for</strong> - the set to sort</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: + <ul> + <li>'up' - smallest to largest; default option</li> + <li>'down' - largest to smallest</li> + </ul> + </li> + </ul> + </td> + <td> + <code>// sorts the students by GPA + [#student GPA] + index = sort[value: GPA]</code> + </td> + </tr> + + <tr> + <td> + <h3>gather/count</h3> - Returns the number of elements in a set + </td> + </tr> + <tr> + <td> + <ul> + <li><strong>for</strong> - the set to count over</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// counts the number of citizens in each state + residents = [#citizen state] + population = count[given: residents, per: state]</code> + </td> + </tr> + + <tr> + <td> + <h3>gather/sum</h3> - Returns the sum of values in a set of attributes + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>for</strong> - the set to gather</li> + <li><strong>value</strong> - the specific variable to be summed</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// returns the sum of salaries for each department + employees = [#employee salary department] + expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> + </td> + </tr> + </table> + + <h2> + Math + </h2> + + <table> + <tr> + <td> + <h3>+</h3> - Adds two numbers + </td> + </tr> + + <tr> + <td> + Infix notation + </td> + <td> + <code>total-debt = credit-card + debit-card</code> + </td> + </tr> + + <tr> + <td> + <h3>-</h3> - Subtracts two numbers + </td> + </tr> + + <tr> + <td> + Infix notation + </td> + <td> + <code>remaining-debt = total-debt - amount_paid</code> + </td> + </tr> + + <tr> + <td> + <h3>*</h3> - Multiplies two numbers + </td> + </tr> + + <tr> + <td> + Infix notation + </td> + <td> + <code>yearly-payments = monthly-payments * 12</code> + </td> + </tr> + + <tr> + <td> + <h3>/</h3> - Divides two numbers + </td> + </tr> + + <tr> + <td> + Infix notation + </td> + <td> + <code>monthly-payments = yearly-payments / 12</code> + </td> + </tr> + + <tr> + <td> + <h3>math/floor</h3> - Rounds a number down + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>value</strong> - the number to be rounded down</li> + </ul> + </td> + <td> + <code>// x rounded down to 34 + x = math/floor[value: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/ceiling</h3> - Rounds a number up + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>value</strong> - the number to be rounded up</li> + </ul> + </td> + <td> + <code>// x rounded up to 35 + x = math/ceiling[value: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/round</h3> - Rounds a number to the nearest integer + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>value</strong> - the number to be rounded to the nearest integer</li> + </ul> + </td> + <td> + <code>// x rounded to 34 + x = math/floor[value: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/sin</h3> - Sine of an angle + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>deg</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 + r = math/sin[deg: 90]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/cos</h3> - Cosine of an angle + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>deg</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 0 + r = math/cos[deg: 90]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/tan</h3> - Tangent of an angle + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>deg</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 + r = math/tan[deg: 45]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/max</h3> - The greater of two values + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the higher score + [#scores pac-man donkey-kong] + best-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/min</h3> - The lesser of two values + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the lower score + [#scores pac-man donkey-kong] + worst-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/mod</h3> - Modulo division + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>value</strong> - the number to be divided (dividend)</li> + <li><strong>by</strong> - the number by which to divide (divisor)</li> + </ul> + </td> + <td> + <code>// m is the remainder, 1 + m = math/mod[value: 5, by: 2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/absolute</h3> - Absolute value of a number + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>value</strong> - the number whose absolute value is found</li> + </ul> + </td> + <td> + <code>// number of hours from the prime meridian + [#city latitude longitude] + hours-from-gmt = math/absolute[value: latitude] / 15</code> + </td> + </tr> + + <tr> + <td> + <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>a</strong> - the number to be formatted</li> + <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> + </ul> + </td> + <td> + <code>// pi represented as the string "3.14" + [#circle circumference diameter] + pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/range</h3> - Generates a range of numbers + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>start</strong> - the start of the range</li> + <li><strong>stop</strong> - the end of the range</li> + </ul> + </td> + <td> + <code>// generates integers 1 through 10 + y = math/range[start: 1, stop: 10]</code> + </td> + </tr> + + <tr> + <td> + <h3>random/number</h3> - Generates a random number between 1 and 0 + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>seed</strong> - a number used to initialize the random number generator</li> + </ul> + </td> + <td> + <code>// generates a random number every second + [#time minutes seconds] + x = random/number[seed: seconds]</code> + </td> + </tr> + </table> + + <h2> + Strings + </h2> + + <table> + <tr> + <td> + <h3>string/replace</h3> - Replaces a string of text with another + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the text in which to search for strings and replace them</li> + <li><strong>replace</strong> - the string to be replaced</li> + <li><strong>with</strong> - the string that will replace `replace`</li> + </ul> + </td> + <td> + <code>// Americanized version of British spelling + [#website body] + american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/get</h3> - Gets a character from a specific location in a string + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>at</strong> - the location to be searched</li> + </ul> + </td> + <td> + <code>// finds the 17th letter of the alphabet + alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + letter = string/get[text: alphabet, at: 17]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/uppercase</h3> -Converts a string to uppercase + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>funny = "lol" +really-funny = string/uppercase[text: funny]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/lowercase</h3> - Converts a string to lowercase + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>really-funny = "LOL" +down-a-notch = string/uppercase[text: really-funny]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>substring</strong> - the string to be found in `text`</li> + </ul> + </td> + <td> + <code>// Eve is in developers, starting at an index of 2 +index = string/index-of[text: "developers", substring: "eve"</code> + </td> + </tr> + + <tr> + <td> + <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the string whose length is found</li> + </ul> + </td> + <td> + <code>// the code point length of the word "unicode" +string = "unicode" +length-in-js = string/codepoint-length[text: string]</code> + </td> + </tr> + </table> + +</body> + + + Standard Library - https://cmontella.github.io/docs/handbook/libraries/ + https://docs-next.witheve.com/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/handbook/libraries/ + https://docs-next.witheve.com/handbook/libraries/ +<p><head> + <link rel="stylesheet" type="text/css" href="style.css"> +</head></p> + +<h1 id="standard-library">Standard Library</h1> + <h2 id="aggregates">Aggregates</h2> <table> - <tr> - <td colspan="2"> + <td> <h3>gather/sort</h3> - Generates an ordering for a set </td> </tr> + <tr> <td> <ul> @@ -64,7 +589,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>gather/count</h3> - Returns the number of elements in a set </td> </tr> @@ -83,7 +608,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>gather/sum</h3> - Returns the sum of values in a set of attributes </td> </tr> @@ -108,7 +633,7 @@ <table> <tr> - <td colspan="2"> + <td> <h3>+</h3> - Adds two numbers </td> </tr> @@ -123,7 +648,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>-</h3> - Subtracts two numbers </td> </tr> @@ -138,7 +663,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>*</h3> - Multiplies two numbers </td> </tr> @@ -153,7 +678,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>/</h3> - Divides two numbers </td> </tr> @@ -168,7 +693,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/floor</h3> - Rounds a number down </td> </tr> @@ -186,7 +711,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/ceiling</h3> - Rounds a number up </td> </tr> @@ -204,7 +729,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/round</h3> - Rounds a number to the nearest integer </td> </tr> @@ -222,7 +747,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/sin</h3> - Sine of an angle </td> </tr> @@ -240,7 +765,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/cos</h3> - Cosine of an angle </td> </tr> @@ -258,7 +783,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/tan</h3> - Tangent of an angle </td> </tr> @@ -276,7 +801,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/max</h3> - The greater of two values </td> </tr> @@ -296,7 +821,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/min</h3> - The lesser of two values </td> </tr> @@ -316,7 +841,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/mod</h3> - Modulo division </td> </tr> @@ -335,7 +860,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/absolute</h3> - Absolute value of a number </td> </tr> @@ -354,7 +879,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places </td> </tr> @@ -374,7 +899,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>math/range</h3> - Generates a range of numbers </td> </tr> @@ -393,7 +918,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>random/number</h3> - Generates a random number between 1 and 0 </td> </tr> @@ -416,7 +941,7 @@ <table> <tr> - <td colspan="2"> + <td> <h3>string/replace</h3> - Replaces a string of text with another </td> </tr> @@ -437,7 +962,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>string/get</h3> - Gets a character from a specific location in a string </td> </tr> @@ -457,7 +982,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>string/uppercase</h3> -Converts a string to uppercase </td> </tr> @@ -475,7 +1000,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>string/lowercase</h3> - Converts a string to lowercase </td> </tr> @@ -493,7 +1018,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string </td> </tr> @@ -512,7 +1037,7 @@ </tr> <tr> - <td colspan="2"> + <td> <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. </td> </tr> diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html index c0c9062..479710b 100644 --- a/handbook/libraries/index.html +++ b/handbook/libraries/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library @@ -152,15 +152,21 @@

    EVE

    +

    + +

    + +

    Standard Library

    +

    Aggregates

  • (+=) Add value to attribute.
    - - + - @@ -201,7 +207,7 @@

    gather/count

    - Returns the number of elements in a set - @@ -226,7 +232,7 @@

    Math

    +

    gather/sort

    - Generates an ordering for a set
      @@ -182,7 +188,7 @@

      gather/sort

      - Generates an ordering for a set
    +

    gather/count

    - Returns the number of elements in a set
    +

    gather/sum

    - Returns the sum of values in a set of attributes
    - @@ -241,7 +247,7 @@

    +

    - Adds two numbers - @@ -256,7 +262,7 @@

    -

    - Subtracts two numbers - @@ -271,7 +277,7 @@

    *

    - Multiplies two numbers - @@ -286,7 +292,7 @@

    /

    - Divides two numbers - @@ -304,7 +310,7 @@

    math/floor

    - Rounds a number down - @@ -322,7 +328,7 @@

    math/ceiling

    - Rounds a number up - @@ -340,7 +346,7 @@

    math/round

    - Rounds a number to the nearest integer - @@ -358,7 +364,7 @@

    math/sin

    - Sine of an angle - @@ -376,7 +382,7 @@

    math/cos

    - Cosine of an angle - @@ -394,7 +400,7 @@

    math/tan

    - Tangent of an angle - @@ -414,7 +420,7 @@

    math/max

    - The greater of two values - @@ -434,7 +440,7 @@

    math/min

    - The lesser of two values - @@ -453,7 +459,7 @@

    math/mod

    - Modulo division - @@ -472,7 +478,7 @@

    math/absolute

    - Absolute value of a number - @@ -492,7 +498,7 @@

    math/to-fixed

    - Formats a number as a string to a certain number of dec - @@ -511,7 +517,7 @@

    math/range

    - Generates a range of numbers - @@ -534,7 +540,7 @@

    Strings

    +

    +

    - Adds two numbers
    +

    -

    - Subtracts two numbers
    +

    *

    - Multiplies two numbers
    +

    /

    - Divides two numbers
    +

    math/floor

    - Rounds a number down
    +

    math/ceiling

    - Rounds a number up
    +

    math/round

    - Rounds a number to the nearest integer
    +

    math/sin

    - Sine of an angle
    +

    math/cos

    - Cosine of an angle
    +

    math/tan

    - Tangent of an angle
    +

    math/max

    - The greater of two values
    +

    math/min

    - The lesser of two values
    +

    math/mod

    - Modulo division
    +

    math/absolute

    - Absolute value of a number
    +

    math/to-fixed

    - Formats a number as a string to a certain number of decimal places
    +

    math/range

    - Generates a range of numbers
    +

    random/number

    - Generates a random number between 1 and 0
    - @@ -555,7 +561,7 @@

    string/replace

    - Replaces a string of text with another - @@ -575,7 +581,7 @@

    string/get

    - Gets a character from a specific location in a string - @@ -593,7 +599,7 @@

    string/uppercase

    -Converts a string to uppercase - @@ -611,7 +617,7 @@

    string/lowercase

    - Converts a string to lowercase - @@ -630,7 +636,7 @@

    string/index-of

    - Returns the position of the first occurrence of a spe - diff --git a/handbook/libraries/stdlib/index.html b/handbook/libraries/stdlib/index.html new file mode 100644 index 0000000..e942208 --- /dev/null +++ b/handbook/libraries/stdlib/index.html @@ -0,0 +1,510 @@ + + + + + + +

    + Aggregates +

    + +
    +

    string/replace

    - Replaces a string of text with another
    +

    string/get

    - Gets a character from a specific location in a string
    +

    string/uppercase

    -Converts a string to uppercase
    +

    string/lowercase

    - Converts a string to lowercase
    +

    string/index-of

    - Returns the position of the first occurrence of a specified value in a string
    +

    string/codepoint-length

    - Returns the length of a string in Unicode code points.
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    gather/sort

    - Generates an ordering for a set +
    +
      +
    • for - the set to sort
    • +
    • per - (optional) - one or more attributes by which to group `for`
    • +
    • direction - (optional) - direction in which to sort `for`. Possible values are: +
        +
      • 'up' - smallest to largest; default option
      • +
      • 'down' - largest to smallest
      • +
      +
    • +
    +
    + // sorts the students by GPA + [#student GPA] + index = sort[value: GPA] +
    +

    gather/count

    - Returns the number of elements in a set +
    +
      +
    • for - the set to count over
    • +
    • per - (optional) - one or more attributes by which to group `for`
    • +
    +
    + // counts the number of citizens in each state + residents = [#citizen state] + population = count[given: residents, per: state] +
    +

    gather/sum

    - Returns the sum of values in a set of attributes +
    +
      +
    • for - the set to gather
    • +
    • value - the specific variable to be summed
    • +
    • per - (optional) - one or more attributes by which to group `for`
    • +
    +
    + // returns the sum of salaries for each department + employees = [#employee salary department] + expenses = gather/sum[for: employees, value: employees.salary, per: department] +
    + +

    + Math +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    +

    - Adds two numbers +
    + Infix notation + + total-debt = credit-card + debit-card +
    +

    -

    - Subtracts two numbers +
    + Infix notation + + remaining-debt = total-debt - amount_paid +
    +

    *

    - Multiplies two numbers +
    + Infix notation + + yearly-payments = monthly-payments * 12 +
    +

    /

    - Divides two numbers +
    + Infix notation + + monthly-payments = yearly-payments / 12 +
    +

    math/floor

    - Rounds a number down +
    +
      +
    • value - the number to be rounded down
    • +
    +
    + // x rounded down to 34 + x = math/floor[value: 34.2] +
    +

    math/ceiling

    - Rounds a number up +
    +
      +
    • value - the number to be rounded up
    • +
    +
    + // x rounded up to 35 + x = math/ceiling[value: 34.2] +
    +

    math/round

    - Rounds a number to the nearest integer +
    +
      +
    • value - the number to be rounded to the nearest integer
    • +
    +
    + // x rounded to 34 + x = math/floor[value: 34.2] +
    +

    math/sin

    - Sine of an angle +
    +
      +
    • deg - the angle in degrees
    • +
    +
    + // r calculated to 1 + r = math/sin[deg: 90] +
    +

    math/cos

    - Cosine of an angle +
    +
      +
    • deg - the angle in degrees
    • +
    +
    + // r calculated to 0 + r = math/cos[deg: 90] +
    +

    math/tan

    - Tangent of an angle +
    +
      +
    • deg - the angle in degrees
    • +
    +
    + // r calculated to 1 + r = math/tan[deg: 45] +
    +

    math/max

    - The greater of two values +
    +
      +
    • a - a value to compare
    • +
    • b - another value to compare
    • +
    +
    + // takes the higher score + [#scores pac-man donkey-kong] + best-score = math/min[a: pac-man, b: donkey-kong] +
    +

    math/min

    - The lesser of two values +
    +
      +
    • a - a value to compare
    • +
    • b - another value to compare
    • +
    +
    + // takes the lower score + [#scores pac-man donkey-kong] + worst-score = math/min[a: pac-man, b: donkey-kong] +
    +

    math/mod

    - Modulo division +
    +
      +
    • value - the number to be divided (dividend)
    • +
    • by - the number by which to divide (divisor)
    • +
    +
    + // m is the remainder, 1 + m = math/mod[value: 5, by: 2] +
    +

    math/absolute

    - Absolute value of a number +
    +
      +
    • value - the number whose absolute value is found
    • +
    +
    + // number of hours from the prime meridian + [#city latitude longitude] + hours-from-gmt = math/absolute[value: latitude] / 15 +
    +

    math/to-fixed

    - Formats a number as a string to a certain number of decimal places +
    +
      +
    • a - the number to be formatted
    • +
    • b - the number of decimal places to which `a` will be formatted
    • +
    +
    + // pi represented as the string "3.14" + [#circle circumference diameter] + pi = math/to-fixed[a: (circumference / diameter), b: 2] +
    +

    math/range

    - Generates a range of numbers +
    +
      +
    • start - the start of the range
    • +
    • stop - the end of the range
    • +
    +
    + // generates integers 1 through 10 + y = math/range[start: 1, stop: 10] +
    +

    random/number

    - Generates a random number between 1 and 0 +
    +
      +
    • seed - a number used to initialize the random number generator
    • +
    +
    + // generates a random number every second + [#time minutes seconds] + x = random/number[seed: seconds] +
    + +

    + Strings +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    string/replace

    - Replaces a string of text with another +
    +
      +
    • text - the text in which to search for strings and replace them
    • +
    • replace - the string to be replaced
    • +
    • with - the string that will replace `replace`
    • +
    +
    + // Americanized version of British spelling + [#website body] + american-version = string/replace[text: body, replace: "flavour", with: "flavor"] +
    +

    string/get

    - Gets a character from a specific location in a string +
    +
      +
    • text - the text to be searched
    • +
    • at - the location to be searched
    • +
    +
    + // finds the 17th letter of the alphabet + alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + letter = string/get[text: alphabet, at: 17] +
    +

    string/uppercase

    -Converts a string to uppercase +
    +
      +
    • text - the text to be converted
    • +
    +
    + funny = "lol" +really-funny = string/uppercase[text: funny] +
    +

    string/lowercase

    - Converts a string to lowercase +
    +
      +
    • text - the text to be converted
    • +
    +
    + really-funny = "LOL" +down-a-notch = string/uppercase[text: really-funny] +
    +

    string/index-of

    - Returns the position of the first occurrence of a specified value in a string +
    +
      +
    • text - the text to be searched
    • +
    • substring - the string to be found in `text`
    • +
    +
    + // Eve is in developers, starting at an index of 2 +index = string/index-of[text: "developers", substring: "eve" +
    +

    string/codepoint-length

    - Returns the length of a string in Unicode code points. +
    +
      +
    • text - the string whose length is found
    • +
    +
    + // the code point length of the word "unicode" +string = "unicode" +length-in-js = string/codepoint-length[text: string] +
    + + diff --git a/index.html b/index.html index 675f18a..6065ac0 100644 --- a/index.html +++ b/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -114,20 +114,20 @@

    EVE

  • - + Library @@ -186,6 +186,7 @@

    Stuck?

    Want to learn more?

      +
    • Browse our gallery of examples from the Eve crew and the community to learn, to be inspired, or just for fun!
    • Read our blog to see what we’re up to, from our developer diary to essays, announcements, and more.
    diff --git a/index.xml b/index.xml index a10f977..55585e3 100644 --- a/index.xml +++ b/index.xml @@ -2,18 +2,18 @@ Eve Documentation - https://cmontella.github.io/docs/index.xml + https://docs-next.witheve.com/index.xml Recent content on Eve Documentation Hugo -- gohugo.io en-us - + Installation - https://cmontella.github.io/docs/install/ + https://docs-next.witheve.com/install/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/install/ + https://docs-next.witheve.com/install/ <h1 id="installation">Installation</h1> @@ -46,10 +46,10 @@ npm install Quickstart - https://cmontella.github.io/docs/tutorials/quickstart.eve/ + https://docs-next.witheve.com/tutorials/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/tutorials/quickstart.eve/ + https://docs-next.witheve.com/tutorials/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> @@ -146,10 +146,10 @@ npm install Quickstart - https://cmontella.github.io/docs/quickstart.eve/ + https://docs-next.witheve.com/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/quickstart.eve/ + https://docs-next.witheve.com/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> @@ -246,10 +246,10 @@ npm install Index - https://cmontella.github.io/docs/ + https://docs-next.witheve.com/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/ + https://docs-next.witheve.com/ <h2 id="install-guide">Install guide</h2> @@ -282,6 +282,7 @@ npm install <h2 id="want-to-learn-more">Want to learn more?</h2> <ul> +<li>Browse our <a href="../gallery">gallery</a> of examples from the Eve crew and the community to learn, to be inspired, or just for fun!</li> <li>Read our <a href="http://incidentalcomplexity.com">blog</a> to see what we’re up to, from our developer diary to essays, announcements, and more.</li> </ul> @@ -289,13 +290,13 @@ npm install Syntax Ref - https://cmontella.github.io/docs/syntaxreference/ + https://docs-next.witheve.com/syntaxreference/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/syntaxreference/ + https://docs-next.witheve.com/syntaxreference/ -<h1 id="syntax-reference">Syntax Reference</h1> +<p><link rel="stylesheet" type="text/css" href="style.css"></p> <h2 id="records-and-patterns">Records and Patterns</h2> @@ -447,10 +448,10 @@ not(person = [#employee])</code></td> <h2 id="if-then-and-if-else">If&hellip;Then and If&hellip;Else</h2> -<p><code>If</code> lets your block try multiple branches for a variable. If every branch has no matches, the block fails.</p> - <table> + <tr><td><em><code>If</code> lets your block try multiple branches for a variable. If every branch has no matches, the block fails.</em></td></tr> + <tr> <td><code>If … else</code> lets you express ordered choice. <strong>Only the first branch</strong> with matches will contribute values to the variable.</td> <td><code></code></td> @@ -502,10 +503,10 @@ budgets = gather/sum[value: employee.salary, <h2 id="update-operators">Update Operators</h2> -<p>Besides creating new records, Eve has four operators to modify existing records in <code>bind</code> or <code>commit</code>.</p> - <table> + <tr><td><em>Besides creating new records, Eve has four operators to modify existing records in <code>bind</code> or <code>commit</code>.</em></td></tr> + <tr> <td>(<code>+=</code>) Add value to attribute.</td> <td><code>chris.likes += “pizza”</code></td> @@ -549,10 +550,10 @@ chris := none</code></td> - https://cmontella.github.io/docs/README/ + https://docs-next.witheve.com/README/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/README/ + https://docs-next.witheve.com/README/ <p align="center"> @@ -577,57 +578,582 @@ chris := none</code></td> - https://cmontella.github.io/docs/guides/ + https://docs-next.witheve.com/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/guides/ + https://docs-next.witheve.com/guides/ - https://cmontella.github.io/docs/handbook/core/ + https://docs-next.witheve.com/handbook/core/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/handbook/core/ + https://docs-next.witheve.com/handbook/core/ - https://cmontella.github.io/docs/handbook/ + https://docs-next.witheve.com/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/handbook/ + https://docs-next.witheve.com/handbook/ - https://cmontella.github.io/docs/tutorials/ + https://docs-next.witheve.com/handbook/libraries/stdlib/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://docs-next.witheve.com/handbook/libraries/stdlib/ + <head> + <link rel="stylesheet" type="text/css" href="style.css"> +</head> + +<body> + + <h2> + Aggregates + </h2> + + <table> + <tr> + <td> + <h3>gather/sort</h3> - Generates an ordering for a set + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>for</strong> - the set to sort</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: + <ul> + <li>'up' - smallest to largest; default option</li> + <li>'down' - largest to smallest</li> + </ul> + </li> + </ul> + </td> + <td> + <code>// sorts the students by GPA + [#student GPA] + index = sort[value: GPA]</code> + </td> + </tr> + + <tr> + <td> + <h3>gather/count</h3> - Returns the number of elements in a set + </td> + </tr> + <tr> + <td> + <ul> + <li><strong>for</strong> - the set to count over</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// counts the number of citizens in each state + residents = [#citizen state] + population = count[given: residents, per: state]</code> + </td> + </tr> + + <tr> + <td> + <h3>gather/sum</h3> - Returns the sum of values in a set of attributes + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>for</strong> - the set to gather</li> + <li><strong>value</strong> - the specific variable to be summed</li> + <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> + </ul> + </td> + <td> + <code>// returns the sum of salaries for each department + employees = [#employee salary department] + expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> + </td> + </tr> + </table> + + <h2> + Math + </h2> + + <table> + <tr> + <td> + <h3>+</h3> - Adds two numbers + </td> + </tr> + + <tr> + <td> + Infix notation + </td> + <td> + <code>total-debt = credit-card + debit-card</code> + </td> + </tr> + + <tr> + <td> + <h3>-</h3> - Subtracts two numbers + </td> + </tr> + + <tr> + <td> + Infix notation + </td> + <td> + <code>remaining-debt = total-debt - amount_paid</code> + </td> + </tr> + + <tr> + <td> + <h3>*</h3> - Multiplies two numbers + </td> + </tr> + + <tr> + <td> + Infix notation + </td> + <td> + <code>yearly-payments = monthly-payments * 12</code> + </td> + </tr> + + <tr> + <td> + <h3>/</h3> - Divides two numbers + </td> + </tr> + + <tr> + <td> + Infix notation + </td> + <td> + <code>monthly-payments = yearly-payments / 12</code> + </td> + </tr> + + <tr> + <td> + <h3>math/floor</h3> - Rounds a number down + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>value</strong> - the number to be rounded down</li> + </ul> + </td> + <td> + <code>// x rounded down to 34 + x = math/floor[value: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/ceiling</h3> - Rounds a number up + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>value</strong> - the number to be rounded up</li> + </ul> + </td> + <td> + <code>// x rounded up to 35 + x = math/ceiling[value: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/round</h3> - Rounds a number to the nearest integer + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>value</strong> - the number to be rounded to the nearest integer</li> + </ul> + </td> + <td> + <code>// x rounded to 34 + x = math/floor[value: 34.2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/sin</h3> - Sine of an angle + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>deg</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 + r = math/sin[deg: 90]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/cos</h3> - Cosine of an angle + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>deg</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 0 + r = math/cos[deg: 90]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/tan</h3> - Tangent of an angle + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>deg</strong> - the angle in degrees</li> + </ul> + </td> + <td> + <code>// r calculated to 1 + r = math/tan[deg: 45]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/max</h3> - The greater of two values + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the higher score + [#scores pac-man donkey-kong] + best-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/min</h3> - The lesser of two values + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>a</strong> - a value to compare</li> + <li><strong>b</strong> - another value to compare</li> + </ul> + </td> + <td> + <code>// takes the lower score + [#scores pac-man donkey-kong] + worst-score = math/min[a: pac-man, b: donkey-kong]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/mod</h3> - Modulo division + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>value</strong> - the number to be divided (dividend)</li> + <li><strong>by</strong> - the number by which to divide (divisor)</li> + </ul> + </td> + <td> + <code>// m is the remainder, 1 + m = math/mod[value: 5, by: 2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/absolute</h3> - Absolute value of a number + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>value</strong> - the number whose absolute value is found</li> + </ul> + </td> + <td> + <code>// number of hours from the prime meridian + [#city latitude longitude] + hours-from-gmt = math/absolute[value: latitude] / 15</code> + </td> + </tr> + + <tr> + <td> + <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>a</strong> - the number to be formatted</li> + <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> + </ul> + </td> + <td> + <code>// pi represented as the string "3.14" + [#circle circumference diameter] + pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> + </td> + </tr> + + <tr> + <td> + <h3>math/range</h3> - Generates a range of numbers + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>start</strong> - the start of the range</li> + <li><strong>stop</strong> - the end of the range</li> + </ul> + </td> + <td> + <code>// generates integers 1 through 10 + y = math/range[start: 1, stop: 10]</code> + </td> + </tr> + + <tr> + <td> + <h3>random/number</h3> - Generates a random number between 1 and 0 + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>seed</strong> - a number used to initialize the random number generator</li> + </ul> + </td> + <td> + <code>// generates a random number every second + [#time minutes seconds] + x = random/number[seed: seconds]</code> + </td> + </tr> + </table> + + <h2> + Strings + </h2> + + <table> + <tr> + <td> + <h3>string/replace</h3> - Replaces a string of text with another + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the text in which to search for strings and replace them</li> + <li><strong>replace</strong> - the string to be replaced</li> + <li><strong>with</strong> - the string that will replace `replace`</li> + </ul> + </td> + <td> + <code>// Americanized version of British spelling + [#website body] + american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/get</h3> - Gets a character from a specific location in a string + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>at</strong> - the location to be searched</li> + </ul> + </td> + <td> + <code>// finds the 17th letter of the alphabet + alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + letter = string/get[text: alphabet, at: 17]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/uppercase</h3> -Converts a string to uppercase + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>funny = "lol" +really-funny = string/uppercase[text: funny]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/lowercase</h3> - Converts a string to lowercase + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the text to be converted</li> + </ul> + </td> + <td> + <code>really-funny = "LOL" +down-a-notch = string/uppercase[text: really-funny]</code> + </td> + </tr> + + <tr> + <td> + <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the text to be searched</li> + <li><strong>substring</strong> - the string to be found in `text`</li> + </ul> + </td> + <td> + <code>// Eve is in developers, starting at an index of 2 +index = string/index-of[text: "developers", substring: "eve"</code> + </td> + </tr> + + <tr> + <td> + <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. + </td> + </tr> + + <tr> + <td> + <ul> + <li><strong>text</strong> - the string whose length is found</li> + </ul> + </td> + <td> + <code>// the code point length of the word "unicode" +string = "unicode" +length-in-js = string/codepoint-length[text: string]</code> + </td> + </tr> + </table> + +</body> + + + + + + https://docs-next.witheve.com/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/tutorials/ + https://docs-next.witheve.com/tutorials/ Standard Library - https://cmontella.github.io/docs/handbook/libraries/ + https://docs-next.witheve.com/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/handbook/libraries/ + https://docs-next.witheve.com/handbook/libraries/ +<p><head> + <link rel="stylesheet" type="text/css" href="style.css"> +</head></p> + +<h1 id="standard-library">Standard Library</h1> + <h2 id="aggregates">Aggregates</h2> <table> - <tr> - <td colspan="2"> + <td> <h3>gather/sort</h3> - Generates an ordering for a set </td> </tr> + <tr> <td> <ul> @@ -649,7 +1175,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>gather/count</h3> - Returns the number of elements in a set </td> </tr> @@ -668,7 +1194,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>gather/sum</h3> - Returns the sum of values in a set of attributes </td> </tr> @@ -693,7 +1219,7 @@ chris := none</code></td> <table> <tr> - <td colspan="2"> + <td> <h3>+</h3> - Adds two numbers </td> </tr> @@ -708,7 +1234,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>-</h3> - Subtracts two numbers </td> </tr> @@ -723,7 +1249,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>*</h3> - Multiplies two numbers </td> </tr> @@ -738,7 +1264,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>/</h3> - Divides two numbers </td> </tr> @@ -753,7 +1279,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/floor</h3> - Rounds a number down </td> </tr> @@ -771,7 +1297,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/ceiling</h3> - Rounds a number up </td> </tr> @@ -789,7 +1315,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/round</h3> - Rounds a number to the nearest integer </td> </tr> @@ -807,7 +1333,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/sin</h3> - Sine of an angle </td> </tr> @@ -825,7 +1351,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/cos</h3> - Cosine of an angle </td> </tr> @@ -843,7 +1369,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/tan</h3> - Tangent of an angle </td> </tr> @@ -861,7 +1387,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/max</h3> - The greater of two values </td> </tr> @@ -881,7 +1407,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/min</h3> - The lesser of two values </td> </tr> @@ -901,7 +1427,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/mod</h3> - Modulo division </td> </tr> @@ -920,7 +1446,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/absolute</h3> - Absolute value of a number </td> </tr> @@ -939,7 +1465,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places </td> </tr> @@ -959,7 +1485,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>math/range</h3> - Generates a range of numbers </td> </tr> @@ -978,7 +1504,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>random/number</h3> - Generates a random number between 1 and 0 </td> </tr> @@ -1001,7 +1527,7 @@ chris := none</code></td> <table> <tr> - <td colspan="2"> + <td> <h3>string/replace</h3> - Replaces a string of text with another </td> </tr> @@ -1022,7 +1548,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>string/get</h3> - Gets a character from a specific location in a string </td> </tr> @@ -1042,7 +1568,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>string/uppercase</h3> -Converts a string to uppercase </td> </tr> @@ -1060,7 +1586,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>string/lowercase</h3> - Converts a string to lowercase </td> </tr> @@ -1078,7 +1604,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string </td> </tr> @@ -1097,7 +1623,7 @@ chris := none</code></td> </tr> <tr> - <td colspan="2"> + <td> <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. </td> </tr> diff --git a/install/index.html b/install/index.html index 3c38b86..d621195 100644 --- a/install/index.html +++ b/install/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/quickstart.eve/index.html b/quickstart.eve/index.html index e39f941..7ea727f 100644 --- a/quickstart.eve/index.html +++ b/quickstart.eve/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/sitemap.xml b/sitemap.xml index cd2d8c7..efe8510 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,66 +2,70 @@ - https://cmontella.github.io/docs/install/ + https://docs-next.witheve.com/install/ - https://cmontella.github.io/docs/tutorials/quickstart.eve/ + https://docs-next.witheve.com/tutorials/quickstart.eve/ - https://cmontella.github.io/docs/quickstart.eve/ + https://docs-next.witheve.com/quickstart.eve/ - https://cmontella.github.io/docs/ + https://docs-next.witheve.com/ - https://cmontella.github.io/docs/syntaxreference/ + https://docs-next.witheve.com/syntaxreference/ - https://cmontella.github.io/docs/README/ + https://docs-next.witheve.com/README/ - https://cmontella.github.io/docs/guides/ + https://docs-next.witheve.com/guides/ - https://cmontella.github.io/docs/handbook/core/ + https://docs-next.witheve.com/handbook/core/ - https://cmontella.github.io/docs/handbook/ + https://docs-next.witheve.com/handbook/ - https://cmontella.github.io/docs/tutorials/ + https://docs-next.witheve.com/handbook/libraries/stdlib/ - https://cmontella.github.io/docs/ + https://docs-next.witheve.com/tutorials/ + + + + https://docs-next.witheve.com/ 0 - https://cmontella.github.io/docs/guides/ + https://docs-next.witheve.com/guides/ 0 - https://cmontella.github.io/docs/handbook/ + https://docs-next.witheve.com/handbook/ 0 - https://cmontella.github.io/docs/handbook/libraries/ + https://docs-next.witheve.com/handbook/libraries/ - https://cmontella.github.io/docs/tutorials/ + https://docs-next.witheve.com/tutorials/ 0 diff --git a/syntaxreference/index.html b/syntaxreference/index.html index 11000e0..c55e3b5 100644 --- a/syntaxreference/index.html +++ b/syntaxreference/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library @@ -152,7 +152,7 @@

    EVE

    -

    Syntax Reference

    +

    Records and Patterns

    @@ -304,10 +304,10 @@

    Not

    If…Then and If…Else

    -

    If lets your block try multiple branches for a variable. If every branch has no matches, the block fails.

    - + + @@ -359,10 +359,10 @@

    Functions and Aggregates

    Update Operators

    -

    Besides creating new records, Eve has four operators to modify existing records in bind or commit.

    -
    If lets your block try multiple branches for a variable. If every branch has no matches, the block fails.
    If … else lets you express ordered choice. Only the first branch with matches will contribute values to the variable.
    + + diff --git a/tutorials/index.html b/tutorials/index.html index b9eb66a..a3ffe71 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,13 +150,13 @@

    EVE

    Pages in Tutorial

    - +


    - +

    Quickstart

    diff --git a/tutorials/index.xml b/tutorials/index.xml index 8de1ec3..d918c56 100644 --- a/tutorials/index.xml +++ b/tutorials/index.xml @@ -2,27 +2,27 @@ Tutorials on Eve Documentation - https://cmontella.github.io/docs/tutorials/index.xml + https://docs-next.witheve.com/tutorials/index.xml Recent content in Tutorials on Eve Documentation Hugo -- gohugo.io en-us - + - https://cmontella.github.io/docs/tutorials/ + https://docs-next.witheve.com/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/tutorials/ + https://docs-next.witheve.com/tutorials/ Quickstart - https://cmontella.github.io/docs/tutorials/quickstart.eve/ + https://docs-next.witheve.com/tutorials/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - https://cmontella.github.io/docs/tutorials/quickstart.eve/ + https://docs-next.witheve.com/tutorials/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> diff --git a/tutorials/quickstart.eve/index.html b/tutorials/quickstart.eve/index.html index 5899523..4a0b97e 100644 --- a/tutorials/quickstart.eve/index.html +++ b/tutorials/quickstart.eve/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library From 2629505e765b46aa7300ae086ef5be7d8a63ee63 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Thu, 25 May 2017 18:50:09 -0700 Subject: [PATCH 023/109] Forgot / in domain --- guides/index.html | 26 +- handbook/index.html | 32 +- handbook/index.xml | 579 ++------------------------- handbook/libraries/index.html | 86 ++-- index.html | 27 +- index.xml | 590 ++-------------------------- install/index.html | 26 +- quickstart.eve/index.html | 26 +- sitemap.xml | 4 - syntaxreference/index.html | 36 +- tutorials/index.html | 26 +- tutorials/quickstart.eve/index.html | 26 +- 12 files changed, 208 insertions(+), 1276 deletions(-) diff --git a/guides/index.html b/guides/index.html index aac0b41..2216ca1 100644 --- a/guides/index.html +++ b/guides/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -79,7 +79,7 @@
    diff --git a/handbook/index.html b/handbook/index.html index e398751..d787b78 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -79,7 +79,7 @@
    @@ -162,12 +162,6 @@


    - -

    -
    - -
    -

    Standard Library

    diff --git a/handbook/index.xml b/handbook/index.xml index c9ac50e..51e2686 100644 --- a/handbook/index.xml +++ b/handbook/index.xml @@ -26,525 +26,6 @@ - - - https://docs-next.witheve.com/handbook/libraries/stdlib/ - Mon, 01 Jan 0001 00:00:00 +0000 - - https://docs-next.witheve.com/handbook/libraries/stdlib/ - <head> - <link rel="stylesheet" type="text/css" href="style.css"> -</head> - -<body> - - <h2> - Aggregates - </h2> - - <table> - <tr> - <td> - <h3>gather/sort</h3> - Generates an ordering for a set - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>for</strong> - the set to sort</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: - <ul> - <li>'up' - smallest to largest; default option</li> - <li>'down' - largest to smallest</li> - </ul> - </li> - </ul> - </td> - <td> - <code>// sorts the students by GPA - [#student GPA] - index = sort[value: GPA]</code> - </td> - </tr> - - <tr> - <td> - <h3>gather/count</h3> - Returns the number of elements in a set - </td> - </tr> - <tr> - <td> - <ul> - <li><strong>for</strong> - the set to count over</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - </ul> - </td> - <td> - <code>// counts the number of citizens in each state - residents = [#citizen state] - population = count[given: residents, per: state]</code> - </td> - </tr> - - <tr> - <td> - <h3>gather/sum</h3> - Returns the sum of values in a set of attributes - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>for</strong> - the set to gather</li> - <li><strong>value</strong> - the specific variable to be summed</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - </ul> - </td> - <td> - <code>// returns the sum of salaries for each department - employees = [#employee salary department] - expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> - </td> - </tr> - </table> - - <h2> - Math - </h2> - - <table> - <tr> - <td> - <h3>+</h3> - Adds two numbers - </td> - </tr> - - <tr> - <td> - Infix notation - </td> - <td> - <code>total-debt = credit-card + debit-card</code> - </td> - </tr> - - <tr> - <td> - <h3>-</h3> - Subtracts two numbers - </td> - </tr> - - <tr> - <td> - Infix notation - </td> - <td> - <code>remaining-debt = total-debt - amount_paid</code> - </td> - </tr> - - <tr> - <td> - <h3>*</h3> - Multiplies two numbers - </td> - </tr> - - <tr> - <td> - Infix notation - </td> - <td> - <code>yearly-payments = monthly-payments * 12</code> - </td> - </tr> - - <tr> - <td> - <h3>/</h3> - Divides two numbers - </td> - </tr> - - <tr> - <td> - Infix notation - </td> - <td> - <code>monthly-payments = yearly-payments / 12</code> - </td> - </tr> - - <tr> - <td> - <h3>math/floor</h3> - Rounds a number down - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>value</strong> - the number to be rounded down</li> - </ul> - </td> - <td> - <code>// x rounded down to 34 - x = math/floor[value: 34.2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/ceiling</h3> - Rounds a number up - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>value</strong> - the number to be rounded up</li> - </ul> - </td> - <td> - <code>// x rounded up to 35 - x = math/ceiling[value: 34.2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/round</h3> - Rounds a number to the nearest integer - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>value</strong> - the number to be rounded to the nearest integer</li> - </ul> - </td> - <td> - <code>// x rounded to 34 - x = math/floor[value: 34.2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/sin</h3> - Sine of an angle - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>deg</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 1 - r = math/sin[deg: 90]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/cos</h3> - Cosine of an angle - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>deg</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 0 - r = math/cos[deg: 90]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/tan</h3> - Tangent of an angle - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>deg</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 1 - r = math/tan[deg: 45]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/max</h3> - The greater of two values - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>a</strong> - a value to compare</li> - <li><strong>b</strong> - another value to compare</li> - </ul> - </td> - <td> - <code>// takes the higher score - [#scores pac-man donkey-kong] - best-score = math/min[a: pac-man, b: donkey-kong]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/min</h3> - The lesser of two values - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>a</strong> - a value to compare</li> - <li><strong>b</strong> - another value to compare</li> - </ul> - </td> - <td> - <code>// takes the lower score - [#scores pac-man donkey-kong] - worst-score = math/min[a: pac-man, b: donkey-kong]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/mod</h3> - Modulo division - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>value</strong> - the number to be divided (dividend)</li> - <li><strong>by</strong> - the number by which to divide (divisor)</li> - </ul> - </td> - <td> - <code>// m is the remainder, 1 - m = math/mod[value: 5, by: 2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/absolute</h3> - Absolute value of a number - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>value</strong> - the number whose absolute value is found</li> - </ul> - </td> - <td> - <code>// number of hours from the prime meridian - [#city latitude longitude] - hours-from-gmt = math/absolute[value: latitude] / 15</code> - </td> - </tr> - - <tr> - <td> - <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>a</strong> - the number to be formatted</li> - <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> - </ul> - </td> - <td> - <code>// pi represented as the string "3.14" - [#circle circumference diameter] - pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/range</h3> - Generates a range of numbers - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>start</strong> - the start of the range</li> - <li><strong>stop</strong> - the end of the range</li> - </ul> - </td> - <td> - <code>// generates integers 1 through 10 - y = math/range[start: 1, stop: 10]</code> - </td> - </tr> - - <tr> - <td> - <h3>random/number</h3> - Generates a random number between 1 and 0 - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>seed</strong> - a number used to initialize the random number generator</li> - </ul> - </td> - <td> - <code>// generates a random number every second - [#time minutes seconds] - x = random/number[seed: seconds]</code> - </td> - </tr> - </table> - - <h2> - Strings - </h2> - - <table> - <tr> - <td> - <h3>string/replace</h3> - Replaces a string of text with another - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the text in which to search for strings and replace them</li> - <li><strong>replace</strong> - the string to be replaced</li> - <li><strong>with</strong> - the string that will replace `replace`</li> - </ul> - </td> - <td> - <code>// Americanized version of British spelling - [#website body] - american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/get</h3> - Gets a character from a specific location in a string - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the text to be searched</li> - <li><strong>at</strong> - the location to be searched</li> - </ul> - </td> - <td> - <code>// finds the 17th letter of the alphabet - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - letter = string/get[text: alphabet, at: 17]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/uppercase</h3> -Converts a string to uppercase - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the text to be converted</li> - </ul> - </td> - <td> - <code>funny = "lol" -really-funny = string/uppercase[text: funny]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/lowercase</h3> - Converts a string to lowercase - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the text to be converted</li> - </ul> - </td> - <td> - <code>really-funny = "LOL" -down-a-notch = string/uppercase[text: really-funny]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the text to be searched</li> - <li><strong>substring</strong> - the string to be found in `text`</li> - </ul> - </td> - <td> - <code>// Eve is in developers, starting at an index of 2 -index = string/index-of[text: "developers", substring: "eve"</code> - </td> - </tr> - - <tr> - <td> - <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the string whose length is found</li> - </ul> - </td> - <td> - <code>// the code point length of the word "unicode" -string = "unicode" -length-in-js = string/codepoint-length[text: string]</code> - </td> - </tr> - </table> - -</body> - - - Standard Library https://docs-next.witheve.com/handbook/libraries/ @@ -553,21 +34,15 @@ length-in-js = string/codepoint-length[text: string]</code> https://docs-next.witheve.com/handbook/libraries/ -<p><head> - <link rel="stylesheet" type="text/css" href="style.css"> -</head></p> - -<h1 id="standard-library">Standard Library</h1> - <h2 id="aggregates">Aggregates</h2> <table> + <tr> - <td> + <td colspan="2"> <h3>gather/sort</h3> - Generates an ordering for a set </td> </tr> - <tr> <td> <ul> @@ -589,7 +64,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>gather/count</h3> - Returns the number of elements in a set </td> </tr> @@ -608,7 +83,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>gather/sum</h3> - Returns the sum of values in a set of attributes </td> </tr> @@ -633,7 +108,7 @@ length-in-js = string/codepoint-length[text: string]</code> <table> <tr> - <td> + <td colspan="2"> <h3>+</h3> - Adds two numbers </td> </tr> @@ -648,7 +123,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>-</h3> - Subtracts two numbers </td> </tr> @@ -663,7 +138,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>*</h3> - Multiplies two numbers </td> </tr> @@ -678,7 +153,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>/</h3> - Divides two numbers </td> </tr> @@ -693,7 +168,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/floor</h3> - Rounds a number down </td> </tr> @@ -711,7 +186,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/ceiling</h3> - Rounds a number up </td> </tr> @@ -729,7 +204,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/round</h3> - Rounds a number to the nearest integer </td> </tr> @@ -747,7 +222,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/sin</h3> - Sine of an angle </td> </tr> @@ -765,7 +240,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/cos</h3> - Cosine of an angle </td> </tr> @@ -783,7 +258,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/tan</h3> - Tangent of an angle </td> </tr> @@ -801,7 +276,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/max</h3> - The greater of two values </td> </tr> @@ -821,7 +296,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/min</h3> - The lesser of two values </td> </tr> @@ -841,7 +316,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/mod</h3> - Modulo division </td> </tr> @@ -860,7 +335,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/absolute</h3> - Absolute value of a number </td> </tr> @@ -879,7 +354,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places </td> </tr> @@ -899,7 +374,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/range</h3> - Generates a range of numbers </td> </tr> @@ -918,7 +393,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>random/number</h3> - Generates a random number between 1 and 0 </td> </tr> @@ -941,7 +416,7 @@ length-in-js = string/codepoint-length[text: string]</code> <table> <tr> - <td> + <td colspan="2"> <h3>string/replace</h3> - Replaces a string of text with another </td> </tr> @@ -962,7 +437,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>string/get</h3> - Gets a character from a specific location in a string </td> </tr> @@ -982,7 +457,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>string/uppercase</h3> -Converts a string to uppercase </td> </tr> @@ -1000,7 +475,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>string/lowercase</h3> - Converts a string to lowercase </td> </tr> @@ -1018,7 +493,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string </td> </tr> @@ -1037,7 +512,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. </td> </tr> diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html index 479710b..41dc8ca 100644 --- a/handbook/libraries/index.html +++ b/handbook/libraries/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -152,21 +152,15 @@

    EVE

    -

    - -

    - -

    Standard Library

    -

    Aggregates

  • Besides creating new records, Eve has four operators to modify existing records in bind or commit.
    (+=) Add value to attribute. chris.likes += “pizza”
    + - - - @@ -207,7 +201,7 @@

    gather/count

    - Returns the number of elements in a set - @@ -232,7 +226,7 @@

    Math

    +

    gather/sort

    - Generates an ordering for a set
      @@ -188,7 +182,7 @@

      gather/sort

      - Generates an ordering for a set
    +

    gather/count

    - Returns the number of elements in a set
    +

    gather/sum

    - Returns the sum of values in a set of attributes
    - @@ -247,7 +241,7 @@

    +

    - Adds two numbers - @@ -262,7 +256,7 @@

    -

    - Subtracts two numbers - @@ -277,7 +271,7 @@

    *

    - Multiplies two numbers - @@ -292,7 +286,7 @@

    /

    - Divides two numbers - @@ -310,7 +304,7 @@

    math/floor

    - Rounds a number down - @@ -328,7 +322,7 @@

    math/ceiling

    - Rounds a number up - @@ -346,7 +340,7 @@

    math/round

    - Rounds a number to the nearest integer - @@ -364,7 +358,7 @@

    math/sin

    - Sine of an angle - @@ -382,7 +376,7 @@

    math/cos

    - Cosine of an angle - @@ -400,7 +394,7 @@

    math/tan

    - Tangent of an angle - @@ -420,7 +414,7 @@

    math/max

    - The greater of two values - @@ -440,7 +434,7 @@

    math/min

    - The lesser of two values - @@ -459,7 +453,7 @@

    math/mod

    - Modulo division - @@ -478,7 +472,7 @@

    math/absolute

    - Absolute value of a number - @@ -498,7 +492,7 @@

    math/to-fixed

    - Formats a number as a string to a certain number of dec - @@ -517,7 +511,7 @@

    math/range

    - Generates a range of numbers - @@ -540,7 +534,7 @@

    Strings

    +

    +

    - Adds two numbers
    +

    -

    - Subtracts two numbers
    +

    *

    - Multiplies two numbers
    +

    /

    - Divides two numbers
    +

    math/floor

    - Rounds a number down
    +

    math/ceiling

    - Rounds a number up
    +

    math/round

    - Rounds a number to the nearest integer
    +

    math/sin

    - Sine of an angle
    +

    math/cos

    - Cosine of an angle
    +

    math/tan

    - Tangent of an angle
    +

    math/max

    - The greater of two values
    +

    math/min

    - The lesser of two values
    +

    math/mod

    - Modulo division
    +

    math/absolute

    - Absolute value of a number
    +

    math/to-fixed

    - Formats a number as a string to a certain number of decimal places
    +

    math/range

    - Generates a range of numbers
    +

    random/number

    - Generates a random number between 1 and 0
    - @@ -561,7 +555,7 @@

    string/replace

    - Replaces a string of text with another - @@ -581,7 +575,7 @@

    string/get

    - Gets a character from a specific location in a string - @@ -599,7 +593,7 @@

    string/uppercase

    -Converts a string to uppercase - @@ -617,7 +611,7 @@

    string/lowercase

    - Converts a string to lowercase - @@ -636,7 +630,7 @@

    string/index-of

    - Returns the position of the first occurrence of a spe - diff --git a/index.html b/index.html index 6065ac0..9957624 100644 --- a/index.html +++ b/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -79,7 +79,7 @@
    @@ -186,7 +186,6 @@

    Stuck?

    Want to learn more?

      -
    • Browse our gallery of examples from the Eve crew and the community to learn, to be inspired, or just for fun!
    • Read our blog to see what we’re up to, from our developer diary to essays, announcements, and more.
    diff --git a/index.xml b/index.xml index 55585e3..eb14d2a 100644 --- a/index.xml +++ b/index.xml @@ -282,7 +282,6 @@ npm install <h2 id="want-to-learn-more">Want to learn more?</h2> <ul> -<li>Browse our <a href="../gallery">gallery</a> of examples from the Eve crew and the community to learn, to be inspired, or just for fun!</li> <li>Read our <a href="http://incidentalcomplexity.com">blog</a> to see what we’re up to, from our developer diary to essays, announcements, and more.</li> </ul> @@ -296,7 +295,7 @@ npm install https://docs-next.witheve.com/syntaxreference/ -<p><link rel="stylesheet" type="text/css" href="style.css"></p> +<h1 id="syntax-reference">Syntax Reference</h1> <h2 id="records-and-patterns">Records and Patterns</h2> @@ -448,9 +447,9 @@ not(person = [#employee])</code></td> <h2 id="if-then-and-if-else">If&hellip;Then and If&hellip;Else</h2> -<table> +<p><code>If</code> lets your block try multiple branches for a variable. If every branch has no matches, the block fails.</p> - <tr><td><em><code>If</code> lets your block try multiple branches for a variable. If every branch has no matches, the block fails.</em></td></tr> +<table> <tr> <td><code>If … else</code> lets you express ordered choice. <strong>Only the first branch</strong> with matches will contribute values to the variable.</td> @@ -503,9 +502,9 @@ budgets = gather/sum[value: employee.salary, <h2 id="update-operators">Update Operators</h2> -<table> +<p>Besides creating new records, Eve has four operators to modify existing records in <code>bind</code> or <code>commit</code>.</p> - <tr><td><em>Besides creating new records, Eve has four operators to modify existing records in <code>bind</code> or <code>commit</code>.</em></td></tr> +<table> <tr> <td>(<code>+=</code>) Add value to attribute.</td> @@ -603,525 +602,6 @@ chris := none</code></td> - - - https://docs-next.witheve.com/handbook/libraries/stdlib/ - Mon, 01 Jan 0001 00:00:00 +0000 - - https://docs-next.witheve.com/handbook/libraries/stdlib/ - <head> - <link rel="stylesheet" type="text/css" href="style.css"> -</head> - -<body> - - <h2> - Aggregates - </h2> - - <table> - <tr> - <td> - <h3>gather/sort</h3> - Generates an ordering for a set - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>for</strong> - the set to sort</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: - <ul> - <li>'up' - smallest to largest; default option</li> - <li>'down' - largest to smallest</li> - </ul> - </li> - </ul> - </td> - <td> - <code>// sorts the students by GPA - [#student GPA] - index = sort[value: GPA]</code> - </td> - </tr> - - <tr> - <td> - <h3>gather/count</h3> - Returns the number of elements in a set - </td> - </tr> - <tr> - <td> - <ul> - <li><strong>for</strong> - the set to count over</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - </ul> - </td> - <td> - <code>// counts the number of citizens in each state - residents = [#citizen state] - population = count[given: residents, per: state]</code> - </td> - </tr> - - <tr> - <td> - <h3>gather/sum</h3> - Returns the sum of values in a set of attributes - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>for</strong> - the set to gather</li> - <li><strong>value</strong> - the specific variable to be summed</li> - <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> - </ul> - </td> - <td> - <code>// returns the sum of salaries for each department - employees = [#employee salary department] - expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> - </td> - </tr> - </table> - - <h2> - Math - </h2> - - <table> - <tr> - <td> - <h3>+</h3> - Adds two numbers - </td> - </tr> - - <tr> - <td> - Infix notation - </td> - <td> - <code>total-debt = credit-card + debit-card</code> - </td> - </tr> - - <tr> - <td> - <h3>-</h3> - Subtracts two numbers - </td> - </tr> - - <tr> - <td> - Infix notation - </td> - <td> - <code>remaining-debt = total-debt - amount_paid</code> - </td> - </tr> - - <tr> - <td> - <h3>*</h3> - Multiplies two numbers - </td> - </tr> - - <tr> - <td> - Infix notation - </td> - <td> - <code>yearly-payments = monthly-payments * 12</code> - </td> - </tr> - - <tr> - <td> - <h3>/</h3> - Divides two numbers - </td> - </tr> - - <tr> - <td> - Infix notation - </td> - <td> - <code>monthly-payments = yearly-payments / 12</code> - </td> - </tr> - - <tr> - <td> - <h3>math/floor</h3> - Rounds a number down - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>value</strong> - the number to be rounded down</li> - </ul> - </td> - <td> - <code>// x rounded down to 34 - x = math/floor[value: 34.2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/ceiling</h3> - Rounds a number up - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>value</strong> - the number to be rounded up</li> - </ul> - </td> - <td> - <code>// x rounded up to 35 - x = math/ceiling[value: 34.2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/round</h3> - Rounds a number to the nearest integer - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>value</strong> - the number to be rounded to the nearest integer</li> - </ul> - </td> - <td> - <code>// x rounded to 34 - x = math/floor[value: 34.2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/sin</h3> - Sine of an angle - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>deg</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 1 - r = math/sin[deg: 90]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/cos</h3> - Cosine of an angle - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>deg</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 0 - r = math/cos[deg: 90]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/tan</h3> - Tangent of an angle - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>deg</strong> - the angle in degrees</li> - </ul> - </td> - <td> - <code>// r calculated to 1 - r = math/tan[deg: 45]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/max</h3> - The greater of two values - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>a</strong> - a value to compare</li> - <li><strong>b</strong> - another value to compare</li> - </ul> - </td> - <td> - <code>// takes the higher score - [#scores pac-man donkey-kong] - best-score = math/min[a: pac-man, b: donkey-kong]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/min</h3> - The lesser of two values - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>a</strong> - a value to compare</li> - <li><strong>b</strong> - another value to compare</li> - </ul> - </td> - <td> - <code>// takes the lower score - [#scores pac-man donkey-kong] - worst-score = math/min[a: pac-man, b: donkey-kong]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/mod</h3> - Modulo division - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>value</strong> - the number to be divided (dividend)</li> - <li><strong>by</strong> - the number by which to divide (divisor)</li> - </ul> - </td> - <td> - <code>// m is the remainder, 1 - m = math/mod[value: 5, by: 2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/absolute</h3> - Absolute value of a number - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>value</strong> - the number whose absolute value is found</li> - </ul> - </td> - <td> - <code>// number of hours from the prime meridian - [#city latitude longitude] - hours-from-gmt = math/absolute[value: latitude] / 15</code> - </td> - </tr> - - <tr> - <td> - <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>a</strong> - the number to be formatted</li> - <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> - </ul> - </td> - <td> - <code>// pi represented as the string "3.14" - [#circle circumference diameter] - pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> - </td> - </tr> - - <tr> - <td> - <h3>math/range</h3> - Generates a range of numbers - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>start</strong> - the start of the range</li> - <li><strong>stop</strong> - the end of the range</li> - </ul> - </td> - <td> - <code>// generates integers 1 through 10 - y = math/range[start: 1, stop: 10]</code> - </td> - </tr> - - <tr> - <td> - <h3>random/number</h3> - Generates a random number between 1 and 0 - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>seed</strong> - a number used to initialize the random number generator</li> - </ul> - </td> - <td> - <code>// generates a random number every second - [#time minutes seconds] - x = random/number[seed: seconds]</code> - </td> - </tr> - </table> - - <h2> - Strings - </h2> - - <table> - <tr> - <td> - <h3>string/replace</h3> - Replaces a string of text with another - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the text in which to search for strings and replace them</li> - <li><strong>replace</strong> - the string to be replaced</li> - <li><strong>with</strong> - the string that will replace `replace`</li> - </ul> - </td> - <td> - <code>// Americanized version of British spelling - [#website body] - american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/get</h3> - Gets a character from a specific location in a string - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the text to be searched</li> - <li><strong>at</strong> - the location to be searched</li> - </ul> - </td> - <td> - <code>// finds the 17th letter of the alphabet - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - letter = string/get[text: alphabet, at: 17]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/uppercase</h3> -Converts a string to uppercase - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the text to be converted</li> - </ul> - </td> - <td> - <code>funny = "lol" -really-funny = string/uppercase[text: funny]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/lowercase</h3> - Converts a string to lowercase - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the text to be converted</li> - </ul> - </td> - <td> - <code>really-funny = "LOL" -down-a-notch = string/uppercase[text: really-funny]</code> - </td> - </tr> - - <tr> - <td> - <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the text to be searched</li> - <li><strong>substring</strong> - the string to be found in `text`</li> - </ul> - </td> - <td> - <code>// Eve is in developers, starting at an index of 2 -index = string/index-of[text: "developers", substring: "eve"</code> - </td> - </tr> - - <tr> - <td> - <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. - </td> - </tr> - - <tr> - <td> - <ul> - <li><strong>text</strong> - the string whose length is found</li> - </ul> - </td> - <td> - <code>// the code point length of the word "unicode" -string = "unicode" -length-in-js = string/codepoint-length[text: string]</code> - </td> - </tr> - </table> - -</body> - - - https://docs-next.witheve.com/tutorials/ @@ -1139,21 +619,15 @@ length-in-js = string/codepoint-length[text: string]</code> https://docs-next.witheve.com/handbook/libraries/ -<p><head> - <link rel="stylesheet" type="text/css" href="style.css"> -</head></p> - -<h1 id="standard-library">Standard Library</h1> - <h2 id="aggregates">Aggregates</h2> <table> + <tr> - <td> + <td colspan="2"> <h3>gather/sort</h3> - Generates an ordering for a set </td> </tr> - <tr> <td> <ul> @@ -1175,7 +649,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>gather/count</h3> - Returns the number of elements in a set </td> </tr> @@ -1194,7 +668,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>gather/sum</h3> - Returns the sum of values in a set of attributes </td> </tr> @@ -1219,7 +693,7 @@ length-in-js = string/codepoint-length[text: string]</code> <table> <tr> - <td> + <td colspan="2"> <h3>+</h3> - Adds two numbers </td> </tr> @@ -1234,7 +708,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>-</h3> - Subtracts two numbers </td> </tr> @@ -1249,7 +723,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>*</h3> - Multiplies two numbers </td> </tr> @@ -1264,7 +738,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>/</h3> - Divides two numbers </td> </tr> @@ -1279,7 +753,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/floor</h3> - Rounds a number down </td> </tr> @@ -1297,7 +771,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/ceiling</h3> - Rounds a number up </td> </tr> @@ -1315,7 +789,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/round</h3> - Rounds a number to the nearest integer </td> </tr> @@ -1333,7 +807,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/sin</h3> - Sine of an angle </td> </tr> @@ -1351,7 +825,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/cos</h3> - Cosine of an angle </td> </tr> @@ -1369,7 +843,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/tan</h3> - Tangent of an angle </td> </tr> @@ -1387,7 +861,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/max</h3> - The greater of two values </td> </tr> @@ -1407,7 +881,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/min</h3> - The lesser of two values </td> </tr> @@ -1427,7 +901,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/mod</h3> - Modulo division </td> </tr> @@ -1446,7 +920,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/absolute</h3> - Absolute value of a number </td> </tr> @@ -1465,7 +939,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places </td> </tr> @@ -1485,7 +959,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>math/range</h3> - Generates a range of numbers </td> </tr> @@ -1504,7 +978,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>random/number</h3> - Generates a random number between 1 and 0 </td> </tr> @@ -1527,7 +1001,7 @@ length-in-js = string/codepoint-length[text: string]</code> <table> <tr> - <td> + <td colspan="2"> <h3>string/replace</h3> - Replaces a string of text with another </td> </tr> @@ -1548,7 +1022,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>string/get</h3> - Gets a character from a specific location in a string </td> </tr> @@ -1568,7 +1042,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>string/uppercase</h3> -Converts a string to uppercase </td> </tr> @@ -1586,7 +1060,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>string/lowercase</h3> - Converts a string to lowercase </td> </tr> @@ -1604,7 +1078,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string </td> </tr> @@ -1623,7 +1097,7 @@ length-in-js = string/codepoint-length[text: string]</code> </tr> <tr> - <td> + <td colspan="2"> <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. </td> </tr> diff --git a/install/index.html b/install/index.html index d621195..16a3ba4 100644 --- a/install/index.html +++ b/install/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    diff --git a/quickstart.eve/index.html b/quickstart.eve/index.html index 7ea727f..3e8c84b 100644 --- a/quickstart.eve/index.html +++ b/quickstart.eve/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    diff --git a/sitemap.xml b/sitemap.xml index efe8510..5a5b5a0 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -37,10 +37,6 @@ https://docs-next.witheve.com/handbook/ - - https://docs-next.witheve.com/handbook/libraries/stdlib/ - - https://docs-next.witheve.com/tutorials/ diff --git a/syntaxreference/index.html b/syntaxreference/index.html index c55e3b5..7122238 100644 --- a/syntaxreference/index.html +++ b/syntaxreference/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -152,7 +152,7 @@

    EVE

    -

    +

    Syntax Reference

    Records and Patterns

    @@ -304,9 +304,9 @@

    Not

    If…Then and If…Else

    -
    +

    string/replace

    - Replaces a string of text with another
    +

    string/get

    - Gets a character from a specific location in a string
    +

    string/uppercase

    -Converts a string to uppercase
    +

    string/lowercase

    - Converts a string to lowercase
    +

    string/index-of

    - Returns the position of the first occurrence of a specified value in a string
    +

    string/codepoint-length

    - Returns the length of a string in Unicode code points.
    +

    If lets your block try multiple branches for a variable. If every branch has no matches, the block fails.

    - +
    If lets your block try multiple branches for a variable. If every branch has no matches, the block fails.
    @@ -359,9 +359,9 @@

    Functions and Aggregates

    Update Operators

    -
    If … else lets you express ordered choice. Only the first branch with matches will contribute values to the variable.
    +

    Besides creating new records, Eve has four operators to modify existing records in bind or commit.

    - +
    Besides creating new records, Eve has four operators to modify existing records in bind or commit.
    diff --git a/tutorials/index.html b/tutorials/index.html index a3ffe71..42b82f0 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -79,7 +79,7 @@
    diff --git a/tutorials/quickstart.eve/index.html b/tutorials/quickstart.eve/index.html index 4a0b97e..185c91f 100644 --- a/tutorials/quickstart.eve/index.html +++ b/tutorials/quickstart.eve/index.html @@ -25,30 +25,30 @@ - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    From b34712d838e39194b1f5529e3ab7281ae1f9ff9a Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Thu, 25 May 2017 18:51:26 -0700 Subject: [PATCH 024/109] can't be secure --- guides/index.html | 46 +++++++++++++------------- guides/index.xml | 8 ++--- handbook/index.html | 50 ++++++++++++++--------------- handbook/index.xml | 16 ++++----- handbook/libraries/index.html | 40 +++++++++++------------ index.html | 44 ++++++++++++------------- index.xml | 48 +++++++++++++-------------- install/index.html | 40 +++++++++++------------ quickstart.eve/index.html | 40 +++++++++++------------ sitemap.xml | 30 ++++++++--------- syntaxreference/index.html | 40 +++++++++++------------ tutorials/index.html | 48 +++++++++++++-------------- tutorials/index.xml | 12 +++---- tutorials/quickstart.eve/index.html | 40 +++++++++++------------ 14 files changed, 251 insertions(+), 251 deletions(-) diff --git a/guides/index.html b/guides/index.html index 2216ca1..e71de9f 100644 --- a/guides/index.html +++ b/guides/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,7 +150,7 @@

    EVE

    Pages in Guide

    - +

    diff --git a/guides/index.xml b/guides/index.xml index e53782e..f603b51 100644 --- a/guides/index.xml +++ b/guides/index.xml @@ -2,18 +2,18 @@ Guides on Eve Documentation - https://docs-next.witheve.com/guides/index.xml + http://docs-next.witheve.com/guides/index.xml Recent content in Guides on Eve Documentation Hugo -- gohugo.io en-us - + - https://docs-next.witheve.com/guides/ + http://docs-next.witheve.com/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/guides/ + http://docs-next.witheve.com/guides/ diff --git a/handbook/index.html b/handbook/index.html index d787b78..1ae063f 100644 --- a/handbook/index.html +++ b/handbook/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,19 +150,19 @@

    EVE

    Pages in Handbook

    - +


    - +


    - +

    Standard Library

    diff --git a/handbook/index.xml b/handbook/index.xml index 51e2686..aa8fc3f 100644 --- a/handbook/index.xml +++ b/handbook/index.xml @@ -2,36 +2,36 @@ Handbooks on Eve Documentation - https://docs-next.witheve.com/handbook/index.xml + http://docs-next.witheve.com/handbook/index.xml Recent content in Handbooks on Eve Documentation Hugo -- gohugo.io en-us - + - https://docs-next.witheve.com/handbook/core/ + http://docs-next.witheve.com/handbook/core/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/handbook/core/ + http://docs-next.witheve.com/handbook/core/ - https://docs-next.witheve.com/handbook/ + http://docs-next.witheve.com/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/handbook/ + http://docs-next.witheve.com/handbook/ Standard Library - https://docs-next.witheve.com/handbook/libraries/ + http://docs-next.witheve.com/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/handbook/libraries/ + http://docs-next.witheve.com/handbook/libraries/ <h2 id="aggregates">Aggregates</h2> diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html index 41dc8ca..be05969 100644 --- a/handbook/libraries/index.html +++ b/handbook/libraries/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/index.html b/index.html index 9957624..883ecea 100644 --- a/index.html +++ b/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -114,20 +114,20 @@

    EVE

  • - + Library diff --git a/index.xml b/index.xml index eb14d2a..bdfc6e8 100644 --- a/index.xml +++ b/index.xml @@ -2,18 +2,18 @@ Eve Documentation - https://docs-next.witheve.com/index.xml + http://docs-next.witheve.com/index.xml Recent content on Eve Documentation Hugo -- gohugo.io en-us - + Installation - https://docs-next.witheve.com/install/ + http://docs-next.witheve.com/install/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/install/ + http://docs-next.witheve.com/install/ <h1 id="installation">Installation</h1> @@ -46,10 +46,10 @@ npm install Quickstart - https://docs-next.witheve.com/tutorials/quickstart.eve/ + http://docs-next.witheve.com/tutorials/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/tutorials/quickstart.eve/ + http://docs-next.witheve.com/tutorials/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> @@ -146,10 +146,10 @@ npm install Quickstart - https://docs-next.witheve.com/quickstart.eve/ + http://docs-next.witheve.com/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/quickstart.eve/ + http://docs-next.witheve.com/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> @@ -246,10 +246,10 @@ npm install Index - https://docs-next.witheve.com/ + http://docs-next.witheve.com/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/ + http://docs-next.witheve.com/ <h2 id="install-guide">Install guide</h2> @@ -289,10 +289,10 @@ npm install Syntax Ref - https://docs-next.witheve.com/syntaxreference/ + http://docs-next.witheve.com/syntaxreference/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/syntaxreference/ + http://docs-next.witheve.com/syntaxreference/ <h1 id="syntax-reference">Syntax Reference</h1> @@ -549,10 +549,10 @@ chris := none</code></td> - https://docs-next.witheve.com/README/ + http://docs-next.witheve.com/README/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/README/ + http://docs-next.witheve.com/README/ <p align="center"> @@ -577,46 +577,46 @@ chris := none</code></td> - https://docs-next.witheve.com/guides/ + http://docs-next.witheve.com/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/guides/ + http://docs-next.witheve.com/guides/ - https://docs-next.witheve.com/handbook/core/ + http://docs-next.witheve.com/handbook/core/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/handbook/core/ + http://docs-next.witheve.com/handbook/core/ - https://docs-next.witheve.com/handbook/ + http://docs-next.witheve.com/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/handbook/ + http://docs-next.witheve.com/handbook/ - https://docs-next.witheve.com/tutorials/ + http://docs-next.witheve.com/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/tutorials/ + http://docs-next.witheve.com/tutorials/ Standard Library - https://docs-next.witheve.com/handbook/libraries/ + http://docs-next.witheve.com/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/handbook/libraries/ + http://docs-next.witheve.com/handbook/libraries/ <h2 id="aggregates">Aggregates</h2> diff --git a/install/index.html b/install/index.html index 16a3ba4..defd6b0 100644 --- a/install/index.html +++ b/install/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/quickstart.eve/index.html b/quickstart.eve/index.html index 3e8c84b..ad31675 100644 --- a/quickstart.eve/index.html +++ b/quickstart.eve/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/sitemap.xml b/sitemap.xml index 5a5b5a0..655df98 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,66 +2,66 @@ - https://docs-next.witheve.com/install/ + http://docs-next.witheve.com/install/ - https://docs-next.witheve.com/tutorials/quickstart.eve/ + http://docs-next.witheve.com/tutorials/quickstart.eve/ - https://docs-next.witheve.com/quickstart.eve/ + http://docs-next.witheve.com/quickstart.eve/ - https://docs-next.witheve.com/ + http://docs-next.witheve.com/ - https://docs-next.witheve.com/syntaxreference/ + http://docs-next.witheve.com/syntaxreference/ - https://docs-next.witheve.com/README/ + http://docs-next.witheve.com/README/ - https://docs-next.witheve.com/guides/ + http://docs-next.witheve.com/guides/ - https://docs-next.witheve.com/handbook/core/ + http://docs-next.witheve.com/handbook/core/ - https://docs-next.witheve.com/handbook/ + http://docs-next.witheve.com/handbook/ - https://docs-next.witheve.com/tutorials/ + http://docs-next.witheve.com/tutorials/ - https://docs-next.witheve.com/ + http://docs-next.witheve.com/ 0 - https://docs-next.witheve.com/guides/ + http://docs-next.witheve.com/guides/ 0 - https://docs-next.witheve.com/handbook/ + http://docs-next.witheve.com/handbook/ 0 - https://docs-next.witheve.com/handbook/libraries/ + http://docs-next.witheve.com/handbook/libraries/ - https://docs-next.witheve.com/tutorials/ + http://docs-next.witheve.com/tutorials/ 0 diff --git a/syntaxreference/index.html b/syntaxreference/index.html index 7122238..fab96a5 100644 --- a/syntaxreference/index.html +++ b/syntaxreference/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/tutorials/index.html b/tutorials/index.html index 42b82f0..2271981 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,13 +150,13 @@

    EVE

    Pages in Tutorial

    - +


    - +

    Quickstart

    diff --git a/tutorials/index.xml b/tutorials/index.xml index d918c56..88d180b 100644 --- a/tutorials/index.xml +++ b/tutorials/index.xml @@ -2,27 +2,27 @@ Tutorials on Eve Documentation - https://docs-next.witheve.com/tutorials/index.xml + http://docs-next.witheve.com/tutorials/index.xml Recent content in Tutorials on Eve Documentation Hugo -- gohugo.io en-us - + - https://docs-next.witheve.com/tutorials/ + http://docs-next.witheve.com/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/tutorials/ + http://docs-next.witheve.com/tutorials/ Quickstart - https://docs-next.witheve.com/tutorials/quickstart.eve/ + http://docs-next.witheve.com/tutorials/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - https://docs-next.witheve.com/tutorials/quickstart.eve/ + http://docs-next.witheve.com/tutorials/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> diff --git a/tutorials/quickstart.eve/index.html b/tutorials/quickstart.eve/index.html index 185c91f..189205c 100644 --- a/tutorials/quickstart.eve/index.html +++ b/tutorials/quickstart.eve/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -111,20 +111,20 @@

    EVE

  • - + Library From 6bfa0a617035a8aec91167661b26f3d75cbf6529 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Thu, 25 May 2017 19:54:31 -0700 Subject: [PATCH 025/109] Update site --- handbook/index.xml | 166 +++++++++++++++++----------------- handbook/libraries/index.html | 166 +++++++++++++++++----------------- index.xml | 166 +++++++++++++++++----------------- stylesheets/application.css | 25 +++-- 4 files changed, 271 insertions(+), 252 deletions(-) diff --git a/handbook/index.xml b/handbook/index.xml index aa8fc3f..92ee6e4 100644 --- a/handbook/index.xml +++ b/handbook/index.xml @@ -34,22 +34,24 @@ http://docs-next.witheve.com/handbook/libraries/ +<h1 id="standard-library">Standard Library</h1> + <h2 id="aggregates">Aggregates</h2> <table> <tr> <td colspan="2"> - <h3>gather/sort</h3> - Generates an ordering for a set + <b>gather/sort</b> - Generates an ordering for a set </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>for</strong> - the set to sort</li> <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: - <ul> + <ul class="arglist"> <li>'up' - smallest to largest; default option</li> <li>'down' - largest to smallest</li> </ul> @@ -58,39 +60,39 @@ </td> <td> <code>// sorts the students by GPA - [#student GPA] - index = sort[for: GPA]</code> +[#student GPA] +index = sort[for: GPA]</code> </td> </tr> <tr> <td colspan="2"> - <h3>gather/count</h3> - Returns the number of elements in a set + <b>gather/count</b> - Returns the number of elements in a set </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>for</strong> - the set to count over</li> <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> </ul> </td> <td> <code>// counts the number of citizens in each state - residents = [#citizen state] - population = count[given: residents, per: state]</code> +residents = [#citizen state] +population = count[given: residents, per: state]</code> </td> </tr> <tr> <td colspan="2"> - <h3>gather/sum</h3> - Returns the sum of values in a set of attributes + <b>gather/sum</b> - Returns the sum of values in a set of attributes </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>for</strong> - the set to gather</li> <li><strong>value</strong> - the specific variable to be summed</li> <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> @@ -98,8 +100,8 @@ </td> <td> <code>// returns the sum of salaries for each department - employees = [#employee salary department] - expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> +employees = [#employee salary department] +expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> </td> </tr> </table> @@ -109,7 +111,7 @@ <table> <tr> <td colspan="2"> - <h3>+</h3> - Adds two numbers + <b>+</b> - Adds two numbers </td> </tr> @@ -124,7 +126,7 @@ <tr> <td colspan="2"> - <h3>-</h3> - Subtracts two numbers + <b>-</b> - Subtracts two numbers </td> </tr> @@ -139,7 +141,7 @@ <tr> <td colspan="2"> - <h3>*</h3> - Multiplies two numbers + <b>*</b> - Multiplies two numbers </td> </tr> @@ -154,7 +156,7 @@ <tr> <td colspan="2"> - <h3>/</h3> - Divides two numbers + <b>/</b> - Divides two numbers </td> </tr> @@ -169,245 +171,245 @@ <tr> <td colspan="2"> - <h3>math/floor</h3> - Rounds a number down + <b>math/floor</b> - Rounds a number down </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>value</strong> - the number to be rounded down</li> </ul> </td> <td> <code>// x rounded down to 34 - x = math/floor[value: 34.2]</code> +x = math/floor[value: 34.2]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/ceiling</h3> - Rounds a number up + <b>math/ceiling</b> - Rounds a number up </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>value</strong> - the number to be rounded up</li> </ul> </td> <td> <code>// x rounded up to 35 - x = math/ceiling[value: 34.2]</code> +x = math/ceiling[value: 34.2]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/round</h3> - Rounds a number to the nearest integer + <b>math/round</b> - Rounds a number to the nearest integer </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>value</strong> - the number to be rounded to the nearest integer</li> </ul> </td> <td> <code>// x rounded to 34 - x = math/floor[value: 34.2]</code> +x = math/floor[value: 34.2]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/sin</h3> - Sine of an angle + <b>math/sin</b> - Sine of an angle </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 1 - r = math/sin[degrees: 90]</code> +r = math/sin[degrees: 90]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/cos</h3> - Cosine of an angle + <b>math/cos</b> - Cosine of an angle </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 0 - r = math/cos[degrees: 90]</code> +r = math/cos[degrees: 90]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/tan</h3> - Tangent of an angle + <b>math/tan</b> - Tangent of an angle </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 1 - r = math/tan[degrees: 45]</code> +r = math/tan[degrees: 45]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/max</h3> - The greater of two values + <b>math/max</b> - The greater of two values </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>a</strong> - a value to compare</li> <li><strong>b</strong> - another value to compare</li> </ul> </td> <td> <code>// takes the higher score - [#scores pac-man donkey-kong] - best-score = math/min[a: pac-man, b: donkey-kong]</code> +[#scores pac-man donkey-kong] +best-score = math/min[a: pac-man, b: donkey-kong]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/min</h3> - The lesser of two values + <b>math/min</b> - The lesser of two values </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>a</strong> - a value to compare</li> <li><strong>b</strong> - another value to compare</li> </ul> </td> <td> <code>// takes the lower score - [#scores pac-man donkey-kong] - worst-score = math/min[a: pac-man, b: donkey-kong]</code> +[#scores pac-man donkey-kong] +worst-score = math/min[a: pac-man, b: donkey-kong]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/mod</h3> - Modulo division + <b>math/mod</b> - Modulo division </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>value</strong> - the number to be divided (dividend)</li> <li><strong>by</strong> - the number by which to divide (divisor)</li> </ul> </td> <td> <code>// m is the remainder, 1 - m = math/mod[value: 5, by: 2]</code> +m = math/mod[value: 5, by: 2]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/absolute</h3> - Absolute value of a number + <b>math/absolute</b> - Absolute value of a number </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>value</strong> - the number whose absolute value is found</li> </ul> </td> <td> <code>// number of hours from the prime meridian - [#city latitude longitude] - hours-from-gmt = math/absolute[value: latitude] / 15</code> +[#city latitude longitude] +hours-from-gmt = math/absolute[value: latitude] / 15</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places + <b>math/to-fixed</b> - Formats a number as a string to a certain number of decimal places </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>a</strong> - the number to be formatted</li> <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> </ul> </td> <td> <code>// pi represented as the string "3.14" - [#circle circumference diameter] - pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> +[#circle circumference diameter] +pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/range</h3> - Generates a range of numbers + <b>math/range</b> - Generates a range of numbers </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>start</strong> - the start of the range</li> <li><strong>stop</strong> - the end of the range</li> </ul> </td> <td> <code>// generates integers 1 through 10 - y = math/range[start: 1, stop: 10]</code> +y = math/range[start: 1, stop: 10]</code> </td> </tr> <tr> <td colspan="2"> - <h3>random/number</h3> - Generates a random number between 1 and 0 + <b>random/number</b> - Generates a random number between 1 and 0 </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>seed</strong> - a number used to initialize the random number generator</li> </ul> </td> <td> <code>// generates a random number every second - [#time minutes seconds] - x = random/number[seed: seconds]</code> +[#time minutes seconds] +x = random/number[seed: seconds]</code> </td> </tr> </table> @@ -417,13 +419,13 @@ <table> <tr> <td colspan="2"> - <h3>string/replace</h3> - Replaces a string of text with another + <b>string/replace</b> - Replaces a string of text with another </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the text in which to search for strings and replace them</li> <li><strong>replace</strong> - the string to be replaced</li> <li><strong>with</strong> - the string that will replace `replace`</li> @@ -431,102 +433,102 @@ </td> <td> <code>// Americanized version of British spelling - [#website body] - american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> +[#website body] +american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> </td> </tr> <tr> <td colspan="2"> - <h3>string/get</h3> - Gets a character from a specific location in a string + <b>string/get</b> - Gets a character from a specific location in a string </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the text to be searched</li> <li><strong>at</strong> - the location to be searched</li> </ul> </td> <td> <code>// finds the 17th letter of the alphabet - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - letter = string/get[text: alphabet, at: 17]</code> +alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +letter = string/get[text: alphabet, at: 17]</code> </td> </tr> <tr> <td colspan="2"> - <h3>string/uppercase</h3> -Converts a string to uppercase + <b>string/uppercase</b> -Converts a string to uppercase </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the text to be converted</li> </ul> </td> <td> <code>funny = "lol" - really-funny = string/uppercase[text: funny]</code> +really-funny = string/uppercase[text: funny]</code> </td> </tr> <tr> <td colspan="2"> - <h3>string/lowercase</h3> - Converts a string to lowercase + <b>string/lowercase</b> - Converts a string to lowercase </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the text to be converted</li> </ul> </td> <td> <code>really-funny = "LOL" - down-a-notch = string/uppercase[text: really-funny]</code> +down-a-notch = string/uppercase[text: really-funny]</code> </td> </tr> <tr> <td colspan="2"> - <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string + <b>string/index-of</b> - Returns the position of the first occurrence of a specified value in a string </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the text to be searched</li> <li><strong>substring</strong> - the string to be found in `text`</li> </ul> </td> <td> <code>// Eve is in developers, starting at an index of 2 - index = string/index-of[text: "developers", substring: "eve"</code> +index = string/index-of[text: "developers", substring: "eve"</code> </td> </tr> <tr> <td colspan="2"> - <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. + <b>string/codepoint-length</b> - Returns the length of a string in Unicode code points. </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the string whose length is found</li> </ul> </td> <td> <code>// the code point length of the word "unicode" - string = "unicode" - length-in-js = string/codepoint-length[text: string]</code> +string = "unicode" +length-in-js = string/codepoint-length[text: string]</code> </td> </tr> </table> diff --git a/handbook/libraries/index.html b/handbook/libraries/index.html index be05969..855b664 100644 --- a/handbook/libraries/index.html +++ b/handbook/libraries/index.html @@ -152,22 +152,24 @@

    EVE

    +

    Standard Library

    +

    Aggregates

  • (+=) Add value to attribute.
    -

    gather/sort

    - Generates an ordering for a set + gather/sort - Generates an ordering for a set
    -
      +
      • for - the set to sort
      • per - (optional) - one or more attributes by which to group `for`
      • direction - (optional) - direction in which to sort `for`. Possible values are: -
          +
          • 'up' - smallest to largest; default option
          • 'down' - largest to smallest
          @@ -176,39 +178,39 @@

          gather/sort

          - Generates an ordering for a set
    // sorts the students by GPA - [#student GPA] - index = sort[for: GPA] +[#student GPA] +index = sort[for: GPA]
    -

    gather/count

    - Returns the number of elements in a set + gather/count - Returns the number of elements in a set
    -
      +
      • for - the set to count over
      • per - (optional) - one or more attributes by which to group `for`
    // counts the number of citizens in each state - residents = [#citizen state] - population = count[given: residents, per: state] +residents = [#citizen state] +population = count[given: residents, per: state]
    -

    gather/sum

    - Returns the sum of values in a set of attributes + gather/sum - Returns the sum of values in a set of attributes
    -
      +
      • for - the set to gather
      • value - the specific variable to be summed
      • per - (optional) - one or more attributes by which to group `for`
      • @@ -216,8 +218,8 @@

        gather/sum

        - Returns the sum of values in a set of attributes
    // returns the sum of salaries for each department - employees = [#employee salary department] - expenses = gather/sum[for: employees, value: employees.salary, per: department] +employees = [#employee salary department] +expenses = gather/sum[for: employees, value: employees.salary, per: department]
    @@ -227,7 +229,7 @@

    Math

    @@ -242,7 +244,7 @@

    +

    - Adds two numbers @@ -257,7 +259,7 @@

    -

    - Subtracts two numbers @@ -272,7 +274,7 @@

    *

    - Multiplies two numbers @@ -287,245 +289,245 @@

    /

    - Divides two numbers
    -

    +

    - Adds two numbers + + - Adds two numbers
    -

    -

    - Subtracts two numbers + - - Subtracts two numbers
    -

    *

    - Multiplies two numbers + * - Multiplies two numbers
    -

    /

    - Divides two numbers + / - Divides two numbers
    -

    math/floor

    - Rounds a number down + math/floor - Rounds a number down
    -
      +
      • value - the number to be rounded down
    // x rounded down to 34 - x = math/floor[value: 34.2] +x = math/floor[value: 34.2]
    -

    math/ceiling

    - Rounds a number up + math/ceiling - Rounds a number up
    -
      +
      • value - the number to be rounded up
    // x rounded up to 35 - x = math/ceiling[value: 34.2] +x = math/ceiling[value: 34.2]
    -

    math/round

    - Rounds a number to the nearest integer + math/round - Rounds a number to the nearest integer
    -
      +
      • value - the number to be rounded to the nearest integer
    // x rounded to 34 - x = math/floor[value: 34.2] +x = math/floor[value: 34.2]
    -

    math/sin

    - Sine of an angle + math/sin - Sine of an angle
    -
      +
      • degrees - the angle in degrees
    // r calculated to 1 - r = math/sin[degrees: 90] +r = math/sin[degrees: 90]
    -

    math/cos

    - Cosine of an angle + math/cos - Cosine of an angle
    -
      +
      • degrees - the angle in degrees
    // r calculated to 0 - r = math/cos[degrees: 90] +r = math/cos[degrees: 90]
    -

    math/tan

    - Tangent of an angle + math/tan - Tangent of an angle
    -
      +
      • degrees - the angle in degrees
    // r calculated to 1 - r = math/tan[degrees: 45] +r = math/tan[degrees: 45]
    -

    math/max

    - The greater of two values + math/max - The greater of two values
    -
      +
      • a - a value to compare
      • b - another value to compare
    // takes the higher score - [#scores pac-man donkey-kong] - best-score = math/min[a: pac-man, b: donkey-kong] +[#scores pac-man donkey-kong] +best-score = math/min[a: pac-man, b: donkey-kong]
    -

    math/min

    - The lesser of two values + math/min - The lesser of two values
    -
      +
      • a - a value to compare
      • b - another value to compare
    // takes the lower score - [#scores pac-man donkey-kong] - worst-score = math/min[a: pac-man, b: donkey-kong] +[#scores pac-man donkey-kong] +worst-score = math/min[a: pac-man, b: donkey-kong]
    -

    math/mod

    - Modulo division + math/mod - Modulo division
    -
      +
      • value - the number to be divided (dividend)
      • by - the number by which to divide (divisor)
    // m is the remainder, 1 - m = math/mod[value: 5, by: 2] +m = math/mod[value: 5, by: 2]
    -

    math/absolute

    - Absolute value of a number + math/absolute - Absolute value of a number
    -
      +
      • value - the number whose absolute value is found
    // number of hours from the prime meridian - [#city latitude longitude] - hours-from-gmt = math/absolute[value: latitude] / 15 +[#city latitude longitude] +hours-from-gmt = math/absolute[value: latitude] / 15
    -

    math/to-fixed

    - Formats a number as a string to a certain number of decimal places + math/to-fixed - Formats a number as a string to a certain number of decimal places
    -
      +
      • a - the number to be formatted
      • b - the number of decimal places to which `a` will be formatted
    // pi represented as the string "3.14" - [#circle circumference diameter] - pi = math/to-fixed[a: (circumference / diameter), b: 2] +[#circle circumference diameter] +pi = math/to-fixed[a: (circumference / diameter), b: 2]
    -

    math/range

    - Generates a range of numbers + math/range - Generates a range of numbers
    -
      +
      • start - the start of the range
      • stop - the end of the range
    // generates integers 1 through 10 - y = math/range[start: 1, stop: 10] +y = math/range[start: 1, stop: 10]
    -

    random/number

    - Generates a random number between 1 and 0 + random/number - Generates a random number between 1 and 0
    -
      +
      • seed - a number used to initialize the random number generator
    // generates a random number every second - [#time minutes seconds] - x = random/number[seed: seconds] +[#time minutes seconds] +x = random/number[seed: seconds]
    @@ -535,13 +537,13 @@

    Strings

    -

    string/replace

    - Replaces a string of text with another + string/replace - Replaces a string of text with another
    -
      +
      • text - the text in which to search for strings and replace them
      • replace - the string to be replaced
      • with - the string that will replace `replace`
      • @@ -549,102 +551,102 @@

        string/replace

        - Replaces a string of text with another
    // Americanized version of British spelling - [#website body] - american-version = string/replace[text: body, replace: "flavour", with: "flavor"] +[#website body] +american-version = string/replace[text: body, replace: "flavour", with: "flavor"]
    -

    string/get

    - Gets a character from a specific location in a string + string/get - Gets a character from a specific location in a string
    -
      +
      • text - the text to be searched
      • at - the location to be searched
    // finds the 17th letter of the alphabet - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - letter = string/get[text: alphabet, at: 17] +alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +letter = string/get[text: alphabet, at: 17]
    -

    string/uppercase

    -Converts a string to uppercase + string/uppercase -Converts a string to uppercase
    -
      +
      • text - the text to be converted
    funny = "lol" - really-funny = string/uppercase[text: funny] +really-funny = string/uppercase[text: funny]
    -

    string/lowercase

    - Converts a string to lowercase + string/lowercase - Converts a string to lowercase
    -
      +
      • text - the text to be converted
    really-funny = "LOL" - down-a-notch = string/uppercase[text: really-funny] +down-a-notch = string/uppercase[text: really-funny]
    -

    string/index-of

    - Returns the position of the first occurrence of a specified value in a string + string/index-of - Returns the position of the first occurrence of a specified value in a string
    -
      +
      • text - the text to be searched
      • substring - the string to be found in `text`
    // Eve is in developers, starting at an index of 2 - index = string/index-of[text: "developers", substring: "eve" +index = string/index-of[text: "developers", substring: "eve"
    -

    string/codepoint-length

    - Returns the length of a string in Unicode code points. + string/codepoint-length - Returns the length of a string in Unicode code points.
    -
      +
      • text - the string whose length is found
    // the code point length of the word "unicode" - string = "unicode" - length-in-js = string/codepoint-length[text: string] +string = "unicode" +length-in-js = string/codepoint-length[text: string]
    diff --git a/index.xml b/index.xml index bdfc6e8..d628b2a 100644 --- a/index.xml +++ b/index.xml @@ -619,22 +619,24 @@ chris := none</code></td> http://docs-next.witheve.com/handbook/libraries/ +<h1 id="standard-library">Standard Library</h1> + <h2 id="aggregates">Aggregates</h2> <table> <tr> <td colspan="2"> - <h3>gather/sort</h3> - Generates an ordering for a set + <b>gather/sort</b> - Generates an ordering for a set </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>for</strong> - the set to sort</li> <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> <li><strong>direction</strong> - (optional) - direction in which to sort `for`. Possible values are: - <ul> + <ul class="arglist"> <li>'up' - smallest to largest; default option</li> <li>'down' - largest to smallest</li> </ul> @@ -643,39 +645,39 @@ chris := none</code></td> </td> <td> <code>// sorts the students by GPA - [#student GPA] - index = sort[for: GPA]</code> +[#student GPA] +index = sort[for: GPA]</code> </td> </tr> <tr> <td colspan="2"> - <h3>gather/count</h3> - Returns the number of elements in a set + <b>gather/count</b> - Returns the number of elements in a set </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>for</strong> - the set to count over</li> <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> </ul> </td> <td> <code>// counts the number of citizens in each state - residents = [#citizen state] - population = count[given: residents, per: state]</code> +residents = [#citizen state] +population = count[given: residents, per: state]</code> </td> </tr> <tr> <td colspan="2"> - <h3>gather/sum</h3> - Returns the sum of values in a set of attributes + <b>gather/sum</b> - Returns the sum of values in a set of attributes </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>for</strong> - the set to gather</li> <li><strong>value</strong> - the specific variable to be summed</li> <li><strong>per</strong> - (optional) - one or more attributes by which to group `for`</li> @@ -683,8 +685,8 @@ chris := none</code></td> </td> <td> <code>// returns the sum of salaries for each department - employees = [#employee salary department] - expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> +employees = [#employee salary department] +expenses = gather/sum[for: employees, value: employees.salary, per: department]</code> </td> </tr> </table> @@ -694,7 +696,7 @@ chris := none</code></td> <table> <tr> <td colspan="2"> - <h3>+</h3> - Adds two numbers + <b>+</b> - Adds two numbers </td> </tr> @@ -709,7 +711,7 @@ chris := none</code></td> <tr> <td colspan="2"> - <h3>-</h3> - Subtracts two numbers + <b>-</b> - Subtracts two numbers </td> </tr> @@ -724,7 +726,7 @@ chris := none</code></td> <tr> <td colspan="2"> - <h3>*</h3> - Multiplies two numbers + <b>*</b> - Multiplies two numbers </td> </tr> @@ -739,7 +741,7 @@ chris := none</code></td> <tr> <td colspan="2"> - <h3>/</h3> - Divides two numbers + <b>/</b> - Divides two numbers </td> </tr> @@ -754,245 +756,245 @@ chris := none</code></td> <tr> <td colspan="2"> - <h3>math/floor</h3> - Rounds a number down + <b>math/floor</b> - Rounds a number down </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>value</strong> - the number to be rounded down</li> </ul> </td> <td> <code>// x rounded down to 34 - x = math/floor[value: 34.2]</code> +x = math/floor[value: 34.2]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/ceiling</h3> - Rounds a number up + <b>math/ceiling</b> - Rounds a number up </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>value</strong> - the number to be rounded up</li> </ul> </td> <td> <code>// x rounded up to 35 - x = math/ceiling[value: 34.2]</code> +x = math/ceiling[value: 34.2]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/round</h3> - Rounds a number to the nearest integer + <b>math/round</b> - Rounds a number to the nearest integer </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>value</strong> - the number to be rounded to the nearest integer</li> </ul> </td> <td> <code>// x rounded to 34 - x = math/floor[value: 34.2]</code> +x = math/floor[value: 34.2]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/sin</h3> - Sine of an angle + <b>math/sin</b> - Sine of an angle </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 1 - r = math/sin[degrees: 90]</code> +r = math/sin[degrees: 90]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/cos</h3> - Cosine of an angle + <b>math/cos</b> - Cosine of an angle </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 0 - r = math/cos[degrees: 90]</code> +r = math/cos[degrees: 90]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/tan</h3> - Tangent of an angle + <b>math/tan</b> - Tangent of an angle </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>degrees</strong> - the angle in degrees</li> </ul> </td> <td> <code>// r calculated to 1 - r = math/tan[degrees: 45]</code> +r = math/tan[degrees: 45]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/max</h3> - The greater of two values + <b>math/max</b> - The greater of two values </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>a</strong> - a value to compare</li> <li><strong>b</strong> - another value to compare</li> </ul> </td> <td> <code>// takes the higher score - [#scores pac-man donkey-kong] - best-score = math/min[a: pac-man, b: donkey-kong]</code> +[#scores pac-man donkey-kong] +best-score = math/min[a: pac-man, b: donkey-kong]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/min</h3> - The lesser of two values + <b>math/min</b> - The lesser of two values </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>a</strong> - a value to compare</li> <li><strong>b</strong> - another value to compare</li> </ul> </td> <td> <code>// takes the lower score - [#scores pac-man donkey-kong] - worst-score = math/min[a: pac-man, b: donkey-kong]</code> +[#scores pac-man donkey-kong] +worst-score = math/min[a: pac-man, b: donkey-kong]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/mod</h3> - Modulo division + <b>math/mod</b> - Modulo division </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>value</strong> - the number to be divided (dividend)</li> <li><strong>by</strong> - the number by which to divide (divisor)</li> </ul> </td> <td> <code>// m is the remainder, 1 - m = math/mod[value: 5, by: 2]</code> +m = math/mod[value: 5, by: 2]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/absolute</h3> - Absolute value of a number + <b>math/absolute</b> - Absolute value of a number </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>value</strong> - the number whose absolute value is found</li> </ul> </td> <td> <code>// number of hours from the prime meridian - [#city latitude longitude] - hours-from-gmt = math/absolute[value: latitude] / 15</code> +[#city latitude longitude] +hours-from-gmt = math/absolute[value: latitude] / 15</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/to-fixed</h3> - Formats a number as a string to a certain number of decimal places + <b>math/to-fixed</b> - Formats a number as a string to a certain number of decimal places </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>a</strong> - the number to be formatted</li> <li><strong>b</strong> - the number of decimal places to which `a` will be formatted</li> </ul> </td> <td> <code>// pi represented as the string "3.14" - [#circle circumference diameter] - pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> +[#circle circumference diameter] +pi = math/to-fixed[a: (circumference / diameter), b: 2]</code> </td> </tr> <tr> <td colspan="2"> - <h3>math/range</h3> - Generates a range of numbers + <b>math/range</b> - Generates a range of numbers </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>start</strong> - the start of the range</li> <li><strong>stop</strong> - the end of the range</li> </ul> </td> <td> <code>// generates integers 1 through 10 - y = math/range[start: 1, stop: 10]</code> +y = math/range[start: 1, stop: 10]</code> </td> </tr> <tr> <td colspan="2"> - <h3>random/number</h3> - Generates a random number between 1 and 0 + <b>random/number</b> - Generates a random number between 1 and 0 </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>seed</strong> - a number used to initialize the random number generator</li> </ul> </td> <td> <code>// generates a random number every second - [#time minutes seconds] - x = random/number[seed: seconds]</code> +[#time minutes seconds] +x = random/number[seed: seconds]</code> </td> </tr> </table> @@ -1002,13 +1004,13 @@ chris := none</code></td> <table> <tr> <td colspan="2"> - <h3>string/replace</h3> - Replaces a string of text with another + <b>string/replace</b> - Replaces a string of text with another </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the text in which to search for strings and replace them</li> <li><strong>replace</strong> - the string to be replaced</li> <li><strong>with</strong> - the string that will replace `replace`</li> @@ -1016,102 +1018,102 @@ chris := none</code></td> </td> <td> <code>// Americanized version of British spelling - [#website body] - american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> +[#website body] +american-version = string/replace[text: body, replace: "flavour", with: "flavor"]</code> </td> </tr> <tr> <td colspan="2"> - <h3>string/get</h3> - Gets a character from a specific location in a string + <b>string/get</b> - Gets a character from a specific location in a string </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the text to be searched</li> <li><strong>at</strong> - the location to be searched</li> </ul> </td> <td> <code>// finds the 17th letter of the alphabet - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - letter = string/get[text: alphabet, at: 17]</code> +alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +letter = string/get[text: alphabet, at: 17]</code> </td> </tr> <tr> <td colspan="2"> - <h3>string/uppercase</h3> -Converts a string to uppercase + <b>string/uppercase</b> -Converts a string to uppercase </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the text to be converted</li> </ul> </td> <td> <code>funny = "lol" - really-funny = string/uppercase[text: funny]</code> +really-funny = string/uppercase[text: funny]</code> </td> </tr> <tr> <td colspan="2"> - <h3>string/lowercase</h3> - Converts a string to lowercase + <b>string/lowercase</b> - Converts a string to lowercase </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the text to be converted</li> </ul> </td> <td> <code>really-funny = "LOL" - down-a-notch = string/uppercase[text: really-funny]</code> +down-a-notch = string/uppercase[text: really-funny]</code> </td> </tr> <tr> <td colspan="2"> - <h3>string/index-of</h3> - Returns the position of the first occurrence of a specified value in a string + <b>string/index-of</b> - Returns the position of the first occurrence of a specified value in a string </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the text to be searched</li> <li><strong>substring</strong> - the string to be found in `text`</li> </ul> </td> <td> <code>// Eve is in developers, starting at an index of 2 - index = string/index-of[text: "developers", substring: "eve"</code> +index = string/index-of[text: "developers", substring: "eve"</code> </td> </tr> <tr> <td colspan="2"> - <h3>string/codepoint-length</h3> - Returns the length of a string in Unicode code points. + <b>string/codepoint-length</b> - Returns the length of a string in Unicode code points. </td> </tr> <tr> <td> - <ul> + <ul class="arglist"> <li><strong>text</strong> - the string whose length is found</li> </ul> </td> <td> <code>// the code point length of the word "unicode" - string = "unicode" - length-in-js = string/codepoint-length[text: string]</code> +string = "unicode" +length-in-js = string/codepoint-length[text: string]</code> </td> </tr> </table> diff --git a/stylesheets/application.css b/stylesheets/application.css index de22d8c..5212201 100644 --- a/stylesheets/application.css +++ b/stylesheets/application.css @@ -97,7 +97,7 @@ pre { } code { - color: rgb(0, 121, 211); + color: rgb(226, 79, 94); } blockquote { @@ -143,7 +143,7 @@ li { .drawer { color: rgb(85, 85, 85); padding-bottom: 20px; - + padding-top: 10px; } .highlight { @@ -192,6 +192,10 @@ li { margin-bottom: 20px; } +b { + font-weight: bold; +} + .sub li { margin: 0px; } @@ -201,7 +205,7 @@ li { } .selected a { - color: rgb(145, 192, 214); + color: rgb(226, 79, 94); } .active { @@ -290,15 +294,24 @@ nav > .play-cta { margin: 0; padding: 10px 20px; color: white; } ul { display: block; margin-left: 2em; } -code { padding: 0.2em; background: #f0f2f7; white-space: pre-wrap; font-family: "Inconsolata", "Monaco", "Consolas", "Ubuntu Mono", monospace; font-size: 0.9rem; } +code { padding: 0.2em; white-space: pre-wrap; font-family: "Inconsolata", "Monaco", "Consolas", "Ubuntu Mono", monospace; font-size: 0.9rem; } strong { font-weight: 600; } table { - border: 1px black solid; + border: 1px #888a8f solid; margin-bottom: 1em; min-width: 820px; border-collapse: collapse; border-spacing: 0; } -td { border: 1px black solid; width: 20em; } \ No newline at end of file +td { + border: 1px #AAA solid; + width: 20em; + padding: 10px; +} + +.arglist { + list-style: none; + margin-left: 0px; +} \ No newline at end of file From 50c18074ff98ced34c3002d208fdaf90b2c82069 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Fri, 26 May 2017 15:18:30 -0700 Subject: [PATCH 026/109] Mirror docs.witheve --- 404.html | 0 index.html | 38 +- sitemap.xml | 68 -- v0.2/404.html | 0 v0.2/CNAME | 1 + {README => v0.2/README}/index.html | 0 v0.2/README/index.xml | 34 + {fonts => v0.2/fonts}/icon.eot | Bin {fonts => v0.2/fonts}/icon.svg | 0 {fonts => v0.2/fonts}/icon.ttf | Bin {fonts => v0.2/fonts}/icon.woff | Bin v0.2/guides/for-programmers/index.html | 385 ++++++++ v0.2/guides/index.html | 373 ++++++++ v0.2/guides/index.xml | 200 ++++ v0.2/guides/style/index.html | 513 +++++++++++ v0.2/handbook/actions/index.html | 389 ++++++++ v0.2/handbook/add/index.html | 423 +++++++++ v0.2/handbook/aggregates/index.html | 391 ++++++++ v0.2/handbook/bind/index.html | 609 +++++++++++++ v0.2/handbook/blocks/index.html | 504 +++++++++++ v0.2/handbook/browser/index.html | 367 ++++++++ v0.2/handbook/commit/index.html | 613 +++++++++++++ v0.2/handbook/commonmark/index.html | 435 +++++++++ v0.2/handbook/core/index.html | 371 ++++++++ v0.2/handbook/databases/index.html | 463 ++++++++++ v0.2/handbook/datetime/date/index.html | 785 ++++++++++++++++ v0.2/handbook/datetime/index.html | 371 ++++++++ v0.2/handbook/datetime/time/index.html | 422 +++++++++ v0.2/handbook/docker/index.html | 394 ++++++++ v0.2/handbook/ebnf/index.html | 473 ++++++++++ v0.2/handbook/equality/index.html | 420 +++++++++ v0.2/handbook/equivalence/index.html | 377 ++++++++ v0.2/handbook/event/click/index.html | 391 ++++++++ v0.2/handbook/event/index.html | 369 ++++++++ v0.2/handbook/events/click/index.html | 440 +++++++++ v0.2/handbook/events/index.html | 418 +++++++++ v0.2/handbook/expressions/index.html | 379 ++++++++ v0.2/handbook/functions/index.html | 424 +++++++++ v0.2/handbook/general/index.html | 371 ++++++++ v0.2/handbook/general/sort/index.html | 504 +++++++++++ v0.2/handbook/glossary/index.html | 399 ++++++++ v0.2/handbook/help/index.html | 396 ++++++++ v0.2/handbook/http/index.html | 367 ++++++++ v0.2/handbook/if-then/index.html | 443 +++++++++ v0.2/handbook/index.html | 781 ++++++++++++++++ v0.2/handbook/index.xml | 660 ++++++++++++++ v0.2/handbook/inequality/index.html | 428 +++++++++ v0.2/handbook/installation/index.html | 380 ++++++++ v0.2/handbook/intro/index.html | 389 ++++++++ v0.2/handbook/is/index.html | 400 ++++++++ v0.2/handbook/joins/index.html | 387 ++++++++ v0.2/handbook/linux/index.html | 388 ++++++++ v0.2/handbook/literate-programming/index.html | 404 +++++++++ v0.2/handbook/mac/index.html | 379 ++++++++ v0.2/handbook/math/abs/index.html | 399 ++++++++ v0.2/handbook/math/ceil/index.html | 399 ++++++++ v0.2/handbook/math/cos/index.html | 403 +++++++++ v0.2/handbook/math/fix/index.html | 411 +++++++++ v0.2/handbook/math/floor/index.html | 399 ++++++++ v0.2/handbook/math/index.html | 418 +++++++++ v0.2/handbook/math/mod/index.html | 402 +++++++++ v0.2/handbook/math/range/index.html | 434 +++++++++ v0.2/handbook/math/round/index.html | 402 +++++++++ v0.2/handbook/math/sin/index.html | 403 +++++++++ v0.2/handbook/math/sum/index.html | 417 +++++++++ v0.2/handbook/math/tan/index.html | 400 ++++++++ v0.2/handbook/merge/index.html | 391 ++++++++ v0.2/handbook/model/index.html | 386 ++++++++ v0.2/handbook/not/index.html | 391 ++++++++ v0.2/handbook/npm/index.html | 378 ++++++++ v0.2/handbook/programs/index.html | 373 ++++++++ v0.2/handbook/records/index.html | 460 ++++++++++ v0.2/handbook/remove/index.html | 384 ++++++++ v0.2/handbook/running/index.html | 425 +++++++++ v0.2/handbook/search/index.html | 400 ++++++++ v0.2/handbook/session/index.html | 367 ++++++++ v0.2/handbook/set/index.html | 403 +++++++++ v0.2/handbook/sets/index.html | 406 +++++++++ v0.2/handbook/standard-library/index.html | 379 ++++++++ v0.2/handbook/statistics/count/index.html | 450 +++++++++ v0.2/handbook/statistics/index.html | 377 ++++++++ v0.2/handbook/statistics/random/index.html | 423 +++++++++ v0.2/handbook/string-interpolation/index.html | 404 +++++++++ v0.2/handbook/strings/index.html | 372 ++++++++ v0.2/handbook/strings/join/index.html | 433 +++++++++ v0.2/handbook/strings/split/index.html | 408 +++++++++ v0.2/handbook/tags/index.html | 424 +++++++++ v0.2/handbook/update-operators/index.html | 391 ++++++++ v0.2/handbook/view/index.html | 367 ++++++++ v0.2/handbook/windows/index.html | 379 ++++++++ v0.2/images/favicon.png | Bin 0 -> 588 bytes v0.2/images/logo_only.png | Bin 0 -> 54866 bytes v0.2/index.html | 379 ++++++++ v0.2/index.xml | 851 ++++++++++++++++++ .../javascripts}/application.js | 0 .../javascripts}/modernizr.js | 0 v0.2/sitemap.xml | 308 +++++++ v0.2/stylesheets/application.css | 211 +++++ v0.2/stylesheets/highlight/highlight.css | 46 + v0.2/tutorials/index.html | 367 ++++++++ v0.2/tutorials/index.xml | 248 +++++ v0.2/tutorials/quickstart/index.html | 591 ++++++++++++ v0.3/README/index.html | 19 + v0.3/fonts/icon.eot | Bin 0 -> 2224 bytes v0.3/fonts/icon.svg | 22 + v0.3/fonts/icon.ttf | Bin 0 -> 2072 bytes v0.3/fonts/icon.woff | Bin 0 -> 2148 bytes {guides => v0.3/guides}/index.html | 48 +- {guides => v0.3/guides}/index.xml | 8 +- {handbook => v0.3/handbook}/index.html | 52 +- {handbook => v0.3/handbook}/index.xml | 16 +- .../handbook}/libraries/index.html | 42 +- .../handbook}/libraries/stdlib/index.html | 0 v0.3/images/eve.svg | 1 + v0.3/images/favicon.png | Bin 0 -> 588 bytes v0.3/images/logo_only.png | Bin 0 -> 54866 bytes v0.3/index.html | 197 ++++ index.xml => v0.3/index.xml | 48 +- {install => v0.3/install}/index.html | 42 +- v0.3/javascripts/application.js | 1 + v0.3/javascripts/modernizr.js | 1 + .../quickstart.eve}/index.html | 42 +- v0.3/sitemap.xml | 68 ++ style.css => v0.3/style.css | 0 v0.3/stylesheets/application.css | 317 +++++++ v0.3/stylesheets/highlight/highlight.css | 46 + .../syntaxreference}/index.html | 42 +- {tutorials => v0.3/tutorials}/index.html | 50 +- {tutorials => v0.3/tutorials}/index.xml | 12 +- .../tutorials}/quickstart.eve/index.html | 42 +- 130 files changed, 37166 insertions(+), 325 deletions(-) create mode 100644 404.html delete mode 100644 sitemap.xml create mode 100644 v0.2/404.html create mode 100644 v0.2/CNAME rename {README => v0.2/README}/index.html (100%) create mode 100644 v0.2/README/index.xml rename {fonts => v0.2/fonts}/icon.eot (100%) rename {fonts => v0.2/fonts}/icon.svg (100%) rename {fonts => v0.2/fonts}/icon.ttf (100%) rename {fonts => v0.2/fonts}/icon.woff (100%) create mode 100644 v0.2/guides/for-programmers/index.html create mode 100644 v0.2/guides/index.html create mode 100644 v0.2/guides/index.xml create mode 100644 v0.2/guides/style/index.html create mode 100644 v0.2/handbook/actions/index.html create mode 100644 v0.2/handbook/add/index.html create mode 100644 v0.2/handbook/aggregates/index.html create mode 100644 v0.2/handbook/bind/index.html create mode 100644 v0.2/handbook/blocks/index.html create mode 100644 v0.2/handbook/browser/index.html create mode 100644 v0.2/handbook/commit/index.html create mode 100644 v0.2/handbook/commonmark/index.html create mode 100644 v0.2/handbook/core/index.html create mode 100644 v0.2/handbook/databases/index.html create mode 100644 v0.2/handbook/datetime/date/index.html create mode 100644 v0.2/handbook/datetime/index.html create mode 100644 v0.2/handbook/datetime/time/index.html create mode 100644 v0.2/handbook/docker/index.html create mode 100644 v0.2/handbook/ebnf/index.html create mode 100644 v0.2/handbook/equality/index.html create mode 100644 v0.2/handbook/equivalence/index.html create mode 100644 v0.2/handbook/event/click/index.html create mode 100644 v0.2/handbook/event/index.html create mode 100644 v0.2/handbook/events/click/index.html create mode 100644 v0.2/handbook/events/index.html create mode 100644 v0.2/handbook/expressions/index.html create mode 100644 v0.2/handbook/functions/index.html create mode 100644 v0.2/handbook/general/index.html create mode 100644 v0.2/handbook/general/sort/index.html create mode 100644 v0.2/handbook/glossary/index.html create mode 100644 v0.2/handbook/help/index.html create mode 100644 v0.2/handbook/http/index.html create mode 100644 v0.2/handbook/if-then/index.html create mode 100644 v0.2/handbook/index.html create mode 100644 v0.2/handbook/index.xml create mode 100644 v0.2/handbook/inequality/index.html create mode 100644 v0.2/handbook/installation/index.html create mode 100644 v0.2/handbook/intro/index.html create mode 100644 v0.2/handbook/is/index.html create mode 100644 v0.2/handbook/joins/index.html create mode 100644 v0.2/handbook/linux/index.html create mode 100644 v0.2/handbook/literate-programming/index.html create mode 100644 v0.2/handbook/mac/index.html create mode 100644 v0.2/handbook/math/abs/index.html create mode 100644 v0.2/handbook/math/ceil/index.html create mode 100644 v0.2/handbook/math/cos/index.html create mode 100644 v0.2/handbook/math/fix/index.html create mode 100644 v0.2/handbook/math/floor/index.html create mode 100644 v0.2/handbook/math/index.html create mode 100644 v0.2/handbook/math/mod/index.html create mode 100644 v0.2/handbook/math/range/index.html create mode 100644 v0.2/handbook/math/round/index.html create mode 100644 v0.2/handbook/math/sin/index.html create mode 100644 v0.2/handbook/math/sum/index.html create mode 100644 v0.2/handbook/math/tan/index.html create mode 100644 v0.2/handbook/merge/index.html create mode 100644 v0.2/handbook/model/index.html create mode 100644 v0.2/handbook/not/index.html create mode 100644 v0.2/handbook/npm/index.html create mode 100644 v0.2/handbook/programs/index.html create mode 100644 v0.2/handbook/records/index.html create mode 100644 v0.2/handbook/remove/index.html create mode 100644 v0.2/handbook/running/index.html create mode 100644 v0.2/handbook/search/index.html create mode 100644 v0.2/handbook/session/index.html create mode 100644 v0.2/handbook/set/index.html create mode 100644 v0.2/handbook/sets/index.html create mode 100644 v0.2/handbook/standard-library/index.html create mode 100644 v0.2/handbook/statistics/count/index.html create mode 100644 v0.2/handbook/statistics/index.html create mode 100644 v0.2/handbook/statistics/random/index.html create mode 100644 v0.2/handbook/string-interpolation/index.html create mode 100644 v0.2/handbook/strings/index.html create mode 100644 v0.2/handbook/strings/join/index.html create mode 100644 v0.2/handbook/strings/split/index.html create mode 100644 v0.2/handbook/tags/index.html create mode 100644 v0.2/handbook/update-operators/index.html create mode 100644 v0.2/handbook/view/index.html create mode 100644 v0.2/handbook/windows/index.html create mode 100644 v0.2/images/favicon.png create mode 100644 v0.2/images/logo_only.png create mode 100644 v0.2/index.html create mode 100644 v0.2/index.xml rename {javascripts => v0.2/javascripts}/application.js (100%) rename {javascripts => v0.2/javascripts}/modernizr.js (100%) create mode 100644 v0.2/sitemap.xml create mode 100644 v0.2/stylesheets/application.css create mode 100644 v0.2/stylesheets/highlight/highlight.css create mode 100644 v0.2/tutorials/index.html create mode 100644 v0.2/tutorials/index.xml create mode 100644 v0.2/tutorials/quickstart/index.html create mode 100644 v0.3/README/index.html create mode 100644 v0.3/fonts/icon.eot create mode 100644 v0.3/fonts/icon.svg create mode 100644 v0.3/fonts/icon.ttf create mode 100644 v0.3/fonts/icon.woff rename {guides => v0.3/guides}/index.html (66%) rename {guides => v0.3/guides}/index.xml (62%) rename {handbook => v0.3/handbook}/index.html (65%) rename {handbook => v0.3/handbook}/index.xml (96%) rename {handbook => v0.3/handbook}/libraries/index.html (90%) rename {handbook => v0.3/handbook}/libraries/stdlib/index.html (100%) create mode 100644 v0.3/images/eve.svg create mode 100644 v0.3/images/favicon.png create mode 100644 v0.3/images/logo_only.png create mode 100644 v0.3/index.html rename index.xml => v0.3/index.xml (97%) rename {install => v0.3/install}/index.html (74%) create mode 100644 v0.3/javascripts/application.js create mode 100644 v0.3/javascripts/modernizr.js rename {quickstart.eve => v0.3/quickstart.eve}/index.html (89%) create mode 100644 v0.3/sitemap.xml rename style.css => v0.3/style.css (100%) create mode 100644 v0.3/stylesheets/application.css create mode 100644 v0.3/stylesheets/highlight/highlight.css rename {syntaxreference => v0.3/syntaxreference}/index.html (88%) rename {tutorials => v0.3/tutorials}/index.html (65%) rename {tutorials => v0.3/tutorials}/index.xml (96%) rename {tutorials => v0.3/tutorials}/quickstart.eve/index.html (89%) diff --git a/404.html b/404.html new file mode 100644 index 0000000..e69de29 diff --git a/index.html b/index.html index 883ecea..1c8078b 100644 --- a/index.html +++ b/index.html @@ -87,7 +87,7 @@

    EVE

    Play Blog - Docs + Docs Community @@ -154,40 +154,8 @@

    EVE

    - - -

    Install guide

    - -

    Need to install Eve on your machine? Head here for step-by-step directions.

    - -

    Quickstart

    - -

    If you’re new to Eve and want a hands-on demo to learn the language, you can jump right in with a 5 minute quickstart guide that shows you how to build a simple incrementing counter.

    - -

    Syntax reference

    - -

    Want a reminder how the syntax works or to get an overview of Eve without going through the quickstart? The syntax reference is a good place to start.

    - -

    Libraries

    - -

    Want to know everything Eve can do? Here’s a list of all the functions, operators, and watchers available in the language.

    - -

    Stuck?

    - -

    If you didn’t find what you were looking for, you can get in touch with the Eve team and the community through these channels:

    - -
      -
    • Send a message to the mailing list. We generally respond to messages within a day.
    • -
    • Send a tweet to @with_eve.
    • -
    • Submit an issue to our GitHub repository.
    • -
    • Join the Eve Slack channel to talk with Eve developers and the community in real time (coming soon)
    • -
    - -

    Want to learn more?

    - -
      -
    • Read our blog to see what we’re up to, from our developer diary to essays, announcements, and more.
    • -
    +

    v0.2 Documentation

    +

    v0.3 Documentation

    diff --git a/sitemap.xml b/sitemap.xml deleted file mode 100644 index 655df98..0000000 --- a/sitemap.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - http://docs-next.witheve.com/install/ - - - - http://docs-next.witheve.com/tutorials/quickstart.eve/ - - - - http://docs-next.witheve.com/quickstart.eve/ - - - - http://docs-next.witheve.com/ - - - - http://docs-next.witheve.com/syntaxreference/ - - - - http://docs-next.witheve.com/README/ - - - - http://docs-next.witheve.com/guides/ - - - - http://docs-next.witheve.com/handbook/core/ - - - - http://docs-next.witheve.com/handbook/ - - - - http://docs-next.witheve.com/tutorials/ - - - - http://docs-next.witheve.com/ - 0 - - - - http://docs-next.witheve.com/guides/ - 0 - - - - http://docs-next.witheve.com/handbook/ - 0 - - - - http://docs-next.witheve.com/handbook/libraries/ - - - - http://docs-next.witheve.com/tutorials/ - 0 - - - \ No newline at end of file diff --git a/v0.2/404.html b/v0.2/404.html new file mode 100644 index 0000000..e69de29 diff --git a/v0.2/CNAME b/v0.2/CNAME new file mode 100644 index 0000000..e825467 --- /dev/null +++ b/v0.2/CNAME @@ -0,0 +1 @@ +docs.witheve.com \ No newline at end of file diff --git a/README/index.html b/v0.2/README/index.html similarity index 100% rename from README/index.html rename to v0.2/README/index.html diff --git a/v0.2/README/index.xml b/v0.2/README/index.xml new file mode 100644 index 0000000..e1b17d3 --- /dev/null +++ b/v0.2/README/index.xml @@ -0,0 +1,34 @@ + + + + READMEs on Eve Documentation + http://docs-next.witheve.com/v0.2//readme/ + Recent content in READMEs on Eve Documentation + Hugo -- gohugo.io + en-us + + + + + http://docs-next.witheve.com/v0.2//readme/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//readme/ + <p align="center"> + <img src="http://www.witheve.com/logo.png" alt="Eve logo" width="10%" /> +</p> + +<hr /> + +<h1 id="documentation-for-the-eve-programming-language">Documentation for the Eve programming language.</h1> + +<p>You can learn more about Eve here: <a href="http://witheve.com/">http://witheve.com/</a></p> + +<p>You can play with Eve here: <a href="http://play.witheve.com">http://play.witheve.com</a></p> + +<p>Eve is under active development here: <a href="https://github.com/witheve/Eve">https://github.com/witheve/Eve</a></p> + + + + + \ No newline at end of file diff --git a/fonts/icon.eot b/v0.2/fonts/icon.eot similarity index 100% rename from fonts/icon.eot rename to v0.2/fonts/icon.eot diff --git a/fonts/icon.svg b/v0.2/fonts/icon.svg similarity index 100% rename from fonts/icon.svg rename to v0.2/fonts/icon.svg diff --git a/fonts/icon.ttf b/v0.2/fonts/icon.ttf similarity index 100% rename from fonts/icon.ttf rename to v0.2/fonts/icon.ttf diff --git a/fonts/icon.woff b/v0.2/fonts/icon.woff similarity index 100% rename from fonts/icon.woff rename to v0.2/fonts/icon.woff diff --git a/v0.2/guides/for-programmers/index.html b/v0.2/guides/for-programmers/index.html new file mode 100644 index 0000000..3f1e86d --- /dev/null +++ b/v0.2/guides/for-programmers/index.html @@ -0,0 +1,385 @@ + + + + + + + + + + + + Eve for Programmers - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Eve for Programmers

    + +

    As a programmer, you probably find it easy to switch between different programming langauges. If you know Javascript, you probably wouldn’t have a hard time learning similar langauges like C++, Java, or Python. That’s because despite syntactic differences, these languages largely conform to the same programming model. When we program in languages like these, we use similar abstractions between them – loops, functions, and input/output patterns have become a staple of every programmer’s toolbox. When we solve problems, we usually reach a solution in terms of these primitive operations.

    + +

    Eve is a different kind of programming langauge from Javascript or Python, so programmers new to Eve may feel a little lost at first. How do you get anything done in a language without loops? How do you compose code without functions? The purpose of this guide is to provide a mapping from the common tools you know, to the Eve way of solving problems. We’ll look at some programs written in Javascript, and see how they Eve can solve them.

    + +

    Functions

    + +

    Functions are the fundamental unit of code reuse in most conventional programming languages. These langauges typically start from a “main” function, and branch

    + +

    Looping

    + +

    Map

    + +

    Reduce

    + +

    Recursion

    + +

    I/O

    + + +
    +
    + +
    + diff --git a/v0.2/guides/index.html b/v0.2/guides/index.html new file mode 100644 index 0000000..cafb32f --- /dev/null +++ b/v0.2/guides/index.html @@ -0,0 +1,373 @@ + + + + + + + + + + + + Guides - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    diff --git a/v0.2/guides/index.xml b/v0.2/guides/index.xml new file mode 100644 index 0000000..aa9b244 --- /dev/null +++ b/v0.2/guides/index.xml @@ -0,0 +1,200 @@ + + + + Guides on Eve Documentation + http://docs-next.witheve.com/v0.2//guides/ + Recent content in Guides on Eve Documentation + Hugo -- gohugo.io + en-us + + + + Eve for Programmers + http://docs-next.witheve.com/v0.2//guides/for-programmers/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//guides/for-programmers/ + + +<h1 id="eve-for-programmers">Eve for Programmers</h1> + +<p>As a programmer, you probably find it easy to switch between different programming langauges. If you know Javascript, you probably wouldn&rsquo;t have a hard time learning similar langauges like C++, Java, or Python. That&rsquo;s because despite syntactic differences, these languages largely conform to the same programming model. When we program in languages like these, we use similar abstractions between them &ndash; loops, functions, and input/output patterns have become a staple of every programmer&rsquo;s toolbox. When we solve problems, we usually reach a solution in terms of these primitive operations.</p> + +<p>Eve is a different kind of programming langauge from Javascript or Python, so programmers new to Eve may feel a little lost at first. How do you get anything done in a language without loops? How do you compose code without functions? The purpose of this guide is to provide a mapping from the common tools you know, to the Eve way of solving problems. We&rsquo;ll look at some programs written in Javascript, and see how they Eve can solve them.</p> + +<h2 id="functions">Functions</h2> + +<p>Functions are the fundamental unit of code reuse in most conventional programming languages. These langauges typically start from a &ldquo;main&rdquo; function, and branch</p> + +<h2 id="looping">Looping</h2> + +<h3 id="map">Map</h3> + +<h3 id="reduce">Reduce</h3> + +<h3 id="recursion">Recursion</h3> + +<h2 id="i-o">I/O</h2> + + + + + Style Guide + http://docs-next.witheve.com/v0.2//guides/style/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//guides/style/ + + +<h1 id="eve-style-guide">Eve Style Guide</h1> + +<h2 id="comments">Comments</h2> + +<p>Add a space after the comment marker to make comments more readable</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// This is correct</span><span class="w"></span> +<span class="c1">//This is incorrect</span><span class="w"></span> +</code></pre></div> + +<h2 id="naming">Naming</h2> + +<p>As much as possible, don&rsquo;t abbreviate names. The goal in writing an Eve program is to be as readable as possible. An abbreviation that makes sense to you might not make sense to someone else, or even yourself when you revisit the program in a year.</p> + +<p>Multi-word names should be joined by dashes <code>-</code>, not underscores <code>_</code>.</p> + +<h2 id="program-layout">Program layout</h2> + +<p>Blocks should be preceded by at least a one line comment, indicating the purpose of the block.</p> + +<h2 id="commas">Commas</h2> + +<p>Although Eve treats commas as white-space, they should be used to enhance readability as needed:</p> + +<p>In records, separate attributes with commas after a bind</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// More readable</span><span class="w"></span> +<span class="p">[</span><span class="nt">#person</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">30</span><span class="p">,</span><span class="w"> </span><span class="x">height</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="x">hair</span><span class="nf">-</span><span class="x">color</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;brown&quot;</span><span class="p">]</span><span class="w"></span> + +<span class="c1">// Less readable</span><span class="w"></span> +<span class="p">[</span><span class="nt">#person</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">30</span><span class="w"> </span><span class="x">height</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="w"> </span><span class="x">hair</span><span class="nf">-</span><span class="x">color</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;brown&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Commas should also be used to separate items contained in parenthesis, such as in a multiple return.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// More readable</span><span class="w"></span> +<span class="p">(</span><span class="x">val</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">val</span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#tag1</span><span class="p">]</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="l">false</span><span class="p">)</span><span class="w"></span> +<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="p">,</span><span class="w"> </span><span class="l">true</span><span class="p">)</span><span class="w"></span> +<span class="x">total</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="p">(</span><span class="x">attr</span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">)]</span><span class="w"></span> + +<span class="c1">// Less readable</span><span class="w"></span> +<span class="p">(</span><span class="x">val</span><span class="m">1</span><span class="w"> </span><span class="x">val</span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#tag1</span><span class="p">]</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="l">false</span><span class="p">)</span><span class="w"></span> +<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="w"> </span><span class="l">true</span><span class="p">)</span><span class="w"></span> +<span class="x">total</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="p">(</span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">)]</span><span class="w"></span> +</code></pre></div> + +<h2 id="indention">Indention</h2> + +<p>Eve does not enforce indention, but it is important for readability</p> + +<h3 id="blocks">Blocks</h3> + +<p><code>search</code>. <code>commit</code>, and <code>bind</code> should be the only lines at zero indention. Everything else should be indented.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Good</span><span class="w"></span> +<span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>But not this:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Not good</span><span class="w"></span> +<span class="kr">search</span><span class="w"></span> +<span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"></span> +<span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h3 id="if-then">If-Then</h3> + +<p>Each arm of an <code>if-then</code> statement should be at the same indention level. The <code>then</code> portion of the statement can be on a new line if the <code>if</code> portion is exceptionally long, but it should be indented once.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Good if layout</span><span class="w"></span> +<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> +<span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> +<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> + +<span class="c1">// Okay, especially if the branch is long</span><span class="w"></span> +<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#long-record</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">]</span><span class="w"> </span> +<span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> +<span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#long-record2</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">]</span><span class="w"> </span> +<span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> +<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> + +<span class="c1">// Less readable &quot;if&quot; formatting</span><span class="w"></span> +<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> +<span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> +<span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> + +<span class="c1">// Less readable &quot;if&quot; formatting</span><span class="w"></span> +<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> +</code></pre></div> + +<h3 id="nested-records">Nested records</h3> + +<p>When nested records are placed on a new line, they should be indented once past the parent record. Where possible, nested records should be the final attribute in the parent record.</p> + +<p>Nested records should appear on their own line if you are nesting more than one.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Okay, but only do this for one level of nesting</span><span class="w"></span> +<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">]]</span><span class="w"></span> + +<span class="c1">// More readable</span><span class="w"></span> +<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">]]</span><span class="w"></span> + +<span class="c1">// Also good</span><span class="w"></span> +<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div1&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div3&quot;</span><span class="p">]]]</span><span class="w"> </span> + +<span class="c1">// Not good</span><span class="w"></span> +<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="p">]]</span><span class="w"></span> + +<span class="c1">// Also not good</span><span class="w"></span> +<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">],</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="newlines">Newlines</h2> + +<p>Newlines should precede and follow every code block.</p> + +<p>Within code blocks, a newline should be added between every action. This enhances readability, especially in the case where multiple actions are needed. For instance, the following code block:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@studentDB</span><span class="w"></span> +<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#students</span><span class="p">]</span><span class="w"></span> + +<span class="kr">search</span><span class="w"> </span><span class="nt">@schoolDB</span><span class="w"></span> +<span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="x">schools.name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">student.school</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">students.name</span><span class="p">]</span><span class="w"> </span> + +<span class="kr">commit</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#new-record</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>is more readable than this code block:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@studentDB</span><span class="w"></span> +<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#students</span><span class="p">]</span><span class="w"></span> +<span class="kr">search</span><span class="w"> </span><span class="nt">@schoolDB</span><span class="w"></span> +<span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="x">schools.name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">student.school</span><span class="w"></span> +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">students.name</span><span class="p">]</span><span class="w"> </span> +<span class="kr">commit</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#new-record</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + + + + + \ No newline at end of file diff --git a/v0.2/guides/style/index.html b/v0.2/guides/style/index.html new file mode 100644 index 0000000..3fffc00 --- /dev/null +++ b/v0.2/guides/style/index.html @@ -0,0 +1,513 @@ + + + + + + + + + + + + Style Guide - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Eve Style Guide

    + +

    Comments

    + +

    Add a space after the comment marker to make comments more readable

    +
    // This is correct
    +//This is incorrect
    +
    + +

    Naming

    + +

    As much as possible, don’t abbreviate names. The goal in writing an Eve program is to be as readable as possible. An abbreviation that makes sense to you might not make sense to someone else, or even yourself when you revisit the program in a year.

    + +

    Multi-word names should be joined by dashes -, not underscores _.

    + +

    Program layout

    + +

    Blocks should be preceded by at least a one line comment, indicating the purpose of the block.

    + +

    Commas

    + +

    Although Eve treats commas as white-space, they should be used to enhance readability as needed:

    + +

    In records, separate attributes with commas after a bind

    +
    // More readable
    +[#person name age: 30, height: 5, hair-color: "brown"]
    +
    +// Less readable
    +[#person name age: 30 height: 5 hair-color: "brown"]
    +
    + +

    Commas should also be used to separate items contained in parenthesis, such as in a multiple return.

    +
    // More readable
    +(val1, val2) = if [#tag1] then (1, false)
    +               else (0, true)
    +total = count[given: attr1, per: (attr2, attr3)]
    +
    +// Less readable
    +(val1 val2) = if [#tag1] then (1 false)
    +               else (0 true)
    +total = count[given: attr1 per: (attr2 attr3)]
    +
    + +

    Indention

    + +

    Eve does not enforce indention, but it is important for readability

    + +

    Blocks

    + +

    search. commit, and bind should be the only lines at zero indention. Everything else should be indented.

    +
    // Good
    +search
    +  [...]
    +
    +bind
    +  [...]
    +
    + +

    But not this:

    +
    // Not good
    +search
    +[...]
    +
    +bind
    +[...]
    +
    + +

    If-Then

    + +

    Each arm of an if-then statement should be at the same indention level. The then portion of the statement can be on a new line if the if portion is exceptionally long, but it should be indented once.

    +
    // Good if layout
    +value = if bar then baz
    +        if bar2 then baz2
    +        else baz3
    +
    +// Okay, especially if the branch is long
    +value = if [#long-record attr1 attr2 attr3] 
    +          then baz
    +        if [#long-record2 attr1 attr2 attr3] 
    +          then baz2
    +        else baz3
    +
    +// Less readable "if" formatting
    +value = if bar then baz
    +if bar2 then baz2
    +else baz3
    +
    +// Less readable "if" formatting
    +value = if bar then baz if bar2 then baz2 else baz3
    +
    + +

    Nested records

    + +

    When nested records are placed on a new line, they should be indented once past the parent record. Where possible, nested records should be the final attribute in the parent record.

    + +

    Nested records should appear on their own line if you are nesting more than one.

    +
    // Okay, but only do this for one level of nesting
    +[#div text: "hello", children: [#div text: "world"]]
    +
    +// More readable
    +[#div text: "hello", children: 
    +  [#div text: "world"]]
    +
    +// Also good
    +[#div children: 
    +  [#div text: "div1"]
    +  [#div text: "div2" children:
    +    [#div text: "div3"]]]  
    +
    +// Not good
    +[#div children: [#div text: "div2"] [#div text: "div2"]]
    +
    +// Also not good
    +[#div children: 
    +  [#div text: "world"], text: "hello"]
    +
    + +

    Newlines

    + +

    Newlines should precede and follow every code block.

    + +

    Within code blocks, a newline should be added between every action. This enhances readability, especially in the case where multiple actions are needed. For instance, the following code block:

    +
    search @studentDB
    +  students = [#students]
    +
    +search @schoolDB
    +  schools = [#school]
    +  schools.name = student.school
    +
    +bind @browser
    +  [#div text: students.name] 
    +
    +commit
    +  [#new-record]
    +
    + +

    is more readable than this code block:

    +
    search @studentDB
    +  students = [#students]
    +search @schoolDB
    +  schools = [#school]
    +  schools.name = student.school
    +bind @browser
    +  [#div text: students.name] 
    +commit
    +  [#new-record]
    +
    + + +
    +
    + +
    + diff --git a/v0.2/handbook/actions/index.html b/v0.2/handbook/actions/index.html new file mode 100644 index 0000000..af0f5e2 --- /dev/null +++ b/v0.2/handbook/actions/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + Actions - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Actions

    + +

    Description

    + +

    There are three actions in Eve: search, bind, and commit.

    + +

    search is used when you want to gather records from one or more databases. These records are called “supporting records”, because they are used as a basis for bound or committed records.

    + +

    bind and commit actions are used when you want to update records in one or more databases, but they differ in the way the updates are performed.

    + +
      +
    • bound records last only as long as their supporting records. When supporting records changes, then bound records changes accordingly, replacing any previously bound records.

    • + +
    • committed records persist past the lifetime of their supporting records. When supporting records change, then a new record is committed, leaving any previously committed records still intact.

    • +
    + +

    Examples

    +
    
    +
    + +

    See Also

    + +

    search | bind | commit

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/add/index.html b/v0.2/handbook/add/index.html new file mode 100644 index 0000000..ef1fa7f --- /dev/null +++ b/v0.2/handbook/add/index.html @@ -0,0 +1,423 @@ + + + + + + + + + + + + Add: += - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Add Operator

    + +

    adds a value to an attribute on a record

    + +

    Syntax

    +
    // Add a value to an attribute
    +record.attribute += value
    +
    +// Add a tag to a record
    +record += #tag
    +
    + +

    Description

    + +

    record.attribute += value adds value to attribute. If record already has an attribute with a value, then value will be added to the set. Otherwise, if record doesn’t have an attribute with this name already, then += will create the attribute and set it to value. As Eve variables are sets, if the value already exists on the attribute, the value cannot be added again.

    + +

    attribute can be an attribute already on the record, or it can be a new attribute.

    + +

    value can be a string or number literal, a variable bound to one of these, or a record.

    + +

    record += #tag adds #tag to record. This is shorthand for record.tag += "tag".

    + +

    Examples

    + +

    Add the current second to a record. Since Eve works in sets, time-history can only ever hold then numbers 0 through 60. This means after one minute passes, no new elements will be added to tracker.time-history.

    +
    search
    +  tracker = [#seconds-tracker]
    +  [#time seconds]
    +
    +commit
    +  tracker.time-history += seconds
    +
    + +

    We can get around this by adding a record:

    +
    search
    +  tracker = [#seconds-tracker]
    +  [#time seconds]
    +
    +commit
    +  tracker.time-history += [seconds]
    +
    + +

    Now, instead of adding numbers to time-history we are adding records, which are associated with a unique ID. So after the first minute passes, time-history will contain duplicate seconds, but the record ID will ensure each one is unique.

    + +
    + +

    Add the #honor-student tag to any #student with a GPA greater than 3.75:

    +
    search
    +  student = [#student gpa > 3.75]
    +  
    +bind
    +  student += #honor-student
    +
    + +

    See Also

    + +

    set operator | remove operator | merge operator | bind | commit

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/aggregates/index.html b/v0.2/handbook/aggregates/index.html new file mode 100644 index 0000000..92ea814 --- /dev/null +++ b/v0.2/handbook/aggregates/index.html @@ -0,0 +1,391 @@ + + + + + + + + + + + + Aggregates - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Aggregates

    + +

    aggregates reduce a set of values to a single value

    + +

    Description

    + +

    Aggregates are functions that take an input set and produce an output set, typically with a different cardinality than the input set. Examples of aggregates include sum, count, and average. Each of these takes a set of numbers as an input, and typically produces a single number as output.

    + +

    Aggregates are called just like other functions in Eve. For instance, the count aggregate is called like so:

    +
    employee-count = count[given: employees]
    +
    + +

    Aggregates don’t always produce a single output value. In some instances, you may want to group your input according to a desired dimension (department, grade, state, country, zip code, etc.) and then aggregate based on those groupings. Extending the example above, we could count the employees in each department:

    +
    employee-count = count[given: employees, per: department]
    +
    + +

    Now, employee-count will have a count for each department, instead of a single count over all departments. For more complete examples, see the doc files for specific aggregates.

    + +

    Tip

    + +

    Aggregates have similar behavior to the reduce() function in many other langauges.

    + +

    See Also

    + +

    count

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/bind/index.html b/v0.2/handbook/bind/index.html new file mode 100644 index 0000000..c62fc50 --- /dev/null +++ b/v0.2/handbook/bind/index.html @@ -0,0 +1,609 @@ + + + + + + + + + + + + bind - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    bind

    + +

    updates or creates records, syncing them with matched records

    + +

    Syntax

    +
    bind
    +
    +bind @database1, ..., @databaseN
    +
    + +

    Description

    + +

    bind updates or creates new records with a lifetime equal to matched records within the block. Matched records are any records found in a search action. If matched records change during program execution, all bound records change accordingly. If any matched records are removed (i.e. they no longer match the search), bound records and updates are removed as well.

    + +

    By default, bound records are directed to a default local database.

    + +

    bind @database1, ..., @databaseN directs bound records to one or more databases.

    + +

    Bind vs. Commit

    + +

    While bind and commit both update records in a database, they do so with slightly different behavior; a bound record has the same lifetime as its supporting records, whereas a committed record exists in the database until it is removed intentionally. Let’s take a closer look at this distinction and what the implications are.

    + +

    Consider the following block that reads the current time, and prints it to the screen:

    +
    search
    +  [#time seconds]
    +
    +bind @browser
    +  [#div text: seconds]
    +
    + +

    In this block we search for the current time and bind it to a message that displays it. The message exists as long as the current time stays the same (1 second obviously). When the time changes, the current message disappears and is replaced with a new message, displaying the new time. This is the behavior of bind; bound records persist only as long as their matching records.

    + +

    Now let’s look at what commit does in contrast:

    +
    search
    +  [#time seconds]
    +
    +commit @browser
    +  [#div text: seconds]
    +
    + +

    Compared to the previous block, we only changed bind to commit. When you run this block, at first you’ll see a single message like before. However, you’ll notice that messages begin to accumulate every second. Unlike with bind, committed records persist in the database until they are intentionally removed.

    + +

    To make things very concrete, we can actually mimic the behavior of a bind using two blocks that commit. We’ve already got the first one (the one just above), that commits messages to @browser. Now all we need is a second block, one that removes old committed messages from @browser:

    +
    search 
    +  [#time seconds]
    +
    +search @browser
    +  s = seconds - 1
    +  // Do some math to handle the roll over at 60 seconds
    +  last-time = s - 60 * floor[value: s / 60]
    +  msg = [#div text: last-time]
    +  
    +commit @browser
    +  msg := none
    +
    + +

    This block searches for the message that was displayed during the previous second, and sets it to none, thereby removing it from @browser. Therefore, only the message bound to the the current time is displayed on the screen. This behavior is identical to that of the block that binds these messages instead of committing them!

    + +

    An Execution Perspective

    + +

    Another way to understand bind vs. commit is by looking at how the databases change over each tick of the Eve evaluator. We’ll consider the same program as before, looking at how its state changes over time. First, consider the bind case. When the program starts, there’s nothing in any databases; the program is a blank slate. At t1 the first #time is added to @session. This addition is bound to a #div, which is added to @browser. These changes are summarized in the first column of the table below.

    + +

    At t2, a new #time is added to @session, and the one from t1 is removed. Since we used a bind, this causes the existing #div to be removed from @browser, but it is replaced with a new #div reflecting the current time. At t3, the same operations takes place, and this process continues until the program is terminated.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +t0 + +t1 + +t2 + +t3 +
    +delta + + + ++ [#time seconds: 39] ++ [#div text: "39"] + ++ [#time seconds: 40] +- [#time seconds: 39] ++ [#div text: "40"] +- [#div text: "39"] + ++ [#time seconds: 41] +- [#time seconds: 40] ++ [#div text: "41"] +- [#div text: "40"] +
    +@session + +[ ] + +[[#time seconds: 39]] + +[[#time seconds: 40]] + +[[#time seconds: 41]] +
    +@browser + +[ ] + +[[#div text: 39]] + +[[#div text: 40]] + +[[#div text: 41]] +
    + +

    Let’s perform the same analysis in the commit case. In this program, things start off the same; initially the database is empty, and at t1 a #time and a #div are added to their respective databases. At t2, things get more interesting. While the old #time is still replaced, the #div displaying the old time is not replaced since we committed it to @browser. Indeed, in subsequent rounds of execution, the contents of @browser keeps growing.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +t0 + +t1 + +t2 + +t3 +
    +delta + + ++ [#time seconds: 39] ++ [#div text: "39"] + ++ [#time seconds: 40] +- [#time seconds: 39] ++ [#div text: "40"] + ++ [#time seconds: 41] +- [#time seconds: 40] ++ [#div text: "41"] +
    +@session + +[ ] + +[[#time seconds: 39]] + +[[#time seconds: 40]] + +[[#time seconds: 41]] +
    +@browser + +[ ] + +[[#div text: 39]] + +[[#div text: 39], + [#div text: 40]] + +[[#div text: 39], + [#div text: 40], + [#div text: 41]] +
    + +

    Tips

    + +

    When you want to display data in an interface element like a #div, a bind is usually the more appropriate choice compared to a commit. A bind will keep the interface element always up-to-date, whereas a commit will leave lingering elements that no longer reflect the current state of the program.

    + +

    When searching for an event like a #click, a commit is usually more appropriate than bind. When an event occurs, a record representing the event is added to a database. That record exists for exactly one “instant”, and then it is removed from the database. During that “instant”, any block searching for that event will be satisfied and can execute a bind or commit action. If you bind on the event, then the result will disappear as soon as the event does. However, if you commit on the event, then that result will persist after the event has been removed.

    + +

    Examples

    + +

    Display a formatted time:

    +
    search
    +  [#time hours minutes seconds]
    +  (am/pm, adjusted-hours) = if hours >= 12 then ("PM", hours - 12)
    +                            else if hours = 0 then ("AM", 12)
    +                            else ("AM", hours)
    +bind @browser
    +  [#div text: "The current time is {{adjusted-hours}}:{{minutes}}:{{seconds}} {{am/pm}}"]
    +
    + +

    See Also

    + +

    commit | databases | search

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/blocks/index.html b/v0.2/handbook/blocks/index.html new file mode 100644 index 0000000..c257180 --- /dev/null +++ b/v0.2/handbook/blocks/index.html @@ -0,0 +1,504 @@ + + + + + + + + + + + + Blocks - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Blocks

    + +

    blocks compose Eve programs

    + +

    Syntax

    +
    // Blocks contain Eve code and can execute actions
    +```
    +search
    +  .....
    +
    +bind
    +  .....
    +
    +commit
    +  .....
    +```
    +
    +// Blocks that are disabled are not executed
    +```eve disabled
    +search
    +  ....
    +```
    +
    +// Non-Eve blocks are not parsed or executed
    +```javascript
    +function() {
    +  ...
    +}
    +```
    +
    +// Blocks that omit the search action are satisfied by default
    +```
    +bind
    +  .....
    +```
    +
    +```
    +commit
    +  .....
    +```
    +
    + +

    Description

    + +

    A block is the fundamental unit of Eve code. Eve programs are made up of a series of blocks, each of which can perform actions:

    + +
      +
    1. A block searches one or more databases for records.
    2. +
    3. A block binds or commits new records in one or more databases.
    4. +
    + +

    Blocks execute when the records they search for exist or change. If a block doesn’t search for any records, then the block executes by default, but it can never update bound or committed records.

    + +

    Blocks can have any number of search, commit, and bind actions, each of which can reference any number of databases. If a block has multiple search actions, it will only execute if all searches are satisfied.

    + +

    Blocks automatically keep bound and committed records up-to-date with matched records. When a record matching a search changes, those changes are reflected automatically in bound and committed records within that block.

    + +

    Specifying a Block

    + +

    Blocks are specified using two fences to delineate the beginning and end of the block. Code fences are matching pairs of either three consecutive ticks (```) or tildes (~~~). This style of code block is the same as supported by CommonMark. However, we don’t currently support specifying code blocks via indentation.

    + +

    Info Strings

    + +

    You can specify the type of code within a block with an info string, written directly after the block’s opening code fence. By default, any block without an info string are assumed to contain Eve code.

    + +
    ```
    +// An implicit block of Eve code. This block is parsed and executed
    +  ...
    +```
    +
    +```eve
    +// An explicit block of Eve code. This block is parsed and executed
    +  ...
    +```
    +
    +```eve disabled
    +// An explicit block of Eve code. This block is parsed, but not executed
    +  ...
    +```
    +
    +```javascript
    +// An explicit block of Javascript code. This block is ignored
    +// by the Eve compiler entirely
    +  ...
    +```
    +
    + +

    Tips

    + +

    Although they are similar, it’s important not to think of blocks like functions in other languages. Blocks don’t have a name, and you don’t “call” them like you do functions. Instead, you “use” a block by searching for the records it creates.

    + +

    Likewise, there is no “main” block. Since Eve is declarative and there is no order, there is no particular starting point for a program. As a close analog, any block that does not search for records will be the first to execute when the program starts. For instance:

    +
    commit
    +  [#student name: "Sally"]
    +  [#student name: "Ingrid"]
    +
    + +

    This block has no search action, so it doesn’t depend on any other records. Thus, it can be viewed as a “root” of the program. A program may contain many such root blocks.

    + +

    Examples

    + +

    A block with search and bind actions. The bind action adds the #div to the @browser database.

    +
    search
    +  [name]
    +
    +bind @browser
    +  [#div text: name]
    +
    + +

    A block with only a commit action:

    +
    commit
    +  [name: "Roger"]
    +
    + +
    + +

    Search for a #click in @event, create a #request in @http

    +
    search @event
    +  [#click]
    +
    +commit @http
    +  [#request #google url: "https://jsonplaceholder.typicode.com/posts/"]
    +
    + +

    Search for a #request with a response, display it in the browser

    +
    search @http
    +  [#request #google response: [json]]
    +  json = [#array]
    +  lookup[record: json, attribute, value: [title body]]
    +
    +bind @browser
    +  [#div text: "{{title}}"]
    +  [#div text: "{{body}}"]
    +
    + +

    See Also

    + +

    search | bind | commit | databases

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/browser/index.html b/v0.2/handbook/browser/index.html new file mode 100644 index 0000000..4a149b8 --- /dev/null +++ b/v0.2/handbook/browser/index.html @@ -0,0 +1,367 @@ + + + + + + + + + + + + @browser - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    @browser

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/commit/index.html b/v0.2/handbook/commit/index.html new file mode 100644 index 0000000..3c6e46f --- /dev/null +++ b/v0.2/handbook/commit/index.html @@ -0,0 +1,613 @@ + + + + + + + + + + + + commit - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    commit

    + +

    updates or creates records that persist until intentionally removed

    + +

    Syntax

    +
    commit
    +
    +commit @database1, ..., @databaseN
    +
    + +

    Description

    + +

    commit updates or creates new records that persist in a database until they are intentionally removed. If supporting records change or are removed, the original committed records remain in tact, and can still be searched by other blocks. By default, committed records are directed to a local database.

    + +

    commit @database1, ..., @databaseN directs committed records one or more databases.

    + +

    Bind vs. Commit

    + +

    While bind and commit both update records in a database, they do so with slightly different behavior; a bound record has the same lifetime as its supporting records, whereas a committed record exists in the database until it is removed intentionally. Let’s take a closer look at this distinction and what the implications are.

    + +

    Consider the following block that reads the current time, and prints it to the screen:

    +
    search
    +  [#time seconds]
    +
    +bind @browser
    +  [#div text: seconds]
    +
    + +

    In this block we search for the current time and bind it to a message that displays it. The message exists as long as the current time stays the same (1 second obviously). When the time changes, the current message disappears and is replaced with a new message, displaying the new time. This is the behavior of bind; bound records persist only as long as their matching records.

    + +

    Now let’s look at what commit does in contrast:

    +
    search
    +  [#time seconds]
    +
    +commit @browser
    +  [#div text: seconds]
    +
    + +

    Compared to the previous block, we only changed bind to commit. When you run this block, at first you’ll see a single message like before. However, you’ll notice that messages begin to accumulate every second. Unlike with bind, committed records persist in the database until they are intentionally removed.

    + +

    To make things very concrete, we can actually mimic the behavior of a bind using two blocks that commit. We’ve already got the first one (the one just above), that commits messages to @browser. Now all we need is a second block, one that removes old committed messages from @browser:

    +
    search 
    +  [#time seconds]
    +
    +search @browser
    +  s = seconds - 1
    +  // Do some math to handle the roll over at 60 seconds
    +  last-time = s - 60 * floor[value: s / 60]
    +  msg = [#div text: last-time]
    +  
    +commit @browser
    +  msg := none
    +
    + +

    This block searches for the message that was displayed during the previous second, and sets it to none, thereby removing it from @browser. Therefore, only the message bound to the the current time is displayed on the screen. This behavior is identical to that of the block that binds these messages instead of committing them!

    + +

    An Execution Perspective

    + +

    Another way to understand bind vs. commit is by looking at how the databases change over each tick of the Eve evaluator. We’ll consider the same program as before, looking at how its state changes over time. First, consider the bind case. When the program starts, there’s nothing in any databases; the program is a blank slate. At t1 the first #time is added to @session. This addition is bound to a #div, which is added to @browser. These changes are summarized in the first column of the table below.

    + +

    At t2, a new #time is added to @session, and the one from t1 is removed. Since we used a bind, this causes the existing #div to be removed from @browser, but it is replaced with a new #div reflecting the current time. At t3, the same operations takes place, and this process continues until the program is terminated.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +t0 + +t1 + +t2 + +t3 +
    +delta + + + ++ [#time seconds: 39] ++ [#div text: "39"] + ++ [#time seconds: 40] +- [#time seconds: 39] ++ [#div text: "40"] +- [#div text: "39"] + ++ [#time seconds: 41] +- [#time seconds: 40] ++ [#div text: "41"] +- [#div text: "40"] +
    +@session + +[ ] + +[[#time seconds: 39]] + +[[#time seconds: 40]] + +[[#time seconds: 41]] +
    +@browser + +[ ] + +[[#div text: 39]] + +[[#div text: 40]] + +[[#div text: 41]] +
    + +

    Let’s perform the same analysis in the commit case. In this program, things start off the same; initially the database is empty, and at t1 a #time and a #div are added to their respective databases. At t2, things get more interesting. While the old #time is still replaced, the #div displaying the old time is not replaced since we committed it to @browser. Indeed, in subsequent rounds of execution, the contents of @browser keeps growing.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +t0 + +t1 + +t2 + +t3 +
    +delta + + ++ [#time seconds: 39] ++ [#div text: "39"] + ++ [#time seconds: 40] +- [#time seconds: 39] ++ [#div text: "40"] + ++ [#time seconds: 41] +- [#time seconds: 40] ++ [#div text: "41"] +
    +@session + +[ ] + +[[#time seconds: 39]] + +[[#time seconds: 40]] + +[[#time seconds: 41]] +
    +@browser + +[ ] + +[[#div text: 39]] + +[[#div text: 39], + [#div text: 40]] + +[[#div text: 39], + [#div text: 40], + [#div text: 41]] +
    + +

    Tips

    + +

    When you want to display data in an interface element like a #div, a bind is usually the more appropriate choice compared to a commit. A bind will keep the interface element always up-to-date, whereas a commit will leave lingering elements that no longer reflect the current state of the program.

    + +

    When searching for an event like a #click, a commit is usually more appropriate than bind. When an event occurs, a record representing the event is added to a database. That record exists for exactly one “instant”, and then it is removed from the database. During that “instant”, any block searching for that event will be satisfied and can execute a bind or commit action. If you bind on the event, then the result will disappear as soon as the event does. However, if you commit on the event, then that result will persist after the event has been removed.

    + +

    Examples

    + +

    Initialize a counter when a session connects

    +
    search
    +  [#session-connect]
    +
    +commit
    +  [#counter count: 0]
    +
    + +

    Increment a counter when a button is clicked

    +
    search
    +  [#click element: [#count-button diff counter]]
    +
    +commit
    +  counter.count := counter.count + diff
    +
    + +

    See Also

    + +

    bind | databases | search

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/commonmark/index.html b/v0.2/handbook/commonmark/index.html new file mode 100644 index 0000000..a6a9118 --- /dev/null +++ b/v0.2/handbook/commonmark/index.html @@ -0,0 +1,435 @@ + + + + + + + + + + + + CommonMark - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    CommonMark

    + +

    Eve documents are compatible with CommonMark

    + +

    Syntax

    + +

    Headings

    + +
    # heading1
    +## heading2
    +### heading3
    +
    + +

    Emphasis

    + +
    *italic*
    +_italic_
    +**bold**
    +__bold__
    +
    + + + +
    [link](address)
    +
    +[link][ref]
    +[ref] : address
    +
    + +

    Lists

    + +
    - list item
    +- list item2
    +  - sublist item
    +
    +* list item
    +* list item2
    +  * sublist item
    +
    +1. ordered list1
    +2. ordered list2
    +
    +1) ordered list1
    +2) ordered list2
    +
    + +

    Quotes

    + +
    > blockquote
    +
    + +

    Code

    + +
    ```
    +  a block of code
    +```
    +
    +`Inline code` with backticks
    +
    + +

    Description

    + +

    CommonMark is an effort to standardize and remove ambiguity from the Markdown language. Eve uses CommonMark as the basis for formatting and rendering prose contained in Eve files. Eve code is written as code blocks within a document specified in CommonMark. Code blocks are delinated by code fences, three backtics before and after Eve code. Everything within a code block is treated as Eve code.

    + +

    Examples

    + +

    See Also

    + +

    literate programming | blocks | programming model

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/core/index.html b/v0.2/handbook/core/index.html new file mode 100644 index 0000000..4f0d04a --- /dev/null +++ b/v0.2/handbook/core/index.html @@ -0,0 +1,371 @@ + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    + diff --git a/v0.2/handbook/databases/index.html b/v0.2/handbook/databases/index.html new file mode 100644 index 0000000..4d90609 --- /dev/null +++ b/v0.2/handbook/databases/index.html @@ -0,0 +1,463 @@ + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Databases

    + +

    Databases contain records

    + +

    Syntax

    +
    // search action
    +search @database1, ..., @databaseN
    +
    +// Commit action
    +commit @database1, ..., @databaseN
    +
    +// Bind action
    +bind @database1, ..., @databaseN
    +
    + +

    Description

    + +

    <action> @database performs the given action, one of search, bind, or commit, on the union of the provided databases.

    + +

    If no database is provided with an action, then that action is performed on the default @session database.

    + +

    Creating and Searching Databases

    + +

    You can create databases on-demand by simply committing a record to one. e.g.

    + +
    commit @my-database
    +  [#my-record]
    +
    + +

    This block will create a new database called “my-database”, which will contain the newly committed record. You can now search for this record in your new database:

    + +
    search @my-database
    +  [#my-record]
    +
    +bind @browser
    +  [#div text: "Found a record!"]
    +
    + +

    Special Databases

    + +

    Eve has some built-in databases that have meaning to the runtime.

    + +
      +
    • @session - the default database when no database is specified with an action.
    • +
    • @view - records committed to @view are used to visualize data.
    • +
    • @event - contains events originating from the DOM
    • +
    • @browser - Eve clients running in the browser render applicable records in this @browser as HTML elements.
    • +
    • @http - Stores records representing HTTP requests and responses
    • +
    + +

    Examples

    + +

    Display the element that was clicked in the DOM

    +
    search @event
    +  [#click #direct-target element]
    +
    +commit @browser
    +  [#div text: "{{element}} was clicked."]
    +
    + +

    Commit some data in @session, and then display it on a button click.

    + +
    commit
    +  [#for-display text: "Hello"]
    +
    + +

    We are searching over three databases to complete this block.

    + +
      +
    • the #click is in @event
    • +
    • the #button is in @browser
    • +
    • the text for display is in @session. This needs to be made explicit; since we are searching in other databases, @session is not searched implicitly.
    • +
    + +
    search @event @browser @session
    +  [#click element: [#button]]
    +  [#for-display text]
    +
    +commit @browser
    +  [#div text]
    +
    + +

    This block could have been written with two searches for the same effect:

    + +
    search @event @browser
    +  [#click element: [#button]]
    +
    +search
    +  [#for-display text]
    +
    +commit @browser
    +  [#div text]
    +
    + +

    See Also

    + +

    search | bind | commit

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/datetime/date/index.html b/v0.2/handbook/datetime/date/index.html new file mode 100644 index 0000000..a313607 --- /dev/null +++ b/v0.2/handbook/datetime/date/index.html @@ -0,0 +1,785 @@ + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + + + + + + + + + + + date - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    date

    + +

    provides the current date

    + +

    Syntax

    +
    [#date day month year]
    +
    + +

    Attributes

    + +
      +
    • day - current numeric day
    • +
    • month - current numeric month
    • +
    • year - current numeric year
    • +
    + +

    Description

    + +

    Provides the current day as reported by the system clock.

    + +

    Time updates at the frequency of the smallest selected in the record.

    + +

    Examples

    + +

    Prints the current date as a formatted string.

    +
    search
    +  [#date month day year]
    +
    +bind @browser
    +  [#div text: "Today is {{month}}/{{day}}/{{year}}"]
    +
    + +

    See Also

    + +

    time

    + + +
    +
    + +
    + + + +
    +
    + +
    + + + +
    +
    + +
    + diff --git a/v0.2/handbook/datetime/index.html b/v0.2/handbook/datetime/index.html new file mode 100644 index 0000000..dd459d9 --- /dev/null +++ b/v0.2/handbook/datetime/index.html @@ -0,0 +1,371 @@ + + + + + + + + + + + + Date & Time - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Date & Time

    + +
      +
    • time - The current system time
    • +
    + + +
    +
    + +
    + diff --git a/v0.2/handbook/datetime/time/index.html b/v0.2/handbook/datetime/time/index.html new file mode 100644 index 0000000..3ef9427 --- /dev/null +++ b/v0.2/handbook/datetime/time/index.html @@ -0,0 +1,422 @@ + + + + + + + + + + + + time - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    time

    + +

    provides the current time

    + +

    Syntax

    +
    [#time year 
    +       month 
    +       day 
    +       hours 
    +       hours-24 
    +       minutes 
    +       seconds 
    +       time-string 
    +       time seconds 
    +       frames 
    +       ampm]
    +
    + +

    Attributes

    + +
      +
    • year - the current year
    • +
    • month - the current month from 0 to 11
    • +
    • day - the current day of the month from 1 to 31
    • +
    • hours - current hour from 0 to 11
    • +
    • hours-24 - current hour from 0 to 23
    • +
    • minutes - current minute from 0 to 59
    • +
    • seconds - current second from 0 to 59
    • +
    • time-string - the current time in a string of the form HH:MM AM/PM
    • +
    • timestamp - the number of milliseconds since midnight January 1, 1970
    • +
    • ampm - a string indicating morning or evening
    • +
    • frames - the number of frames elapsed since the program began. This fastest updating attribute on #time, refreshing evey 16 milliseconds.
    • +
    + +

    Description

    + +

    Provides the current time as reported by the system clock.

    + +

    Time updates at the frequency of the smallest unit of time selected in the record.

    + +

    Examples

    + +

    Prints the current time as a formatted string.

    +
    search
    +  [#time hours minutes seconds]
    +
    +bind @browser
    +  [#div text: "The time is {{hours}}:{{minutes}}:{{seconds}}"]
    +
    + +

    Example Usage

    + + + + +
    +
    + +
    + diff --git a/v0.2/handbook/docker/index.html b/v0.2/handbook/docker/index.html new file mode 100644 index 0000000..a6dddae --- /dev/null +++ b/v0.2/handbook/docker/index.html @@ -0,0 +1,394 @@ + + + + + + + + + + + + Docker - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Eve in Docker

    + +

    A Docker container for Eve is available on Docker Hub. After installing Docker for your platform, you can download our container with the following command:

    + +
    docker pull witheve/eve
    +
    + +

    Windows Users - Docker for Windows requires Microsoft Hyper-V, which requires Windows 10.

    + +

    Examples

    + +

    To run the Docker container, execute:

    + +
    docker run -p [port]:8080 witheve/eve
    +
    + +

    [port] is an available port on your local machine. It can be 8080 or any other port you would like. Then direct your browser to http://localhost:[port] to access the editor.

    + +

    [eve_file] is a path to a *.eve file you would like to build. The working directory of the container is eve/build, so to run a program in the eve/examples directory, you need to provide a relative path e.g.

    + +
    docker -p 8080:8080 witheve/eve
    +
    + +

    To pass Eve files on your local machine into the container, you’ll need to mount a docker volume.

    + +

    See also

    + +

    linux | mac | windows | npm |running

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/ebnf/index.html b/v0.2/handbook/ebnf/index.html new file mode 100644 index 0000000..8f609c0 --- /dev/null +++ b/v0.2/handbook/ebnf/index.html @@ -0,0 +1,473 @@ + + + + + + + + + + + + Grammar - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Eve EBNF grammar

    + +

    The following specification is expressed in Extended Backus–Naur Form

    + +

    Basics

    +
    newline = "\n"
    +whitespace =  " " | "\t" | "," | newline;
    +unicode = ? all unicode chars - whitespace ?;
    +specials = "@" | "#" | "." | "," | "(" | ")" | "[" | "]" | "{" | "}" | "⦑" | "⦒" | ":" | "\"";
    +non-special = unicode - specials;
    +
    + +

    Values

    +
    none = "none";
    +boolean = "true" | "false";
    +numeric = "0" .. "9";
    +number = ["-"] {numeric} ["." {numeric}];
    +string-interpolation = "{{" expression "}}";
    +string = "\"" {string-interpolation | unicode - "\"" | "\\\"" | whitespace} "\"";
    +uuid ="⦑" (unicode - specials)  "⦒"
    +
    + +

    Keywords and Identifiers

    +
    search = "search";
    +action = "bind" | "commit";
    +if = "if";
    +then = "then";
    +else = "else";
    +is = "is";
    +not = "not";
    +none = "none";
    +keyword = search | action | if | then | else | boolean | is | not | none
    +non-special-non-numeric = non-special - numeric
    +identifier = (non-special-non-numeric {non-special}) - keyword - "```";
    +
    + +

    Comparisons

    +
    equality = ":" | "=";
    +comparator = equality | ">" | "<" | ">=" | "<=" | "!=";
    +comparison = expression whitespace+ comparator whitespace+ expression;
    +
    + +

    Functions

    +
    infix-op = "*" | "+" | "-" | "/";
    +infix = expression infix-op expression;
    +function = identifier "[" [attribute] {whitespace+ attribute} "]";
    +
    + +

    Records and Attributes

    +
    record = "[" [attribute] {whitespace+ attribute} "]"
    +attribute = name | tag | attribute-not | identifier {whitespace+ comparator whitespace+ expression};
    +name = "@" (identifier | string);
    +tag = "#" (identifier | string);
    +attribute-not = not "(" whitespace* identifier [comparator whitespace+ expression] ")";
    +attribute-access = identifier whitespace* {"." whitespace* identifier}+
    +
    + +

    Special Forms

    +
    not-statement = not "(" statement {whitespace+ statement} ")";
    +is-expression = is "(" comparison ")";
    +
    + +

    Expression

    +
    expression = number | identifier | function | infix | record | attribute-access;
    +
    + +

    Statements

    +
    comment = "//" {unicode | whitespace - newline} newline
    +statement = record | function | not-statement | if-statement | comparison | comment
    +
    + +

    Action Statements

    +
    create-action = (identifier whitespace+ equality whitespace+ record) | record
    +merge-action = (identifier | attribute-access) whitespace+ "<-" whitespace+ record
    +name-tag-action = (identifier | attribute-access) whitespace+ ("+=" | "-=") whitespace+ (name | tag)
    +remove-action = (identifier | attribute-access) whitespace+ ":=" whitespace+ none
    +attribute-action = attribute-access whitespace+ (":=" | "+=" | "-=") whitespace+ expression
    +action-operation = create-action | merge-action | name-tag-action | remove-action | attribute-action
    +
    + +

    If-Then

    +
    group = "(" expression {whitespace+ expression} ")"
    +binding-group = "(" identifier {whitespace+ identifier} ")"
    +if-result = (group | expression);
    +if-expression = if whitespace+ {statement whitespace+} then whitespace+ if-result;
    +else-if-expression = else whitespace+ if whitespace+ {statement whitespace+} then whitespace+ if-result;
    +else-expression = else whitespace+ if-result
    +if-statement = (identifier | binding-group) whitespace+ equality whitespace+
    +               if-expression
    +               {whitespace+ (if-expression | else-if-expression)}
    +               [else-expression]
    +
    + +

    Sections

    +
    database-declaration = name | "(" {name whitespace+} ")"
    +match-section = search whitespace+ [database-declaration whitespace+] {statement whitespace}
    +action-section = action whitespace+ [database-declaration whitespace+] {action-statement whitespace}
    +section = match-sectiong | action-section
    +
    + +

    Program and Blocks

    +
    fence-symbol = "```"
    +start-fence = newline fence-symbol [whitespace* (unicode - newline)] newline
    +end-fence = newline fence-symbol newline
    +block = start-fence {section} end-fence
    +program = {unicode | whitespace | block}
    +
    + + +
    +
    + +
    + diff --git a/v0.2/handbook/equality/index.html b/v0.2/handbook/equality/index.html new file mode 100644 index 0000000..0b07807 --- /dev/null +++ b/v0.2/handbook/equality/index.html @@ -0,0 +1,420 @@ + + + + + + + + + + + + Equality - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Equality

    + +

    = and : assert the equality of two values

    + +

    Syntax

    +
    // Use : in a record to bind an attribute to a value
    +[attribute: value]
    +
    +// Use = outside a record to bind an attribute to a value
    +[attribute]
    +attribute = value
    +
    + +

    Description

    + +

    [attribute: value] binds value to attribute, so that only records with attributes of the given value are returned. For instance, [name: "John"] selects all records with a name attribute equal to “John”. You can achieve the same effect with the = operator by first searching for a record. For instance:

    +
    [name]
    +name = "John"
    +
    + +

    This example further demonstrates that in Eve, variables with the same name are equivalent. Here, name inside the record and name on the second line are the same. This has particular implications, especially in the context of joining records. For instance:

    +
    search
    +  [#student name school: name]
    +  [#school name address]
    +
    + +

    This block searches for #students and #schools with the same name. This means if you have a school named “South High School”, it won’t match unless there is also a student named “South High School”. If you want to use attributes, but don’t want to join on them, you can access them via dot notation.

    +
    search
    +  [#student name school: schools.name]
    +  schools = [#school address]
    +
    + +

    This will correctly allow us to relate students and the addresses of the schools they attend.

    + +

    Tips

    + +

    Eve has two identical equivalency operators, : and =. They have the same semantic meaning, and could be used interchangeably. However, for readability reasons we encourage you to use : to express equality within records, and = outside of records. For example [attribute: value] is good, while we don’t encourage [attribute = value], even though it is semantically equivalent.

    + +

    Examples

    + +

    The following block will never execute the bind action because of a contradiction in the search:

    +
    search
    +  x = 10
    +  x = 20
    +
    +bind @browser
    +  [#div text: "This will never display"]
    +
    + +

    The search action says that x = 10 and x = 20, which is never true. Since there is no order or assignment in Eve, this statement does not first set x to 10 and then to 20. To see this more clearly, these two statements could be written as one:x = 10 = 20.

    + +

    See Also

    + +

    inequality | joins

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/equivalence/index.html b/v0.2/handbook/equivalence/index.html new file mode 100644 index 0000000..913e674 --- /dev/null +++ b/v0.2/handbook/equivalence/index.html @@ -0,0 +1,377 @@ + + + + + + + + + + + + Equivalence - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Equivalence

    + +
      +
    • Equality - Expresses when two statements are equality
    • +
    • Inequality - Expresses the relationship between two statements when they are not equality
    • +
    • Joins - Relate disjoint records by binding attributes from one with the other.
    • +
    + +

    See Also

    + +

    equality | inequality | joins

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/event/click/index.html b/v0.2/handbook/event/click/index.html new file mode 100644 index 0000000..8edc2eb --- /dev/null +++ b/v0.2/handbook/event/click/index.html @@ -0,0 +1,391 @@ + + + + + + + + + + + + click - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    click

    + +

    click event

    + +

    Syntax

    + +
    [#click]
    +[#click element]
    +[#click #direct-target element]
    +
    + +

    Attributes

    + +
      +
    • #direct-target - selects only directly clicked elements, as opposed to elements to which the event bubbles.
    • +
    • element - the element that was clicked.
    • +
    + +

    Description

    + +

    When an element in the DOM is clicked, a #click record is created in the @event database.

    + +

    Examples

    + +

    See Also

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/event/index.html b/v0.2/handbook/event/index.html new file mode 100644 index 0000000..89572f6 --- /dev/null +++ b/v0.2/handbook/event/index.html @@ -0,0 +1,369 @@ + + + + + + + + + + + + @event - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    @event

    + +

    click - a left-button mouse click event

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/events/click/index.html b/v0.2/handbook/events/click/index.html new file mode 100644 index 0000000..fbc243d --- /dev/null +++ b/v0.2/handbook/events/click/index.html @@ -0,0 +1,440 @@ + + + + + + + + + + + + click - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    click

    + +

    click event

    + +

    Syntax

    + +
    [#click]
    +[#click element]
    +[#click #direct-target element]
    +
    + +

    Attributes

    + +
      +
    • #direct-target - selects only directly clicked elements, as opposed to elements to which the event bubbles.
    • +
    • element - the element that was clicked.
    • +
    + +

    Description

    + +

    When an element in the DOM is clicked, a #click record is created in the @event database.

    + +

    Examples

    + +

    See Also

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/events/index.html b/v0.2/handbook/events/index.html new file mode 100644 index 0000000..974c926 --- /dev/null +++ b/v0.2/handbook/events/index.html @@ -0,0 +1,418 @@ + + + + + + + + + + + + Events - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Events

    + +

    click - a left-button mouse click event

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/expressions/index.html b/v0.2/handbook/expressions/index.html new file mode 100644 index 0000000..22b4e4d --- /dev/null +++ b/v0.2/handbook/expressions/index.html @@ -0,0 +1,379 @@ + + + + + + + + + + + + Expressions - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    + diff --git a/v0.2/handbook/functions/index.html b/v0.2/handbook/functions/index.html new file mode 100644 index 0000000..88c91f5 --- /dev/null +++ b/v0.2/handbook/functions/index.html @@ -0,0 +1,424 @@ + + + + + + + + + + + + Functions - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Functions

    + +

    Functions map one or more arguments to one or more values.

    + +

    Syntax

    +
    // A typical function call
    +value = fn[argument]
    +
    +// A function call with multiple arguments
    +value = fn[argument1, ..., argumentN]
    +
    +// A function call with multiple arguments and multiple return values
    +(value1, value2) = fn[argument1, ..., argumentN]
    +
    +// A desugared function call
    +[#fn #function argument1, ... argumentN, value1, ..., valueN]
    +
    + +

    Description

    + +

    Functions as they exist in other languages are mostly obviated by Eve’s tag semantics. Consider the following function call in a C-family language.

    +
    // A typical function call
    +x = sin(1.5);                              
    +
    + +

    In Eve, we could match a record that operates similarly:

    +
    [#sin #function radians: 1.5, return: x]
    +
    + +

    These statements accomplish the same objective: store the sine of an angle in a result variable. The Eve syntax is at a disadvantage though, because it cannot be composed into an expression like a typical function. Therefore, specific Eve records can be used as traditional functions:

    +
    x = sin[radians: 1.5]
    +
    + +

    Let’s look at what makes Eve functions different.

    + +

    Explicit Arguments

    + +

    A function’s arguments are enclosed in square brackets to draw attention to the fact that functions in Eve are just regular records. Also like records, arguments are stated explicitly. This has several advantages over typical calling patterns:

    + +
      +
    • Explicit arguments are self-documenting, so a reader unfamiliar with the function can understand more about the function without looking up exactly how it works. In the case of sin, you don’t have to know whether the inputs have to be in radians or degrees; the call-site tells you.

    • + +
    • Eve provides alternative calling patterns for functions. Some languages have two sin functions, one for angles in radians and another for angles in degrees. By contrast, Eve has a single sin function. If your angles are in radians, you call sin[radians], whereas if your angles are in degrees, you call sin[degrees].

    • + +
    • Like all records, you can state arguments in any order. This opens up an easy path for optional arguments: include the arguments you want and leave out the ones you don’t.

    • +
    + +

    Referential Transparency

    + +

    All expressions in Eve are referentially transparent, meaning you can replace the expression with its result and the behavior of the program will not change. This in turn means that expressions are side-effect free, and the only thing they depend on is their input arguments. Referential transparency is key to enabling some key features in Eve, like time travel debugging and provenance.

    + +

    Set Semantics

    + +

    In Eve, functions work over sets, meaning that a function will be applied to all elements of the input sets, resulting in an output that is itself a set. For more, see the document on set semantics.

    + +

    See Also

    + +

    aggregate | set semantics

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/general/index.html b/v0.2/handbook/general/index.html new file mode 100644 index 0000000..d0c52d1 --- /dev/null +++ b/v0.2/handbook/general/index.html @@ -0,0 +1,371 @@ + + + + + + + + + + + + General - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    General

    + +
      +
    • sort - Orders elements in a set
    • +
    + + +
    +
    + +
    + diff --git a/v0.2/handbook/general/sort/index.html b/v0.2/handbook/general/sort/index.html new file mode 100644 index 0000000..977fcf3 --- /dev/null +++ b/v0.2/handbook/general/sort/index.html @@ -0,0 +1,504 @@ + + + + + + + + + + + + sort - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    sort

    + +

    generates an ordering for a set

    + +

    Syntax

    +
    // Sort one or more values
    +index = sort[value]
    +index = sort[value: (value1, value2, ...)]
    +
    +// Sort one or more values, and specify the direction for each
    +index = sort[value direction]
    +index = sort[value: (value1, value2, ...), direction: ("up", "down", ...)]
    +
    +// Sort according to some grouping
    +index = sort[value per]
    +index = sort[value direction per]
    +
    + +

    Arguments

    + +
      +
    • value - one or more variables to sort. More than one variable can be provided using a list e.g. sort[value: (value1, ..., valueN)], and they will be sorted in turn.
    • +
    • direction - _optional_ - one or more directions by which to sort value. If no direction is provided, all variables are sorted from smallest to largest. Possible values are: + +
        +
      • “up” for sorting from smallest to largest.
      • +
      • “down” for sorting from largest to smallest.
      • +
    • +
    • per - _optional_ - Instead of sorting the whole set, per allows you to divide the set into groups and sort each one.
    • +
    + +

    The output is a set of indices, each of which maps to an element of the sorted variable. For example, if the value is ("A", "C", "D", "B"), then index is (1, 3, 4, 2).

    + +

    Description

    + +

    Sort generates an index that describes the ordering of an input value. It’s important to remember that variables in Eve are sets, and therefore have no ordering. Because of this, sort does not reorder value, but it generates a set of indices, each of which maps to an element in value.

    + +

    Sort is flexible, and can generate an ordering over multiple dimensions, directions, and groupings.

    + +

    index = sort[value] generates an ordering of value from smallest to largest.

    + +

    index = sort[value direction] generates an ordering of value in a given direction. Acceptable values are “up” and “down”.

    + +

    index = sort[value: (value1, ... , valueN)] generates an ordering of a list of values, ordering by value1 first, then value2, and so on. For example, if you have #person records with name, age and height attributes, you could sort as follows:

    +
    search
    +  [#person name age height]
    +  index = sort[value: (age, name, height)]
    +
    + +

    This will sort the people first by age, then by name, then by height.

    + +

    index = sort[value: (value1, ... , valueN), direction: (direction1, ... , directionN)] does the same as above, but you can specify the direction you sort each variable. Acceptable value for direction are “up” and “down”. By default, values are sorted in the “up” direction.

    + +

    index = sort[value per] sorts value, grouped by per. This divides value into groups according to the elements of per, and each one is sorted.

    + +

    Examples

    + +

    We have #student records with grade (1 - 12), teacher, GPA (0.0 - 4.0) attributes. We can sort the students by grade:

    +
    search
    +  [#student name grade]
    +  index = sort[value: grade]
    +
    +bind @browser
    +  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    +
    + +

    The browser handles the task of rendering the divs in the order specified by the sortattribute. Taking this further, we can choose the direction of the sortted set, whether “up” or “down”. The default direction is “up” when none is specified.

    +
    search
    +  [#student name grade]
    +  index = sort[value: grade, direction: "down"]
    +  
    +bind @browser
    +  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    +
    + +

    You can also sort across multiple axes of a record. For instance, we can sort grade from 9 to 12, then sort by name from Z - A.

    +
    search
    +  [#student name grade]
    +  index = sort[value: (grade, name) , direction: ("up","down")]
    +
    +bind @browser
    +  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    +
    + +

    This can be extended to sort any number of attributes

    +
    search
    +  [#student name grade teacher GPA]
    +  index = sort[value: (grade, teacher, name, GPA) , direction: ("up", "down", "up", "down")]
    +
    +bind @browser
    +  [#div sort: index, text: "{{index}} - {{name}} {{grade}} {{teacher}} {{GPA}}"]
    +
    + +

    Finally, we can group sorted attributes with the per argument. Here you can see the difference between sorting by name then grade, and sorting by name per grade.

    +
    search
    +  [#student name grade GPA]
    +  index = sort[value: (GPA, name), per: grade]
    +  
    +bind @browser
    +  [#div sort: index, text: "{{index}} - {{name}} {{grade}}"]
    +
    + +

    When you sort per grade, then name is first grouped by grade, and each of those groups is then sorted. This is why index goes from 1-6 instead of 1-20 as in the other examples; Although there are still 20 elements in index, the maximum is 6 because no grade has more than 6 students. You might want to sort data this way in order to display it in a nested structure, such as this:

    +
    search
    +    [#student name grade teacher]
    +  index = sort[value: name, per: grade]
    +  
    +bind @browser
    +  [#div grade children: 
    +    [#h3 sort: 0, text: "Grade: {{grade}}"]
    +    [#div sort: index, text: "{{index}} {{name}}"]]
    +
    + +
    + +

    Commit some test data

    +
    commit
    +  [#student name: "Mach", grade: 9, teacher: "Mr. Black", GPA: "1.0"]
    +  [#student name: "Pok", grade: 9, teacher: "Mrs. Brown", GPA: "3.4"]
    +  [#student name: "Karima", grade: 9, teacher: "Mr. Black", GPA: "2.4"]
    +  [#student name: "Garth", grade: 9, teacher: "Mrs. Brown", GPA: "2.8"]
    +  [#student name: "Berta", grade: 9, teacher: "Mr. Black", GPA: "2.7"]
    +  [#student name: "Maxine", grade: 10, teacher: "Mr. Red", GPA: "4.0"]
    +  [#student name: "Gwyn", grade: 10, teacher: "Mrs. Blue", GPA: "2.5"]
    +  [#student name: "Ilse", grade: 10, teacher: "Mr. Red", GPA: "3.0"]
    +  [#student name: "Hobert", grade: 11, teacher: "Ms. Green", GPA: "3.2"]
    +  [#student name: "Arlean", grade: 10, teacher: "Mr. Red", GPA: "2.4"]
    +  [#student name: "Ty", grade: 10, teacher: "Mrs. Blue", GPA: "1.7"]
    +  [#student name: "Kermit", grade: 11, teacher: "Ms. Green", GPA: "2.9"]
    +  [#student name: "Cortez", grade: 11, teacher: "Mrs. Orange", GPA: "2.3"]
    +  [#student name: "Polly", grade: 11, teacher: "Ms. Green", GPA: "2.1"]
    +  [#student name: "Damion", grade: 12, teacher: "Mrs. Purple", GPA: "3.8"]
    +  [#student name: "Gretchen", grade: 12, teacher: "Mrs. Yellow", GPA: "2.8"]
    +  [#student name: "Octavio", grade: 12, teacher: "Mrs. Purple", GPA: "3.4"]
    +  [#student name: "Pa", grade: 12, teacher: "Mrs. Yellow", GPA: "3.5"]
    +  [#student name: "Elwanda", grade: 10, teacher: "Mrs. Blue", GPA: "1.3"]
    +  [#student name: "Guadalupe", grade: 11, teacher: "Mrs. Orange", GPA: "3.7"]
    +
    + + +
    +
    + +
    + diff --git a/v0.2/handbook/glossary/index.html b/v0.2/handbook/glossary/index.html new file mode 100644 index 0000000..73ece9f --- /dev/null +++ b/v0.2/handbook/glossary/index.html @@ -0,0 +1,399 @@ + + + + + + + + + + + + Glossary - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Glossary

    + +

    Cardinality

    + +

    Cardinality is the number of elements in a set. For example, the set (5, 4, 2) contains three elements, so the cardinality of the set is 3.

    + +

    Cartesian Product

    + +

    The Cartesian product A × B of two sets A and B is the set of ordered pairs (a,b) where a ∈ A and b ∈ B. For example, if A = (1, 2) and B = ("A", "B"), then A x B = ((1,"A"), (1, "B"), (2, "A"), (2, "B")).

    + +

    Entity

    + +

    Entities are unique IDs in the Eve DB. An entity can represent anything - a person, a business, a message, an application, a button, etc.

    + +

    Fact

    + +

    Facts describe entities. Each fact is composed of an attribute and a value, and is associated with a specific entity. Facts might be a person’s age, an employee’s salary, a department’s budget, etc.

    + +

    Provenance

    + +

    Provenance is the record and history of data and its place of origin. In Eve, provenance tells you how a value is calculated by looking back at the history of its computation. Provenance can be used to precisely identify the cause of unexpected data in your application.

    + +

    Record

    + +

    Records are composed of facts. In Eve, you select records from the database by supplying a pattern of attributes, and any records matching that pattern are returned to you. For example, a record might be the ages, salaries, and departments of employees.

    + +

    Referential Transparency

    + +

    An expression is referentially transparency if it can be replaced with its result without changing the behavior of the program. Expression that are not referentially transparent tend to have side effects, or rely on state that is not supplied as part of the input arguments, but through a side channel.

    + +

    Set

    + +

    In mathematics, a set is a collection of elements where each element is unique. Sets have no order, so position in the set does not imply uniqueness. For example (1, 2, 3) is a set, whereas (1, 2, 1, 3) is not a set, because 1 appears twice. Furthermore, this means that (1, 2, 3) is equivalent to (3, 1, 2), (3, 2, 1), and (1, 3, 2) because they have the same elements regardless of order. Elements of a set can be anything, and therefore can be sets themselves. To make the previous collection a set we could do the following: ((1,A), (2,B), (1,C), (3,D)).

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/help/index.html b/v0.2/handbook/help/index.html new file mode 100644 index 0000000..b882022 --- /dev/null +++ b/v0.2/handbook/help/index.html @@ -0,0 +1,396 @@ + + + + + + + + + + + + Getting Help - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Getting Help

    + +

    If you have any questions or get stuck while you are learning Eve, there are several ways to get help:

    + +

    Before reaching out, make sure you’ve looked at the following resources:

    + +
      +
    • Read the quick start guide. It contains everything you’ll need to build your first Eve program.
    • +
    • Read the syntax reference. It summarizes the syntax of Eve on a single sheet of paper.
    • +
    + +

    If you’re still stuck, you can get in touch with Eve developers and the community through these channels:

    + +
      +
    • Send a message to the mailing list. We generally respond to messages within a day.
    • +
    • Send a tweet to @with_eve.
    • +
    • Submit an issue to our GitHub repository.
    • +
    • Join the Eve Slack channel to talk with Eve developers and the community in real time (coming soon)
    • +
    + +

    Hare are some more resources to help you learn Eve:

    + +
      +
    • Browse our growing catalog of example applications for something similar to what you’re doing.
    • +
    • Read our development blog to learn more about what goes on behind the scenes at Eve.
    • +
    + +

    See Also

    + +

    guides | tutorials | mailing list | @with_eve | GitHub

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/http/index.html b/v0.2/handbook/http/index.html new file mode 100644 index 0000000..9331bfb --- /dev/null +++ b/v0.2/handbook/http/index.html @@ -0,0 +1,367 @@ + + + + + + + + + + + + @http - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    @http

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/if-then/index.html b/v0.2/handbook/if-then/index.html new file mode 100644 index 0000000..eb88a3a --- /dev/null +++ b/v0.2/handbook/if-then/index.html @@ -0,0 +1,443 @@ + + + + + + + + + + + + if-then - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    If-Then

    + +

    Conditional equivalence

    + +

    Syntax

    +
    result = if record then value
    +  
    +result = if record then value
    +         else value
    +
    +result = if record then value
    +         if record then value
    +
    +result = if record then value
    +         else if record then value
    +
    +result = if record then value
    +         else if record then value
    +         else value
    +
    +(result1, ..., resultN) = if record then (value, ..., valueN)
    +
    +(result1, ..., resultN) = if record then (value, ..., valueN)
    +                          else (value, ..., valueN)
    +
    +(result1, ..., resultN) = if record1 then (value, ..., valueN)
    +                          if record2 then (value, ..., valueN)
    +
    +(result1, ..., resultN) = if record1 then (value, ..., valueN)
    +                          else if record2 then (value, ..., valueN)
    +
    +(result1, ..., resultN) = if record1 then (value, ..., valueN)
    +                          else if record2 then (value, ..., valueN)
    +                          else (value, ..., valueN)                                          
    +
    + +

    Description

    + +

    If allows conditional equivalence, and works a lot like if in other languages. Our if has two components: The keyword if followed by a conditional; and the keyword then followed by one or more return objects. An optional else keyword indicates the default value:

    + +

    This block is used to switch between the singular and plural for displaying the number of burgers each guest is eating. If statements can be composed, permitting the creation of complex conditional statements. For instance, instead of inviting friends and their spouses in two blocks (the first two blocks in the example program), I could have done it in a single block using an if statement:

    + +

    This is equivalent to a union/and operator, which combines elements from disparate sets into the same set. The second way to use if is in conjunction with the else keyword:

    + +

    This is equivalent to a choose/or operator, selecting only the first branch with a non-empty body. A bug in this program is that if some guest is tagged both #hungry and #vegetarian, that guest will actually receive two burgers. Therefore, while order of statements usually does not matter in Eve, if statements are one area where it does.

    + +

    A final feature of the if statement is multiple returns. For instance, we could have done this:

    + +

    Examples

    + +

    Basic usage

    +
    burger-switch = if guest.burgers = 1 then "burger"
    +                else "burgers"
    +
    +
    [@"my party" date]
    +friend = [#friend busy-dates != date]
    +guest = if friend then friend
    +        if friend.spouse then friend.spouse
    +
    + +

    Using else if

    +
    burgers = if guest = [@Arthur] then 3
    +          else if guest = [#hungry] then 2
    +          else if guest = [#vegetarian] then 0
    +          else 1
    +
    + +

    Multiple returns

    +
    (burgers, status) = if guest = [@Arthur] then (3, #fed)
    +                    else if guest = [#hungry] then (2, #fed)
    +                    else if guest = [#vegetarian] then (0, #needsfood)
    +                    else (1, #fed)
    +
    + +

    See Also

    + +

    expressions | records | functions

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/index.html b/v0.2/handbook/index.html new file mode 100644 index 0000000..a8ef677 --- /dev/null +++ b/v0.2/handbook/index.html @@ -0,0 +1,781 @@ + + + + + + + + + + + + Handbooks - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + +
    + +
    +
    diff --git a/v0.2/handbook/index.xml b/v0.2/handbook/index.xml new file mode 100644 index 0000000..64de6ae --- /dev/null +++ b/v0.2/handbook/index.xml @@ -0,0 +1,660 @@ + + + + Handbooks on Eve Documentation + http://docs-next.witheve.com/v0.2//handbook/ + Recent content in Handbooks on Eve Documentation + Hugo -- gohugo.io + en-us + + + + + http://docs-next.witheve.com/v0.2//handbook/core/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/core/ + + +<h1 id="core-language">Core Language</h1> + +<h2 id="see-also">See Also</h2> + +<p><a href="../records">records</a> | <a href="../equivalence">equivalence</a> | <a href="../actions">actions</a> | <a href="../expressions">expressions</a> | <a href="../update-operators">update operators</a> | <a href="../databases">databases</a></p> + + + + + + http://docs-next.witheve.com/v0.2//handbook/databases/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/databases/ + + +<h1 id="databases">Databases</h1> + +<p>Databases contain records</p> + +<h2 id="syntax">Syntax</h2> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// search action</span><span class="w"></span> +<span class="kr">search</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> + +<span class="c1">// Commit action</span><span class="w"></span> +<span class="kr">commit</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> + +<span class="c1">// Bind action</span><span class="w"></span> +<span class="kr">bind</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> +</code></pre></div> + +<h2 id="description">Description</h2> + +<p><code>&lt;action&gt; @database</code> performs the given action, one of <code>search</code>, <code>bind</code>, or <code>commit</code>, on the union of the provided databases.</p> + +<p>If no database is provided with an action, then that action is performed on the default <code>@session</code> database.</p> + +<h2 id="creating-and-searching-databases">Creating and Searching Databases</h2> + +<p>You can create databases on-demand by simply committing a record to one. e.g.</p> + +<pre><code>commit @my-database + [#my-record] +</code></pre> + +<p>This block will create a new database called &ldquo;my-database&rdquo;, which will contain the newly committed record. You can now search for this record in your new database:</p> + +<pre><code>search @my-database + [#my-record] + +bind @browser + [#div text: &quot;Found a record!&quot;] +</code></pre> + +<h2 id="special-databases">Special Databases</h2> + +<p>Eve has some built-in databases that have meaning to the runtime.</p> + +<ul> +<li><a href="../session">@session</a> - the default database when no database is specified with an action.</li> +<li><a href="../view">@view</a> - records committed to <code>@view</code> are used to visualize data.</li> +<li><a href="../event">@event</a> - contains events originating from the DOM</li> +<li><a href="../browser">@browser</a> - Eve clients running in the browser render applicable records in this <code>@browser</code> as HTML elements.</li> +<li><a href="../http">@http</a> - Stores records representing HTTP requests and responses</li> +</ul> + +<h2 id="examples">Examples</h2> + +<p>Display the element that was clicked in the DOM</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@event</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#click</span><span class="w"> </span><span class="nt">#direct-target</span><span class="w"> </span><span class="x">element</span><span class="p">]</span><span class="w"></span> + +<span class="kr">commit</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{element}} was clicked.&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Commit some data in <code>@session</code>, and then display it on a button click.</p> + +<pre><code>commit + [#for-display text: &quot;Hello&quot;] +</code></pre> + +<p>We are searching over three databases to complete this block.</p> + +<ul> +<li>the <code>#click</code> is in <code>@event</code></li> +<li>the <code>#button</code> is in <code>@browser</code></li> +<li>the text for display is in <code>@session</code>. This needs to be made explicit; since we are searching in other databases, <code>@session</code> is not searched implicitly.</li> +</ul> + +<pre><code>search @event @browser @session + [#click element: [#button]] + [#for-display text] + +commit @browser + [#div text] +</code></pre> + +<p>This block could have been written with two searches for the same effect:</p> + +<pre><code>search @event @browser + [#click element: [#button]] + +search + [#for-display text] + +commit @browser + [#div text] +</code></pre> + +<h2 id="see-also">See Also</h2> + +<p><a href="../search">search</a> | <a href="../bind">bind</a> | <a href="../commit">commit</a></p> + + + + + + http://docs-next.witheve.com/v0.2//handbook/intro/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/intro/ + + +<h1 id="introduction">Introduction</h1> + +<h2 id="notable-features">Notable Features</h2> + +<ul> +<li><p>Eve programs aren&rsquo;t talking to a database, they <em>are</em> the database. That means no plumbing, no impedance mismatch, and no extra infrastructure is needed.</p></li> + +<li><p>Everything is data. The file system, http requests, the DOM&hellip; That means everything can be queried and everything can be reacted to.</p></li> + +<li><p>Eve&rsquo;s semantics were built for concurrency, asynchrony, and distribution. There are no promises, or thread synchronizations, or borrows.</p></li> + +<li><p>Eve programs practice literate programming, since there&rsquo;s no incidental ordering imposed by the language.</p></li> + +<li><p>Another result of a lack of ordering is that programs grow very organically through composition.</p></li> + +<li><p>Eve programs are naturally tiny.</p></li> + +<li><p>Correctness can be defined globally through integrity constraints, allowing people to safely contribute to an application without worrying about checking every possible invariant locally.</p></li> +</ul> + +<h2 id="see-also">See Also</h2> + +<p><a href="../installation">getting eve</a> | <a href="../running">running eve</a> | <a href="../programs">eve programs</a> | <a href="../core">core language</a></p> + + + + + + http://docs-next.witheve.com/v0.2//handbook/programs/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/programs/ + + +<h1 id="eve-programs">Eve Programs</h1> + +<p>Coming soon&hellip;</p> + +<h2 id="see-also">See Also</h2> + +<p><a href="../model">programming model</a> | <a href="../literate-programming">literate programming</a> | <a href="../blocks">blocks</a></p> + + + + + Linux + http://docs-next.witheve.com/v0.2//handbook/linux/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/linux/ + + +<h1 id="installing-eve-on-linux">Installing Eve on Linux</h1> + +<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> + +<pre><code>npm install +npm start +</code></pre> + +<p>Then open <code>http://localhost:8080/</code> in your browser.</p> + +<h2 id="tips">Tips</h2> + +<p>Some distributions (most notably Ubuntu) have renamed <code>node</code> to <code>nodejs</code>. If this is the case, you&rsquo;ll need to create a symlink that remaps nodejs back to node. e.g.</p> + +<pre><code>ln -s /usr/bin/nodejs /usr/bin/node +</code></pre> + +<p>Then proceed with the installation as usual</p> + +<h2 id="see-also">See also</h2> + +<p><a href="../mac">mac</a> | <a href="../windows">windows</a> | <a href="../docker">docker</a> | <a href="../running">running</a></p> + + + + + Mac + http://docs-next.witheve.com/v0.2//handbook/mac/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/mac/ + + +<h1 id="installing-eve-on-mac">Installing Eve on Mac</h1> + +<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> + +<pre><code>npm install +npm start +</code></pre> + +<p>Then open <code>http://localhost:8080/</code> in your browser.</p> + +<h2 id="see-also">See also</h2> + +<p><a href="../linux">linux</a> | <a href="../windows">windows</a> | <a href="../docker">docker</a> | <a href="../npm">npm</a> | <a href="../running">running</a></p> + + + + + Standard Library + http://docs-next.witheve.com/v0.2//handbook/standard-library/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/standard-library/ + + +<h1 id="standard-library">Standard Library</h1> + +<p>The Eve standard library of functions is globally available, meaning you don&rsquo;t have to reference a specific database to use these functions.</p> + +<h2 id="description">Description</h2> + +<ul> +<li><a href="../general">general</a> - General functions</li> +<li><a href="../math">math</a> - General mathematical and trigonometric functions</li> +<li><a href="../strings">strings</a> - Functions that manipulate strings</li> +<li><a href="../statistics">statistics</a> - Functions that calculate statistical measures on values</li> +<li><a href="../datetime">date &amp; time</a> - Functions that get and manipulate date and time</li> +</ul> + + + + + Windows + http://docs-next.witheve.com/v0.2//handbook/windows/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/windows/ + + +<h1 id="installing-eve-on-windows">Installing Eve on Windows</h1> + +<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> + +<pre><code>npm install +npm start +</code></pre> + +<p>Then open <code>http://localhost:8080/</code> in your browser.</p> + +<h2 id="see-also">See also</h2> + +<p><a href="../linux">linux</a> | <a href="../mac">mac</a> | <a href="../docker">docker</a> | <a href="../npm">npm</a> | <a href="../running">running</a></p> + + + + + abs + http://docs-next.witheve.com/v0.2//handbook/math/abs/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/math/abs/ + + +<h1 id="abs">abs</h1> + +<p>The absolute value of a number</p> + +<h2 id="syntax">Syntax</h2> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">abs</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="attributes">Attributes</h2> + +<ul> +<li><code>value</code> - a set of numbers</li> +</ul> + +<h2 id="description">Description</h2> + +<p><code>y = abs[value]</code> returns the absolute value of the elements in <code>value</code>. Every positive number is kept positive, but every negative number is made positive.</p> + +<h2 id="examples">Examples</h2> + +<p>Get the absolute value of a number</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">abs</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="nf">-</span><span class="m">3</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span> +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Displays the number <code>3</code>.</p> + +<h2 id="see-also">See Also</h2> + +<p><a href="../sign">sign</a></p> + + + + + ceiling + http://docs-next.witheve.com/v0.2//handbook/math/ceil/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/math/ceil/ + + +<h1 id="ceiling">ceiling</h1> + +<p>Round a number up to the nearest integer.</p> + +<h2 id="syntax">Syntax</h2> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">ceiling</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="attributes">Attributes</h2> + +<ul> +<li><code>value</code> - a set of numbers</li> +</ul> + +<h2 id="description">Description</h2> + +<p><code>y = ceiling[value]</code> rounds the elements of <code>value</code> up to the nearest integers.</p> + +<h2 id="examples">Examples</h2> + +<p>Calculate the ceiling of <code>34.2</code></p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">ceiling</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="m">34</span><span class="x">.</span><span class="m">2</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span> +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>The result is <code>35</code>.</p> + +<h2 id="see-also">See Also</h2> + +<p><a href="../floor">floor</a> | <a href="../fix">fix</a> | <a href="../round">round</a></p> + + + + + click + http://docs-next.witheve.com/v0.2//handbook/event/click/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/event/click/ + + +<h1 id="click">click</h1> + +<p>click event</p> + +<h2 id="syntax">Syntax</h2> + +<pre><code>[#click] +[#click element] +[#click #direct-target element] +</code></pre> + +<h2 id="attributes">Attributes</h2> + +<ul> +<li><code>#direct-target</code> - selects only directly clicked elements, as opposed to elements to which the event bubbles.</li> +<li><code>element</code> - the element that was clicked.</li> +</ul> + +<h2 id="description">Description</h2> + +<p>When an element in the DOM is clicked, a <code>#click</code> record is created in the <code>@event</code> database.</p> + +<h2 id="examples">Examples</h2> + +<h2 id="see-also">See Also</h2> + + + + + cos + http://docs-next.witheve.com/v0.2//handbook/math/cos/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/math/cos/ + + +<h1 id="cos">cos</h1> + +<p>Calculate the cosine of an angle</p> + +<h2 id="syntax">Syntax</h2> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">cos</span><span class="p">[</span><span class="x">radians</span><span class="p">]</span><span class="w"></span> +<span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">cos</span><span class="p">[</span><span class="x">degrees</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="attributes">Attributes</h2> + +<ul> +<li><code>radians</code> - the angle in radians</li> +<li><code>degrees</code> - the angle in degrees</li> +</ul> + +<h2 id="description">Description</h2> + +<p><code>y = cos[degrees]</code> calculates the cosine of an input in degrees.</p> + +<p><code>y = cos[radians]</code> calculates the cosine of an input in radians.</p> + +<p><code>cos</code> operates element-wise on its inputs.</p> + +<h2 id="examples">Examples</h2> + +<p>Calculate the cosine of 90 degrees</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">cos</span><span class="p">[</span><span class="x">degrees</span><span class="nf">:</span><span class="w"> </span><span class="m">90</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span> +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="see-also">See Also</h2> + +<p><a href="../sin">sin</a> | <a href="../tan">tan</a></p> + + + + + count + http://docs-next.witheve.com/v0.2//handbook/statistics/count/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/statistics/count/ + + +<h1 id="count">count</h1> + +<p>Returns the number of elements in a set</p> + +<h2 id="syntax">Syntax</h2> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="p">]</span><span class="w"></span> +<span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="attributes">Attributes</h2> + +<ul> +<li><code>given</code> - the set to count over</li> +<li><code>per</code> - <em>optional</em> - one or more attributes by which to group <code>given</code>.</li> +</ul> + +<h2 id="description">Description</h2> + +<p><code>y = count[given]</code> counts the number of elements in <code>given</code>.</p> + +<p><code>y = count[given, per]</code> counts the number of elements in <code>given</code>, grouped by the attribute(s) provided in <code>per</code>. For instance, <code>class-size = count[given: students, per: grade]</code> would count the number of students in each grade. You can group along multiple axes; the previous example could be extended to work across multiple schools by doing <code>class-size = count[given: students, per: (grade, school)]</code>. See the examples section to see these in action.</p> + +<h2 id="examples">Examples</h2> + +<p>Before we get to the <code>count</code> examples, let&rsquo;s add some students. Each <code>#student</code> has a <code>grade</code> and a <code>school</code>. Grades are one of 10, 11, or 12. Schools are one of &ldquo;West&rdquo; and &ldquo;East&rdquo;.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Diedra&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Celia&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Michaela&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">11</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Jermaine&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">11</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Issac&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">12</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Jamar&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">12</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Yee&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Johanne&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Mertie&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Elmira&quot;</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">11</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>First let&rsquo;s count the total number of students in the school district.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="x">enrollment</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@view</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#value</span><span class="w"> </span><span class="x">|</span><span class="w"> </span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;There are {{enrollment}} students in the district&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Now let&rsquo;s count the number of students in each school.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="x">school</span><span class="nf">-</span><span class="x">enrollment</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@view</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#value</span><span class="w"> </span><span class="x">|</span><span class="w"> </span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{school-enrollment}} attend {{school}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>We could have similarly counted the number of students in each grade across the district.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">grade</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="x">grade</span><span class="nf">-</span><span class="x">enrollment</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="x">grade</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@view</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#value</span><span class="w"> </span><span class="x">|</span><span class="w"> </span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{grade-enrollment}} students are in {{grade}}th grade&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Finally, we can count the number of students per grade, per school.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="x">grade</span><span class="nf">-</span><span class="x">school</span><span class="nf">-</span><span class="x">enrollment</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="p">(</span><span class="x">grade</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="p">)]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@view</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#value</span><span class="w"> </span><span class="x">|</span><span class="w"> </span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{grade-school-enrollment}} students are in {{grade}}th grade at {{school}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h3 id="example-usage">Example Usage</h3> + +<ul> +<li><a href="http://play.witheve.com/#/examples/todomvc.eve">TodoMVC</a></li> +<li><a href="http://play.witheve.com/#/examples/tic-tac-toe.eve">Tic-Tac-Toe</a></li> +</ul> + +<h2 id="see-also">See Also</h2> + +<p><a href="../../math/sum">sum</a> | <a href="../../aggregates">aggregates</a></p> + + + + + fix + http://docs-next.witheve.com/v0.2//handbook/math/fix/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/math/fix/ + + +<h1 id="fix">fix</h1> + +<p>Round a number toward zero.</p> + +<h2 id="syntax">Syntax</h2> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">fix</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="attributes">Attributes</h2> + +<ul> +<li><code>value</code> - a set of numbers</li> +</ul> + +<h2 id="description">Description</h2> + +<p><code>y = fix[value]</code> rounds the elements of <code>value</code> toward zero. This means that negative numbers will be rounded up to the nearest integer, while positive numbers will be rounded down.</p> + +<h2 id="examples">Examples</h2> + +<p>Calculate the fix of <code>34.7</code> and <code>-34.7</code></p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">fix</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="m">34</span><span class="x">.</span><span class="m">7</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="x">z</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">fix</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="nf">-</span><span class="m">34</span><span class="x">.</span><span class="m">7</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;The fix of 34.7 is {{y}}&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;The fix of -34.7 is {{z}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>We see that the fix of <code>34.7</code> is <code>34</code>, while the fix of <code>-34.7</code> is <code>-34</code>. Compare this to rounding the numbers:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">round</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="m">34</span><span class="x">.</span><span class="m">7</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="x">z</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">round</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="nf">-</span><span class="m">34</span><span class="x">.</span><span class="m">7</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;The round of 34.7 is {{y}}&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;The round of -34.7 is {{z}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>We see that the round of <code>34.7</code> is <code>35</code>, while the round of <code>-34.7</code> is <code>-35</code>.</p> + +<h2 id="see-also">See Also</h2> + +<p><a href="../floor">floor</a> | <a href="../ceil">ceil</a> | <a href="../round">round</a></p> + + + + + floor + http://docs-next.witheve.com/v0.2//handbook/math/floor/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//handbook/math/floor/ + + +<h1 id="floor">floor</h1> + +<p>Round a number down to the nearest integer.</p> + +<h2 id="syntax">Syntax</h2> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">floor</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="attributes">Attributes</h2> + +<ul> +<li><code>value</code> - a set of numbers</li> +</ul> + +<h2 id="description">Description</h2> + +<p><code>y = floor[value]</code> rounds the elements of <code>value</code> down to the nearest integers.</p> + +<h2 id="examples">Examples</h2> + +<p>Calculate the floor of <code>34.2</code></p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">floor</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="m">34</span><span class="x">.</span><span class="m">2</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>The result is <code>34</code>.</p> + +<h2 id="see-also">See Also</h2> + +<p><a href="ceil.md">ceil</a> | <a href="fix.md">fix</a> | <a href="round.md">round</a></p> + + + + + \ No newline at end of file diff --git a/v0.2/handbook/inequality/index.html b/v0.2/handbook/inequality/index.html new file mode 100644 index 0000000..f52beb3 --- /dev/null +++ b/v0.2/handbook/inequality/index.html @@ -0,0 +1,428 @@ + + + + + + + + + + + + Inequality - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Inequality

    + +

    inequality operators filter records

    + +

    Syntax

    +
    // Inequality Operators
    +>, >=, <, <=, !=
    +
    +// Inside of records
    +[attribute >= value]
    +[attribute >= variable]
    +
    +// Outside of records
    +variable >= value
    +variable >= variable
    +
    +// Satisfy multiple constraints in a single line
    +value <= variable <= value   
    +variable <= variable <= variable
    +
    + +

    Description

    + +

    Attributes can be filtered using inequality operators, including >, >=, <, <= and !=.

    + +

    >, >=, <, <= can only filter using values that can be sorted. For instance, you can use these operators to filter numbers, but you cannot filter records this way.

    + +

    != tests only for inequality, and doesn’t compare whether an attribute is greater or less than a particular value. Therefore, != can be used to filter any value.

    + +

    You can use inequality operators inside records or outside of them. Inside of records, you can filter an attribute on a single value. Outside of records, you have more freedom to filter on multiple values. For instance, if you want only records with an attribute between a maximum and minimum value, you can write something like min-value < variable < max-value.

    + +

    Examples

    + +

    Select students with a low GPA

    +
    search @test-data
    +  [#student name GPA < 2.0]
    +
    +bind @browser
    +  [#div text: "{{name}} needs a tutor."]
    +
    + +

    Select students with a GPA over 2.0 but less than 3.0

    +
    search @test-data
    +  [#student name GPA]
    +  2.0 <= GPA < 3.0
    +
    +bind @browser
    +  [#div text: "{{name}} is doing fine"]
    +
    + +

    You can be very specific with filters. Select students named “John” in 11th or 12th grade with a GPA between 2.0 and 3.0, and who don’t attend “West” high school.

    +
    search @test-data
    +  students = [#student name: "John", grade >= 11, school != "West" ]
    +  2.0 <= students.GPA < 3.0
    +
    +bind @browser
    +  [#div text: "{{name}} is doing fine"]  
    +
    + +

    See Also

    + +

    equality | joins | equivalence

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/installation/index.html b/v0.2/handbook/installation/index.html new file mode 100644 index 0000000..2799bd1 --- /dev/null +++ b/v0.2/handbook/installation/index.html @@ -0,0 +1,380 @@ + + + + + + + + + + + + Getting Eve - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    + diff --git a/v0.2/handbook/intro/index.html b/v0.2/handbook/intro/index.html new file mode 100644 index 0000000..431d471 --- /dev/null +++ b/v0.2/handbook/intro/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Introduction

    + +

    Notable Features

    + +
      +
    • Eve programs aren’t talking to a database, they are the database. That means no plumbing, no impedance mismatch, and no extra infrastructure is needed.

    • + +
    • Everything is data. The file system, http requests, the DOM… That means everything can be queried and everything can be reacted to.

    • + +
    • Eve’s semantics were built for concurrency, asynchrony, and distribution. There are no promises, or thread synchronizations, or borrows.

    • + +
    • Eve programs practice literate programming, since there’s no incidental ordering imposed by the language.

    • + +
    • Another result of a lack of ordering is that programs grow very organically through composition.

    • + +
    • Eve programs are naturally tiny.

    • + +
    • Correctness can be defined globally through integrity constraints, allowing people to safely contribute to an application without worrying about checking every possible invariant locally.

    • +
    + +

    See Also

    + +

    getting eve | running eve | eve programs | core language

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/is/index.html b/v0.2/handbook/is/index.html new file mode 100644 index 0000000..e9ddc06 --- /dev/null +++ b/v0.2/handbook/is/index.html @@ -0,0 +1,400 @@ + + + + + + + + + + + + is - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    is

    + +

    Tests the truth of a statement

    + +

    Syntax

    +
    y = is( ... )
    +
    + +

    Description

    + +

    y = is( ... ) tests the truth of the statement contained in the parentheses. If the statement is true, then is returns the value true, otherwise it returns false.

    + +

    Examples

    +
    search
    +  x = 10
    +  y = is(20 = x)
    +  z = is(20 = x * 2)
    +
    +bind @browser
    +  [#div text: "y is {{y}}"]
    +  [#div text: "z is {{z}}"]
    +
    + +

    The output shows that y is false while z is true.

    + +

    Example Usage

    + + + +

    See Also

    + +

    not | records | expressions

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/joins/index.html b/v0.2/handbook/joins/index.html new file mode 100644 index 0000000..3191518 --- /dev/null +++ b/v0.2/handbook/joins/index.html @@ -0,0 +1,387 @@ + + + + + + + + + + + + Joins - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Joins

    + +

    joins allow you to relate two records

    + +

    Syntax

    +
    // Join two records using a bind
    +[#record1 attribute1]
    +[#record2 attribute2: attribute1]
    +
    +// Join two records using a name
    +[#record1 attribute]
    +[#record2 attribute]
    +
    + +

    Description

    + +

    Examples

    + +

    See Also

    + +

    equality | inequality | records

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/linux/index.html b/v0.2/handbook/linux/index.html new file mode 100644 index 0000000..9e71bf5 --- /dev/null +++ b/v0.2/handbook/linux/index.html @@ -0,0 +1,388 @@ + + + + + + + + + + + + Linux - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Installing Eve on Linux

    + +

    First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

    + +
    npm install
    +npm start
    +
    + +

    Then open http://localhost:8080/ in your browser.

    + +

    Tips

    + +

    Some distributions (most notably Ubuntu) have renamed node to nodejs. If this is the case, you’ll need to create a symlink that remaps nodejs back to node. e.g.

    + +
    ln -s /usr/bin/nodejs /usr/bin/node
    +
    + +

    Then proceed with the installation as usual

    + +

    See also

    + +

    mac | windows | docker | running

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/literate-programming/index.html b/v0.2/handbook/literate-programming/index.html new file mode 100644 index 0000000..fa977b5 --- /dev/null +++ b/v0.2/handbook/literate-programming/index.html @@ -0,0 +1,404 @@ + + + + + + + + + + + + Literate Programming - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Literate Programming

    + +

    In the spirit of literate programming, Eve programs are primarily prose, interleaved with Eve code. Donald Knuth explains literate programming in his influential paper:

    + +
    +

    The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. Such an author … strives for a program that is comprehensible because its concepts have been introduced in an order that is best for human understanding, using a mixture of formal and informal methods that reinforce each other.

    +
    + +

    This description fits with the ethos of Eve - that programming is primarily meant to communicate with other humans, not the computer. You’ll notice the above Eve program is actually written in two languages: Markdown, used to format the prose; and Eve, which is delineated by standard Markdown code blocks. Only the content within a block is compiled, while everything else is disregarded as a comment.

    + +

    Writing code this way has several properties that result in higher quality programs:

    + +
      +
    • Literate programming forces you to consider a human audience. While this is usually the first step in writing any document, in programming the audience is typically a machine. For an Eve program, the audience might be your collaborators, your boss, or even your future self when revisiting the program in a year. By considering the audience of your program source, you create an anchor from which the narrative of your program flows, leading to a more coherent document.

    • + +
    • The human brain is wired to engage with and remember stories. Think back to a book you read (or maybe a show you watched) last year. You probably remember in great detail all of the characters and their personalities, the pivotal moments of the plot, the descriptions of the various settings, etc. But how much can you remember of a piece of code you haven’t looked at for a year? Literate programming adds another dimension to your code that will help you keep more of your program in working memory.

    • + +
    • Since Eve code blocks can be arranged in any order, literate programming encourages the programmer to arrange them in an way that makes narrative sense. Code can have a beginning, middle, and end just like a short story. Or like an epic novel, code can have many interwoven storylines. Either way, the structure of the code should follow an order imposed by a narrative, not one imposed by the compiler.

    • + +
    • Literate programming can help you think about your program more thoroughly. Through practicing literate programming, you can reveal edge cases, incorrect assumptions, gaps in understanding the problem domain, and shaky implementation details before any code is even written.

    • +
    + +

    Literate programming is a first-class design concept in Eve. We will be writing all of our programs in this manner, and will encourage others to do the same for the reasons above. That said, there is nothing in the syntax that specifically requires literate programming; you can write your program as a series of code blocks without any prose, and it will be perfectly valid.

    + +

    CommonMark

    + +

    Eve is CommonMark compatible.

    + +

    Examples

    + + + +

    See Also

    + +

    blocks | programming model | CommonMark

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/mac/index.html b/v0.2/handbook/mac/index.html new file mode 100644 index 0000000..109f7d8 --- /dev/null +++ b/v0.2/handbook/mac/index.html @@ -0,0 +1,379 @@ + + + + + + + + + + + + Mac - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Installing Eve on Mac

    + +

    First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

    + +
    npm install
    +npm start
    +
    + +

    Then open http://localhost:8080/ in your browser.

    + +

    See also

    + +

    linux | windows | docker | npm | running

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/abs/index.html b/v0.2/handbook/math/abs/index.html new file mode 100644 index 0000000..aecf923 --- /dev/null +++ b/v0.2/handbook/math/abs/index.html @@ -0,0 +1,399 @@ + + + + + + + + + + + + abs - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    abs

    + +

    The absolute value of a number

    + +

    Syntax

    +
    y = abs[value]
    +
    + +

    Attributes

    + +
      +
    • value - a set of numbers
    • +
    + +

    Description

    + +

    y = abs[value] returns the absolute value of the elements in value. Every positive number is kept positive, but every negative number is made positive.

    + +

    Examples

    + +

    Get the absolute value of a number

    +
    search
    +  y = abs[value: -3]
    +  
    +bind @browser
    +  [#div text: y]
    +
    + +

    Displays the number 3.

    + +

    See Also

    + +

    sign

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/ceil/index.html b/v0.2/handbook/math/ceil/index.html new file mode 100644 index 0000000..e576d7d --- /dev/null +++ b/v0.2/handbook/math/ceil/index.html @@ -0,0 +1,399 @@ + + + + + + + + + + + + ceiling - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    ceiling

    + +

    Round a number up to the nearest integer.

    + +

    Syntax

    +
    y = ceiling[value]
    +
    + +

    Attributes

    + +
      +
    • value - a set of numbers
    • +
    + +

    Description

    + +

    y = ceiling[value] rounds the elements of value up to the nearest integers.

    + +

    Examples

    + +

    Calculate the ceiling of 34.2

    +
    search
    +  y = ceiling[value: 34.2]
    +  
    +bind @browser
    +  [#div text: y]
    +
    + +

    The result is 35.

    + +

    See Also

    + +

    floor | fix | round

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/cos/index.html b/v0.2/handbook/math/cos/index.html new file mode 100644 index 0000000..219a9f2 --- /dev/null +++ b/v0.2/handbook/math/cos/index.html @@ -0,0 +1,403 @@ + + + + + + + + + + + + cos - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    cos

    + +

    Calculate the cosine of an angle

    + +

    Syntax

    +
    y = cos[radians]
    +y = cos[degrees]
    +
    + +

    Attributes

    + +
      +
    • radians - the angle in radians
    • +
    • degrees - the angle in degrees
    • +
    + +

    Description

    + +

    y = cos[degrees] calculates the cosine of an input in degrees.

    + +

    y = cos[radians] calculates the cosine of an input in radians.

    + +

    cos operates element-wise on its inputs.

    + +

    Examples

    + +

    Calculate the cosine of 90 degrees

    +
    search
    +  y = cos[degrees: 90]
    +  
    +bind @browser
    +  [#div text: y]
    +
    + +

    See Also

    + +

    sin | tan

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/fix/index.html b/v0.2/handbook/math/fix/index.html new file mode 100644 index 0000000..1146b6f --- /dev/null +++ b/v0.2/handbook/math/fix/index.html @@ -0,0 +1,411 @@ + + + + + + + + + + + + fix - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    fix

    + +

    Round a number toward zero.

    + +

    Syntax

    +
    y = fix[value]
    +
    + +

    Attributes

    + +
      +
    • value - a set of numbers
    • +
    + +

    Description

    + +

    y = fix[value] rounds the elements of value toward zero. This means that negative numbers will be rounded up to the nearest integer, while positive numbers will be rounded down.

    + +

    Examples

    + +

    Calculate the fix of 34.7 and -34.7

    +
    search
    +  y = fix[value: 34.7]
    +  z = fix[value: -34.7]
    +
    +bind @browser
    +  [#div text: "The fix of 34.7 is {{y}}"]
    +  [#div text: "The fix of -34.7 is {{z}}"]
    +
    + +

    We see that the fix of 34.7 is 34, while the fix of -34.7 is -34. Compare this to rounding the numbers:

    +
    search
    +  y = round[value: 34.7]
    +  z = round[value: -34.7]
    +
    +bind @browser
    +  [#div text: "The round of 34.7 is {{y}}"]
    +  [#div text: "The round of -34.7 is {{z}}"]
    +
    + +

    We see that the round of 34.7 is 35, while the round of -34.7 is -35.

    + +

    See Also

    + +

    floor | ceil | round

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/floor/index.html b/v0.2/handbook/math/floor/index.html new file mode 100644 index 0000000..37335b8 --- /dev/null +++ b/v0.2/handbook/math/floor/index.html @@ -0,0 +1,399 @@ + + + + + + + + + + + + floor - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    floor

    + +

    Round a number down to the nearest integer.

    + +

    Syntax

    +
    y = floor[value]
    +
    + +

    Attributes

    + +
      +
    • value - a set of numbers
    • +
    + +

    Description

    + +

    y = floor[value] rounds the elements of value down to the nearest integers.

    + +

    Examples

    + +

    Calculate the floor of 34.2

    +
    search
    +  y = floor[value: 34.2]
    +
    +bind @browser
    +  [#div text: y]
    +
    + +

    The result is 34.

    + +

    See Also

    + +

    ceil | fix | round

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/index.html b/v0.2/handbook/math/index.html new file mode 100644 index 0000000..7fb0831 --- /dev/null +++ b/v0.2/handbook/math/index.html @@ -0,0 +1,418 @@ + + + + + + + + + + + + Math - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Math

    + +

    Arithmetic

    + +
      +
    • plus ( + ) - Add two numbers
    • +
    • minus ( - ) - Subtract two numbers
    • +
    • times ( * ) - Multiply two numbers
    • +
    • divide ( / ) - Divide two numbers
    • +
    + +

    General Math

    + +
      +
    • abs - Absolute value
    • +
    • ceiling - Round a number up
    • +
    • floor - Round a number down
    • +
    • round - Round a number
    • +
    • fix - Calculate the fix of a number
    • +
    • mod - Modulo division
    • +
    • exp - The number e raised to a power
    • +
    • log - Calculate the logarithm of a number
    • +
    + +

    Trigonometric Functions

    + +
      +
    • sin - Sine of an angle
    • +
    • cos - Cosine of an angle
    • +
    • tan - Tangent of an angle
    • +
    • asin - Arc sine of an angle
    • +
    • acos - Arc cosine of an angle
    • +
    • atan - Arc tangent of an angle
    • +
    • atan2 - Arc tangent using sign to determine quadrant
    • +
    + +

    Hyperbolic Functions

    + +
      +
    • sinh - Hyperbolic sine of an angle
    • +
    • cosh - Hyperbolic cosine of an angle
    • +
    • tanh - Hyperbolic tangent of an angle
    • +
    • asinh - Hyperbolic arc sine of an angle
    • +
    • acosh - Hyperbolic arc cosine of an angle
    • +
    • atanh - Hyperbolic arc tangent of an angle
    • +
    + +

    Other Functions

    + +
      +
    • range - Generates a range of numbers
    • +
    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/mod/index.html b/v0.2/handbook/math/mod/index.html new file mode 100644 index 0000000..b210a6c --- /dev/null +++ b/v0.2/handbook/math/mod/index.html @@ -0,0 +1,402 @@ + + + + + + + + + + + + mod - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    mod

    + +

    Return the modulus after division

    + +

    Syntax

    +
    y = mod[value, by]
    +
    + +

    Attributes

    + +
      +
    • value - the number to be divided
    • +
    • by - the number by which to divide value
    • +
    + +

    Description

    + +

    Modulo division calculates the modulus (the remainder) after dividing value by by. If value is a set of size N, then by can either be a scalar or another set of size N.

    + +

    Examples

    + +

    Keeps the value of an angle between the range [π, -π]:

    +
    search
    +  value = 30
    +  angle = mod[value, by: 2 * pi[]]
    +  pi2pi = if angle > pi[] then angle - 2 * pi[]
    +          if angle < pi[] * -1 then angle + 2 * pi[]
    +          else angle
    +        
    +bind @view
    +  [#value | value: "{{value}} -> {{pi2pi}}"]
    +
    + +

    See Also

    + +

    ceil | floor | round

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/range/index.html b/v0.2/handbook/math/range/index.html new file mode 100644 index 0000000..e120a7a --- /dev/null +++ b/v0.2/handbook/math/range/index.html @@ -0,0 +1,434 @@ + + + + + + + + + + + + range - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    range

    + +

    Generates a set of numbers between two values

    + +

    Syntax

    +
    y = range[from, to]
    +y = range[from, to, increment]
    +
    + +

    Attributes

    + +
      +
    • from - the start of the range. Does not need to be an integer.
    • +
    • to - the end of the range. Does not need to be an integer.
    • +
    • increment - specifies the increment by which the elements are separated. By default, this value is 1.
    • +
    + +

    Description

    + +

    y = range[from, to] generates a set of numbers starting at from and ending at to, in increments of 1. The range generated includes from and to.

    + +

    y = range[from, to, increment] generates a set of numbers starting at from and ending at to inclusive, at a specified increment. The range generated will start at from and include as many elements as possible until the next element exceeds to. Depending on the chosen increment, this could potentially exclude to from the generated range.

    + +

    Examples

    + +

    Generate and display the integers between 1 and 10. In this example, y = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10):

    +
    search
    +  y = range[from: 1, to: 10]
    +
    +bind @browser
    +  [#div sort: y, text: y]
    +
    + +

    Generate and display the odd integers between 1 and 10. In this example, y = (1, 3, 5, 7, 9). Notice the set does not include 10 in this case.

    +
    search
    +  y = range[from: 1, to: 10, increment: 2]
    +
    +bind @browser
    +  [#div sort: y, text: y]
    +
    + +

    We can use range and Eve’s join semantics to generate indicies for a grid of cells.

    +
    search
    +  i = range[from: 1 to: 5]
    +  j = range[from: 1 to: 5]
    +  coordinate = "({{i}}, {{j}})"
    +
    +bind @browser
    +  [#div sort: coordinate, text: coordinate]
    +
    + +

    Will display:

    + +
    (1, 1)
    +(1, 2)
    +(1, 3)
    +...
    +(5, 4)
    +(5, 5)
    +
    + +

    Example Usage

    + + + +

    See Also

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/round/index.html b/v0.2/handbook/math/round/index.html new file mode 100644 index 0000000..d3d66b9 --- /dev/null +++ b/v0.2/handbook/math/round/index.html @@ -0,0 +1,402 @@ + + + + + + + + + + + + round - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    round

    + +

    Round a number to the nearest integer

    + +

    Syntax

    +
    y = round[value]
    +
    + +

    Attributes

    + +
      +
    • value - a set of numbers
    • +
    + +

    Description

    + +

    y = round[value] rounds the elements of value toward the nearest integers.

    + +
      +
    • For positive numbers - if the fractional part of the number is greater than or equal to 0.5, then the number is rounded up. Otherwise, it is rounded down.
    • +
    • For negative numbers - if the fractional part of the number is greater than or equal to -0.5, then the number is rounded down to the nearest negative integer. Otherwise, it is rounded up.
    • +
    + +

    Examples

    +
    search
    +  y = round[value: 34.5]
    +  z = round[value: 34.4]
    +  
    +bind @browser
    +  [#div text: "The round of 34.5 is {{y}}"]
    +  [#div text: "The round of 34.4 is {{z}}"]
    +
    + +

    See Also

    + +

    floor | ceil | fix

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/sin/index.html b/v0.2/handbook/math/sin/index.html new file mode 100644 index 0000000..d4584ee --- /dev/null +++ b/v0.2/handbook/math/sin/index.html @@ -0,0 +1,403 @@ + + + + + + + + + + + + sin - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    sin

    + +

    Calculate the sine of an angle

    + +

    Syntax

    +
    y = sin[radians]
    +y = sin[degrees]
    +
    + +

    Attributes

    + +
      +
    • radians - the angle in radians
    • +
    • degrees - the angle in degrees
    • +
    + +

    Description

    + +

    y = sin[degrees] calculates the sine of an input in degrees.

    + +

    y = sin[radians] calculates the sine of an input in radians.

    + +

    sin operates element-wise on its inputs.

    + +

    Examples

    +
    search
    +  y = sin[degrees: 90]
    +  x = sin[radians: 3.14 / 2]
    +  
    +bind @browser
    +  [#div text: y]
    +  [#div text: x]
    +
    + +

    See Also

    + +

    cos | tan

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/sum/index.html b/v0.2/handbook/math/sum/index.html new file mode 100644 index 0000000..ee93197 --- /dev/null +++ b/v0.2/handbook/math/sum/index.html @@ -0,0 +1,417 @@ + + + + + + + + + + + + sum - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    sum

    + +

    Sum the elements in a set

    + +

    Syntax

    +
    y = sum[value, given]
    +y = sum[value, given, per]
    +
    + +

    Arguments

    + +
      +
    • value - the variable or attribute to be summed
    • +
    • given - the record from which the value can be accessed
    • +
    • per - optional - specifies the set over which you are summing
    • +
    + +

    Description

    + +

    y = sum[value, given] returns the sum of elements in a set. The set must be entirely numeric or a runtime-error occurs.

    + +

    Examples

    + +

    Context data:

    +
    commit
    +  [#employee salary: 100, department: "hunting"]
    +  [#employee salary: 200, department: "hunting"]
    +  [#employee salary: 300, department: "gathering"]
    +
    + +

    Get sum of all matching records:

    +
    search
    +  employee = [#employee salary department]
    +  total-salary = sum[value:salary, given: employee]
    +
    +bind @browser
    +  [#div text: "Total: {{ total-salary }}" ]
    +
    + +

    Get sum of matching records grouped by department:

    +
    search
    +  employee = [#employee salary department]
    +  total-salary = sum[value:salary, given: employee, per: department]
    +
    +bind @browser
    +  [#div text: "{{department}} : {{ total-salary }}" ]
    +
    + +

    See Also

    + +

    count | aggregates

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/math/tan/index.html b/v0.2/handbook/math/tan/index.html new file mode 100644 index 0000000..8bfb790 --- /dev/null +++ b/v0.2/handbook/math/tan/index.html @@ -0,0 +1,400 @@ + + + + + + + + + + + + tan - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    tan

    + +

    Calculate the tangent of an angle

    + +

    Syntax

    +
    y = tan[radians]
    +y = tan[degrees]
    +
    + +

    Attributes

    + +
      +
    • radians - the angle in radians
    • +
    • degrees - the angle in degrees
    • +
    + +

    Description

    + +

    y = tan[degrees] calculates the tangent of an input in degrees.

    + +

    y = tan[radians] calculates the tangent of an input in radians.

    + +

    tan operates element-wise on its inputs.

    + +

    Examples

    +
    match
    +  y = tan[degrees: 90]
    +bind @browser
    +  [#div text: y]
    +
    + +

    See Also

    + +

    cos | sin

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/merge/index.html b/v0.2/handbook/merge/index.html new file mode 100644 index 0000000..6720247 --- /dev/null +++ b/v0.2/handbook/merge/index.html @@ -0,0 +1,391 @@ + + + + + + + + + + + + Merge <- - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Merge Operator

    + +

    Merges one record into another

    + +

    Syntax

    +
    record <- [attribute: value, ... ]
    +
    + +

    Description

    + +

    record <- [attribute: value, ... ] merges the anonymous record [attribute: value, ... ] into the record bound to record. Merge is useful for setting multiple attributes on a record at once.

    + +

    Examples

    + +

    Search for a record and merge another record into it.

    +
    search
    +  celia = [#Celia]
    +
    +bind
    +  celia <- [#student grade: 10, school: "East"]
    +
    + +

    See Also

    + +

    set operator | add operator | remove operator | action phase

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/model/index.html b/v0.2/handbook/model/index.html new file mode 100644 index 0000000..38489e5 --- /dev/null +++ b/v0.2/handbook/model/index.html @@ -0,0 +1,386 @@ + + + + + + + + + + + + Programming Model - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Programming Model

    + +

    At its core, Eve only responds to two commands:

    + +
      +
    1. What facts do you know about this “record”?
    2. +
    3. Remember a new fact about this “record”.
    4. +
    + +

    Communication with Eve happens through “records”, which are key-value pairs attached to a unique ID.

    + +

    Computation occurs as a result of relationships between records. For example, I might model myself as a record with an age and a birth-year. There might also be a record representing the current-year. Then I could compute my age as my birth-year subtracted from the current-year.

    + +

    A key concept here is that age is a derived fact, supported by two other facts: birth-year and current-year. If either of those supporting facts are removed from Eve, then age can no longer be computed. For intuition, think about modeling this calculation in a spreadsheet using three cells.

    + +

    One last thing to note about control flow is that we have no concept of a loop in Eve. Recursion is one way to recover looping, but set semantics and aggregates often removes the need for recursion. In Eve, every value is actually a set. With operators defined over sets (think map()) and aggregation (think reduce()) we can actually do away with most cases where we would be tempted to use a loop.

    + +

    See also

    + +

    blocks | literate programming | sets | records

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/not/index.html b/v0.2/handbook/not/index.html new file mode 100644 index 0000000..be50fea --- /dev/null +++ b/v0.2/handbook/not/index.html @@ -0,0 +1,391 @@ + + + + + + + + + + + + not - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    not

    + +

    excludes records from the results

    + +

    Syntax

    +
    not([ ... ])
    +
    + +

    Description

    + +

    Not is an anti-join operator, which takes a body of records. For example, we can get a list of people who are not invited to the party:

    +
    // friends not invited to the party
    +search
    +  friends = [#friend]
    +  not(friends = [#invited])
    +
    +bind @view
    +  [#value | value: "{{friends.name}} wasn't invited to the party"]
    +
    + +

    Examples

    + +

    See Also

    + +

    is | records | match

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/npm/index.html b/v0.2/handbook/npm/index.html new file mode 100644 index 0000000..2b6ea88 --- /dev/null +++ b/v0.2/handbook/npm/index.html @@ -0,0 +1,378 @@ + + + + + + + + + + + + npm - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Eve on npm

    + +

    A package for Eve is available on npm. After installing npm for your platform, you can download our package with the following command:

    + +
    npm install -g witheve
    +
    + +

    This will give you a global Eve installation that you can invoke with the command eve from any folder. Doing so will launch an Eve server at http://localhost:8080.

    + +

    See also

    + +

    linux | mac | windows | docker | running

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/programs/index.html b/v0.2/handbook/programs/index.html new file mode 100644 index 0000000..43af1cb --- /dev/null +++ b/v0.2/handbook/programs/index.html @@ -0,0 +1,373 @@ + + + + + + + + + + + + - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    + diff --git a/v0.2/handbook/records/index.html b/v0.2/handbook/records/index.html new file mode 100644 index 0000000..b7aa34c --- /dev/null +++ b/v0.2/handbook/records/index.html @@ -0,0 +1,460 @@ + + + + + + + + + + + + Records - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Records

    + +

    Records are attribute: value pairs associated to a unique ID

    + +

    Syntax

    +
    // A record with an attribute
    +[attribute]
    +
    +// A record with an attribute of given value
    +[attribute: value]
    +
    +// A record with N attributes of given values
    +[attribute1: value1, ... , attributeN: valueN]
    +
    +// A record nested within another record
    +[attribute1: [attribute2: value]]
    +
    +// Equates a record and a variable
    +r = [attribute ...]
    +
    +// Accessing an attribute on a record
    +r.attribute
    +
    +// Join two records
    +[attribute1: attribute2]
    +[attribute2]
    +
    + +

    Description

    + +

    Records are the predominant datatype in Eve. Records are used in two ways:

    + +
      +
    1. In a search you supply a pattern of attributes to match records in a supplied database.
    2. +
    3. In a bind or commit, you supply a pattern of attributes to insert into a database.
    4. +
    + +

    [attribute] matches all records with the given attribute.

    + +

    [attribute: value] matches all records with the given attribute bound to specified value.

    + +

    [attribute > value] matches all records with the given attribute bound filtered on a value. The inequality > can be one of the inequality operators.

    + +

    [attribute1: value1, ... , attributeN: valueN] is the general case for records. This matches all records with all of the given attributes filtered on the given values.

    + +

    [attribute1: [attribute2: value]] nests a record within another record.

    + +

    r = [attribute ...] equates a record to a variable r.

    + +

    r.attribute accesses the value of attribute on variable r.

    + +

    Examples

    + +

    Match all records with a name, and bind a #div for each one.

    +
    search
    +  [name]
    +
    +bind @browser
    +  [#div text: name]
    +
    + +

    Records can have multiple attributes

    +
    search
    +  [#student name grade school]
    +  
    +bind @browser
    +  [#div text: "{{name}} is in {{grade}}th grade at {{school}}"]
    +
    + +

    Join records by binding attributes from one record into another record. Equate records with variables. Access record attributes using dot notation.

    +
    search
    +  school = [#school name address]
    +  student = [#student school: name]
    +
    +bind @browser
    +  [#div text: "{{student.name}} attends {{school.name}} at {{address}}"]
    +
    + +

    Records can be nested.

    +
    commit
    +  [name: "Jeremy" spouse: [name: "Wendy"]]
    +
    + +

    Dot notation can be composed for deep access to records

    +
    search
    +  Jeremy = [name: "Jeremy"]
    +
    +bind @browser
    +  [#div text: "{{Jeremy.name}} is married to {{Jeremy.spouse.name}}"]
    +
    + +

    See Also

    + +

    search | bind | commit | tags | databases | equality | inequality | joins

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/remove/index.html b/v0.2/handbook/remove/index.html new file mode 100644 index 0000000..f0dd12b --- /dev/null +++ b/v0.2/handbook/remove/index.html @@ -0,0 +1,384 @@ + + + + + + + + + + + + Remove: -= - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    + diff --git a/v0.2/handbook/running/index.html b/v0.2/handbook/running/index.html new file mode 100644 index 0000000..5eee2d3 --- /dev/null +++ b/v0.2/handbook/running/index.html @@ -0,0 +1,425 @@ + + + + + + + + + + + + Running Eve - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Running Eve

    + +

    If you’ve downloaded and installed Eve via npm, you can launch Eve with the eve command.

    + +
    eve
    +
    + +

    This launches an Eve server running in the Eve root directory at http://localhost:8080. From here, you’ll be directed to quickstart.eve, and have access to the Eve examples directory from within the editor.

    + +

    Running an Eve File

    + +

    If you want to run a specific Eve program, you can provide its path after the eve command:

    + +
    eve ~/myDir/myEveFile.eve
    +
    + +

    Then you navigate to Eve in your browser to access the specified program. If you like, you can also recover the editor with a flag:

    + +
    eve ~/myEveDir/myEveFile.eve --editor
    +
    + +

    This will run the supplied Eve program with the editor visible

    + +

    Running Eve in Server mode

    + +

    Eve can be started in server mode using the --server flag:

    + +
    eve --server
    +
    + +

    Without this flag, execution of Eve programs happens within the browser, with the Eve server acting only as a file server between the browser and your local system. In server mode, Eve will instead execute your program on the server. Currently written programs will operate exactly as before, but this is a preliminary step in order to get networked Eve applications going (like a chat server or a multiplayer game). There is still work needed to be done there

    + +

    Eve Workspaces

    + +

    You can run Eve in a custom workspace. To create a new Eve workspace, create a folder with an empty file named package.json, then start Eve from within this folder. Eve recognizes that it is starting an Eve workspace, and will serve *.eve files from within this directory instead of the Eve examples folder. Furthermore, you can serve various assets, like images or CSS, by placing them in an “assets” sub-folder.

    + +

    Flags

    + +
      +
    • server - run Eve in server execution mode.
    • +
    • editor - run Eve with the editor visible. This defaults to false, except when Eve is started in an Eve project folder.
    • +
    • port - specify the port on which to run the Eve server. Alternatively, the running port can be specified with the PORT environment variable, which takes precedence over the port flag.
    • +
    + +

    Running Eve from Source

    + +

    To run Eve from source, you invoke the following command in the extracted Eve folder:

    + +
    npm start
    +
    + +

    You can apply the above flags to this command, but you’ll need an extra -- to do so. e.g.

    + +
    npm start -- --port 1234
    +
    + +

    See Also

    + +

    linux | mac | windows | docker | npm

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/search/index.html b/v0.2/handbook/search/index.html new file mode 100644 index 0000000..eb72d9f --- /dev/null +++ b/v0.2/handbook/search/index.html @@ -0,0 +1,400 @@ + + + + + + + + + + + + search - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    search

    + +

    signifies the beginning of the search phase

    + +

    Syntax

    +
    search
    +
    +search @database1, ..., @databaseN
    +
    + +

    Description

    + +

    search signifies the beginning of the search phase of a block. By default, searched records are drawn from a default local database.

    + +

    search @database1, ... @databaseN draws searched records from one or more databases.

    + +

    Examples

    + +

    search a record

    +
    search
    +  [name]
    +  
    +bind
    +  [#div text: name]  
    +
    + +

    Omit the search phase

    +
    bind
    +  [#div text: "Hello, world"]
    +
    + +

    See Also

    + +

    bind | commit | databases | records

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/session/index.html b/v0.2/handbook/session/index.html new file mode 100644 index 0000000..02a083b --- /dev/null +++ b/v0.2/handbook/session/index.html @@ -0,0 +1,367 @@ + + + + + + + + + + + + @session - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    @session

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/set/index.html b/v0.2/handbook/set/index.html new file mode 100644 index 0000000..e1df9ad --- /dev/null +++ b/v0.2/handbook/set/index.html @@ -0,0 +1,403 @@ + + + + + + + + + + + + Set: := - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Set Operator

    + +

    Sets the value of an attribute on a record

    + +

    Syntax

    +
    // Set attribute to value
    +record.attribute := value
    +
    +// Remove attribute
    +record.attribute := none
    +
    + +

    Description

    + +

    record.attribute := value sets attribute to value. If record already has an attribute with a value, then this will overwrite it. Otherwise, if record doesn’t have an attribute with this name already, then := will create the attribute and set it to value.

    + +

    attribute can be an attribute already on the record, or it can be a new attribute.

    + +

    value can be a string or number literal, a record, or a variable bound to one of these.

    + +

    record.attribute := none sets the value of attribute to the special value none, which is the empty set (a set with no elements).

    + +

    Examples

    + +

    Set the age of #students that don’t already have an age.

    +
    search
    +  student = [#student]
    +  age = if student.age then student.age
    +        else if student.grade then student.grade + 6
    +        
    +bind
    +  student.age := age
    +
    + +

    See Also

    + +

    add operator | remove operator | merge operator

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/sets/index.html b/v0.2/handbook/sets/index.html new file mode 100644 index 0000000..382b32c --- /dev/null +++ b/v0.2/handbook/sets/index.html @@ -0,0 +1,406 @@ + + + + + + + + + + + + Sets - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Set Semantics

    + +

    Expressions and actions in Eve work over sets.

    + +

    Description

    + +

    Sets are unordered collections where every element of the collection is unique. For example, ("a", "b", "c") is a set, while ("a", "a", "b", "c") is not. Furthermoer, ("a", "b", "c") and ("c", "b", "a") are equivalent sets, even though the order of elements is different.

    + +

    Examples

    + +
    (1, 2, 3, 4) // Every element is unique           
    +(1, 2, 3, 1) // One is repeated twice, so this is not a set
    +(4, 3, 2, 1) // This set is the same as the first, despite the order of elements
    +("Steve", 1, (1, 2)) // Elements can be nonhomogeneous, as long as each one is unique
    +(("a", 1), ("a", 2), ("a", 3)) // Sets within sets can be used to repeat values
    +
    + +

    Set Example in Eve

    +
    commit
    +  [#point x: 5, y: 4]
    +  [#point x: 3, y: 7]
    +  [#point x: 1, y: 2]
    +
    + +

    We can calculate the distance from each of these points to every other point:

    +
    search
    +  p1 = [#point x: x1, y: y1]
    +  p2 = [#point x: x2, y: y2]
    +  dx = x1 - x2 
    +  dy = y1 - y2
    +  
    +bind @browser
    + [#div sort: x1, text: "({{x1}}, {{y1}}) - ({{x2}}, {{y2}}) = ({{dx}}, {{dy}})"]
    +
    + +

    In imperative languages, you would need a nested loop to cover all of the combinations. In Eve, functions (and infix operators like +, which are just sugar for a function) operate over sets, so this loop is implicitly handled by Eve.

    + +

    See Also

    + +

    programming model | functions | aggregates | cartesian product

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/standard-library/index.html b/v0.2/handbook/standard-library/index.html new file mode 100644 index 0000000..4f11688 --- /dev/null +++ b/v0.2/handbook/standard-library/index.html @@ -0,0 +1,379 @@ + + + + + + + + + + + + Standard Library - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Standard Library

    + +

    The Eve standard library of functions is globally available, meaning you don’t have to reference a specific database to use these functions.

    + +

    Description

    + +
      +
    • general - General functions
    • +
    • math - General mathematical and trigonometric functions
    • +
    • strings - Functions that manipulate strings
    • +
    • statistics - Functions that calculate statistical measures on values
    • +
    • date & time - Functions that get and manipulate date and time
    • +
    + + +
    +
    + +
    + diff --git a/v0.2/handbook/statistics/count/index.html b/v0.2/handbook/statistics/count/index.html new file mode 100644 index 0000000..678c113 --- /dev/null +++ b/v0.2/handbook/statistics/count/index.html @@ -0,0 +1,450 @@ + + + + + + + + + + + + count - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    count

    + +

    Returns the number of elements in a set

    + +

    Syntax

    +
    y = count[given]
    +y = count[given, per]
    +
    + +

    Attributes

    + +
      +
    • given - the set to count over
    • +
    • per - optional - one or more attributes by which to group given.
    • +
    + +

    Description

    + +

    y = count[given] counts the number of elements in given.

    + +

    y = count[given, per] counts the number of elements in given, grouped by the attribute(s) provided in per. For instance, class-size = count[given: students, per: grade] would count the number of students in each grade. You can group along multiple axes; the previous example could be extended to work across multiple schools by doing class-size = count[given: students, per: (grade, school)]. See the examples section to see these in action.

    + +

    Examples

    + +

    Before we get to the count examples, let’s add some students. Each #student has a grade and a school. Grades are one of 10, 11, or 12. Schools are one of “West” and “East”.

    +
    commit
    +  [#student name: "Diedra" grade: 10 school: "West"]
    +  [#student name: "Celia" grade: 10 school: "West"]
    +  [#student name: "Michaela" grade: 11 school: "West"]
    +  [#student name: "Jermaine" grade: 11 school: "West"]
    +  [#student name: "Issac" grade: 12 school: "West"]
    +  [#student name: "Jamar" grade: 12 school: "West"]
    +  [#student name: "Yee" grade: 10 school: "East"]
    +  [#student name: "Johanne" grade: 10 school: "East"]
    +  [#student name: "Mertie" grade: 10 school: "East"]
    +  [#student name: "Elmira" grade: 11 school: "East"]
    +
    + +

    First let’s count the total number of students in the school district.

    +
    search
    +  students = [#student]
    +  enrollment = count[given: students]
    +
    +bind @view
    +  [#value | value: "There are {{enrollment}} students in the district"]
    +
    + +

    Now let’s count the number of students in each school.

    +
    search
    +  students = [#student school]
    +  school-enrollment = count[given: students, per: school]
    +
    +bind @view
    +  [#value | value: "{{school-enrollment}} attend {{school}}"]
    +
    + +

    We could have similarly counted the number of students in each grade across the district.

    +
    search
    +  students = [#student grade]
    +  grade-enrollment = count[given: students, per: grade]
    +
    +bind @view
    +  [#value | value: "{{grade-enrollment}} students are in {{grade}}th grade"]
    +
    + +

    Finally, we can count the number of students per grade, per school.

    +
    search
    +  students = [#student grade school]
    +  grade-school-enrollment = count[given: students, per: (grade, school)]
    +
    +bind @view
    +  [#value | value: "{{grade-school-enrollment}} students are in {{grade}}th grade at {{school}}"]
    +
    + +

    Example Usage

    + + + +

    See Also

    + +

    sum | aggregates

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/statistics/index.html b/v0.2/handbook/statistics/index.html new file mode 100644 index 0000000..8d5479f --- /dev/null +++ b/v0.2/handbook/statistics/index.html @@ -0,0 +1,377 @@ + + + + + + + + + + + + Statistics - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Statistics

    + +
      +
    • count - counts the number of elements in a set
    • +
    + +

    Random Functions

    + +
      +
    • random - Generates a random number between 0 and 1
    • +
    + + +
    +
    + +
    + diff --git a/v0.2/handbook/statistics/random/index.html b/v0.2/handbook/statistics/random/index.html new file mode 100644 index 0000000..567e4d5 --- /dev/null +++ b/v0.2/handbook/statistics/random/index.html @@ -0,0 +1,423 @@ + + + + + + + + + + + + random - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    random

    + +

    Generates a random number between 0 and 1

    + +

    Syntax

    +
    y = random[seed]
    +
    + +

    Attributes

    + +
      +
    • seed - initializes the random number generator. The seed itself does not need to be random.
    • +
    + +

    Description

    + +

    y = random[seed] generates a pseudorandom number drawn from the standard uniform distribution, meaning the generated number is restricted to be between 0 and 1. To generate a number between a custom range, see the examples.

    + +

    Examples

    + +

    Prints a random number every second. The time attribute in #div is used to make each generated number unique for display purposes.

    +
    search 
    +  [#time minutes seconds]
    +  x = random[seed: seconds]
    +
    +commit @browser
    +  [#div time: "{{minutes}}{{seconds}}"  text: x]
    +
    + +

    Generate a random number between min and max

    +
    search
    +  min = 5
    +  max = 10
    +  x = random[seed: 1] * (max - min) + min
    +
    +bind @browser
    +  [#div text: x]
    +
    + +

    Generate 10 random numbers

    +
    search
    +  i = range[from: 1, to: 10]
    +  x = random[seed: i]
    +
    +bind @browser
    +  [#div text: x]
    +
    + +

    Example Usage

    + + + +

    See Also

    + +

    [gaussian][../gaussian]

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/string-interpolation/index.html b/v0.2/handbook/string-interpolation/index.html new file mode 100644 index 0000000..61dfa21 --- /dev/null +++ b/v0.2/handbook/string-interpolation/index.html @@ -0,0 +1,404 @@ + + + + + + + + + + + + String Interpolation - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    String Interpolation

    + +

    injects the value of an attribute or variable into a string

    + +

    Syntax

    +
    "{{ variable }}"
    +
    + +

    Description

    + +

    "{{ variable }}" embeds the value of variable within a string. Variable should be an attribute on a record or the result of an expression.

    + +

    String interpolation works element-wise on its input. This means the string will be repeated for every unique value in variable.

    + +

    Multiple variables can be interpolated into strings. If the variables have no relation to each other (i.e. they are not joined or part of the same record), then string interpolation is applied to the cartesian product of the sets.

    + +

    Examples

    + +

    Display student name, grade and school:

    +
    search
    +  [#student name grade school]
    +
    +bind @browser
    +  [#div text: "{{name}} is a {{grade}}th grade student at {{school}}."]
    +
    + +

    Use string interpolation to display pairs of numbers:

    +
    search 
    +  i = range[from: 1, to: 10]
    +  j = range[from: 1, to: 10]
    +
    +bind @browser
    +  [#div text: "({{ i }}, {{ j }})"]
    +
    + +

    See Also

    + +

    strings | expressions

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/strings/index.html b/v0.2/handbook/strings/index.html new file mode 100644 index 0000000..6cc3554 --- /dev/null +++ b/v0.2/handbook/strings/index.html @@ -0,0 +1,372 @@ + + + + + + + + + + + + Strings - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Strings

    + +
      +
    • split - split a string into tokens
    • +
    • join - join tokens into a string
    • +
    + + +
    +
    + +
    + diff --git a/v0.2/handbook/strings/join/index.html b/v0.2/handbook/strings/join/index.html new file mode 100644 index 0000000..47252c1 --- /dev/null +++ b/v0.2/handbook/strings/join/index.html @@ -0,0 +1,433 @@ + + + + + + + + + + + + join - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    join

    + +

    Joins a set of strings into a single string

    + +

    Syntax

    +
    text = join[token, given, index, with]
    +
    + +

    Attributes

    + +
      +
    • token - set of strings to be joined
    • +
    • given - establishes the set being joined. If tokens are not unique, you can add attributes here that will make them unique. Must at least provide token as part of the given set, or only the first one will be returned.
    • +
    • index - indicates where each token is ordered in text.
    • +
    • with - inserted between every element in token.
    • +
    + +

    Description

    + +

    text = join[token, index, given, with] takes tokens together using with in an order specified by index. Returns the joined string.

    + +

    Examples

    + +

    Split a sentence into tokens, and join the tokens into a sentence again

    +
    search
    +  // Split the sentence into words
    +  (token, index) = split[text: "the quick brown fox", by: " "]
    +
    +  // Join the words back into a sentence, but with hyphens instead of spaces
    +  text = join[token given: token, index with: "-"]
    +
    +bind @view
    +  [#value | value: text] // Expected "the-quick-brown-fox"
    +
    + +
    + +

    Since join is an aggregate, set semantics play an important part here; if we don’t specify what makes each token unique, then the results can be surprising. The following example will demonstrate this.

    + +

    Let’s split the phrase “hello world” into letters:

    +
    search
    +  //token = (h, e, l, l, o, w, o, r, l, d)
    +  (token, index) = split[text: "hello world", by: ""]
    +
    +bind
    +  [#phrase token index]
    +
    +bind @view
    +  [#value | value: token]
    +
    + +

    Let’s join this phrase back together. Like last time, we’ll join with a -. Notice that some tokens (“l” and “o”) should appear multiple times in the phrase. To correctly join them, we add index as part of the given set:

    +
    search
    +  [#phrase token index]
    +  // given = (("h", 1), ("e", 2), ("l", 3), ("l", 4) ... ("l", 10), ("d", 11)) 
    +  // without including index, the result is "h-e-l-o- -w-r-d". Try it and see!
    +  text = join[token given: (token, index) index with: "-"]
    +
    +bind @view
    +  [#value | value: text]
    +
    + +

    The result expected result is “h-e-l-l-o- -w-o-r-l-d”.

    + +

    See Also

    + +

    split

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/strings/split/index.html b/v0.2/handbook/strings/split/index.html new file mode 100644 index 0000000..c4f027d --- /dev/null +++ b/v0.2/handbook/strings/split/index.html @@ -0,0 +1,408 @@ + + + + + + + + + + + + split - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    split

    + +

    splits a string at the given delimiter

    + +

    Syntax

    +
    (token, index) = split[text, by]
    +
    + +

    Attributes

    + +
      +
    • text - the text to be split
    • +
    • by - the delimiter at which to split the text. An empty string will split the text at every character.
    • +
    • token - the recovered tokens after the split
    • +
    • index - the indices of the tokens in the original text
    • +
    + +

    Description

    + +

    (token, index) = split[text, by] splits a text into tokens according to the given delimiter, by. Returns token and index of those tokens in the original string.

    + +

    Examples

    + +

    Splits a string at every character

    +
    search
    +  (token, index) = split[text: "hello, world", by: ""]
    +  
    +bind @browser
    +  [#div text: "{{token}} {{index}}"]
    +
    + +

    Split a sentence into words and display them in order

    +
    search
    +  (token, index) = split[text: "the quick brown fox", by: " "]
    +  
    +bind @browser
    +  [#div sort: index, text: token]
    +
    + +

    See Also

    + +

    concat | join | char-at | find | length | replace

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/tags/index.html b/v0.2/handbook/tags/index.html new file mode 100644 index 0000000..781d344 --- /dev/null +++ b/v0.2/handbook/tags/index.html @@ -0,0 +1,424 @@ + + + + + + + + + + + + Tags - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Tag Selector

    + +

    The tag selector is a shortcut for the tag attribute on records

    + +

    Syntax

    +
    #tag
    +
    +#"tag with spaces"
    +
    + +

    Description

    + +

    The tag selector # is a shortcut for the tag attribute, e.g. [#person] is a shortcut for [tag: "person"].

    + +

    The tag selector is useful for selecting a group of similar records.

    + +

    Tags are useful for making a record unique. For instance, in a single database, many disparate records might have an age attribute. e.g. [age] might select unrelated records if you’re only interested in ages of employees. A more specific record would be [#employee age], which would match only records that are both tagged “employee” and have an age attribute.

    + +

    Multiple tags can be used to further specify a record. For instance:

    +
    [#employee wage]
    +[#employee #part-time wage]
    +
    + +

    The first record matches all #employees, while the second matches only those who are also #part-time. Any number of tags can be used in this way.

    + +

    Tips

    + +

    Tags are useful for creating switches. Add a tag to a record to include it in a set. Then, when you don’t want that record in the set anymore, just remove the tag. The record will no longer match the set.

    + +

    Examples

    + +

    Search for students and display their names and the grade they’re in.

    +
    search
    +  [#student name grade]
    +
    +bind @browser
    +  [#div text: "{{name}} is in {{grade}}th grade."]
    +
    + +

    Add students with good marks to the honor roll. When a student’s GPA falls below 3.5, he or she will not make the honor roll because this block will not add the #honor-roll tag.

    +
    search
    +  students = [#student gpa >= 3.5]
    +
    +bind
    +  students += #honor-roll
    +
    + +

    Display the honor roll

    +
    search
    +  [#student #honor-roll name]
    +
    +bind @browser
    +  [#div text: "{{name}} is a smarty pants"]
    +
    + +

    See Also

    + +

    records | search | sets

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/update-operators/index.html b/v0.2/handbook/update-operators/index.html new file mode 100644 index 0000000..c5e6c68 --- /dev/null +++ b/v0.2/handbook/update-operators/index.html @@ -0,0 +1,391 @@ + + + + + + + + + + + + Update Operators - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Update Operators

    + +

    Update operates are used to modify records

    + +

    Syntax

    +
    // Add operator
    +record.attribute += value
    +
    +// Remove operator
    +record.attribute -= value
    +
    +// Set operator
    +record.attribute := value
    +
    +// Merge operator
    +record <- [ ... ]
    +
    + +

    Description

    + +

    Examples

    + +

    See Also

    + +

    add | remove | set | merge | bind | commit

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/view/index.html b/v0.2/handbook/view/index.html new file mode 100644 index 0000000..35cd36a --- /dev/null +++ b/v0.2/handbook/view/index.html @@ -0,0 +1,367 @@ + + + + + + + + + + + + @view - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    @view

    + + +
    +
    + +
    + diff --git a/v0.2/handbook/windows/index.html b/v0.2/handbook/windows/index.html new file mode 100644 index 0000000..effa925 --- /dev/null +++ b/v0.2/handbook/windows/index.html @@ -0,0 +1,379 @@ + + + + + + + + + + + + Windows - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Installing Eve on Windows

    + +

    First, download the Eve source. You’ll need a recent node.js and then in the extracted Eve directory:

    + +
    npm install
    +npm start
    +
    + +

    Then open http://localhost:8080/ in your browser.

    + +

    See also

    + +

    linux | mac | docker | npm | running

    + + +
    +
    + +
    + diff --git a/v0.2/images/favicon.png b/v0.2/images/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..9954640c725b67c9ce2832fc2cb92f5205e0cb68 GIT binary patch literal 588 zcmV-S0<-;zP)`OKT|FoG@`x%_aS zZP%v&X&Um%^vu~0o8^i2z|!%F;>qEo=}V&{L&Z%2*@cQ} zd+L0_ZrnQZ`n??Z`~|(?x3s8NE6R}GaNoAr+>M!wwI;xN>0Bt;&RE@7SpamMM5)Z+ z(lY6fIeaak)GB2*)+7%AXf*sx zd9`{QKmw?>iYMN_k;1ZI=K#1s%>hm4cai~Epp=4q9^r!8YIU)=QyTxM{|nHxU!(pF zAYz8GQroe1^tYHJ0dyg3PpO`cDh0v_(;L=NA}ER_5*X1ar9z?J{6Q*i48_9oIjRld zc|1OLh_8t)NZ${bN@1Geh0K9H2RjzEYx3#2d{1)RP4w+;UA81$C~_jVvYa&av8z+3 z?sh$KQwje0#Nw(MpUXXn%&yE|TP&H~ a@_qssLZoZh+}s-g0000Ou94eCcHFE;*;~f7S45$bnU&1UtZ>bYD|>bAk*sVP5iVtx6|%=I zWL#wXziywt>-^67|NouiD0O;|*X#9sjOXKdBXn=8Qj#%}ojZ4qQe90+@7y_pVDR;e zloSV*qjLb8RD#V|Jk{7w~+X+^CNG| z-M|ltEi_e?z<2QLK=FM5_(tNUuB}WmLqbYN#9;J@VFdgL?xt+yrs!&A?q=uY$adGx z!RnllfS{O^fQXc!ARG9NpoElwu(C>SFSwILbtQ$nUM6cNkOby2?-@!t(IeSM!7OYF z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W`?{6Ar(e<8N&7oH{ei)>;prR6xW$1i+to(vV&LRIg`NE-_A; zpJ~&fw2YQmI?-w<^})od%!DO^3!_2&3XNaIGODODdlOR4fye5tsama6(#mH|Si{x@ zR$B(^rT+kEjT=~1B!c`x5j@Ndr8-sj(z+ z3gD9pLPz??Db*1zmll(@LI_DvzliV~0h2yCeafFIJ}rjDQ~D1OL7=Z@m@okTz^R1# mR&|_af&WIM_$AUlLpOV}a*%#Ow5B?vJ?2R)3 literal 0 HcmV?d00001 diff --git a/v0.2/index.html b/v0.2/index.html new file mode 100644 index 0000000..d9b2789 --- /dev/null +++ b/v0.2/index.html @@ -0,0 +1,379 @@ + + + + + + + + + + + + Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + +
    + + + +
    \ No newline at end of file diff --git a/v0.2/index.xml b/v0.2/index.xml new file mode 100644 index 0000000..6598f30 --- /dev/null +++ b/v0.2/index.xml @@ -0,0 +1,851 @@ + + + + Eve Documentation + http://docs-next.witheve.com/ + Recent content on Eve Documentation + Hugo -- gohugo.io + en-us + + + + + http://docs-next.witheve.com/README/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/README/ + + +<p align="center"> + <img src="http://www.witheve.com/logo.png" alt="Eve logo" width="10%" /> +</p> + +<hr /> + +<h1 id="documentation-for-the-eve-programming-language">Documentation for the Eve programming language.</h1> + +<p>You can learn more about Eve here: <a href="http://witheve.com/">http://witheve.com/</a></p> + +<p>You can play with Eve here: <a href="http://play.witheve.com">http://play.witheve.com</a></p> + +<p>Eve is under active development here: <a href="https://github.com/witheve/Eve">https://github.com/witheve/Eve</a></p> + +<h2 id="contributing">Contributing</h2> + +<p>There&rsquo;s a lot of work to be done on the documentation, so this is a great place for beginners to get started with Eve. From fixing typos to adding examples, work needs to be done across the board here. Check out the <a href="https://github.com/witheve/docs/issues">issues</a> for a place to start, as they have been raised already as points of improvement by the community. If someone is already assigned and the issue has been aroud a while, check to see if it&rsquo;s being worked on before starting it yourself. Or, if you find an issue yourself, please report it so others know it exists. Thank you!</p> + + + + + + http://docs-next.witheve.com/handbook/core/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/handbook/core/ + + +<h1 id="core-language">Core Language</h1> + +<h2 id="see-also">See Also</h2> + +<p><a href="../records">records</a> | <a href="../equivalence">equivalence</a> | <a href="../actions">actions</a> | <a href="../expressions">expressions</a> | <a href="../update-operators">update operators</a> | <a href="../databases">databases</a></p> + + + + + + http://docs-next.witheve.com/handbook/databases/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/handbook/databases/ + + +<h1 id="databases">Databases</h1> + +<p>Databases contain records</p> + +<h2 id="syntax">Syntax</h2> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// search action</span><span class="w"></span> +<span class="kr">search</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> + +<span class="c1">// Commit action</span><span class="w"></span> +<span class="kr">commit</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> + +<span class="c1">// Bind action</span><span class="w"></span> +<span class="kr">bind</span><span class="w"> </span><span class="nt">@database1</span><span class="p">,</span><span class="w"> </span><span class="x">...</span><span class="p">,</span><span class="w"> </span><span class="nt">@databaseN</span><span class="w"></span> +</code></pre></div> + +<h2 id="description">Description</h2> + +<p><code>&lt;action&gt; @database</code> performs the given action, one of <code>search</code>, <code>bind</code>, or <code>commit</code>, on the union of the provided databases.</p> + +<p>If no database is provided with an action, then that action is performed on the default <code>@session</code> database.</p> + +<h2 id="creating-and-searching-databases">Creating and Searching Databases</h2> + +<p>You can create databases on-demand by simply committing a record to one. e.g.</p> + +<pre><code>commit @my-database + [#my-record] +</code></pre> + +<p>This block will create a new database called &ldquo;my-database&rdquo;, which will contain the newly committed record. You can now search for this record in your new database:</p> + +<pre><code>search @my-database + [#my-record] + +bind @browser + [#div text: &quot;Found a record!&quot;] +</code></pre> + +<h2 id="special-databases">Special Databases</h2> + +<p>Eve has some built-in databases that have meaning to the runtime.</p> + +<ul> +<li><a href="../session">@session</a> - the default database when no database is specified with an action.</li> +<li><a href="../view">@view</a> - records committed to <code>@view</code> are used to visualize data.</li> +<li><a href="../event">@event</a> - contains events originating from the DOM</li> +<li><a href="../browser">@browser</a> - Eve clients running in the browser render applicable records in this <code>@browser</code> as HTML elements.</li> +<li><a href="../http">@http</a> - Stores records representing HTTP requests and responses</li> +</ul> + +<h2 id="examples">Examples</h2> + +<p>Display the element that was clicked in the DOM</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@event</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#click</span><span class="w"> </span><span class="nt">#direct-target</span><span class="w"> </span><span class="x">element</span><span class="p">]</span><span class="w"></span> + +<span class="kr">commit</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{element}} was clicked.&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Commit some data in <code>@session</code>, and then display it on a button click.</p> + +<pre><code>commit + [#for-display text: &quot;Hello&quot;] +</code></pre> + +<p>We are searching over three databases to complete this block.</p> + +<ul> +<li>the <code>#click</code> is in <code>@event</code></li> +<li>the <code>#button</code> is in <code>@browser</code></li> +<li>the text for display is in <code>@session</code>. This needs to be made explicit; since we are searching in other databases, <code>@session</code> is not searched implicitly.</li> +</ul> + +<pre><code>search @event @browser @session + [#click element: [#button]] + [#for-display text] + +commit @browser + [#div text] +</code></pre> + +<p>This block could have been written with two searches for the same effect:</p> + +<pre><code>search @event @browser + [#click element: [#button]] + +search + [#for-display text] + +commit @browser + [#div text] +</code></pre> + +<h2 id="see-also">See Also</h2> + +<p><a href="../search">search</a> | <a href="../bind">bind</a> | <a href="../commit">commit</a></p> + + + + + + http://docs-next.witheve.com/handbook/intro/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/handbook/intro/ + + +<h1 id="introduction">Introduction</h1> + +<h2 id="notable-features">Notable Features</h2> + +<ul> +<li><p>Eve programs aren&rsquo;t talking to a database, they <em>are</em> the database. That means no plumbing, no impedance mismatch, and no extra infrastructure is needed.</p></li> + +<li><p>Everything is data. The file system, http requests, the DOM&hellip; That means everything can be queried and everything can be reacted to.</p></li> + +<li><p>Eve&rsquo;s semantics were built for concurrency, asynchrony, and distribution. There are no promises, or thread synchronizations, or borrows.</p></li> + +<li><p>Eve programs practice literate programming, since there&rsquo;s no incidental ordering imposed by the language.</p></li> + +<li><p>Another result of a lack of ordering is that programs grow very organically through composition.</p></li> + +<li><p>Eve programs are naturally tiny.</p></li> + +<li><p>Correctness can be defined globally through integrity constraints, allowing people to safely contribute to an application without worrying about checking every possible invariant locally.</p></li> +</ul> + +<h2 id="see-also">See Also</h2> + +<p><a href="../installation">getting eve</a> | <a href="../running">running eve</a> | <a href="../programs">eve programs</a> | <a href="../core">core language</a></p> + + + + + + http://docs-next.witheve.com/handbook/programs/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/handbook/programs/ + + +<h1 id="eve-programs">Eve Programs</h1> + +<p>Coming soon&hellip;</p> + +<h2 id="see-also">See Also</h2> + +<p><a href="../model">programming model</a> | <a href="../literate-programming">literate programming</a> | <a href="../blocks">blocks</a></p> + + + + + Eve Documentation + http://docs-next.witheve.com/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/ + + +<h1 id="eve-programming-language-documentation">Eve Programming Language Documentation</h1> + +<h2 id="guides">Guides</h2> + +<ul> +<li><a href="http://play.witheve.com">Eve Quickstart Guide</a></li> +</ul> + + + + + Eve for Programmers + http://docs-next.witheve.com/guides/for-programmers/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/guides/for-programmers/ + + +<h1 id="eve-for-programmers">Eve for Programmers</h1> + +<p>As a programmer, you probably find it easy to switch between different programming langauges. If you know Javascript, you probably wouldn&rsquo;t have a hard time learning similar langauges like C++, Java, or Python. That&rsquo;s because despite syntactic differences, these languages largely conform to the same programming model. When we program in languages like these, we use similar abstractions between them &ndash; loops, functions, and input/output patterns have become a staple of every programmer&rsquo;s toolbox. When we solve problems, we usually reach a solution in terms of these primitive operations.</p> + +<p>Eve is a different kind of programming langauge from Javascript or Python, so programmers new to Eve may feel a little lost at first. How do you get anything done in a language without loops? How do you compose code without functions? The purpose of this guide is to provide a mapping from the common tools you know, to the Eve way of solving problems. We&rsquo;ll look at some programs written in Javascript, and see how they Eve can solve them.</p> + +<h2 id="functions">Functions</h2> + +<p>Functions are the fundamental unit of code reuse in most conventional programming languages. These langauges typically start from a &ldquo;main&rdquo; function, and branch</p> + +<h2 id="looping">Looping</h2> + +<h3 id="map">Map</h3> + +<h3 id="reduce">Reduce</h3> + +<h3 id="recursion">Recursion</h3> + +<h2 id="i-o">I/O</h2> + + + + + Linux + http://docs-next.witheve.com/handbook/linux/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/handbook/linux/ + + +<h1 id="installing-eve-on-linux">Installing Eve on Linux</h1> + +<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> + +<pre><code>npm install +npm start +</code></pre> + +<p>Then open <code>http://localhost:8080/</code> in your browser.</p> + +<h2 id="tips">Tips</h2> + +<p>Some distributions (most notably Ubuntu) have renamed <code>node</code> to <code>nodejs</code>. If this is the case, you&rsquo;ll need to create a symlink that remaps nodejs back to node. e.g.</p> + +<pre><code>ln -s /usr/bin/nodejs /usr/bin/node +</code></pre> + +<p>Then proceed with the installation as usual</p> + +<h2 id="see-also">See also</h2> + +<p><a href="../mac">mac</a> | <a href="../windows">windows</a> | <a href="../docker">docker</a> | <a href="../running">running</a></p> + + + + + Mac + http://docs-next.witheve.com/handbook/mac/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/handbook/mac/ + + +<h1 id="installing-eve-on-mac">Installing Eve on Mac</h1> + +<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> + +<pre><code>npm install +npm start +</code></pre> + +<p>Then open <code>http://localhost:8080/</code> in your browser.</p> + +<h2 id="see-also">See also</h2> + +<p><a href="../linux">linux</a> | <a href="../windows">windows</a> | <a href="../docker">docker</a> | <a href="../npm">npm</a> | <a href="../running">running</a></p> + + + + + Quickstart + http://docs-next.witheve.com/tutorials/quickstart/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/tutorials/quickstart/ + + +<h1 id="eve-quick-start-tutorial">Eve Quick Start Tutorial</h1> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">```</span><span class="w"></span> +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">tag</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, world&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x">```</span><span class="w"></span> +</code></pre></div> + +<p>Hello world! At its core, Eve is a pattern matching language. You match patterns of data by searching a database, then update or create new data according to what you&rsquo;ve found. In this example, we created a <a href="https://witheve.github.io/docs/handbook/records/"><code>record</code></a> that has two attributes: a tag attribute with the value <code>&quot;div&quot;</code>, and a text attribute with the value <code>&quot;Hello, world&quot;</code>. We <a href="https://witheve.github.io/docs/handbook/bind/">bound</a> this record to the browser, which is how we displayed our venerable message.</p> + +<p>The three backticks <code>```</code> are called a code fence, and they allow us to denote blocks of code. This gives us the ability to embed Eve code in normal documents written in Markdown. This is how Eve programs are written: everything in a code fence is a <a href="https://witheve.github.io/docs/handbook/blocks/">block</a> of Eve code, while everything outside is prose describing the program. In fact, this quick start tutorial is an example of an executable Eve program! In the subsequent blocks, you won&rsquo;t see any code fences, but they still exist in the <a href="https://raw.githubusercontent.com/witheve/docs/src/guides/quickstart.md">document&rsquo;s source</a>.</p> + +<p>So far we&rsquo;ve created a record that displays “Hello, world!” but as I said, Eve is a pattern matching language. Let&rsquo;s explore that by searching for something:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">tag</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, world&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Our message disappeared! Before, we bound without searching, so the message displayed by default. Now we&rsquo;re binding in the presence of a <a href="https://witheve.github.io/docs/handbook/search/"><code>search</code></a> action, so the bound record only exists if all the searched records are matched. Here, we&rsquo;re searching for all records with a <code>name</code> attribute, but we haven&rsquo;t added any records like that to Eve so none are matched. With no matching records, the <code>bind</code> cannot execute, and the message disappears from the screen.</p> + +<p>This is the flow of an Eve block: you search for records in a database, and if all the records you searched for are matched, you can modify the matched records or create new ones. If any part of your search is not matched, then no records will be created or updated.</p> + +<p>To get our message back, all we need is a record with a name attribute. We can create one permanently with the <a href="https://witheve.github.io/docs/handbook/commit/"><code>commit</code></a> action:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Celia&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Hello, world… again! Commit permanently updates or creates a record that will persist even if its matched records (the records matched in a search action) change. Since we aren&rsquo;t searching for anything in this block, the commit executes by default and adds a record with a name attribute of <code>&quot;Celia&quot;</code>. The addition of this new record satisfies the search in the previous block, so “Hello, world!” appears on the screen again.</p> + +<p>But what else can you do with matched records? For starters, we can use them to create new records:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, {{name}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Since we matched on a record with a name attribute, we now have a reference to that name, and we can inject it into a string using <a href="https://witheve.github.io/docs/handbook/string-interpolation/"><code>{{ ... }}</code></a> embedding. We can also swap out <code>tag: &quot;div&quot;</code> for the sugared <code>#div</code>. <a href="https://witheve.github.io/docs/handbook/tags/">Tags</a> are used a lot in Eve to talk about collections of related records. For example, we could search for all records with a <code>#student</code> tag, with name, grade, and school attributes.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is a {{grade}}th grade student at {{school}}.&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Since we&rsquo;re matching on more attributes, this block is no longer satisfied by the record we added earlier; we&rsquo;re missing a <code>#student</code> tag, as well as grade and school attributes. Even though these are currently missing, we can still write the code that would display them.</p> + +<p>Let&rsquo;s display this new message by adding the missing attributes to Celia. We could add them to the block where we comitted Celia originally, but we can also do it programatically:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">celia</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Celia”</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">celia</span><span class="w"> </span><span class="nf">&lt;-</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">16</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>You can define variables within blocks, which act as handles on records that allow you to change them. In this case, we&rsquo;re using the <a href="https://witheve.github.io/docs/handbook/merge/">merge operator</a> <code>&lt;-</code> to combine two records. With the addition of this block, the sentence &ldquo;Celia is a 10th grade student at East.&rdquo; appears in the browser.</p> + +<p>Celia is cool and all, but let&rsquo;s add some more students to our database:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Diedra”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">12</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Michelle”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">11</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Jermaine”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">9</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Three sentences are now printed, one for each student that matches the search. Eve works on <a href="https://witheve.github.io/docs/handbook/sets/">sets</a>, so when we search for <code>[#student name grade school]</code>, we find <em>all</em> records that match the given pattern. This includes Celia, Diedra and Michelle (but not Jermaine, as he has no school in his record). Therefore, when we bind the record <code>[#div text: &quot;{{name}} is a ... &quot;]</code>, we are actually binding three records, one for each matching <code>#student</code>.</p> + +<p>If you re-compile the program a couple times, you&rsquo;ll see the order of sentences may change. This is because <strong>there is no ordering in Eve - blocks are not ordered, statements are not ordered, and results are not ordered</strong>. If you want to order elements, you must impose an ordering yourself. We can ask the browser to draw elements in an order with the &ldquo;sort&rdquo; attribute:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="x">name</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is a {{grade}}th grade student at {{school}}.&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>This time when you recompile your program, the order will stay fixed, sorted alphabetically by name.</p> + +<p>Let&rsquo;s make things a little more interesting by adding some records about the schools the students attend:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“West”</span><span class="p">,</span><span class="w"> </span><span class="x">address</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;1234 Main Street&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“East”</span><span class="p">,</span><span class="w"> </span><span class="x">address</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;5678 Broad Street&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>What if we want to display the address of the school each student attends? Although <code>#student</code>s and <code>#school</code>s are in different records, <strong>we can relate two records by associating attributes from one record with attributes from the other.</strong> This is an operation known as <a href="https://witheve.github.io/docs/handbook/joins/">joining</a>. In this case, we want to relate the <code>name</code> attribute on <code>#schools</code> with the <code>school</code> attribute on <code>#students</code>. This compares the values of the attributes between records, and matches up those with the same value. For instance, since Celia&rsquo;s school is &ldquo;East&rdquo;, she can join with the <code>#school</code> named &ldquo;East&rdquo;.</p> + +<p>Our first attempt may come out looking a little something like this:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">student</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">name</span><span class="p">]</span><span class="w"> </span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{student.name}} attends {{school.name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>But that didn&rsquo;t work. How come? In Eve, <strong>things with the same name are <a href="https://witheve.github.io/docs/handbook/equivalence/">equivalent</a></strong>. In this block, we&rsquo;ve used &ldquo;name&rdquo; three times, which says that the school&rsquo;s name, the student&rsquo;s name, and the student&rsquo;s school are all the same. Of course, there is no combination of students and schools that match this search, so nothing is displayed.</p> + +<p>Instead, we can use the dot operator to specifically ask for the name attribute in the <code>#school</code> records, and rename our variables to get a correct block:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school.name</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{students.name}} attends {{schools.name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>This creates an implicit join over the school name without mixing up the names of the students and the names of the schools, giving us our desired output. You can actually bind attributes to any name you want to avoid collisions in a block:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="nf">-</span><span class="x">name</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">student</span><span class="nf">-</span><span class="x">name</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="nf">-</span><span class="x">name</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{student-name}} attends {{school-name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="advanced-eve">Advanced Eve</h2> + +<p>Recall when we added our students, Celia was the only one we added an <code>age</code> to. Therefore, the following block only displays Celia&rsquo;s age, even though we ask for all the <code>#student</code>s:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is {{age}} years old&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Let&rsquo;s pretend that all students enter first grade at six years old. Therefore, if we know a student&rsquo;s grade, we can calculate their age and add it to the student&rsquo;s record:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">student</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">calculated</span><span class="nf">-</span><span class="x">age</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">student.age</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">student.age</span><span class="w"></span> +<span class="x">                  </span><span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">student.grade</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">student.grade</span><span class="w"> </span><span class="nf">+</span><span class="w"> </span><span class="m">5</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">student.age</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="x">calculated</span><span class="nf">-</span><span class="x">age</span><span class="w"></span> +</code></pre></div> + +<p>This block selects all students, and uses and <a href="https://witheve.github.io/docs/handbook/if-then/"><code>if-then</code></a> expression to set the student&rsquo;s calculated age. If the student already has an age, we set it to that. Otherwise, if the student has no age, we can calculate it with some arithmetic. The <a href="https://witheve.github.io/docs/handbook/set/">set operator</a> <code>:=</code> sets an attribute to a specified value regardless of what it was before the block executed. That value can be anything, from a number to a string to another record.</p> + +<h3 id="aggregates">Aggregates</h3> + +<p>So far everything we&rsquo;ve done has used one record at a time, but what happens when we want to work over a group of records, such as counting how many students there are? To solve such a problem, we&rsquo;ll need to use an <a href="https://witheve.github.io/docs/handbook/aggregates/">aggregate</a>. Aggregates take a set of values and turn them into a single value, akin to &ldquo;fold&rdquo; or &ldquo;reduce&rdquo; functions in other languages. In this case, we&rsquo;ll use the aggregate <a href="https://witheve.github.io/docs/handbook/statistics/count/"><code>count</code></a> to figure out how many <code>#students</code> are in the school district:  </p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">total</span><span class="nf">-</span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{total-students}} are in the school district&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>A quick note on the syntax for <code>count</code> - it feels a lot like a function in other languages, since it has a return value and can be used inline in expressions. Under the hood, <a href="https://witheve.github.io/docs/handbook/functions/">functions</a> and aggregates are actually records; <code>total = count[given: students]</code> is shorthand for <code>[#count #function given: students, value: total]</code>. This distinction won&rsquo;t materially change the way you use <code>count</code>, but it goes to show that everything in Eve reduces to working with records.</p> + +<p>While <code>given</code> is a required argument in <code>count</code>, aggregates (and functions in general) can also have optional arguments. Let&rsquo;s say we want to know how many students attend each school. We can use the optional argument <code>per</code> to count students grouped by the school they attend:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="nf">-</span><span class="x">per</span><span class="nf">-</span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{students-per-school}} attend {{school}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>All function-like records in Eve specify their arguments as attributes. This means you specify the argument and its value, unlike in other languages, where the order of the values determines the attribute to which they belong. As with everything else in Eve, order doesn&rsquo;t matter.</p> + +<h2 id="extra-credit">Extra Credit</h2> + +<p>At this point, you know everything necessary about Eve to complete this extra credit portion (the only additional knowledge you need is domain knowledge of HTML and forms). Let&rsquo;s review some of the key concepts:</p> + +<ul> +<li>Eve programs are composed of blocks of code that search for and update records.</li> +<li>Records are sets of <code>attribute: value</code> pairs attached to a unique ID.</li> +<li>Eve works with sets, which have no ordering and contain unique elements.</li> +<li>Things with the same name are equivalent.</li> +</ul> + +<p>Your extra credit task is to build a web-based form that allows you to add students to the database. Take a moment to think about how this might be done in Eve, given everything we&rsquo;ve learned so far.</p> + +<p>First, let&rsquo;s make the form. We&rsquo;ve already displayed a <code>#div</code>, and in the same way we can draw <code>#input</code>s and a <code>#button</code>:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Name:&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#name-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">2</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">3</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Grade:&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#grade-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">4</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;School:&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#school-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">6</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#button</span><span class="w"> </span><span class="nt">#submit</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">7</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;submit&quot;</span><span class="p">]]</span><span class="w"></span> +</code></pre></div> + +<p>We&rsquo;ve added some tags to the inputs and the button to distinguish them, so we can easily search for them from other blocks. Now that we have a form, we need to define what happens when the submit button is clicked.</p> + +<p>Remember, everything in Eve is a record, so the <code>#click</code> event is no different. When a user clicks the mouse in the browser, Eve records that click in the database.</p> + +<p>This record exists only for an instant, but we can react to it by searching for <code>[#click element: [#submit]]</code>. This record represents a <code>#click</code> on our <code>#submit</code> button. Then, all we need to do is capture the values of the input boxes and save them as a <code>#student</code> record:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#click</span><span class="w"> </span><span class="x">element</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#submit</span><span class="p">]]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#name-input</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#grade-input</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school-input</span><span class="p">]</span><span class="w"></span> + +<span class="kr">commit</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="c1">// save the new student</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">name.value</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="x">grade.value</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school.value</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="c1">// reset the form</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">name.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">grade.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">school.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> +</code></pre></div> + +<h2 id="learning-more">Learning more</h2> + +<p>If you want to learn more about Eve, we have some resources to help with that:</p> + +<ul> +<li>Example applications - See some working programs and explore how they work.</li> +<li>Tutorials - Step by step instructions on building Eve applications.</li> +<li><a href="https://witheve.github.io/docs">The Eve Handbook</a> - Everything you need to know about Eve.</li> +<li><a href="https://witheve.github.io/assets/docs/SyntaxReference.pdf">Eve syntax reference</a> - Eve&rsquo;s syntax in one page.</li> +<li>Guides - In-depth documents on topics relating to Eve.</li> +</ul> + +<p>We also invite you to join the Eve community! There are several ways to get involved:</p> + +<ul> +<li>Join our <a href="https://groups.google.com/forum/#!forum/eve-talk">mailing list</a> and get involved with the latest discussions on Eve.</li> +<li>Impact the future of Eve by getting involved with our <a href="https://github.com/witheve/rfcs">Request for Comments</a> process.</li> +<li>Read our <a href="http://incidentalcomplexity.com/">development diary</a> for the latest news and articles on Eve.</li> +<li>Follow us on <a href="https://twitter.com/with_eve">twitter</a>.</li> +</ul> + + + + + Standard Library + http://docs-next.witheve.com/handbook/standard-library/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/handbook/standard-library/ + + +<h1 id="standard-library">Standard Library</h1> + +<p>The Eve standard library of functions is globally available, meaning you don&rsquo;t have to reference a specific database to use these functions.</p> + +<h2 id="description">Description</h2> + +<ul> +<li><a href="../general">general</a> - General functions</li> +<li><a href="../math">math</a> - General mathematical and trigonometric functions</li> +<li><a href="../strings">strings</a> - Functions that manipulate strings</li> +<li><a href="../statistics">statistics</a> - Functions that calculate statistical measures on values</li> +<li><a href="../datetime">date &amp; time</a> - Functions that get and manipulate date and time</li> +</ul> + + + + + Style Guide + http://docs-next.witheve.com/guides/style/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/guides/style/ + + +<h1 id="eve-style-guide">Eve Style Guide</h1> + +<h2 id="comments">Comments</h2> + +<p>Add a space after the comment marker to make comments more readable</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// This is correct</span><span class="w"></span> +<span class="c1">//This is incorrect</span><span class="w"></span> +</code></pre></div> + +<h2 id="naming">Naming</h2> + +<p>As much as possible, don&rsquo;t abbreviate names. The goal in writing an Eve program is to be as readable as possible. An abbreviation that makes sense to you might not make sense to someone else, or even yourself when you revisit the program in a year.</p> + +<p>Multi-word names should be joined by dashes <code>-</code>, not underscores <code>_</code>.</p> + +<h2 id="program-layout">Program layout</h2> + +<p>Blocks should be preceded by at least a one line comment, indicating the purpose of the block.</p> + +<h2 id="commas">Commas</h2> + +<p>Although Eve treats commas as white-space, they should be used to enhance readability as needed:</p> + +<p>In records, separate attributes with commas after a bind</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// More readable</span><span class="w"></span> +<span class="p">[</span><span class="nt">#person</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">30</span><span class="p">,</span><span class="w"> </span><span class="x">height</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="x">hair</span><span class="nf">-</span><span class="x">color</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;brown&quot;</span><span class="p">]</span><span class="w"></span> + +<span class="c1">// Less readable</span><span class="w"></span> +<span class="p">[</span><span class="nt">#person</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">30</span><span class="w"> </span><span class="x">height</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="w"> </span><span class="x">hair</span><span class="nf">-</span><span class="x">color</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;brown&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Commas should also be used to separate items contained in parenthesis, such as in a multiple return.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// More readable</span><span class="w"></span> +<span class="p">(</span><span class="x">val</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">val</span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#tag1</span><span class="p">]</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="l">false</span><span class="p">)</span><span class="w"></span> +<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="p">,</span><span class="w"> </span><span class="l">true</span><span class="p">)</span><span class="w"></span> +<span class="x">total</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="p">(</span><span class="x">attr</span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">)]</span><span class="w"></span> + +<span class="c1">// Less readable</span><span class="w"></span> +<span class="p">(</span><span class="x">val</span><span class="m">1</span><span class="w"> </span><span class="x">val</span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#tag1</span><span class="p">]</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="l">false</span><span class="p">)</span><span class="w"></span> +<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="w"> </span><span class="l">true</span><span class="p">)</span><span class="w"></span> +<span class="x">total</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="p">(</span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">)]</span><span class="w"></span> +</code></pre></div> + +<h2 id="indention">Indention</h2> + +<p>Eve does not enforce indention, but it is important for readability</p> + +<h3 id="blocks">Blocks</h3> + +<p><code>search</code>. <code>commit</code>, and <code>bind</code> should be the only lines at zero indention. Everything else should be indented.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Good</span><span class="w"></span> +<span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>But not this:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Not good</span><span class="w"></span> +<span class="kr">search</span><span class="w"></span> +<span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"></span> +<span class="p">[</span><span class="x">...</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h3 id="if-then">If-Then</h3> + +<p>Each arm of an <code>if-then</code> statement should be at the same indention level. The <code>then</code> portion of the statement can be on a new line if the <code>if</code> portion is exceptionally long, but it should be indented once.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Good if layout</span><span class="w"></span> +<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> +<span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> +<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> + +<span class="c1">// Okay, especially if the branch is long</span><span class="w"></span> +<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#long-record</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">]</span><span class="w"> </span> +<span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> +<span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="p">[</span><span class="nt">#long-record2</span><span class="w"> </span><span class="x">attr</span><span class="m">1</span><span class="w"> </span><span class="x">attr</span><span class="m">2</span><span class="w"> </span><span class="x">attr</span><span class="m">3</span><span class="p">]</span><span class="w"> </span> +<span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> +<span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> + +<span class="c1">// Less readable &quot;if&quot; formatting</span><span class="w"></span> +<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"></span> +<span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"></span> +<span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> + +<span class="c1">// Less readable &quot;if&quot; formatting</span><span class="w"></span> +<span class="x">value</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">bar</span><span class="m">2</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">baz</span><span class="m">2</span><span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="x">baz</span><span class="m">3</span><span class="w"></span> +</code></pre></div> + +<h3 id="nested-records">Nested records</h3> + +<p>When nested records are placed on a new line, they should be indented once past the parent record. Where possible, nested records should be the final attribute in the parent record.</p> + +<p>Nested records should appear on their own line if you are nesting more than one.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Okay, but only do this for one level of nesting</span><span class="w"></span> +<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">]]</span><span class="w"></span> + +<span class="c1">// More readable</span><span class="w"></span> +<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">]]</span><span class="w"></span> + +<span class="c1">// Also good</span><span class="w"></span> +<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div1&quot;</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div3&quot;</span><span class="p">]]]</span><span class="w"> </span> + +<span class="c1">// Not good</span><span class="w"></span> +<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div2&quot;</span><span class="p">]]</span><span class="w"></span> + +<span class="c1">// Also not good</span><span class="w"></span> +<span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;world&quot;</span><span class="p">],</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;hello&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="newlines">Newlines</h2> + +<p>Newlines should precede and follow every code block.</p> + +<p>Within code blocks, a newline should be added between every action. This enhances readability, especially in the case where multiple actions are needed. For instance, the following code block:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@studentDB</span><span class="w"></span> +<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#students</span><span class="p">]</span><span class="w"></span> + +<span class="kr">search</span><span class="w"> </span><span class="nt">@schoolDB</span><span class="w"></span> +<span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="x">schools.name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">student.school</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">students.name</span><span class="p">]</span><span class="w"> </span> + +<span class="kr">commit</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#new-record</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>is more readable than this code block:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span><span class="nt">@studentDB</span><span class="w"></span> +<span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#students</span><span class="p">]</span><span class="w"></span> +<span class="kr">search</span><span class="w"> </span><span class="nt">@schoolDB</span><span class="w"></span> +<span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span><span class="x">schools.name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">student.school</span><span class="w"></span> +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">students.name</span><span class="p">]</span><span class="w"> </span> +<span class="kr">commit</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#new-record</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + + + + + Windows + http://docs-next.witheve.com/handbook/windows/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/handbook/windows/ + + +<h1 id="installing-eve-on-windows">Installing Eve on Windows</h1> + +<p>First, <a href="https://github.com/witheve/Eve/archive/master.zip">download</a> the Eve source. You&rsquo;ll need a recent <a href="https://nodejs.org">node.js</a> and then in the extracted Eve directory:</p> + +<pre><code>npm install +npm start +</code></pre> + +<p>Then open <code>http://localhost:8080/</code> in your browser.</p> + +<h2 id="see-also">See also</h2> + +<p><a href="../linux">linux</a> | <a href="../mac">mac</a> | <a href="../docker">docker</a> | <a href="../npm">npm</a> | <a href="../running">running</a></p> + + + + + abs + http://docs-next.witheve.com/handbook/math/abs/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/handbook/math/abs/ + + +<h1 id="abs">abs</h1> + +<p>The absolute value of a number</p> + +<h2 id="syntax">Syntax</h2> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">abs</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="attributes">Attributes</h2> + +<ul> +<li><code>value</code> - a set of numbers</li> +</ul> + +<h2 id="description">Description</h2> + +<p><code>y = abs[value]</code> returns the absolute value of the elements in <code>value</code>. Every positive number is kept positive, but every negative number is made positive.</p> + +<h2 id="examples">Examples</h2> + +<p>Get the absolute value of a number</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">abs</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="nf">-</span><span class="m">3</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span> +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Displays the number <code>3</code>.</p> + +<h2 id="see-also">See Also</h2> + +<p><a href="../sign">sign</a></p> + + + + + ceiling + http://docs-next.witheve.com/handbook/math/ceil/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/handbook/math/ceil/ + + +<h1 id="ceiling">ceiling</h1> + +<p>Round a number up to the nearest integer.</p> + +<h2 id="syntax">Syntax</h2> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">ceiling</span><span class="p">[</span><span class="x">value</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="attributes">Attributes</h2> + +<ul> +<li><code>value</code> - a set of numbers</li> +</ul> + +<h2 id="description">Description</h2> + +<p><code>y = ceiling[value]</code> rounds the elements of <code>value</code> up to the nearest integers.</p> + +<h2 id="examples">Examples</h2> + +<p>Calculate the ceiling of <code>34.2</code></p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="x">y</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">ceiling</span><span class="p">[</span><span class="x">value</span><span class="nf">:</span><span class="w"> </span><span class="m">34</span><span class="x">.</span><span class="m">2</span><span class="p">]</span><span class="w"></span> +<span class="w"> </span> +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="x">y</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>The result is <code>35</code>.</p> + +<h2 id="see-also">See Also</h2> + +<p><a href="../floor">floor</a> | <a href="../fix">fix</a> | <a href="../round">round</a></p> + + + + + \ No newline at end of file diff --git a/javascripts/application.js b/v0.2/javascripts/application.js similarity index 100% rename from javascripts/application.js rename to v0.2/javascripts/application.js diff --git a/javascripts/modernizr.js b/v0.2/javascripts/modernizr.js similarity index 100% rename from javascripts/modernizr.js rename to v0.2/javascripts/modernizr.js diff --git a/v0.2/sitemap.xml b/v0.2/sitemap.xml new file mode 100644 index 0000000..0a92834 --- /dev/null +++ b/v0.2/sitemap.xml @@ -0,0 +1,308 @@ + + + + + http://docs-next.witheve.com/ + + + + http://docs-next.witheve.com/README/ + + + + http://docs-next.witheve.com/handbook/core/ + + + + http://docs-next.witheve.com/handbook/databases/ + + + + http://docs-next.witheve.com/handbook/intro/ + + + + http://docs-next.witheve.com/handbook/programs/ + + + + http://docs-next.witheve.com/ + + + + http://docs-next.witheve.com/guides/for-programmers/ + + + + http://docs-next.witheve.com/handbook/linux/ + + + + http://docs-next.witheve.com/handbook/mac/ + + + + http://docs-next.witheve.com/tutorials/quickstart/ + + + + http://docs-next.witheve.com/handbook/standard-library/ + + + + http://docs-next.witheve.com/guides/style/ + + + + http://docs-next.witheve.com/handbook/windows/ + + + + http://docs-next.witheve.com/handbook/math/abs/ + + + + http://docs-next.witheve.com/handbook/math/ceil/ + + + + http://docs-next.witheve.com/handbook/event/click/ + + + + http://docs-next.witheve.com/handbook/math/cos/ + + + + http://docs-next.witheve.com/handbook/statistics/count/ + + + + http://docs-next.witheve.com/handbook/math/fix/ + + + + http://docs-next.witheve.com/handbook/math/floor/ + + + + http://docs-next.witheve.com/handbook/strings/join/ + + + + http://docs-next.witheve.com/handbook/math/mod/ + + + + http://docs-next.witheve.com/handbook/statistics/random/ + + + + http://docs-next.witheve.com/handbook/math/range/ + + + + http://docs-next.witheve.com/handbook/math/round/ + + + + http://docs-next.witheve.com/handbook/math/sin/ + + + + http://docs-next.witheve.com/handbook/general/sort/ + + + + http://docs-next.witheve.com/handbook/strings/split/ + + + + http://docs-next.witheve.com/handbook/math/sum/ + + + + http://docs-next.witheve.com/handbook/math/tan/ + + + + http://docs-next.witheve.com/handbook/datetime/time/ + + + + http://docs-next.witheve.com/handbook/session/ + + + + http://docs-next.witheve.com/handbook/add/ + + + + http://docs-next.witheve.com/handbook/equality/ + + + + http://docs-next.witheve.com/handbook/functions/ + + + + http://docs-next.witheve.com/handbook/general/ + + + + http://docs-next.witheve.com/handbook/installation/ + + + + http://docs-next.witheve.com/handbook/ebnf/ + + + + http://docs-next.witheve.com/handbook/model/ + + + + http://docs-next.witheve.com/handbook/records/ + + + + http://docs-next.witheve.com/handbook/search/ + + + + http://docs-next.witheve.com/handbook/browser/ + + + + http://docs-next.witheve.com/handbook/aggregates/ + + + + http://docs-next.witheve.com/handbook/commonmark/ + + + + http://docs-next.witheve.com/handbook/equivalence/ + + + + http://docs-next.witheve.com/handbook/inequality/ + + + + http://docs-next.witheve.com/handbook/math/ + + + + http://docs-next.witheve.com/handbook/running/ + + + + http://docs-next.witheve.com/handbook/set/ + + + + http://docs-next.witheve.com/handbook/sets/ + + + + http://docs-next.witheve.com/handbook/tags/ + + + + http://docs-next.witheve.com/handbook/bind/ + + + + http://docs-next.witheve.com/handbook/event/ + + + + http://docs-next.witheve.com/handbook/actions/ + + + + http://docs-next.witheve.com/handbook/help/ + + + + http://docs-next.witheve.com/handbook/joins/ + + + + http://docs-next.witheve.com/handbook/literate-programming/ + + + + http://docs-next.witheve.com/handbook/remove/ + + + + http://docs-next.witheve.com/handbook/strings/ + + + + http://docs-next.witheve.com/handbook/commit/ + + + + http://docs-next.witheve.com/handbook/if-then/ + + + + http://docs-next.witheve.com/handbook/http/ + + + + http://docs-next.witheve.com/handbook/blocks/ + + + + http://docs-next.witheve.com/handbook/docker/ + + + + http://docs-next.witheve.com/handbook/expressions/ + + + + http://docs-next.witheve.com/handbook/merge/ + + + + http://docs-next.witheve.com/handbook/statistics/ + + + + http://docs-next.witheve.com/handbook/is/ + + + + http://docs-next.witheve.com/handbook/not/ + + + + http://docs-next.witheve.com/handbook/view/ + + + + http://docs-next.witheve.com/handbook/datetime/ + + + + http://docs-next.witheve.com/handbook/string-interpolation/ + + + + http://docs-next.witheve.com/handbook/update-operators/ + + + + http://docs-next.witheve.com/handbook/npm/ + + + + http://docs-next.witheve.com/handbook/glossary/ + + + \ No newline at end of file diff --git a/v0.2/stylesheets/application.css b/v0.2/stylesheets/application.css new file mode 100644 index 0000000..119f9e1 --- /dev/null +++ b/v0.2/stylesheets/application.css @@ -0,0 +1,211 @@ +#eve-pallette { + /* Default */ + color: rgb(74,64,136); + color: rgb(91,89,164); + color: rgb(107,103,173); + color: rgb(0,121,177); + color: rgb(0,158,224); + color: rgb(0,184,241); + + /* Style 1 */ + color: rgb(0, 115, 139); + color: rgb(0, 152, 167); + color: rgb(0, 171, 188); + color: rgb(140, 49, 55); + color: rgb(177, 67, 73); + color: rgb(226, 79, 94); + + /* Style 2 */ + color: rgb(85, 138, 126); + color: rgb(113, 177, 162); + color: rgb(128, 198, 182); + color: rgb(153, 114, 45); + color: rgb(198, 154, 63); + color: rgb(246, 192, 78); + + /* Style 3 */ + color: rgb(82, 129, 62); + color: rgb(111, 165, 81); + color: rgb(129, 191, 95); + color: rgb(0, 113, 140); + color: rgb(0, 151, 167); + color: rgb(0, 170, 190); + + /* Style 4 */ + color: rgb(60, 48, 130); + color: rgb(80, 79, 161); + color: rgb(98, 94, 169); + color: rgb(158, 34, 101); + color: rgb(216, 65, 140); + color: rgb(238, 81, 158); + + /* Style 5 */ + color: rgb(185, 73, 21); + color: rgb(216, 99, 27); + color: rgb(244, 119, 33); + color: rgb(197, 114, 21); + color: rgb(248, 158, 36); + color: rgb(251, 176, 49); + + /* Style 6 */ + color: rgb(124, 38, 118); + color: rgb(169, 59, 150); + color: rgb(200, 56, 150); + color: rgb(91, 34, 127); + color: rgb(126, 60, 151); + color: rgb(164, 95, 167); + + /* Style 7 */ + color: rgb(151, 150, 137); + color: rgb(183, 182, 167); + color: rgb(204, 202, 185); + color: rgb(88, 132, 150); + color: rgb(123, 164, 182); + color: rgb(145, 192, 214); +} + +html, body { + font-family: Avenir, "Nelvetica Neue", sans-serif; + height: 100%; + padding: 0px; + margin: 0px; + color: rgb(85,85,85); + font-size: 15px; + background-color: #f5f5f5; +} + +pre { + background-color: rgb(38,38,38); + padding: 20px; + padding-left: 10px; + overflow: auto; +} + +code { + color: rgb(0, 121, 211); +} + +blockquote { + color: rgb(125,125,125); + border-left: 3px solid rgb(200,200,200); + padding-left: 10px; +} + +p { + line-height: 25px; +} + +ul, ol { + line-height: 25px; +} + +h1 { + font-size: 30px; + color: rgb(85, 85, 85); +} + +h2 { + font-size: 25px; + color: rgb(85, 85, 85); + font-weight: bold; + line-height: 25px; +} + +.logo { + width: 30%; + margin-top: 20px; + margin-bottom: 20px; +} + +.main { + display: flex; + align-items: stretch; + min-height: 100%; +} + +.drawer { + background-color: #555; + color: rgb(187,187,187); + width: 280px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; +} + +.drawer a { + color: rgb(187,187,187); +} + +.article { + max-width: 750px; + padding-left: 60px; + padding-right: 60px; + padding-top: 30px; + background-color: white; +} + +.article a { + color: rgb(0,158,224); +} + +.article a::hover { + color: rgb(91,89,164); +} + +.sidebar-menu { + list-style: none; + margin: 0px; + padding: 0px; +} + +.sidebar-menu a { + text-decoration: none; +} + +.sidebar-menu li { + +} + +.sub { + margin: 0px; + padding: 0px; + padding-left: 20px; +} + +.sub-menu { + margin-top: 20px; +} + +.colored { + color: #eee; +} + +.selected a { + color: rgb(145, 192, 214); +} + +.active { + +} + +.active li { + display: inherit; +} + +.dataTable { + border: 1px solid #000; + border-collapse: collapse; + width: 100%; +} + +.dataTable th { + font-weight: bold; + border: 1px solid #000; +} + +.dataTable td { + border: 1px solid #000; + white-space: pre; + font-family: monospace; + padding: 5px; +} \ No newline at end of file diff --git a/v0.2/stylesheets/highlight/highlight.css b/v0.2/stylesheets/highlight/highlight.css new file mode 100644 index 0000000..7255fa6 --- /dev/null +++ b/v0.2/stylesheets/highlight/highlight.css @@ -0,0 +1,46 @@ +.article pre { + color: black; + background-color: #f5f5f5; + border-left: 5px solid rgb(234, 234, 234); + padding-left: 15px; +} + +.kr { + color: black; +} + +.c1 { + color: #747474; +} + +.nt { + color: rgb(0, 118, 206); +} + +.s { + color: rgb(1, 165, 136); +} + +.m { + color: rgb(1, 165, 136); +} + +.l { + color: rgb(1, 165, 136); +} + +.p { + color: gray; +} + +.nf { + color: rgb(128, 128, 128); +} + +.s2 { + color: rgb(1, 165, 136); +} + +.x { + color: rgb(0, 0, 0); +} \ No newline at end of file diff --git a/v0.2/tutorials/index.html b/v0.2/tutorials/index.html new file mode 100644 index 0000000..cad205a --- /dev/null +++ b/v0.2/tutorials/index.html @@ -0,0 +1,367 @@ + + + + + + + + + + + + Tutorials - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + +
    diff --git a/v0.2/tutorials/index.xml b/v0.2/tutorials/index.xml new file mode 100644 index 0000000..37b17a0 --- /dev/null +++ b/v0.2/tutorials/index.xml @@ -0,0 +1,248 @@ + + + + Tutorials on Eve Documentation + http://docs-next.witheve.com/v0.2//tutorials/ + Recent content in Tutorials on Eve Documentation + Hugo -- gohugo.io + en-us + + + + Quickstart + http://docs-next.witheve.com/v0.2//tutorials/quickstart/ + Mon, 01 Jan 0001 00:00:00 +0000 + + http://docs-next.witheve.com/v0.2//tutorials/quickstart/ + + +<h1 id="eve-quick-start-tutorial">Eve Quick Start Tutorial</h1> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">```</span><span class="w"></span> +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">tag</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, world&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x">```</span><span class="w"></span> +</code></pre></div> + +<p>Hello world! At its core, Eve is a pattern matching language. You match patterns of data by searching a database, then update or create new data according to what you&rsquo;ve found. In this example, we created a <a href="https://witheve.github.io/docs/handbook/records/"><code>record</code></a> that has two attributes: a tag attribute with the value <code>&quot;div&quot;</code>, and a text attribute with the value <code>&quot;Hello, world&quot;</code>. We <a href="https://witheve.github.io/docs/handbook/bind/">bound</a> this record to the browser, which is how we displayed our venerable message.</p> + +<p>The three backticks <code>```</code> are called a code fence, and they allow us to denote blocks of code. This gives us the ability to embed Eve code in normal documents written in Markdown. This is how Eve programs are written: everything in a code fence is a <a href="https://witheve.github.io/docs/handbook/blocks/">block</a> of Eve code, while everything outside is prose describing the program. In fact, this quick start tutorial is an example of an executable Eve program! In the subsequent blocks, you won&rsquo;t see any code fences, but they still exist in the <a href="https://raw.githubusercontent.com/witheve/docs/src/guides/quickstart.md">document&rsquo;s source</a>.</p> + +<p>So far we&rsquo;ve created a record that displays “Hello, world!” but as I said, Eve is a pattern matching language. Let&rsquo;s explore that by searching for something:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">tag</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;div&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, world&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Our message disappeared! Before, we bound without searching, so the message displayed by default. Now we&rsquo;re binding in the presence of a <a href="https://witheve.github.io/docs/handbook/search/"><code>search</code></a> action, so the bound record only exists if all the searched records are matched. Here, we&rsquo;re searching for all records with a <code>name</code> attribute, but we haven&rsquo;t added any records like that to Eve so none are matched. With no matching records, the <code>bind</code> cannot execute, and the message disappears from the screen.</p> + +<p>This is the flow of an Eve block: you search for records in a database, and if all the records you searched for are matched, you can modify the matched records or create new ones. If any part of your search is not matched, then no records will be created or updated.</p> + +<p>To get our message back, all we need is a record with a name attribute. We can create one permanently with the <a href="https://witheve.github.io/docs/handbook/commit/"><code>commit</code></a> action:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Celia&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Hello, world… again! Commit permanently updates or creates a record that will persist even if its matched records (the records matched in a search action) change. Since we aren&rsquo;t searching for anything in this block, the commit executes by default and adds a record with a name attribute of <code>&quot;Celia&quot;</code>. The addition of this new record satisfies the search in the previous block, so “Hello, world!” appears on the screen again.</p> + +<p>But what else can you do with matched records? For starters, we can use them to create new records:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Hello, {{name}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Since we matched on a record with a name attribute, we now have a reference to that name, and we can inject it into a string using <a href="https://witheve.github.io/docs/handbook/string-interpolation/"><code>{{ ... }}</code></a> embedding. We can also swap out <code>tag: &quot;div&quot;</code> for the sugared <code>#div</code>. <a href="https://witheve.github.io/docs/handbook/tags/">Tags</a> are used a lot in Eve to talk about collections of related records. For example, we could search for all records with a <code>#student</code> tag, with name, grade, and school attributes.</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is a {{grade}}th grade student at {{school}}.&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Since we&rsquo;re matching on more attributes, this block is no longer satisfied by the record we added earlier; we&rsquo;re missing a <code>#student</code> tag, as well as grade and school attributes. Even though these are currently missing, we can still write the code that would display them.</p> + +<p>Let&rsquo;s display this new message by adding the missing attributes to Celia. We could add them to the block where we comitted Celia originally, but we can also do it programatically:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">celia</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Celia”</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">celia</span><span class="w"> </span><span class="nf">&lt;-</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;East&quot;</span><span class="p">,</span><span class="w"> </span><span class="x">age</span><span class="nf">:</span><span class="w"> </span><span class="m">16</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>You can define variables within blocks, which act as handles on records that allow you to change them. In this case, we&rsquo;re using the <a href="https://witheve.github.io/docs/handbook/merge/">merge operator</a> <code>&lt;-</code> to combine two records. With the addition of this block, the sentence &ldquo;Celia is a 10th grade student at East.&rdquo; appears in the browser.</p> + +<p>Celia is cool and all, but let&rsquo;s add some more students to our database:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Diedra”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">12</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Michelle”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">11</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;West&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“Jermaine”</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="m">9</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Three sentences are now printed, one for each student that matches the search. Eve works on <a href="https://witheve.github.io/docs/handbook/sets/">sets</a>, so when we search for <code>[#student name grade school]</code>, we find <em>all</em> records that match the given pattern. This includes Celia, Diedra and Michelle (but not Jermaine, as he has no school in his record). Therefore, when we bind the record <code>[#div text: &quot;{{name}} is a ... &quot;]</code>, we are actually binding three records, one for each matching <code>#student</code>.</p> + +<p>If you re-compile the program a couple times, you&rsquo;ll see the order of sentences may change. This is because <strong>there is no ordering in Eve - blocks are not ordered, statements are not ordered, and results are not ordered</strong>. If you want to order elements, you must impose an ordering yourself. We can ask the browser to draw elements in an order with the &ldquo;sort&rdquo; attribute:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="x">name</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is a {{grade}}th grade student at {{school}}.&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>This time when you recompile your program, the order will stay fixed, sorted alphabetically by name.</p> + +<p>Let&rsquo;s make things a little more interesting by adding some records about the schools the students attend:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“West”</span><span class="p">,</span><span class="w"> </span><span class="x">address</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;1234 Main Street&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">“East”</span><span class="p">,</span><span class="w"> </span><span class="x">address</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;5678 Broad Street&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>What if we want to display the address of the school each student attends? Although <code>#student</code>s and <code>#school</code>s are in different records, <strong>we can relate two records by associating attributes from one record with attributes from the other.</strong> This is an operation known as <a href="https://witheve.github.io/docs/handbook/joins/">joining</a>. In this case, we want to relate the <code>name</code> attribute on <code>#schools</code> with the <code>school</code> attribute on <code>#students</code>. This compares the values of the attributes between records, and matches up those with the same value. For instance, since Celia&rsquo;s school is &ldquo;East&rdquo;, she can join with the <code>#school</code> named &ldquo;East&rdquo;.</p> + +<p>Our first attempt may come out looking a little something like this:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">student</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">name</span><span class="p">]</span><span class="w"> </span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{student.name}} attends {{school.name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>But that didn&rsquo;t work. How come? In Eve, <strong>things with the same name are <a href="https://witheve.github.io/docs/handbook/equivalence/">equivalent</a></strong>. In this block, we&rsquo;ve used &ldquo;name&rdquo; three times, which says that the school&rsquo;s name, the student&rsquo;s name, and the student&rsquo;s school are all the same. Of course, there is no combination of students and schools that match this search, so nothing is displayed.</p> + +<p>Instead, we can use the dot operator to specifically ask for the name attribute in the <code>#school</code> records, and rename our variables to get a correct block:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">schools</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school.name</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{students.name}} attends {{schools.name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>This creates an implicit join over the school name without mixing up the names of the students and the names of the schools, giving us our desired output. You can actually bind attributes to any name you want to avoid collisions in a block:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#school</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="nf">-</span><span class="x">name</span><span class="w"> </span><span class="x">address</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">student</span><span class="nf">-</span><span class="x">name</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="nf">-</span><span class="x">name</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{student-name}} attends {{school-name}} at {{address}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<h2 id="advanced-eve">Advanced Eve</h2> + +<p>Recall when we added our students, Celia was the only one we added an <code>age</code> to. Therefore, the following block only displays Celia&rsquo;s age, even though we ask for all the <code>#student</code>s:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="x">age</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{name}} is {{age}} years old&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>Let&rsquo;s pretend that all students enter first grade at six years old. Therefore, if we know a student&rsquo;s grade, we can calculate their age and add it to the student&rsquo;s record:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">student</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">calculated</span><span class="nf">-</span><span class="x">age</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">student.age</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">student.age</span><span class="w"></span> +<span class="x">                  </span><span class="w"> </span><span class="kr">else</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="x">student.grade</span><span class="w"> </span><span class="kr">then</span><span class="w"> </span><span class="x">student.grade</span><span class="w"> </span><span class="nf">+</span><span class="w"> </span><span class="m">5</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">student.age</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="x">calculated</span><span class="nf">-</span><span class="x">age</span><span class="w"></span> +</code></pre></div> + +<p>This block selects all students, and uses and <a href="https://witheve.github.io/docs/handbook/if-then/"><code>if-then</code></a> expression to set the student&rsquo;s calculated age. If the student already has an age, we set it to that. Otherwise, if the student has no age, we can calculate it with some arithmetic. The <a href="https://witheve.github.io/docs/handbook/set/">set operator</a> <code>:=</code> sets an attribute to a specified value regardless of what it was before the block executed. That value can be anything, from a number to a string to another record.</p> + +<h3 id="aggregates">Aggregates</h3> + +<p>So far everything we&rsquo;ve done has used one record at a time, but what happens when we want to work over a group of records, such as counting how many students there are? To solve such a problem, we&rsquo;ll need to use an <a href="https://witheve.github.io/docs/handbook/aggregates/">aggregate</a>. Aggregates take a set of values and turn them into a single value, akin to &ldquo;fold&rdquo; or &ldquo;reduce&rdquo; functions in other languages. In this case, we&rsquo;ll use the aggregate <a href="https://witheve.github.io/docs/handbook/statistics/count/"><code>count</code></a> to figure out how many <code>#students</code> are in the school district:  </p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">total</span><span class="nf">-</span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"> </span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{total-students}} are in the school district&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>A quick note on the syntax for <code>count</code> - it feels a lot like a function in other languages, since it has a return value and can be used inline in expressions. Under the hood, <a href="https://witheve.github.io/docs/handbook/functions/">functions</a> and aggregates are actually records; <code>total = count[given: students]</code> is shorthand for <code>[#count #function given: students, value: total]</code>. This distinction won&rsquo;t materially change the way you use <code>count</code>, but it goes to show that everything in Eve reduces to working with records.</p> + +<p>While <code>given</code> is a required argument in <code>count</code>, aggregates (and functions in general) can also have optional arguments. Let&rsquo;s say we want to know how many students attend each school. We can use the optional argument <code>per</code> to count students grouped by the school they attend:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">students</span><span class="nf">-</span><span class="x">per</span><span class="nf">-</span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="x">count</span><span class="p">[</span><span class="x">given</span><span class="nf">:</span><span class="w"> </span><span class="x">students</span><span class="p">,</span><span class="w"> </span><span class="x">per</span><span class="nf">:</span><span class="w"> </span><span class="x">school</span><span class="p">]</span><span class="w"></span> + +<span class="kr">bind</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;{{students-per-school}} attend {{school}}&quot;</span><span class="p">]</span><span class="w"></span> +</code></pre></div> + +<p>All function-like records in Eve specify their arguments as attributes. This means you specify the argument and its value, unlike in other languages, where the order of the values determines the attribute to which they belong. As with everything else in Eve, order doesn&rsquo;t matter.</p> + +<h2 id="extra-credit">Extra Credit</h2> + +<p>At this point, you know everything necessary about Eve to complete this extra credit portion (the only additional knowledge you need is domain knowledge of HTML and forms). Let&rsquo;s review some of the key concepts:</p> + +<ul> +<li>Eve programs are composed of blocks of code that search for and update records.</li> +<li>Records are sets of <code>attribute: value</code> pairs attached to a unique ID.</li> +<li>Eve works with sets, which have no ordering and contain unique elements.</li> +<li>Things with the same name are equivalent.</li> +</ul> + +<p>Your extra credit task is to build a web-based form that allows you to add students to the database. Take a moment to think about how this might be done in Eve, given everything we&rsquo;ve learned so far.</p> + +<p>First, let&rsquo;s make the form. We&rsquo;ve already displayed a <code>#div</code>, and in the same way we can draw <code>#input</code>s and a <code>#button</code>:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">bind</span><span class="w"> </span><span class="nt">@browser</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">children</span><span class="nf">:</span><span class="w"> </span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Name:&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#name-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">2</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">3</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;Grade:&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#grade-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">4</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#div</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;School:&quot;</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#input</span><span class="w"> </span><span class="nt">#school-input</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">6</span><span class="p">]</span><span class="w"></span> +<span class="x">   </span><span class="w"> </span><span class="p">[</span><span class="nt">#button</span><span class="w"> </span><span class="nt">#submit</span><span class="w"> </span><span class="x">sort</span><span class="nf">:</span><span class="w"> </span><span class="m">7</span><span class="w"> </span><span class="x">text</span><span class="nf">:</span><span class="w"> </span><span class="s">&quot;submit&quot;</span><span class="p">]]</span><span class="w"></span> +</code></pre></div> + +<p>We&rsquo;ve added some tags to the inputs and the button to distinguish them, so we can easily search for them from other blocks. Now that we have a form, we need to define what happens when the submit button is clicked.</p> + +<p>Remember, everything in Eve is a record, so the <code>#click</code> event is no different. When a user clicks the mouse in the browser, Eve records that click in the database.</p> + +<p>This record exists only for an instant, but we can react to it by searching for <code>[#click element: [#submit]]</code>. This record represents a <code>#click</code> on our <code>#submit</code> button. Then, all we need to do is capture the values of the input boxes and save them as a <code>#student</code> record:</p> +<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#click</span><span class="w"> </span><span class="x">element</span><span class="nf">:</span><span class="w"> </span><span class="p">[</span><span class="nt">#submit</span><span class="p">]]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">name</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#name-input</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">grade</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#grade-input</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">school</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#school-input</span><span class="p">]</span><span class="w"></span> + +<span class="kr">commit</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="c1">// save the new student</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="p">[</span><span class="nt">#student</span><span class="w"> </span><span class="x">name</span><span class="nf">:</span><span class="w"> </span><span class="x">name.value</span><span class="p">,</span><span class="w"> </span><span class="x">grade</span><span class="nf">:</span><span class="w"> </span><span class="x">grade.value</span><span class="p">,</span><span class="w"> </span><span class="x">school</span><span class="nf">:</span><span class="w"> </span><span class="x">school.value</span><span class="p">]</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="c1">// reset the form</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">name.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">grade.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> +<span class="x"> </span><span class="w"> </span><span class="x">school.value</span><span class="w"> </span><span class="nf">:=</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"></span> +</code></pre></div> + +<h2 id="learning-more">Learning more</h2> + +<p>If you want to learn more about Eve, we have some resources to help with that:</p> + +<ul> +<li>Example applications - See some working programs and explore how they work.</li> +<li>Tutorials - Step by step instructions on building Eve applications.</li> +<li><a href="https://witheve.github.io/docs">The Eve Handbook</a> - Everything you need to know about Eve.</li> +<li><a href="https://witheve.github.io/assets/docs/SyntaxReference.pdf">Eve syntax reference</a> - Eve&rsquo;s syntax in one page.</li> +<li>Guides - In-depth documents on topics relating to Eve.</li> +</ul> + +<p>We also invite you to join the Eve community! There are several ways to get involved:</p> + +<ul> +<li>Join our <a href="https://groups.google.com/forum/#!forum/eve-talk">mailing list</a> and get involved with the latest discussions on Eve.</li> +<li>Impact the future of Eve by getting involved with our <a href="https://github.com/witheve/rfcs">Request for Comments</a> process.</li> +<li>Read our <a href="http://incidentalcomplexity.com/">development diary</a> for the latest news and articles on Eve.</li> +<li>Follow us on <a href="https://twitter.com/with_eve">twitter</a>.</li> +</ul> + + + + + \ No newline at end of file diff --git a/v0.2/tutorials/quickstart/index.html b/v0.2/tutorials/quickstart/index.html new file mode 100644 index 0000000..2b4e47a --- /dev/null +++ b/v0.2/tutorials/quickstart/index.html @@ -0,0 +1,591 @@ + + + + + + + + + + + + Quickstart - Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + +

    Eve Quick Start Tutorial

    +
    ```
    +bind @browser
    +  [tag: "div", text: "Hello, world"]
    +```
    +
    + +

    Hello world! At its core, Eve is a pattern matching language. You match patterns of data by searching a database, then update or create new data according to what you’ve found. In this example, we created a record that has two attributes: a tag attribute with the value "div", and a text attribute with the value "Hello, world". We bound this record to the browser, which is how we displayed our venerable message.

    + +

    The three backticks ``` are called a code fence, and they allow us to denote blocks of code. This gives us the ability to embed Eve code in normal documents written in Markdown. This is how Eve programs are written: everything in a code fence is a block of Eve code, while everything outside is prose describing the program. In fact, this quick start tutorial is an example of an executable Eve program! In the subsequent blocks, you won’t see any code fences, but they still exist in the document’s source.

    + +

    So far we’ve created a record that displays “Hello, world!” but as I said, Eve is a pattern matching language. Let’s explore that by searching for something:

    +
    search
    +  [name]
    +
    +bind @browser
    +  [tag: "div", text: "Hello, world"]
    +
    + +

    Our message disappeared! Before, we bound without searching, so the message displayed by default. Now we’re binding in the presence of a search action, so the bound record only exists if all the searched records are matched. Here, we’re searching for all records with a name attribute, but we haven’t added any records like that to Eve so none are matched. With no matching records, the bind cannot execute, and the message disappears from the screen.

    + +

    This is the flow of an Eve block: you search for records in a database, and if all the records you searched for are matched, you can modify the matched records or create new ones. If any part of your search is not matched, then no records will be created or updated.

    + +

    To get our message back, all we need is a record with a name attribute. We can create one permanently with the commit action:

    +
    commit
    +  [name: "Celia"]
    +
    + +

    Hello, world… again! Commit permanently updates or creates a record that will persist even if its matched records (the records matched in a search action) change. Since we aren’t searching for anything in this block, the commit executes by default and adds a record with a name attribute of "Celia". The addition of this new record satisfies the search in the previous block, so “Hello, world!” appears on the screen again.

    + +

    But what else can you do with matched records? For starters, we can use them to create new records:

    +
    search
    +  [name]
    +
    +bind @browser
    +  [#div, text: "Hello, {{name}}"]
    +
    + +

    Since we matched on a record with a name attribute, we now have a reference to that name, and we can inject it into a string using {{ ... }} embedding. We can also swap out tag: "div" for the sugared #div. Tags are used a lot in Eve to talk about collections of related records. For example, we could search for all records with a #student tag, with name, grade, and school attributes.

    +
    search
    +  [#student name grade school]
    +
    +bind @browser
    +  [#div text: "{{name}} is a {{grade}}th grade student at {{school}}."]
    +
    + +

    Since we’re matching on more attributes, this block is no longer satisfied by the record we added earlier; we’re missing a #student tag, as well as grade and school attributes. Even though these are currently missing, we can still write the code that would display them.

    + +

    Let’s display this new message by adding the missing attributes to Celia. We could add them to the block where we comitted Celia originally, but we can also do it programatically:

    +
    search
    +  celia = [name: “Celia”]
    +
    +bind
    +  celia <- [#student grade: 10, school: "East", age: 16]
    +
    + +

    You can define variables within blocks, which act as handles on records that allow you to change them. In this case, we’re using the merge operator <- to combine two records. With the addition of this block, the sentence “Celia is a 10th grade student at East.” appears in the browser.

    + +

    Celia is cool and all, but let’s add some more students to our database:

    +
    commit
    +  [#student name: “Diedra”, grade: 12, school: "West"]
    +  [#student name: “Michelle”, grade: 11, school: "West"]
    +  [#student name: “Jermaine”, grade: 9]
    +
    + +

    Three sentences are now printed, one for each student that matches the search. Eve works on sets, so when we search for [#student name grade school], we find all records that match the given pattern. This includes Celia, Diedra and Michelle (but not Jermaine, as he has no school in his record). Therefore, when we bind the record [#div text: "{{name}} is a ... "], we are actually binding three records, one for each matching #student.

    + +

    If you re-compile the program a couple times, you’ll see the order of sentences may change. This is because there is no ordering in Eve - blocks are not ordered, statements are not ordered, and results are not ordered. If you want to order elements, you must impose an ordering yourself. We can ask the browser to draw elements in an order with the “sort” attribute:

    +
    search
    +  [#student name grade school]
    +
    +bind @browser
    +  [#div sort: name, text: "{{name}} is a {{grade}}th grade student at {{school}}."]
    +
    + +

    This time when you recompile your program, the order will stay fixed, sorted alphabetically by name.

    + +

    Let’s make things a little more interesting by adding some records about the schools the students attend:

    +
    commit
    +  [#school name: “West”, address: "1234 Main Street"]
    +  [#school name: “East”, address: "5678 Broad Street"]
    +
    + +

    What if we want to display the address of the school each student attends? Although #students and #schools are in different records, we can relate two records by associating attributes from one record with attributes from the other. This is an operation known as joining. In this case, we want to relate the name attribute on #schools with the school attribute on #students. This compares the values of the attributes between records, and matches up those with the same value. For instance, since Celia’s school is “East”, she can join with the #school named “East”.

    + +

    Our first attempt may come out looking a little something like this:

    +
    search
    +  school = [#school name address]
    +  student = [#student name school: name] 
    +
    +bind @browser
    +  [#div text: "{{student.name}} attends {{school.name}} at {{address}}"]
    +
    + +

    But that didn’t work. How come? In Eve, things with the same name are equivalent. In this block, we’ve used “name” three times, which says that the school’s name, the student’s name, and the student’s school are all the same. Of course, there is no combination of students and schools that match this search, so nothing is displayed.

    + +

    Instead, we can use the dot operator to specifically ask for the name attribute in the #school records, and rename our variables to get a correct block:

    +
    search
    +  schools = [#school address]
    +  students = [#student school: school.name]
    +
    +bind @browser
    +  [#div text: "{{students.name}} attends {{schools.name}} at {{address}}"]
    +
    + +

    This creates an implicit join over the school name without mixing up the names of the students and the names of the schools, giving us our desired output. You can actually bind attributes to any name you want to avoid collisions in a block:

    +
    search
    +  [#school name: school-name address]
    +  [#student name: student-name school: school-name]
    +
    +bind @browser
    +  [#div text: "{{student-name}} attends {{school-name}} at {{address}}"]
    +
    + +

    Advanced Eve

    + +

    Recall when we added our students, Celia was the only one we added an age to. Therefore, the following block only displays Celia’s age, even though we ask for all the #students:

    +
    search
    +  [#student name age]
    +
    +bind @browser
    +  [#div text: "{{name}} is {{age}} years old"]
    +
    + +

    Let’s pretend that all students enter first grade at six years old. Therefore, if we know a student’s grade, we can calculate their age and add it to the student’s record:

    +
    search
    +  student = [#student]
    +  calculated-age = if student.age then student.age
    +                   else if student.grade then student.grade + 5
    +
    +bind @browser
    +  student.age := calculated-age
    +
    + +

    This block selects all students, and uses and if-then expression to set the student’s calculated age. If the student already has an age, we set it to that. Otherwise, if the student has no age, we can calculate it with some arithmetic. The set operator := sets an attribute to a specified value regardless of what it was before the block executed. That value can be anything, from a number to a string to another record.

    + +

    Aggregates

    + +

    So far everything we’ve done has used one record at a time, but what happens when we want to work over a group of records, such as counting how many students there are? To solve such a problem, we’ll need to use an aggregate. Aggregates take a set of values and turn them into a single value, akin to “fold” or “reduce” functions in other languages. In this case, we’ll use the aggregate count to figure out how many #students are in the school district:  

    +
    search
    +  students = [#student]
    +  total-students = count[given: students]
    +
    +bind 
    +  [#div text: "{{total-students}} are in the school district"]
    +
    + +

    A quick note on the syntax for count - it feels a lot like a function in other languages, since it has a return value and can be used inline in expressions. Under the hood, functions and aggregates are actually records; total = count[given: students] is shorthand for [#count #function given: students, value: total]. This distinction won’t materially change the way you use count, but it goes to show that everything in Eve reduces to working with records.

    + +

    While given is a required argument in count, aggregates (and functions in general) can also have optional arguments. Let’s say we want to know how many students attend each school. We can use the optional argument per to count students grouped by the school they attend:

    +
    search
    +  students = [#student school]
    +  students-per-school = count[given: students, per: school]
    +
    +bind
    +  [#div text: "{{students-per-school}} attend {{school}}"]
    +
    + +

    All function-like records in Eve specify their arguments as attributes. This means you specify the argument and its value, unlike in other languages, where the order of the values determines the attribute to which they belong. As with everything else in Eve, order doesn’t matter.

    + +

    Extra Credit

    + +

    At this point, you know everything necessary about Eve to complete this extra credit portion (the only additional knowledge you need is domain knowledge of HTML and forms). Let’s review some of the key concepts:

    + +
      +
    • Eve programs are composed of blocks of code that search for and update records.
    • +
    • Records are sets of attribute: value pairs attached to a unique ID.
    • +
    • Eve works with sets, which have no ordering and contain unique elements.
    • +
    • Things with the same name are equivalent.
    • +
    + +

    Your extra credit task is to build a web-based form that allows you to add students to the database. Take a moment to think about how this might be done in Eve, given everything we’ve learned so far.

    + +

    First, let’s make the form. We’ve already displayed a #div, and in the same way we can draw #inputs and a #button:

    +
    bind @browser
    +  [#div children: 
    +    [#div sort: 1, text: "Name:"]
    +    [#input #name-input sort: 2]
    +    [#div sort: 3, text: "Grade:"]
    +    [#input #grade-input sort: 4]
    +    [#div sort: 5, text: "School:"]
    +    [#input #school-input sort: 6]
    +    [#button #submit sort: 7 text: "submit"]]
    +
    + +

    We’ve added some tags to the inputs and the button to distinguish them, so we can easily search for them from other blocks. Now that we have a form, we need to define what happens when the submit button is clicked.

    + +

    Remember, everything in Eve is a record, so the #click event is no different. When a user clicks the mouse in the browser, Eve records that click in the database.

    + +

    This record exists only for an instant, but we can react to it by searching for [#click element: [#submit]]. This record represents a #click on our #submit button. Then, all we need to do is capture the values of the input boxes and save them as a #student record:

    +
    search
    +  [#click element: [#submit]]
    +  name = [#name-input]
    +  grade = [#grade-input]
    +  school = [#school-input]
    +
    +commit
    +  // save the new student
    +  [#student name: name.value, grade: grade.value, school: school.value]
    +  // reset the form
    +  name.value := ""
    +  grade.value := ""
    +  school.value := ""
    +
    + +

    Learning more

    + +

    If you want to learn more about Eve, we have some resources to help with that:

    + +
      +
    • Example applications - See some working programs and explore how they work.
    • +
    • Tutorials - Step by step instructions on building Eve applications.
    • +
    • The Eve Handbook - Everything you need to know about Eve.
    • +
    • Eve syntax reference - Eve’s syntax in one page.
    • +
    • Guides - In-depth documents on topics relating to Eve.
    • +
    + +

    We also invite you to join the Eve community! There are several ways to get involved:

    + + + + +
    +
    + +
    + diff --git a/v0.3/README/index.html b/v0.3/README/index.html new file mode 100644 index 0000000..e0608f9 --- /dev/null +++ b/v0.3/README/index.html @@ -0,0 +1,19 @@ + + +

    + Eve logo +

    + +
    + +

    Documentation for the Eve programming language.

    + +

    You can learn more about Eve here: http://witheve.com/

    + +

    You can play with Eve here: http://play.witheve.com

    + +

    Eve is under active development here: https://github.com/witheve/Eve

    + +

    Contributing

    + +

    There’s a lot of work to be done on the documentation, so this is a great place for beginners to get started with Eve. From fixing typos to adding examples, work needs to be done across the board here. Check out the issues for a place to start, as they have been raised already as points of improvement by the community. If someone is already assigned and the issue has been aroud a while, check to see if it’s being worked on before starting it yourself. Or, if you find an issue yourself, please report it so others know it exists. Thank you!

    diff --git a/v0.3/fonts/icon.eot b/v0.3/fonts/icon.eot new file mode 100644 index 0000000000000000000000000000000000000000..8f81638c2de436e1b5cc77b6a2693b2b347a0151 GIT binary patch literal 2224 zcmaJDYiN^K^qhP1ZcHEMVbZM4%Vs7uwoQ|)E~(XOx7OBXnq))T&RAn>*Cw^Cqp}}H zWH6912NR|+2m5JcjIkeMjv=!Q9249yfx%!u#)^-T>W{&MHQBjeBBo>Pe4KmF^E>CB z@7#O8&r|?g2oV@;1cVDHB*W2-a$#G6b3^#>-#P#loPbHlK$=uKI0z}2f>SUHNmw9> z5fUU>fJL$rHa6%4A9RqW){j^bqzea^bdbuq5*;Zk-LE^Cdn?+_Wk$3IeMJy!S`Wh)UMyN+J zdS?0mGDhF6kI!%~<+qJq>2&vEpxeis4jnV-TbREq7%~}5A-CPp7U&N8yNm|C!pSZ= z>RMgx`%^o6Qv2I!?&%)eT36VWFT?1`lcUl3`6$Mm(PLi)Z77M4~2lu_KixyTMMWFbEgdpD<-HjI^xqTD%xRVN3f% z27EufM7BCq_F{-eA6ANNH2Jt&hXy?n=(b9Pj&yDA7Bp1}?(gblf$p{dxyryAvDrJc zt^F=*bbI@7kDasKZ>5j8H`V(+mJUPmWnFWsN4v+*4sUM2nLSNzr@QTW$GB0}ROgND*=9A% zw1)nnmfd#y?v|l`gH~p?ZtFkf)fup1^YGd6?&$gJGyIAekox zZ*nZ1`&86Qhw@P=Z(>&x;ARp0>8hS~9}KyeD>li(=rCx4^e?QEnx+3`oEyA6+GNZnmZ#7YHL z5IITs5QomaULXEb^rwKI?mhVE*tF(gTJylu*7C253QKlw|iZm6P z(d9W@r8&tvtF(;hi7G9p>(o@G6(o;TX$^Ek_QYf+{q!nMq!t!WWYV@yU&nvnzqQ7- z^ug5BsoCVh#%sLRU?7uTvQ4GZsfFZH>X_~5Y1`mrW+anI`(Qx2;FrKgKL9DZ>czF6 gge97fk?bg(rg2dERTv>l@iX9~idJf0Tk{R{Kaui$V*mgE literal 0 HcmV?d00001 diff --git a/v0.3/fonts/icon.svg b/v0.3/fonts/icon.svg new file mode 100644 index 0000000..86250e7 --- /dev/null +++ b/v0.3/fonts/icon.svg @@ -0,0 +1,22 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/v0.3/fonts/icon.ttf b/v0.3/fonts/icon.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b5ab5601bed7765790037c721c2ee1c7d444a7a5 GIT binary patch literal 2072 zcmaJ>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ZTG8Fll3 zj5+Cd%2+}8sEn2L{p)3{B7Lunbzp;&lo1tL(rCz1!wd{CB4bYaZW${GPsvybX0XUu zMf$jmbr6F5sp(u6PQf(fAe+i8EuYF|9o>O0NI?dcV3|y000$i$fUbJydVDxDb7nrh z1cxbT2F}1dq+zMvVKA3nam-}0nWgkf=7i(;S;x?HZZwz624GN1utF(jC^{>pO~VT9 cCrEc3&eA$0)i+9>qL=`6wATCjoC1DrZ;vj6}9 literal 0 HcmV?d00001 diff --git a/v0.3/fonts/icon.woff b/v0.3/fonts/icon.woff new file mode 100644 index 0000000000000000000000000000000000000000..ed0f20d5b80ab98072f3557225b3333e01b78670 GIT binary patch literal 2148 zcmaJ?U2M};6hG(Qeym;Bb)z4&t6RTVr5$BkzZkY-Fqm#^Y(iTNVUx0zjk&dB8w&A( z8e?KYjQT(#L^1J^5+8grk{BY32}Tk$w26s{CdP%2q=N?^NL=f=|NfEk;{E5G`#WF% zbMEQ+-@ZLQGz18=8fKtT+PBtZfuCRFM|SoCU;}B73uHeVHCj?Ez9{;wK zTUn*D_W$R{332`_ehf+gc8O7y@KJ5YhY&;!$@L2j^^(8?0P8LMM)d{^a3azm(bMIS zfRu%hoooWzi3=|~D5MA-b&3&2aI9i2uExtracIOW6c|0?H$$~W zZ9y!=*Vf_)tPsDs7NdhB6d}+3tSBZMy=t#;i_#gmKVB}!H#Q{BF2%~_Sb0P64eD(k z3OrBm<)9XEQD?aJn4IA}hfUH8DkSsCQYuwfJIy)O;WRm^6b7;K<`bqa$B>Q{+ent< zD0~4L6~GU|%jBy^bw5Ul2e8&;vn9a2dNdgcpw}(|J=r?F?P!q!5BB!6aHum(p$f3a z9nNlD$DqePv7>9W&&k=|ce2O5P0c}{t=p7-Mc>w}HEN7+9*Dd@(qz@SM_)~Kee(OK zhp;1TV)t|{3S-REYEyT3oPA^drmcrvRh&Z~^%oU97IgGw;hGw@_ zw{WdEr`D^@(GJmHsD4A|xdN||AP+eZdXI)&A~eej51Z$iVC(RU|96Bn+}^DBZUFQ1>X@m8%S;;ip%T zC`Qa3qnS!_KYb@^(9x;gEzTCV29c)2$^C^Y6wr_U&8sX$|R8 z@T8dYZAu>9)`&_AXLP3y-LKp}d$w}>{?LzKVAm}hwpISJ-KyNBN%K)miDJY&YUw3m zx5+}J)FAUE5{XIzOY|hKUAvk}<+<;l66GmTOp2rQJq25wUUv)C$xc41+%-H(AWe5A zm8g_hNz^3KLmYYUjpo?jVm`(C<=%tOpY8ImEbel;MWjV>(tSr4mRQ8ao9dULW~r$} z7|D5}0$p)g+KbO*$tLVVmn8BLQE{}iV1#!1Z+QzofG^=&xP!a!YrKOGn1b2JF0vZn zb?S~-Ppgvznd#vxxi%CjWX!0W2V~4izeC0f!bfGSr0-uRV-@N9WUK`noTQAX(2%Bq zEH%tP52G^Xr0R1(LwEqj{ug`Uae@E< literal 0 HcmV?d00001 diff --git a/guides/index.html b/v0.3/guides/index.html similarity index 66% rename from guides/index.html rename to v0.3/guides/index.html index e71de9f..5d5581a 100644 --- a/guides/index.html +++ b/v0.3/guides/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@

    @@ -87,7 +87,7 @@

    EVE

    Play Blog - Docs + Docs Community @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,7 +150,7 @@

    EVE

    Pages in Guide

    - +

    diff --git a/guides/index.xml b/v0.3/guides/index.xml similarity index 62% rename from guides/index.xml rename to v0.3/guides/index.xml index f603b51..98a1c7e 100644 --- a/guides/index.xml +++ b/v0.3/guides/index.xml @@ -2,18 +2,18 @@ Guides on Eve Documentation - http://docs-next.witheve.com/guides/index.xml + http://docs-next.witheve.com/v0.3/guides/index.xml Recent content in Guides on Eve Documentation Hugo -- gohugo.io en-us - + - http://docs-next.witheve.com/guides/ + http://docs-next.witheve.com/v0.3/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/guides/ + http://docs-next.witheve.com/v0.3/guides/ diff --git a/handbook/index.html b/v0.3/handbook/index.html similarity index 65% rename from handbook/index.html rename to v0.3/handbook/index.html index 1ae063f..93d0d45 100644 --- a/handbook/index.html +++ b/v0.3/handbook/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -87,7 +87,7 @@

    EVE

    Play Blog - Docs + Docs Community @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,19 +150,19 @@

    EVE

    Pages in Handbook

    - +


    - +


    - +

    Standard Library

    diff --git a/handbook/index.xml b/v0.3/handbook/index.xml similarity index 96% rename from handbook/index.xml rename to v0.3/handbook/index.xml index 92ee6e4..932157e 100644 --- a/handbook/index.xml +++ b/v0.3/handbook/index.xml @@ -2,36 +2,36 @@ Handbooks on Eve Documentation - http://docs-next.witheve.com/handbook/index.xml + http://docs-next.witheve.com/v0.3/handbook/index.xml Recent content in Handbooks on Eve Documentation Hugo -- gohugo.io en-us - + - http://docs-next.witheve.com/handbook/core/ + http://docs-next.witheve.com/v0.3/handbook/core/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/handbook/core/ + http://docs-next.witheve.com/v0.3/handbook/core/ - http://docs-next.witheve.com/handbook/ + http://docs-next.witheve.com/v0.3/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/handbook/ + http://docs-next.witheve.com/v0.3/handbook/ Standard Library - http://docs-next.witheve.com/handbook/libraries/ + http://docs-next.witheve.com/v0.3/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/handbook/libraries/ + http://docs-next.witheve.com/v0.3/handbook/libraries/ <h1 id="standard-library">Standard Library</h1> diff --git a/handbook/libraries/index.html b/v0.3/handbook/libraries/index.html similarity index 90% rename from handbook/libraries/index.html rename to v0.3/handbook/libraries/index.html index 855b664..18b7217 100644 --- a/handbook/libraries/index.html +++ b/v0.3/handbook/libraries/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -84,7 +84,7 @@

    EVE

    Play Blog - Docs + Docs Community @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/handbook/libraries/stdlib/index.html b/v0.3/handbook/libraries/stdlib/index.html similarity index 100% rename from handbook/libraries/stdlib/index.html rename to v0.3/handbook/libraries/stdlib/index.html diff --git a/v0.3/images/eve.svg b/v0.3/images/eve.svg new file mode 100644 index 0000000..7bf5127 --- /dev/null +++ b/v0.3/images/eve.svg @@ -0,0 +1 @@ +Asset 1 \ No newline at end of file diff --git a/v0.3/images/favicon.png b/v0.3/images/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..9954640c725b67c9ce2832fc2cb92f5205e0cb68 GIT binary patch literal 588 zcmV-S0<-;zP)`OKT|FoG@`x%_aS zZP%v&X&Um%^vu~0o8^i2z|!%F;>qEo=}V&{L&Z%2*@cQ} zd+L0_ZrnQZ`n??Z`~|(?x3s8NE6R}GaNoAr+>M!wwI;xN>0Bt;&RE@7SpamMM5)Z+ z(lY6fIeaak)GB2*)+7%AXf*sx zd9`{QKmw?>iYMN_k;1ZI=K#1s%>hm4cai~Epp=4q9^r!8YIU)=QyTxM{|nHxU!(pF zAYz8GQroe1^tYHJ0dyg3PpO`cDh0v_(;L=NA}ER_5*X1ar9z?J{6Q*i48_9oIjRld zc|1OLh_8t)NZ${bN@1Geh0K9H2RjzEYx3#2d{1)RP4w+;UA81$C~_jVvYa&av8z+3 z?sh$KQwje0#Nw(MpUXXn%&yE|TP&H~ a@_qssLZoZh+}s-g0000Ou94eCcHFE;*;~f7S45$bnU&1UtZ>bYD|>bAk*sVP5iVtx6|%=I zWL#wXziywt>-^67|NouiD0O;|*X#9sjOXKdBXn=8Qj#%}ojZ4qQe90+@7y_pVDR;e zloSV*qjLb8RD#V|Jk{7w~+X+^CNG| z-M|ltEi_e?z<2QLK=FM5_(tNUuB}WmLqbY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>uzG2+eggUM(kBNB(I_OXxW$J zFYmQ%r3jfZD9wgP*MXuWfDY@@Fory>g5MtNJWQI3r!8u^(~#j>EiQ`maNi(+vgpmP z$jFW`?{6Ar(e<8N&7oH{ei)>;prR6xW$1i+to(vV&LRIg`NE-_A; zpJ~&fw2YQmI?-w<^})od%!DO^3!_2&3XNaIGODODdlOR4fye5tsama6(#mH|Si{x@ zR$B(^rT+kEjT=~1B!c`x5j@Ndr8-sj(z+ z3gD9pLPz??Db*1zmll(@LI_DvzliV~0h2yCeafFIJ}rjDQ~D1OL7=Z@m@okTz^R1# mR&|_af&WIM_$AUlLpOV}a*%#Ow5B?vJ?2R)3 literal 0 HcmV?d00001 diff --git a/v0.3/index.html b/v0.3/index.html new file mode 100644 index 0000000..a51a03d --- /dev/null +++ b/v0.3/index.html @@ -0,0 +1,197 @@ + + + + + + + + + + + + Eve Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + + +

    Install guide

    + +

    Need to install Eve on your machine? Head here for step-by-step directions.

    + +

    Quickstart

    + +

    If you’re new to Eve and want a hands-on demo to learn the language, you can jump right in with a 5 minute quickstart guide that shows you how to build a simple incrementing counter.

    + +

    Syntax reference

    + +

    Want a reminder how the syntax works or to get an overview of Eve without going through the quickstart? The syntax reference is a good place to start.

    + +

    Libraries

    + +

    Want to know everything Eve can do? Here’s a list of all the functions, operators, and watchers available in the language.

    + +

    Stuck?

    + +

    If you didn’t find what you were looking for, you can get in touch with the Eve team and the community through these channels:

    + +
      +
    • Send a message to the mailing list. We generally respond to messages within a day.
    • +
    • Send a tweet to @with_eve.
    • +
    • Submit an issue to our GitHub repository.
    • +
    • Join the Eve Slack channel to talk with Eve developers and the community in real time (coming soon)
    • +
    + +

    Want to learn more?

    + +
      +
    • Read our blog to see what we’re up to, from our developer diary to essays, announcements, and more.
    • +
    + + + +
    +
    +
    +
    \ No newline at end of file diff --git a/index.xml b/v0.3/index.xml similarity index 97% rename from index.xml rename to v0.3/index.xml index d628b2a..cb80942 100644 --- a/index.xml +++ b/v0.3/index.xml @@ -2,18 +2,18 @@ Eve Documentation - http://docs-next.witheve.com/index.xml + http://docs-next.witheve.com/v0.3/index.xml Recent content on Eve Documentation Hugo -- gohugo.io en-us - + Installation - http://docs-next.witheve.com/install/ + http://docs-next.witheve.com/v0.3/install/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/install/ + http://docs-next.witheve.com/v0.3/install/ <h1 id="installation">Installation</h1> @@ -46,10 +46,10 @@ npm install Quickstart - http://docs-next.witheve.com/tutorials/quickstart.eve/ + http://docs-next.witheve.com/v0.3/tutorials/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/tutorials/quickstart.eve/ + http://docs-next.witheve.com/v0.3/tutorials/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> @@ -146,10 +146,10 @@ npm install Quickstart - http://docs-next.witheve.com/quickstart.eve/ + http://docs-next.witheve.com/v0.3/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/quickstart.eve/ + http://docs-next.witheve.com/v0.3/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> @@ -246,10 +246,10 @@ npm install Index - http://docs-next.witheve.com/ + http://docs-next.witheve.com/v0.3/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/ + http://docs-next.witheve.com/v0.3/ <h2 id="install-guide">Install guide</h2> @@ -289,10 +289,10 @@ npm install Syntax Ref - http://docs-next.witheve.com/syntaxreference/ + http://docs-next.witheve.com/v0.3/syntaxreference/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/syntaxreference/ + http://docs-next.witheve.com/v0.3/syntaxreference/ <h1 id="syntax-reference">Syntax Reference</h1> @@ -549,10 +549,10 @@ chris := none</code></td> - http://docs-next.witheve.com/README/ + http://docs-next.witheve.com/v0.3/README/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/README/ + http://docs-next.witheve.com/v0.3/README/ <p align="center"> @@ -577,46 +577,46 @@ chris := none</code></td> - http://docs-next.witheve.com/guides/ + http://docs-next.witheve.com/v0.3/guides/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/guides/ + http://docs-next.witheve.com/v0.3/guides/ - http://docs-next.witheve.com/handbook/core/ + http://docs-next.witheve.com/v0.3/handbook/core/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/handbook/core/ + http://docs-next.witheve.com/v0.3/handbook/core/ - http://docs-next.witheve.com/handbook/ + http://docs-next.witheve.com/v0.3/handbook/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/handbook/ + http://docs-next.witheve.com/v0.3/handbook/ - http://docs-next.witheve.com/tutorials/ + http://docs-next.witheve.com/v0.3/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/tutorials/ + http://docs-next.witheve.com/v0.3/tutorials/ Standard Library - http://docs-next.witheve.com/handbook/libraries/ + http://docs-next.witheve.com/v0.3/handbook/libraries/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/handbook/libraries/ + http://docs-next.witheve.com/v0.3/handbook/libraries/ <h1 id="standard-library">Standard Library</h1> diff --git a/install/index.html b/v0.3/install/index.html similarity index 74% rename from install/index.html rename to v0.3/install/index.html index defd6b0..50f0c95 100644 --- a/install/index.html +++ b/v0.3/install/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -84,7 +84,7 @@

    EVE

    Play Blog - Docs + Docs Community @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/v0.3/javascripts/application.js b/v0.3/javascripts/application.js new file mode 100644 index 0000000..1199f2e --- /dev/null +++ b/v0.3/javascripts/application.js @@ -0,0 +1 @@ +function pegasus(t,e){return e=new XMLHttpRequest,e.open("GET",t),t=[],e.onreadystatechange=e.then=function(n,o,i,r){if(n&&n.call&&(t=[,n,o]),4==e.readyState&&(i=t[0|e.status/200])){try{r=JSON.parse(e.responseText)}catch(s){r=null}i(r,e)}},e.send(),e}if("document"in self&&("classList"in document.createElement("_")?!function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,o=arguments.length;for(n=0;o>n;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}():!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",o=t.Element[n],i=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[n].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},a=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},c=function(t,e){if(""===e)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(t,e)},l=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],o=0,i=n.length;i>o;o++)this.push(n[o]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},u=l[n]=[],d=function(){return new l(this)};if(a[n]=Error[n],u.item=function(t){return this[t]||null},u.contains=function(t){return t+="",-1!==c(this,t)},u.add=function(){var t,e=arguments,n=0,o=e.length,i=!1;do t=e[n]+"",-1===c(this,t)&&(this.push(t),i=!0);while(++nc;c++)a[s[c]]=i(a[s[c]],a);n&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,o){var i=Node.prototype.removeEventListener;"click"===t?i.call(e,t,n.hijacked||n,o):i.call(e,t,n,o)},e.addEventListener=function(t,n,o){var i=Node.prototype.addEventListener;"click"===t?i.call(e,t,n.hijacked||(n.hijacked=function(t){t.propagationStopped||n(t)}),o):i.call(e,t,n,o)}),"function"==typeof e.onclick&&(r=e.onclick,e.addEventListener("click",function(t){r(t)},!1),e.onclick=null)}}var e=navigator.userAgent.indexOf("Windows Phone")>=0,n=navigator.userAgent.indexOf("Android")>0&&!e,o=/iP(ad|hone|od)/.test(navigator.userAgent)&&!e,i=o&&/OS 4_\d(_\d)?/.test(navigator.userAgent),r=o&&/OS [6-7]_\d/.test(navigator.userAgent),s=navigator.userAgent.indexOf("BB10")>0;t.prototype.needsClick=function(t){switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(o&&"file"===t.type||t.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(t.className)},t.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!n;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},t.prototype.sendClick=function(t,e){var n,o;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),o=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},t.prototype.determineEventType=function(t){return n&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},t.prototype.focus=function(t){var e;o&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type&&"month"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},t.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},t.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},t.prototype.onTouchStart=function(t){var e,n,r;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],o){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!i){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTimen||Math.abs(e.pageY-this.touchStartY)>n?!0:!1},t.prototype.onTouchMove=function(t){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},t.prototype.findControl=function(t){return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},t.prototype.onTouchEnd=function(t){var e,s,a,c,l,u=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=t.timeStamp,s=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,r&&(l=t.changedTouches[0],u=document.elementFromPoint(l.pageX-window.pageXOffset,l.pageY-window.pageYOffset)||u,u.fastClickScrollParent=this.targetElement.fastClickScrollParent),a=u.tagName.toLowerCase(),"label"===a){if(e=this.findControl(u)){if(this.focus(u),n)return!1;u=e}}else if(this.needsFocus(u))return t.timeStamp-s>100||o&&window.top!==window&&"input"===a?(this.targetElement=null,!1):(this.focus(u),this.sendClick(u,t),o&&"select"===a||(this.targetElement=null,t.preventDefault()),!1);return o&&!i&&(c=u.fastClickScrollParent,c&&c.fastClickLastScrollTop!==c.scrollTop)?!0:(this.needsClick(u)||(t.preventDefault(),this.sendClick(u,t)),!1)},t.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},t.prototype.onMouse=function(t){return this.targetElement?t.forwardedTouchEvent?!0:t.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1):!0:!0},t.prototype.onClick=function(t){var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===t.target.type&&0===t.detail?!0:(e=this.onMouse(t),e||(this.targetElement=null),e)},t.prototype.destroy=function(){var t=this.layer;n&&(t.removeEventListener("mouseover",this.onMouse,!0),t.removeEventListener("mousedown",this.onMouse,!0),t.removeEventListener("mouseup",this.onMouse,!0)),t.removeEventListener("click",this.onClick,!0),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchcancel",this.onTouchCancel,!1)},t.notNeeded=function(t){var e,o,i,r;if("undefined"==typeof window.ontouchstart)return!0;if(o=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!n)return!0;if(e=document.querySelector("meta[name=viewport]")){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(o>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(s&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(e=document.querySelector("meta[name=viewport]")))){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===t.style.msTouchAction||"manipulation"===t.style.touchAction?!0:(r=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],r>=27&&(e=document.querySelector("meta[name=viewport]"),e&&(-1!==e.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===t.style.touchAction||"manipulation"===t.style.touchAction?!0:!1)},t.attach=function(e,n){return new t(e,n)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return t}):"undefined"!=typeof module&&module.exports?(module.exports=t.attach,module.exports.FastClick=t):window.FastClick=t}(),function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.6.0",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.utils.asString=function(t){return void 0===t||null===t?"":t.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return t.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(t.tokenizer.seperator):[]},t.tokenizer.seperator=/[\s\-]+/,t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var o=t.Pipeline.registeredFunctions[e];if(!o)throw new Error("Cannot load un-registered function: "+e);n.add(o)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var o=this._stack.indexOf(e);if(-1==o)throw new Error("Cannot find existingFn");o+=1,this._stack.splice(o,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var o=this._stack.indexOf(e);if(-1==o)throw new Error("Cannot find existingFn");this._stack.splice(o,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,o=this._stack.length,i=0;n>i;i++){for(var r=t[i],s=0;o>s&&(r=this._stack[s](r,i,t),void 0!==r&&""!==r);s++);void 0!==r&&""!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var o=this.list;if(!o)return this.list=new t.Vector.Node(e,n,o),this.length++;if(en.idx?n=n.next:(o+=e.val*n.val,e=e.next,n=n.next);return o},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return i;t>r&&(e=i),r>t&&(n=i),o=n-e,i=e+Math.floor(o/2),r=this.elements[i]}return r===t?i:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,o=n-e,i=e+Math.floor(o/2),r=this.elements[i];o>1;)t>r&&(e=i),r>t&&(n=i),o=n-e,i=e+Math.floor(o/2),r=this.elements[i];return r>t?i:t>r?i+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,o=0,i=0,r=this.length,s=e.length,a=this.elements,c=e.elements;;){if(o>r-1||i>s-1)break;a[o]!==c[i]?a[o]c[i]&&i++:(n.add(a[o]),o++,i++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,o;return this.length>=t.length?(e=this,n=t):(e=t,n=this),o=e.clone(),o.add.apply(o,n.toArray()),o},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var o={},i=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));o[n.name]=r,t.SortedSet.prototype.add.apply(i,r)},this),this.documentStore.set(r,i),t.SortedSet.prototype.add.apply(this.corpusTokens,i.toArray());for(var s=0;s0&&(o=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=o},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),o=new t.Vector,i=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,c=this,l=this.tokenStore.expand(e).reduce(function(n,i){var r=c.corpusTokens.indexOf(i),s=c.idf(i),l=1,u=new t.SortedSet;if(i!==e){var d=Math.max(3,i.length-e.length);l=1/Math.log(d)}r>-1&&o.insert(r,a*s*l);for(var h=c.tokenStore.get(i),f=Object.keys(h),p=f.length,m=0;p>m;m++)u.add(h[f[m]].ref);return n.union(u)},new t.SortedSet);i.push(l)},this);var a=i.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:o.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),o=n.length,i=new t.Vector,r=0;o>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,c=this.idf(s);i.insert(this.corpusTokens.indexOf(s),a*c)}return i},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,o){return n[o]=t.SortedSet.load(e.store[o]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",o="[aeiouy]",i=n+"[^aeiouy]*",r=o+"[aeiou]*",s="^("+i+")?"+r+i,a="^("+i+")?"+r+i+"("+r+")?$",c="^("+i+")?"+r+i+r+i,l="^("+i+")?"+o,u=new RegExp(s),d=new RegExp(c),h=new RegExp(a),f=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,g=/^(.+?)(ed|ing)$/,y=/.$/,w=/(at|bl|iz)$/,S=new RegExp("([^aeiouylsz])\\1$"),k=new RegExp("^"+i+o+"[^aeiouwxy]$"),E=/^(.+?[^aeiou])y$/,x=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,b=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,T=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,C=/^(.+?)(s|t)(ion)$/,L=/^(.+?)e$/,_=/ll$/,A=new RegExp("^"+i+o+"[^aeiouwxy]$"),O=function(n){var o,i,r,s,a,c,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=g,s.test(n)){var O=s.exec(n);s=u,s.test(O[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var O=a.exec(n);o=O[1],a=f,a.test(o)&&(n=o,a=w,c=S,l=k,a.test(n)?n+="e":c.test(n)?(s=y,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=E,s.test(n)){var O=s.exec(n);o=O[1],n=o+"i"}if(s=x,s.test(n)){var O=s.exec(n);o=O[1],i=O[2],s=u,s.test(o)&&(n=o+t[i])}if(s=b,s.test(n)){var O=s.exec(n);o=O[1],i=O[2],s=u,s.test(o)&&(n=o+e[i])}if(s=T,a=C,s.test(n)){var O=s.exec(n);o=O[1],s=d,s.test(o)&&(n=o)}else if(a.test(n)){var O=a.exec(n);o=O[1]+O[2],a=d,a.test(o)&&(n=o)}if(s=L,s.test(n)){var O=s.exec(n);o=O[1],s=d,a=h,c=A,(s.test(o)||a.test(o)&&!c.test(o))&&(n=o)}return s=_,a=d,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return O}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){return t&&e[t]!==t?t:void 0}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,o=t.charAt(0),i=t.slice(1);return o in n||(n[o]={docs:{}}),0===i.length?(n[o].docs[e.ref]=e,void(this.length+=1)):this.add(i,e,n[o])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;nt){for(;" "!=this[t]&&--t>0;);return this.substring(0,t)+"…"}return this},HTMLElement.prototype.wrap=function(t){t.length||(t=[t]);for(var e=t.length-1;e>=0;e--){var n=e>0?this.cloneNode(!0):this,o=t[e],i=o.parentNode,r=o.nextSibling;n.appendChild(o),r?i.insertBefore(n,r):i.appendChild(n)}},document.addEventListener("DOMContentLoaded",function(){"use strict";Modernizr.addTest("ios",function(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}),Modernizr.addTest("standalone",function(){return!!navigator.standalone}),FastClick.attach(document.body);var t=document.getElementById("toggle-search"),e=(document.getElementById("reset-search"),document.querySelector(".drawer")),n=document.querySelectorAll(".anchor"),o=document.querySelector(".search .field"),i=document.querySelector(".query"),r=document.querySelector(".results .meta");Array.prototype.forEach.call(n,function(t){t.querySelector("a").addEventListener("click",function(){document.getElementById("toggle-drawer").checked=!1,document.body.classList.remove("toggle-drawer")})});var s=window.pageYOffset,a=function(){var t=window.pageYOffset+window.innerHeight,n=Math.max(0,window.innerHeight-e.offsetHeight);t>document.body.clientHeight-(96-n)?"absolute"!=e.style.position&&(e.style.position="absolute",e.style.top=null,e.style.bottom=0):e.offsetHeighte.offsetTop+e.offsetHeight?(e.style.position="fixed",e.style.top=null,e.style.bottom="-96px"):window.pageYOffsets?e.style.top&&(e.style.position="absolute",e.style.top=Math.max(0,s)+"px",e.style.bottom=null):e.style.bottom&&(e.style.position="absolute",e.style.top=t-e.offsetHeight+"px",e.style.bottom=null),s=Math.max(0,window.pageYOffset)},c=function(){var t=document.querySelector(".main");window.removeEventListener("scroll",a),matchMedia("only screen and (max-width: 959px)").matches?(e.style.position=null,e.style.top=null,e.style.bottom=null):e.offsetHeight+96o;o++)t1e4?n=(n/1e3).toFixed(0)+"k":n>1e3&&(n=(n/1e3).toFixed(1)+"k");var o=document.querySelector(".repo-stars .count");o.innerHTML=n},function(t,e){console.error(t,e.status)})}),"standalone"in window.navigator&&window.navigator.standalone){var node,remotes=!1;document.addEventListener("click",function(t){for(node=t.target;"A"!==node.nodeName&&"HTML"!==node.nodeName;)node=node.parentNode;"href"in node&&-1!==node.href.indexOf("http")&&(-1!==node.href.indexOf(document.location.host)||remotes)&&(t.preventDefault(),document.location.href=node.href)},!1)} \ No newline at end of file diff --git a/v0.3/javascripts/modernizr.js b/v0.3/javascripts/modernizr.js new file mode 100644 index 0000000..e82c909 --- /dev/null +++ b/v0.3/javascripts/modernizr.js @@ -0,0 +1 @@ +!function(e,t,n){function r(e,t){return typeof e===t}function i(){var e,t,n,i,o,a,s;for(var l in x)if(x.hasOwnProperty(l)){if(e=[],t=x[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nf;f++)if(h=e[f],g=_.style[h],l(h,"-")&&(h=m(h)),_.style[h]!==n){if(o||r(i,"undefined"))return a(),"pfx"==t?h:!0;try{_.style[h]=i}catch(y){}if(_.style[h]!=g)return a(),"pfx"==t?h:!0}return a(),!1}function g(e,t,n){var i;for(var o in e)if(e[o]in t)return n===!1?e[o]:(i=t[e[o]],r(i,"function")?s(i,n||t):i);return!1}function v(e,t,n,i,o){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+P.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,i,o):(s=(e+" "+A.join(a+" ")+a).split(" "),g(s,t,n))}function y(e,t,r){return v(e,n,n,t,r)}var x=[],E={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){x.push({name:e,fn:t,options:n})},addAsyncTest:function(e){x.push({name:null,fn:e})}},S=function(){};S.prototype=E,S=new S;var b,w=[],C=t.documentElement,T="svg"===C.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;b=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),E._l={},E.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),S.hasOwnProperty(e)&&setTimeout(function(){S._trigger(e,S[e])},0)},E._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=C.elements;return"string"==typeof e?e.split(" "):e}function i(e,t){var n=C.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),C.elements=n+" "+e,u(t)}function o(e){var t=w[e[S]];return t||(t={},b++,e[S]=b,w[b]=t),t}function a(e,n,r){if(n||(n=t),g)return n.createElement(e);r||(r=o(n));var i;return i=r.cache[e]?r.cache[e].cloneNode():E.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!i.canHaveChildren||x.test(e)||i.tagUrn?i:r.frag.appendChild(i)}function s(e,n){if(e||(e=t),g)return e.createDocumentFragment();n=n||o(e);for(var i=n.frag.cloneNode(),a=0,s=r(),l=s.length;l>a;a++)i.createElement(s[a]);return i}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return C.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(C,t.frag)}function u(e){e||(e=t);var r=o(e);return!C.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||l(e,r),e}function c(e){for(var t,n=e.getElementsByTagName("*"),i=n.length,o=RegExp("^(?:"+r().join("|")+")$","i"),a=[];i--;)t=n[i],o.test(t.nodeName)&&a.push(t.applyElement(f(t)));return a}function f(e){for(var t,n=e.attributes,r=n.length,i=e.ownerDocument.createElement(N+":"+e.nodeName);r--;)t=n[r],t.specified&&i.setAttribute(t.nodeName,t.nodeValue);return i.style.cssText=e.style.cssText,i}function d(e){for(var t,n=e.split("{"),i=n.length,o=RegExp("(^|[\\s,>+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),a="$1"+N+"\\:$2";i--;)t=n[i]=n[i].split("}"),t[t.length-1]=t[t.length-1].replace(o,a),n[i]=t.join("}");return n.join("{")}function p(e){for(var t=e.length;t--;)e[t].removeNode()}function m(e){function t(){clearTimeout(a._removeSheetTimer),r&&r.removeNode(!0),r=null}var r,i,a=o(e),s=e.namespaces,l=e.parentWindow;return!_||e.printShived?e:("undefined"==typeof s[N]&&s.add(N),l.attachEvent("onbeforeprint",function(){t();for(var o,a,s,l=e.styleSheets,u=[],f=l.length,p=Array(f);f--;)p[f]=l[f];for(;s=p.pop();)if(!s.disabled&&T.test(s.media)){try{o=s.imports,a=o.length}catch(m){a=0}for(f=0;a>f;f++)p.push(o[f]);try{u.push(s.cssText)}catch(m){}}u=d(u.reverse().join("")),i=c(e),r=n(e,u)}),l.attachEvent("onafterprint",function(){p(i),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,g,v="3.7.3",y=e.html5||{},x=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,E=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,S="_html5shiv",b=0,w={};!function(){try{var e=t.createElement("a");e.innerHTML="",h="hidden"in e,g=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){h=!0,g=!0}}();var C={elements:y.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:v,shivCSS:y.shivCSS!==!1,supportsUnknownElements:g,shivMethods:y.shivMethods!==!1,type:"default",shivDocument:u,createElement:a,createDocumentFragment:s,addElements:i};e.html5=C,u(t);var T=/^$|\b(?:all|print)\b/,N="html5shiv",_=!g&&function(){var n=t.documentElement;return!("undefined"==typeof t.namespaces||"undefined"==typeof t.parentWindow||"undefined"==typeof n.applyElement||"undefined"==typeof n.removeNode||"undefined"==typeof e.attachEvent)}();C.type+=" print",C.shivPrint=m,m(t),"object"==typeof module&&module.exports&&(module.exports=C)}("undefined"!=typeof e?e:this,t);var N={elem:u("modernizr")};S._q.push(function(){delete N.elem});var _={style:N.elem.style};S._q.unshift(function(){delete _.style});var z=(E.testProp=function(e,t,r){return h([e],n,t,r)},function(){function e(e,t){var i;return e?(t&&"string"!=typeof t||(t=u(t||"div")),e="on"+e,i=e in t,!i&&r&&(t.setAttribute||(t=u("div")),t.setAttribute(e,""),i="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),i):!1}var r=!("onblur"in t.documentElement);return e}());E.hasEvent=z,S.addTest("inputsearchevent",z("search"));var k=E.testStyles=f,$=function(){var e=navigator.userAgent,t=e.match(/applewebkit\/([0-9]+)/gi)&&parseFloat(RegExp.$1),n=e.match(/w(eb)?osbrowser/gi),r=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9,i=533>t&&e.match(/android/gi);return n||i||r}();$?S.addTest("fontface",!1):k('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),i=r.sheet||r.styleSheet,o=i?i.cssRules&&i.cssRules[0]?i.cssRules[0].cssText:i.cssText||"":"",a=/src/i.test(o)&&0===o.indexOf(n.split(" ")[0]);S.addTest("fontface",a)});var j="Moz O ms Webkit",P=E._config.usePrefixes?j.split(" "):[];E._cssomPrefixes=P;var A=E._config.usePrefixes?j.toLowerCase().split(" "):[];E._domPrefixes=A,E.testAllProps=v,E.testAllProps=y;var R="CSS"in e&&"supports"in e.CSS,F="supportsCSS"in e;S.addTest("supports",R||F),S.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=S._config.usePrefixes;if(e&&(!t||"webkitPerspective"in C.style)){var n,r="#modernizr{width:0;height:0}";S.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",k(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),S.addTest("json","JSON"in e&&"parse"in JSON&&"stringify"in JSON),S.addTest("checked",function(){return k("#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;display:block}",function(e){var t=u("input");return t.setAttribute("type","checkbox"),t.setAttribute("checked","checked"),e.appendChild(t),20===t.offsetLeft})}),S.addTest("target",function(){var t=e.document;if(!("querySelectorAll"in t))return!1;try{return t.querySelectorAll(":target"),!0}catch(n){return!1}}),S.addTest("contains",r(String.prototype.contains,"function")),i(),o(w),delete E.addTest,delete E.addAsyncTest;for(var M=0;M #mq-test-1 { width: 42px; }',r.insertBefore(o,i),n=42===a.offsetWidth,r.removeChild(o),{matches:n,media:e}}}(e.document)}(this),function(e){"use strict";function t(){E(!0)}var n={};e.respond=n,n.update=function(){};var r=[],i=function(){var t=!1;try{t=new e.XMLHttpRequest}catch(n){t=new e.ActiveXObject("Microsoft.XMLHTTP")}return function(){return t}}(),o=function(e,t){var n=i();n&&(n.open("GET",e,!0),n.onreadystatechange=function(){4!==n.readyState||200!==n.status&&304!==n.status||t(n.responseText)},4!==n.readyState&&n.send(null))};if(n.ajax=o,n.queue=r,n.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},n.mediaQueriesSupported=e.matchMedia&&null!==e.matchMedia("only all")&&e.matchMedia("only all").matches,!n.mediaQueriesSupported){var a,s,l,u=e.document,c=u.documentElement,f=[],d=[],p=[],m={},h=30,g=u.getElementsByTagName("head")[0]||c,v=u.getElementsByTagName("base")[0],y=g.getElementsByTagName("link"),x=function(){var e,t=u.createElement("div"),n=u.body,r=c.style.fontSize,i=n&&n.style.fontSize,o=!1;return t.style.cssText="position:absolute;font-size:1em;width:1em",n||(n=o=u.createElement("body"),n.style.background="none"),c.style.fontSize="100%",n.style.fontSize="100%",n.appendChild(t),o&&c.insertBefore(n,c.firstChild),e=t.offsetWidth,o?c.removeChild(n):n.removeChild(t),c.style.fontSize=r,i&&(n.style.fontSize=i),e=l=parseFloat(e)},E=function(t){var n="clientWidth",r=c[n],i="CSS1Compat"===u.compatMode&&r||u.body[n]||r,o={},m=y[y.length-1],v=(new Date).getTime();if(t&&a&&h>v-a)return e.clearTimeout(s),void(s=e.setTimeout(E,h));a=v;for(var S in f)if(f.hasOwnProperty(S)){var b=f[S],w=b.minw,C=b.maxw,T=null===w,N=null===C,_="em";w&&(w=parseFloat(w)*(w.indexOf(_)>-1?l||x():1)),C&&(C=parseFloat(C)*(C.indexOf(_)>-1?l||x():1)),b.hasquery&&(T&&N||!(T||i>=w)||!(N||C>=i))||(o[b.media]||(o[b.media]=[]),o[b.media].push(d[b.rules]))}for(var z in p)p.hasOwnProperty(z)&&p[z]&&p[z].parentNode===g&&g.removeChild(p[z]);p.length=0;for(var k in o)if(o.hasOwnProperty(k)){var $=u.createElement("style"),j=o[k].join("\n");$.type="text/css",$.media=k,g.insertBefore($,m.nextSibling),$.styleSheet?$.styleSheet.cssText=j:$.appendChild(u.createTextNode(j)),p.push($)}},S=function(e,t,r){var i=e.replace(n.regex.keyframes,"").match(n.regex.media),o=i&&i.length||0;t=t.substring(0,t.lastIndexOf("/"));var a=function(e){return e.replace(n.regex.urls,"$1"+t+"$2$3")},s=!o&&r;t.length&&(t+="/"),s&&(o=1);for(var l=0;o>l;l++){var u,c,p,m;s?(u=r,d.push(a(e))):(u=i[l].match(n.regex.findStyles)&&RegExp.$1,d.push(RegExp.$2&&a(RegExp.$2))),p=u.split(","),m=p.length;for(var h=0;m>h;h++)c=p[h],f.push({media:c.split("(")[0].match(n.regex.only)&&RegExp.$2||"all",rules:d.length-1,hasquery:c.indexOf("(")>-1,minw:c.match(n.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:c.match(n.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}E()},b=function(){if(r.length){var t=r.shift();o(t.href,function(n){S(n,t.href,t.media),m[t.href]=!0,e.setTimeout(function(){b()},0)})}},w=function(){for(var t=0;t - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -84,7 +84,7 @@

    EVE

    Play Blog - Docs + Docs Community @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/v0.3/sitemap.xml b/v0.3/sitemap.xml new file mode 100644 index 0000000..918753f --- /dev/null +++ b/v0.3/sitemap.xml @@ -0,0 +1,68 @@ + + + + + http://docs-next.witheve.com/v0.3/install/ + + + + http://docs-next.witheve.com/v0.3/tutorials/quickstart.eve/ + + + + http://docs-next.witheve.com/v0.3/quickstart.eve/ + + + + http://docs-next.witheve.com/v0.3/ + + + + http://docs-next.witheve.com/v0.3/syntaxreference/ + + + + http://docs-next.witheve.com/v0.3/README/ + + + + http://docs-next.witheve.com/v0.3/guides/ + + + + http://docs-next.witheve.com/v0.3/handbook/core/ + + + + http://docs-next.witheve.com/v0.3/handbook/ + + + + http://docs-next.witheve.com/v0.3/tutorials/ + + + + http://docs-next.witheve.com/v0.3/ + 0 + + + + http://docs-next.witheve.com/v0.3/guides/ + 0 + + + + http://docs-next.witheve.com/v0.3/handbook/ + 0 + + + + http://docs-next.witheve.com/v0.3/handbook/libraries/ + + + + http://docs-next.witheve.com/v0.3/tutorials/ + 0 + + + \ No newline at end of file diff --git a/style.css b/v0.3/style.css similarity index 100% rename from style.css rename to v0.3/style.css diff --git a/v0.3/stylesheets/application.css b/v0.3/stylesheets/application.css new file mode 100644 index 0000000..5212201 --- /dev/null +++ b/v0.3/stylesheets/application.css @@ -0,0 +1,317 @@ +#eve-pallette { + /* Default */ + color: rgb(74,64,136); + color: rgb(91,89,164); + color: rgb(107,103,173); + color: rgb(0,121,177); + color: rgb(0,158,224); + color: rgb(0,184,241); + + /* Style 1 */ + color: rgb(0, 115, 139); + color: rgb(0, 152, 167); + color: rgb(0, 171, 188); + color: rgb(140, 49, 55); + color: rgb(177, 67, 73); + color: rgb(226, 79, 94); + + /* Style 2 */ + color: rgb(85, 138, 126); + color: rgb(113, 177, 162); + color: rgb(128, 198, 182); + color: rgb(153, 114, 45); + color: rgb(198, 154, 63); + color: rgb(246, 192, 78); + + /* Style 3 */ + color: rgb(82, 129, 62); + color: rgb(111, 165, 81); + color: rgb(129, 191, 95); + color: rgb(0, 113, 140); + color: rgb(0, 151, 167); + color: rgb(0, 170, 190); + + /* Style 4 */ + color: rgb(60, 48, 130); + color: rgb(80, 79, 161); + color: rgb(98, 94, 169); + color: rgb(158, 34, 101); + color: rgb(216, 65, 140); + color: rgb(238, 81, 158); + + /* Style 5 */ + color: rgb(185, 73, 21); + color: rgb(216, 99, 27); + color: rgb(244, 119, 33); + color: rgb(197, 114, 21); + color: rgb(248, 158, 36); + color: rgb(251, 176, 49); + + /* Style 6 */ + color: rgb(124, 38, 118); + color: rgb(169, 59, 150); + color: rgb(200, 56, 150); + color: rgb(91, 34, 127); + color: rgb(126, 60, 151); + color: rgb(164, 95, 167); + + /* Style 7 */ + color: rgb(151, 150, 137); + color: rgb(183, 182, 167); + color: rgb(204, 202, 185); + color: rgb(88, 132, 150); + color: rgb(123, 164, 182); + color: rgb(145, 192, 214); +} + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} + +body { display: flex; flex-direction: column; margin: 0; background: white; color: #555; line-height: 1.7; font-family: "Open Sans", Avenir, "Helvetica neue", sans-serif;} + + +pre { + background-color: rgb(38,38,38); + padding: 20px; + padding-left: 10px; + overflow: auto; + margin-bottom: 20px; +} + +code { + color: rgb(226, 79, 94); +} + +blockquote { + color: rgb(125,125,125); + border-left: 3px solid rgb(200,200,200); + padding-left: 10px; +} + +p { + line-height: 25px; + margin-bottom: 20px; +} + +ul, ol { + margin-top: 20px; + margin-bottom: 20px; + line-height: 25px; +} + +h1 { + font-size: 35px; + padding-top: 0px; + margin-top:0px; + margin-bottom: 20px; +} + +h2 { + font-size: 25px; + padding-top: 0px; + margin-bottom: 20px; +} + +li { + margin-left: 20px; +} + +.main { + display: flex; + align-items: stretch; + min-height: 100%; +} + +.drawer { + color: rgb(85, 85, 85); + padding-bottom: 20px; + padding-top: 10px; +} + +.highlight { + margin-bottom: 20px; + margin-top: 20px; +} + +.colored { + font-weight: bold; +} + +.drawer a { + color: rgb(85, 85, 85); +} + +.article { + padding-left: 50px; + padding-bottom: 200px; +} + +.article a { + color: rgb(0,158,224); +} + +.article a::hover { + color: rgb(91,89,164); +} + +.sidebar-menu { + list-style: none; + margin: 0px; + padding: 0px; +} + +.sidebar-menu a { + text-decoration: none; +} + +.sidebar-menu li { + margin-left: 0px; +} + +.sub { + margin: 0px; + padding: 0px; + margin-bottom: 20px; +} + +b { + font-weight: bold; +} + +.sub li { + margin: 0px; +} + +.sub-menu { + +} + +.selected a { + color: rgb(226, 79, 94); +} + +.active { + +} + +.active li { + display: inherit; +} + +.dataTable { + border: 1px solid #000; + border-collapse: collapse; + width: 100%; +} + +.dataTable th { + font-weight: bold; + border: 1px solid #000; +} + +.dataTable td { + border: 1px solid #000; + white-space: pre; + font-family: monospace; + padding: 5px; +} + +.flex-spacer { flex: 1; } +.flex-row { display: flex; } +.flex-row.spaced > * + * { margin-left: 30px; } +.flex-row.double-spaced > * + * { margin-left: 60px; } +.flex-row.stretched { align-self: stretch; } + +.layer-wrapper { display: flex; flex-direction: column; align-items: center; margin-top: 60px; padding: 0 40px; } +.layer { max-width: 100%; width: 960px; display: flex; align-items: center; } +.toplayer { max-width: 100%; width: 960px; display: flex; align-items: top; } +.sub-layer { margin-top: 30px; } + +.header-wrapper { } +.logo { display: flex; flex: 0 0 auto; align-items: center; padding: 0; } +.logo > img { max-width: 60px; } +.logo > h1 { margin: 0; margin-left: 18px; padding: 0; height: 26px; margin-top: -32px; } +.logo > h1 > img { height: 100%; } + +nav { flex: none; display: flex; flex-direction: row-reverse; } +nav > * { flex: 0 0 auto; padding: 10px 20px; margin: 0; text-decoration: none; color: rgb(74, 64, 136); transition: background 0.1s ease-out; } +nav > *:hover { background: #f2f2f2; } +nav > *:active { background: #e9e9e9; } +nav > .play-cta { margin: 0; padding: 10px 20px; color: white; } + +.btn { cursor: pointer; text-align: center; user-select: none; -moz-user-select: none; -ms-user-select: none; } +.btn.big { flex: 1 0 auto; padding: 18px 30px; } +.btn.rounded { border-radius: 3px; } + +.cta { cursor: pointer; text-decoration: none; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; transition: background 0.1s ease-out; } + +.cta.primary { background: rgb(0, 184, 241); color: white; } +.cta.primary:hover { background: rgb(0, 158, 224); } +.cta.primary:active { background: rgb(0, 121, 177); } + +.cta.secondary { background: rgb(107, 103, 173); color: white; } +.cta.secondary:hover { background: rgb(91, 89, 164); } +.cta.secondary:active { background: rgb(74, 64, 136); } + +.cta.tertiary { background: #888a8f; color: white; } +.cta.tertiary:hover { background: #808284; } +.cta.tertiary:active { background: #787a7f; } + +.contact-wrapper { display: flex; flex-direction: column; padding: 0; position: relative; margin-bottom: 60px; color: white; } +.contact { display: flex; flex-direction: row; max-width: 960px; align-self: center; margin: auto; overflow: hidden; border-radius: 3px; cursor: pointer; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; } +.contact > * { flex: 1 1 auto; align-self: stretch; max-width: 320px; padding: 30px; color: white !important; text-decoration: none; transition: background 0.1s ease-out; } +.contact h3 { margin-bottom: 20px; font-size: 1.25rem; } + +.contact > *:first-child { background: rgb(107, 103, 173); } +.contact > *:first-child:hover { background: rgb(117, 115, 190); } +.contact > *:first-child:active { background: rgb(142, 140, 215); } + +.contact > *:nth-child(2) { background: rgb(91, 89, 164); } +.contact > *:nth-child(2):hover { background: rgb(117, 115, 190); } +.contact > *:nth-child(2):active { background: rgb(142, 140, 215); } + +.contact > *:last-child { background: rgb(74, 64, 136); } +.contact > *:last-child:hover { background: rgb(117, 115, 190); } +.contact > *:last-child:active { background: rgb(142, 140, 215); } + +ul { display: block; margin-left: 2em; } + +code { padding: 0.2em; white-space: pre-wrap; font-family: "Inconsolata", "Monaco", "Consolas", "Ubuntu Mono", monospace; font-size: 0.9rem; } + +strong { font-weight: 600; } + +table { + border: 1px #888a8f solid; + margin-bottom: 1em; + min-width: 820px; + border-collapse: collapse; + border-spacing: 0; +} +td { + border: 1px #AAA solid; + width: 20em; + padding: 10px; +} + +.arglist { + list-style: none; + margin-left: 0px; +} \ No newline at end of file diff --git a/v0.3/stylesheets/highlight/highlight.css b/v0.3/stylesheets/highlight/highlight.css new file mode 100644 index 0000000..7255fa6 --- /dev/null +++ b/v0.3/stylesheets/highlight/highlight.css @@ -0,0 +1,46 @@ +.article pre { + color: black; + background-color: #f5f5f5; + border-left: 5px solid rgb(234, 234, 234); + padding-left: 15px; +} + +.kr { + color: black; +} + +.c1 { + color: #747474; +} + +.nt { + color: rgb(0, 118, 206); +} + +.s { + color: rgb(1, 165, 136); +} + +.m { + color: rgb(1, 165, 136); +} + +.l { + color: rgb(1, 165, 136); +} + +.p { + color: gray; +} + +.nf { + color: rgb(128, 128, 128); +} + +.s2 { + color: rgb(1, 165, 136); +} + +.x { + color: rgb(0, 0, 0); +} \ No newline at end of file diff --git a/syntaxreference/index.html b/v0.3/syntaxreference/index.html similarity index 88% rename from syntaxreference/index.html rename to v0.3/syntaxreference/index.html index fab96a5..1041955 100644 --- a/syntaxreference/index.html +++ b/v0.3/syntaxreference/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -84,7 +84,7 @@

    EVE

    Play Blog - Docs + Docs Community @@ -111,20 +111,20 @@

    EVE

  • - + Library diff --git a/tutorials/index.html b/v0.3/tutorials/index.html similarity index 65% rename from tutorials/index.html rename to v0.3/tutorials/index.html index 2271981..d5676b3 100644 --- a/tutorials/index.html +++ b/v0.3/tutorials/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -87,7 +87,7 @@

    EVE

    Play Blog - Docs + Docs Community @@ -108,20 +108,20 @@

    EVE

  • - + Library @@ -150,13 +150,13 @@

    EVE

    Pages in Tutorial

    - +


    - +

    Quickstart

    diff --git a/tutorials/index.xml b/v0.3/tutorials/index.xml similarity index 96% rename from tutorials/index.xml rename to v0.3/tutorials/index.xml index 88d180b..abe974c 100644 --- a/tutorials/index.xml +++ b/v0.3/tutorials/index.xml @@ -2,27 +2,27 @@ Tutorials on Eve Documentation - http://docs-next.witheve.com/tutorials/index.xml + http://docs-next.witheve.com/v0.3/tutorials/index.xml Recent content in Tutorials on Eve Documentation Hugo -- gohugo.io en-us - + - http://docs-next.witheve.com/tutorials/ + http://docs-next.witheve.com/v0.3/tutorials/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/tutorials/ + http://docs-next.witheve.com/v0.3/tutorials/ Quickstart - http://docs-next.witheve.com/tutorials/quickstart.eve/ + http://docs-next.witheve.com/v0.3/tutorials/quickstart.eve/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/tutorials/quickstart.eve/ + http://docs-next.witheve.com/v0.3/tutorials/quickstart.eve/ <h1 id="quickstart">Quickstart</h1> diff --git a/tutorials/quickstart.eve/index.html b/v0.3/tutorials/quickstart.eve/index.html similarity index 89% rename from tutorials/quickstart.eve/index.html rename to v0.3/tutorials/quickstart.eve/index.html index 189205c..243b3dc 100644 --- a/tutorials/quickstart.eve/index.html +++ b/v0.3/tutorials/quickstart.eve/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -76,7 +76,7 @@
    @@ -84,7 +84,7 @@

    EVE

    Play Blog - Docs + Docs Community @@ -111,20 +111,20 @@

    EVE

  • - + Library From 4cba47a25062726cf4def73534d7a0f5a4b2e3bc Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Fri, 26 May 2017 15:25:37 -0700 Subject: [PATCH 027/109] fix links in v0.2 --- index.html | 50 +-- v0.2/CNAME | 2 +- v0.2/README/index.xml | 8 +- v0.2/guides/for-programmers/index.html | 146 ++++----- v0.2/guides/index.html | 154 +++++----- v0.2/guides/index.xml | 12 +- v0.2/guides/style/index.html | 146 ++++----- v0.2/handbook/actions/index.html | 146 ++++----- v0.2/handbook/add/index.html | 146 ++++----- v0.2/handbook/aggregates/index.html | 146 ++++----- v0.2/handbook/bind/index.html | 146 ++++----- v0.2/handbook/blocks/index.html | 146 ++++----- v0.2/handbook/browser/index.html | 146 ++++----- v0.2/handbook/commit/index.html | 146 ++++----- v0.2/handbook/commonmark/index.html | 146 ++++----- v0.2/handbook/core/index.html | 146 ++++----- v0.2/handbook/databases/index.html | 146 ++++----- v0.2/handbook/datetime/date/index.html | 42 +-- v0.2/handbook/datetime/index.html | 146 ++++----- v0.2/handbook/datetime/time/index.html | 146 ++++----- v0.2/handbook/docker/index.html | 146 ++++----- v0.2/handbook/ebnf/index.html | 146 ++++----- v0.2/handbook/equality/index.html | 146 ++++----- v0.2/handbook/equivalence/index.html | 146 ++++----- v0.2/handbook/event/click/index.html | 146 ++++----- v0.2/handbook/event/index.html | 146 ++++----- v0.2/handbook/events/click/index.html | 172 +++++------ v0.2/handbook/events/index.html | 172 +++++------ v0.2/handbook/expressions/index.html | 146 ++++----- v0.2/handbook/functions/index.html | 146 ++++----- v0.2/handbook/general/index.html | 146 ++++----- v0.2/handbook/general/sort/index.html | 146 ++++----- v0.2/handbook/glossary/index.html | 146 ++++----- v0.2/handbook/help/index.html | 146 ++++----- v0.2/handbook/http/index.html | 146 ++++----- v0.2/handbook/if-then/index.html | 146 ++++----- v0.2/handbook/index.html | 290 +++++++++--------- v0.2/handbook/index.xml | 64 ++-- v0.2/handbook/inequality/index.html | 146 ++++----- v0.2/handbook/installation/index.html | 146 ++++----- v0.2/handbook/intro/index.html | 146 ++++----- v0.2/handbook/is/index.html | 146 ++++----- v0.2/handbook/joins/index.html | 146 ++++----- v0.2/handbook/linux/index.html | 146 ++++----- v0.2/handbook/literate-programming/index.html | 146 ++++----- v0.2/handbook/mac/index.html | 146 ++++----- v0.2/handbook/math/abs/index.html | 146 ++++----- v0.2/handbook/math/ceil/index.html | 146 ++++----- v0.2/handbook/math/cos/index.html | 146 ++++----- v0.2/handbook/math/fix/index.html | 146 ++++----- v0.2/handbook/math/floor/index.html | 146 ++++----- v0.2/handbook/math/index.html | 146 ++++----- v0.2/handbook/math/mod/index.html | 146 ++++----- v0.2/handbook/math/range/index.html | 146 ++++----- v0.2/handbook/math/round/index.html | 146 ++++----- v0.2/handbook/math/sin/index.html | 146 ++++----- v0.2/handbook/math/sum/index.html | 146 ++++----- v0.2/handbook/math/tan/index.html | 146 ++++----- v0.2/handbook/merge/index.html | 146 ++++----- v0.2/handbook/model/index.html | 146 ++++----- v0.2/handbook/not/index.html | 146 ++++----- v0.2/handbook/npm/index.html | 146 ++++----- v0.2/handbook/programs/index.html | 146 ++++----- v0.2/handbook/records/index.html | 146 ++++----- v0.2/handbook/remove/index.html | 146 ++++----- v0.2/handbook/running/index.html | 146 ++++----- v0.2/handbook/search/index.html | 146 ++++----- v0.2/handbook/session/index.html | 146 ++++----- v0.2/handbook/set/index.html | 146 ++++----- v0.2/handbook/sets/index.html | 146 ++++----- v0.2/handbook/standard-library/index.html | 146 ++++----- v0.2/handbook/statistics/count/index.html | 146 ++++----- v0.2/handbook/statistics/index.html | 146 ++++----- v0.2/handbook/statistics/random/index.html | 146 ++++----- v0.2/handbook/string-interpolation/index.html | 146 ++++----- v0.2/handbook/strings/index.html | 146 ++++----- v0.2/handbook/strings/join/index.html | 146 ++++----- v0.2/handbook/strings/split/index.html | 146 ++++----- v0.2/handbook/tags/index.html | 146 ++++----- v0.2/handbook/update-operators/index.html | 146 ++++----- v0.2/handbook/view/index.html | 146 ++++----- v0.2/handbook/windows/index.html | 146 ++++----- v0.2/index.html | 150 ++++----- v0.2/index.xml | 64 ++-- v0.2/sitemap.xml | 152 ++++----- v0.2/tutorials/index.html | 152 ++++----- v0.2/tutorials/index.xml | 8 +- v0.2/tutorials/quickstart/index.html | 146 ++++----- v0.3/guides/index.html | 48 +-- v0.3/guides/index.xml | 8 +- v0.3/handbook/index.html | 52 ++-- v0.3/handbook/index.xml | 16 +- v0.3/handbook/libraries/index.html | 42 +-- v0.3/index.html | 46 +-- v0.3/index.xml | 48 +-- v0.3/install/index.html | 42 +-- v0.3/quickstart.eve/index.html | 42 +-- v0.3/sitemap.xml | 30 +- v0.3/syntaxreference/index.html | 42 +-- v0.3/tutorials/index.html | 50 +-- v0.3/tutorials/index.xml | 12 +- v0.3/tutorials/quickstart.eve/index.html | 42 +-- 102 files changed, 6335 insertions(+), 6335 deletions(-) diff --git a/index.html b/index.html index 1c8078b..9d7b940 100644 --- a/index.html +++ b/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,11 +64,11 @@ - + - - + + @@ -79,7 +79,7 @@
    @@ -87,7 +87,7 @@

    EVE

    Play Blog - Docs + Docs Community @@ -114,20 +114,20 @@

    EVE

  • - + Library @@ -154,8 +154,8 @@

    EVE

    -

    v0.2 Documentation

    -

    v0.3 Documentation

    +

    v0.2 Documentation

    +

    v0.3 Documentation

    diff --git a/v0.2/CNAME b/v0.2/CNAME index e825467..3eb499a 100644 --- a/v0.2/CNAME +++ b/v0.2/CNAME @@ -1 +1 @@ -docs.witheve.com \ No newline at end of file +docs.witheve.com/v0.2/ \ No newline at end of file diff --git a/v0.2/README/index.xml b/v0.2/README/index.xml index e1b17d3..e11a58a 100644 --- a/v0.2/README/index.xml +++ b/v0.2/README/index.xml @@ -2,18 +2,18 @@ READMEs on Eve Documentation - http://docs-next.witheve.com/v0.2//readme/ + http://docs.witheve.com/v0.2/readme/ Recent content in READMEs on Eve Documentation Hugo -- gohugo.io en-us - + - http://docs-next.witheve.com/v0.2//readme/ + http://docs.witheve.com/v0.2/readme/ Mon, 01 Jan 0001 00:00:00 +0000 - http://docs-next.witheve.com/v0.2//readme/ + http://docs.witheve.com/v0.2/readme/ <p align="center"> <img src="http://www.witheve.com/logo.png" alt="Eve logo" width="10%" /> </p> diff --git a/v0.2/guides/for-programmers/index.html b/v0.2/guides/for-programmers/index.html index 3f1e86d..ed242e3 100644 --- a/v0.2/guides/for-programmers/index.html +++ b/v0.2/guides/for-programmers/index.html @@ -13,42 +13,42 @@ - + - + - - + + - - - - + + + + @@ -64,7 +64,7 @@ - + @@ -96,34 +96,34 @@