Skip to content

Commit d365c60

Browse files
committed
General update
1 parent b0dbebc commit d365c60

File tree

80 files changed

+108
-290
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+108
-290
lines changed

guides/for-programmers/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@
249249

250250
<ul class="sub">
251251

252-
<li><a href="https://witheve.github.io/docs/handbook/datetime/date/">date</a></li>
253-
254252
<li><a href="https://witheve.github.io/docs/handbook/datetime/time/">time</a></li>
255253

256254
</ul>

guides/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,6 @@
247247

248248
<ul class="sub">
249249

250-
<li><a href="https://witheve.github.io/docs/handbook/datetime/date/">date</a></li>
251-
252250
<li><a href="https://witheve.github.io/docs/handbook/datetime/time/">time</a></li>
253251

254252
</ul>

guides/style/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@
249249

250250
<ul class="sub">
251251

252-
<li><a href="https://witheve.github.io/docs/handbook/datetime/date/">date</a></li>
253-
254252
<li><a href="https://witheve.github.io/docs/handbook/datetime/time/">time</a></li>
255253

256254
</ul>

handbook/actions/index.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@
249249

250250
<ul class="sub">
251251

252-
<li><a href="https://witheve.github.io/docs/handbook/datetime/date/">date</a></li>
253-
254252
<li><a href="https://witheve.github.io/docs/handbook/datetime/time/">time</a></li>
255253

256254
</ul>
@@ -393,14 +391,14 @@ <h1 id="actions">Actions</h1>
393391

394392
<h2 id="description">Description</h2>
395393

396-
<p>There are three actions in Eve: <code>match</code>, <code>bind</code>, and <code>commit</code>.</p>
394+
<p>There are three actions in Eve: <code>search</code>, <code>bind</code>, and <code>commit</code>.</p>
397395

398-
<p><code>match</code> is used when you want to gather records from one or more databases. These records are called &ldquo;supporting records&rdquo;, because they are used as a basis for bound or committed records.</p>
396+
<p><code>search</code> is used when you want to gather records from one or more databases. These records are called &ldquo;supporting records&rdquo;, because they are used as a basis for bound or committed records.</p>
399397

400398
<p><code>bind</code> and <code>commit</code> actions are used when you want to update records in one or more databases, but they differ in the way the updates are performed.</p>
401399

402400
<ul>
403-
<li><p>bound records last only as long as their supporting records. When supporting records changes, then bound records changes acordingly, replacing any previously bound records.</p></li>
401+
<li><p>bound records last only as long as their supporting records. When supporting records changes, then bound records changes accordingly, replacing any previously bound records.</p></li>
404402

405403
<li><p>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.</p></li>
406404
</ul>
@@ -411,7 +409,7 @@ <h2 id="examples">Examples</h2>
411409

412410
<h2 id="see-also">See Also</h2>
413411

414-
<p><a href="../match">match</a> | <a href="../bind">bind</a> | <a href="../commit">commit</a></p>
412+
<p><a href="../search">search</a> | <a href="../bind">bind</a> | <a href="../commit">commit</a></p>
415413

416414

417415
</div>

handbook/add/index.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@
249249

250250
<ul class="sub">
251251

252-
<li><a href="https://witheve.github.io/docs/handbook/datetime/date/">date</a></li>
253-
254252
<li><a href="https://witheve.github.io/docs/handbook/datetime/time/">time</a></li>
255253

256254
</ul>
@@ -394,7 +392,7 @@ <h1 id="add-operator">Add Operator</h1>
394392
<p>adds a value to an attribute on a record</p>
395393

396394
<h2 id="syntax">Syntax</h2>
397-
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Add a value to an attrbiute</span><span class="w"></span>
395+
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="c1">// Add a value to an attribute</span><span class="w"></span>
398396
<span class="x">record.attribute</span><span class="w"> </span><span class="nf">+=</span><span class="w"> </span><span class="x">value</span><span class="w"></span>
399397

400398
<span class="c1">// Add a tag to a record</span><span class="w"></span>
@@ -419,17 +417,19 @@ <h2 id="description">Description</h2>
419417
<h2 id="examples">Examples</h2>
420418

