<commit_before><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>E</title>
<link rel="stylesheet" href="doc.css" type="text/css">
</head>
<body>

<h1>E</h1>

<dl>

<dt><a name="*Err"><code>*Err</code></a>
<dd>A global variable holding a (possibly empty) <code>prg</code> body, which
will be executed during error processing. See also <code><a
href="ref.html#errors">Error Handling</a></code>, <code><a
href="refM.html#*Msg">*Msg</a></code> and <code><a
href="ref_.html#^">^</a></code>.

<pre><code>
: (de *Err (prinl "Fatal error!"))
-> ((prinl "Fatal error!"))
: (/ 3 0)
!? (/ 3 0)
Div/0
Fatal error!
$
</code></pre>

<dt><a name="*Ext"><code>*Ext</code></a>
<dd>A global variable holding a sorted list of cons pairs. The CAR of each pair
specifies an external symbol offset (suitable for <code><a
href="refE.html#ext">ext</a></code>), and the CDR should be a function taking a
single external symbol as an argument. This function should return a list, with
the value for that symbol in its CAR, and the property list (in the format used
by <code><a href="refG.html#getl">getl</a></code> and <code><a
href="refP.html#putl">putl</a></code>) in its CDR. The symbol will be set to
this value and property list upon access. Typically this function will access
the corresponding symbol in a remote database process. See also <code><a
href="refQ.html#qsym">qsym</a></code> and <code><a
href="ref.html#external">external symbols</a></code>.