421419
<p>Add the current second to a record. Since Eve works in sets, <code>time-history</code> can only ever hold then numbers 0 through 60. This means after one minute passes, no new elements will be added to <code>tracker.time-history</code>.</p>
422-
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">match</span><span class="w"></span>
423-
<span class="w"> </span><span class="x">tracker</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">@seconds-tracker</span><span class="p">]</span><span class="w"></span>
420+
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span>
421+
<span class="w"> </span><span class="x">tracker</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#seconds-tracker</span><span class="p">]</span><span class="w"></span>
424422
<span class="w"> </span><span class="p">[</span><span class="nt">#time</span><span class="w"> </span><span class="x">seconds</span><span class="p">]</span><span class="w"></span>
423+
425424
<span class="kr">commit</span><span class="w"></span>
426425
<span class="w"> </span><span class="x">tracker.time</span><span class="nf">-</span><span class="x">history</span><span class="w"> </span><span class="nf">+=</span><span class="w"> </span><span class="x">seconds</span><span class="w"></span>
427426
</code></pre></div>
428427

429428
<p>We can get around this by adding a record:</p>
430-
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">match</span><span class="w"></span>
431-
<span class="w"> </span><span class="x">tracker</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">@seconds-tracker</span><span class="p">]</span><span class="w"></span>
429+
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span>
430+
<span class="w"> </span><span class="x">tracker</span><span class="w"> </span><span class="nf">=</span><span class="w"> </span><span class="p">[</span><span class="nt">#seconds-tracker</span><span class="p">]</span><span class="w"></span>
432431
<span class="w"> </span><span class="p">[</span><span class="nt">#time</span><span class="w"> </span><span class="x">seconds</span><span class="p">]</span><span class="w"></span>
432+
433433
<span class="kr">commit</span><span class="w"></span>
434434
<span class="w"> </span><span class="x">tracker.time</span><span class="nf">-</span><span class="x">history</span><span class="w"> </span><span class="nf">+=</span><span class="w"> </span><span class="p">[</span><span class="x">seconds</span><span class="p">]</span><span class="w"></span>
435435
</code></pre></div>
@@ -439,8 +439,9 @@ <h2 id="examples">Examples</h2>
439439
<hr />
440440

441441
<p>Add the <code>#honor-student</code> tag to any <code>#student</code> with a GPA greater than 3.75:</p>
442-
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">match</span><span class="w"></span>
442+
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span>
443443
<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">gpa</span><span class="w"> </span><span class="nf">&gt;</span><span class="w"> </span><span class="m">3</span><span class="x">.</span><span class="m">75</span><span class="p">]</span><span class="w"></span>
444+
<span class="w"> </span>
444445
<span class="kr">bind</span><span class="w"></span>
445446
<span class="w"> </span><span class="x">student</span><span class="w"> </span><span class="nf">+=</span><span class="w"> </span><span class="nt">#honor-student</span><span class="w"></span>
446447
</code></pre></div>

handbook/aggregates/index.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@
249249

250250
<ul class="sub">
251251

252-
<li><a href="https://witheve.github.io/docs/handbook/datetime/date/">date</a></li>
253-
254252
<li><a href="https://witheve.github.io/docs/handbook/datetime/time/">time</a></li>
255253

256254
</ul>
@@ -398,11 +396,11 @@ <h2 id="description">Description</h2>
398396
<p>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 <code>sum</code>, <code>count</code>, and <code>average</code>. Each of these takes a set of numbers as an input, and typically produces a single number as output.</p>
399397

400398
<p>Aggregates are called just like other functions in Eve. For instance, the <code>count</code> aggregate is called like so:</p>
401-
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">employee</span><span class="nf">-</span><span class="x">count</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">value</span><span class="nf">:</span><span class="w"> </span><span class="x">employees</span><span class="p">]</span><span class="w"></span>
399+
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">employee</span><span class="nf">-</span><span class="x">count</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">employees</span><span class="p">]</span><span class="w"></span>
402400
</code></pre></div>
403401

404402
<p>Aggregates don&rsquo;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:</p>
405-
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">employee</span><span class="nf">-</span><span class="x">count</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">value</span><span class="nf">:</span><span class="w"> </span><span class="x">employees</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">department</span><span class="p">]</span><span class="w"></span>
403+
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="x">employee</span><span class="nf">-</span><span class="x">count</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">employees</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">department</span><span class="p">]</span><span class="w"></span>
406404
</code></pre></div>
407405

408406
<p>Now, <code>employee-count</code> 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.</p>

handbook/bind/index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@
249249

250250
<ul class="sub">
251251

252-
<li><a href="https://witheve.github.io/docs/handbook/datetime/date/">date</a></li>
253-
254252
<li><a href="https://witheve.github.io/docs/handbook/datetime/time/">time</a></li>
255253

256254
</ul>
@@ -429,7 +427,7 @@ <h2 id="bind-vs-commit">Bind vs. Commit</h2>
429427
<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">seconds</span><span class="p">]</span><span class="w"></span>
430428
</code></pre></div>
431429

432-
<p>Comapred to the previous block, we only changed <code>bind</code> to <code>commit</code>. When you run this block, at first you&rsquo;ll see a single message like before. However, you&rsquo;ll notice that messages begin to accumulate every second. Unlike with bind, <strong>committed records persist in the database until they are intentionally removed</strong>.</p>
430+
<p>Compared to the previous block, we only changed <code>bind</code> to <code>commit</code>. When you run this block, at first you&rsquo;ll see a single message like before. However, you&rsquo;ll notice that messages begin to accumulate every second. Unlike with bind, <strong>committed records persist in the database until they are intentionally removed</strong>.</p>
433431

434432
<p>To make things very concrete, we can actually mimic the behavior of a bind using two blocks that commit. We&rsquo;ve already got the first one (the one just above), that commits messages to <code>@browser</code>. Now all we need is a second block, one that removes old committed messages from <code>@browser</code>:</p>
435433
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span>

handbook/blocks/index.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@
249249

250250
<ul class="sub">
251251

252-
<li><a href="https://witheve.github.io/docs/handbook/datetime/date/">date</a></li>
253-
254252
<li><a href="https://witheve.github.io/docs/handbook/datetime/time/">time</a></li>
255253

256254
</ul>
@@ -435,19 +433,19 @@ <h2 id="description">Description</h2>
435433

436434
<h2 id="tips">Tips</h2>
437435

438-
<p>Althgouth they are similar, it&rsquo;s important not to think of blocks like functions in other languages. Blocks don&rsquo;t have a name, and you don&rsquo;t &ldquo;call&rdquo; them like you do functions. Instead, you &ldquo;use&rdquo; a block by creating the records for which it searches.</p>
436+
<p>Although they are similar, it&rsquo;s important not to think of blocks like functions in other languages. Blocks don&rsquo;t have a name, and you don&rsquo;t &ldquo;call&rdquo; them like you do functions. Instead, you &ldquo;use&rdquo; a block by creating the records for which it searches.</p>
439437

440438
<p>Likewise, there is no &ldquo;main&rdquo; 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 execute when the program starts. For instance:</p>
441439
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">commit</span><span class="w"></span>
442440
<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;Sally&quot;</span><span class="p">]</span><span class="w"></span>
443441
<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;Ingrid&quot;</span><span class="p">]</span><span class="w"></span>
444442
</code></pre></div>
445443

446-
<p>This block has no <code>search</code> action, so it doesn&rsquo;t depend on any other recrods. Thus, it can be viewed as a &ldquo;root&rdquo; of the program. A program may contain many such roots.</p>
444+
<p>This block has no <code>search</code> action, so it doesn&rsquo;t depend on any other records. Thus, it can be viewed as a &ldquo;root&rdquo; of the program. A program may contain many such roots.</p>
447445

448446
<h2 id="examples">Examples</h2>
449447

450-
<p>A block with match and bind actions. The bind action adds the <code>#div</code> to the <code>@browser</code> database.</p>
448+
<p>A block with search and bind actions. The bind action adds the <code>#div</code> to the <code>@browser</code> database.</p>
451449
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"></span>
452450
<span class="w"> </span><span class="p">[</span><span class="x">name</span><span class="p">]</span><span class="w"></span>
453451

handbook/commit/index.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@
249249

250250
<ul class="sub">
251251

252-
<li><a href="https://witheve.github.io/docs/handbook/datetime/date/">date</a></li>
253-
254252
<li><a href="https://witheve.github.io/docs/handbook/datetime/time/">time</a></li>
255253

256254
</ul>
@@ -401,7 +399,7 @@ <h2 id="syntax">Syntax</h2>
401399

402400
<h2 id="description">Description</h2>
403401

404-
<p><code>commmit</code> 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.</p>
402+
<p><code>commit</code> 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.</p>
405403

406404
<p><code>commit @database1, ..., @databaseN</code> directs committed records one or more databases.</p>
407405

@@ -427,7 +425,7 @@ <h2 id="bind-vs-commit">Bind vs. Commit</h2>
427425
<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">seconds</span><span class="p">]</span><span class="w"></span>
428426
</code></pre></div>
429427

430-
<p>Comapred to the previous block, we only changed <code>bind</code> to <code>commit</code>. When you run this block, at first you&rsquo;ll see a single message like before. However, you&rsquo;ll notice that messages begin to accumulate every second. Unlike with bind, <strong>committed records persist in the database until they are intentionally removed</strong>.</p>
428+
<p>Compared to the previous block, we only changed <code>bind</code> to <code>commit</code>. When you run this block, at first you&rsquo;ll see a single message like before. However, you&rsquo;ll notice that messages begin to accumulate every second. Unlike with bind, <strong>committed records persist in the database until they are intentionally removed</strong>.</p>
431429

432430
<p>To make things very concrete, we can actually mimic the behavior of a bind using two blocks that commit. We&rsquo;ve already got the first one (the one just above), that commits messages to <code>@browser</code>. Now all we need is a second block, one that removes old committed messages from <code>@browser</code>:</p>
433431
<div class="highlight"><pre><code class="language-eve" data-lang="eve"><span></span><span class="kr">search</span><span class="w"> </span>

0 commit comments

Comments
 (0)