<pre><code>
### On the local machine ###
: (setq *Ext  # Define extension functions
   (mapcar
      '((@Host @Ext)
         (cons @Ext
            (curry (@Host @Ext (Sock)) (Obj)
               (when (or Sock (setq Sock (connect @Host 4040)))
                  (ext @Ext
                     (out Sock (pr (cons 'qsym Obj)))
                     (prog1 (in Sock (rd))
                        (unless @
                           (close Sock)
                           (off Sock) ) ) ) ) ) ) )
      '("10.10.12.1" "10.10.12.2" "10.10.12.3" "10.10.12.4")
      (20 40 60 80) ) )

### On the remote machines ###
(de go ()
   ...
   (task (port 4040)                      # Set up background query server
      (let? Sock (accept @)               # Accept a connection
         (unless (fork)                   # In child process
            (in Sock
               (while (rd)                # Handle requests
                  (sync)
                  (out Sock
                     (pr (eval @)) ) ) )
            (bye) )                       # Exit child process
         (close Sock) ) )
   (forked)                               # Close task in children
   ...

</code></pre>

<dt><a name="+Entity"><code>+Entity</code></a>
<dd>Base class of all database objects. See also <code><a
href="refR.html#+relation">+relation</a></code> and <code><a
href="ref.html#dbase">Database</a></code>.

<p><a name="entityMesssages">Messages</a> to entity objects include

<pre><code>
zap> ()              # Clean up relational structures, for removal from the DB
url> (Tab)           # Call the GUI on that object (in optional Tab)
upd> (X Old)         # Callback method when object is created/modified/deleted
has> (Var Val)       # Check if value is present
put> (Var Val)       # Put a new value
put!> (Var Val)      # Put a new value, single transaction
del> (Var Val)       # Delete value (also partial)
del!> (Var Val)      # Delete value (also partial), single transaction
inc> (Var Val)       # Increment numeric value
inc!> (Var Val)      # Increment numeric value, single transaction
dec> (Var Val)       # Decrement numeric value
dec!> (Var Val)      # Decrement numeric value, single transaction
mis> (Var Val)       # Return error message if value or type mismatch
lose1> (Var)         # Delete relational structures for a single attribute
lose> (Lst)          # Delete relational structures (excluding 'Lst')
lose!> ()            # Delete relational structures, single transaction
keep1> (Var)         # Restore relational structures for single attribute
keep> (Lst)          # Restore relational structures (excluding 'Lst')
keep?> (Lst)         # Test for restauration (excluding 'Lst')
keep!> ()            # Restore relational structures, single transaction
set> (Val)           # Set the value (type, i.e. class list)
set!> (Val)          # Set the value, single transaction
clone> ()            # Object copy
clone!> ()           # Object copy, single transaction
</code></pre>

<dt><a name="e"><code>(e . prg) -> any</code></a>
<dd>Used in a breakpoint. Evaluates <code>prg</code> in the execution
environment, or the currently executed expression if <code>prg</code> is not
given. See also <code><a href="refD.html#debug">debug</a></code>, <code><a
href="ref_.html#!">!</a></code>, <code><a href="ref_.html#^">^</a></code> and
<code><a href="refD.html#*Dbg">*Dbg</a></code>.

<pre><code>
: (! + 3 4)
(+ 3 4)
! (e)
-> 7
</code></pre>

<dt><a name="echo"><code>(echo ['cnt ['cnt]] | ['sym ..]) -> sym</code></a>
<dd>Reads the current input channel, and writes to the current output channel.
If <code>cnt</code> is given, only that many bytes are actually echoed. In case
of two <code>cnt</code> arguments, the first one specifies the number of bytes
to skip in the input stream. Otherwise, if one or more <code>sym</code>
arguments are given, the echo process stops as soon as one of the symbol's names
is encountered in the input stream. In this case the name will be read and
returned, but not written. Returns non-<code>NIL</code> if the operation was
successfully completed.

<pre><code><commit_msg>Minor: See also<commit_after><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>E</title>
<link rel="stylesheet" href="doc.css" type="text/css">
</head>
<body>

<h1>E</h1>

<dl>

<dt><a name="*Err"><code>*Err</code></a>
<dd>A global variable holding a (possibly empty) <code>prg</code> body, which
will be executed during error processing. See also <code><a
href="ref.html#errors">Error Handling</a></code>, <code><a
href="refM.html#*Msg">*Msg</a></code> and <code><a
href="ref_.html#^">^</a></code>.

<pre><code>
: (de *Err (prinl "Fatal error!"))
-> ((prinl "Fatal error!"))
: (/ 3 0)
!? (/ 3 0)
Div/0
Fatal error!
$
</code></pre>

<dt><a name="*Ext"><code>*Ext</code></a>
<dd>A global variable holding a sorted list of cons pairs. The CAR of each pair
specifies an external symbol offset (suitable for <code><a
href="refE.html#ext">ext</a></code>), and the CDR should be a function taking a
single external symbol as an argument. This function should return a list, with
the value for that symbol in its CAR, and the property list (in the format used
by <code><a href="refG.html#getl">getl</a></code> and <code><a
href="refP.html#putl">putl</a></code>) in its CDR. The symbol will be set to
this value and property list upon access. Typically this function will access
the corresponding symbol in a remote database process. See also <code><a
href="refQ.html#qsym">qsym</a></code> and <code><a
href="ref.html#external">external symbols</a></code>.

<pre><code>
### On the local machine ###
: (setq *Ext  # Define extension functions
   (mapcar
      '((@Host @Ext)
         (cons @Ext
            (curry (@Host @Ext (Sock)) (Obj)
               (when (or Sock (setq Sock (connect @Host 4040)))
                  (ext @Ext
                     (out Sock (pr (cons 'qsym Obj)))
                     (prog1 (in Sock (rd))
                        (unless @
                           (close Sock)
                           (off Sock) ) ) ) ) ) ) )
      '("10.10.12.1" "10.10.12.2" "10.10.12.3" "10.10.12.4")
      (20 40 60 80) ) )

### On the remote machines ###
(de go ()
   ...
   (task (port 4040)                      # Set up background query server
      (let? Sock (accept @)               # Accept a connection
         (unless (fork)                   # In child process
            (in Sock
               (while (rd)                # Handle requests
                  (sync)
                  (out Sock
                     (pr (eval @)) ) ) )
            (bye) )                       # Exit child process
         (close Sock) ) )
   (forked)                               # Close task in children
   ...

</code></pre>

<dt><a name="+Entity"><code>+Entity</code></a>
<dd>Base class of all database objects. See also <code><a
href="refR.html#+relation">+relation</a></code> and <code><a
href="ref.html#dbase">Database</a></code>.

<p><a name="entityMesssages">Messages</a> to entity objects include

<pre><code>
zap> ()              # Clean up relational structures, for removal from the DB
url> (Tab)           # Call the GUI on that object (in optional Tab)
upd> (X Old)         # Callback method when object is created/modified/deleted
has> (Var Val)       # Check if value is present
put> (Var Val)       # Put a new value
put!> (Var Val)      # Put a new value, single transaction
del> (Var Val)       # Delete value (also partial)
del!> (Var Val)      # Delete value (also partial), single transaction
inc> (Var Val)       # Increment numeric value
inc!> (Var Val)      # Increment numeric value, single transaction
dec> (Var Val)       # Decrement numeric value
dec!> (Var Val)      # Decrement numeric value, single transaction
mis> (Var Val)       # Return error message if value or type mismatch
lose1> (Var)         # Delete relational structures for a single attribute
lose> (Lst)          # Delete relational structures (excluding 'Lst')
lose!> ()            # Delete relational structures, single transaction
keep1> (Var)         # Restore relational structures for single attribute
keep> (Lst)          # Restore relational structures (excluding 'Lst')
keep?> (Lst)         # Test for restauration (excluding 'Lst')
keep!> ()            # Restore relational structures, single transaction
set> (Val)           # Set the value (type, i.e. class list)
set!> (Val)          # Set the value, single transaction
clone> ()            # Object copy
clone!> ()           # Object copy, single transaction
</code></pre>

<dt><a name="e"><code>(e . prg) -> any</code></a>
<dd>Used in a breakpoint. Evaluates <code>prg</code> in the execution
environment, or the currently executed expression if <code>prg</code> is not
given. See also <code><a href="refD.html#debug">debug</a></code>, <code><a
href="ref_.html#!">!</a></code>, <code><a href="ref_.html#^">^</a></code> and
<code><a href="refD.html#*Dbg">*Dbg</a></code>.

<pre><code>
: (! + 3 4)
(+ 3 4)
! (e)
-> 7
</code></pre>

<dt><a name="echo"><code>(echo ['cnt ['cnt]] | ['sym ..]) -> sym</code></a>
<dd>Reads the current input channel, and writes to the current output channel.
If <code>cnt</code> is given, only that many bytes are actually echoed. In case
of two <code>cnt</code> arguments, the first one specifies the number of bytes
to skip in the input stream. Otherwise, if one or more <code>sym</code>
arguments are given, the echo process stops as soon as one of the symbol's names
is encountered in the input stream. In this case the name will be read and
returned, but not written. Returns non-<code>NIL</code> if the operation was
successfully completed. See also <code><a href="refF.html#from">from</a></code>.

<pre><code>
{'fraction_non_alphanumeric': 0.15331767979824332, 'fraction_numerical': 0.013566397078006782, 'mean_word_length': 2.8066865276398545, 'pattern_counts': {'":': 0, '<': 273, '<?xml version=': 0, '>': 329, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3163261', 'n_tokens_mistral': 3757, 'n_tokens_neox': 3556, 'n_words': 1253}