relpipe-data/examples-guile-filtering.xml
branchv_0
changeset 316 d7ae02390fac
parent 258 2868d772c27e
--- a/relpipe-data/examples-guile-filtering.xml	Sat Sep 12 13:20:21 2020 +0200
+++ b/relpipe-data/examples-guile-filtering.xml	Fri Sep 25 14:38:24 2020 +0200
@@ -2,7 +2,7 @@
 	xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
 	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro">
 	
-	<nadpis>Complex filtering with Guile</nadpis>
+	<nadpis>Complex filtering with Scheme</nadpis>
 	<perex>filtering records with AND, OR and functions</perex>
 	<m:pořadí-příkladu>01400</m:pořadí-příkladu>
 
@@ -12,12 +12,12 @@
 			For simple filtering, we can use <code>relpipe-tr-grep</code>.
 			But what if we need to write some complex query that contains AND and OR operators?
 			What if we need e.g. compare numbers – not only match texts against regular expressions?
-			There is a tool capable to do this and much more: <code>relpipe-tr-guile</code>!
+			There is a tool capable to do this and much more: <code>relpipe-tr-scheme</code>!
 		</p>
 		
 		<p>
 			<a href="https://www.gnu.org/software/guile/">Guile</a> is the GNU implementation of Scheme language (something like Lisp and also full of parenthesis).
-			The <code>relpipe-tr-guile</code> uses GNU Guile as a library, puts data in the Guile context and evaluates Guile expressions and then reads data from the Guile context back and generates relational output from them.
+			The <code>relpipe-tr-scheme</code> reference implementation uses GNU Guile as a library, puts data in the Scheme context and evaluates Scheme expressions and then reads data from the Scheme context back and generates relational output from them.
 			Good news are that it is not necessary to know Lisp/Scheme to use this tool. For the first steps, it can be used just as a query language – like SQL, just a bit Polish.
 		</p>
 		
@@ -29,7 +29,7 @@
 		
 		<m:pre jazyk="bash"><![CDATA[find /usr/share/icons/ -type f -print0 \
 	| relpipe-in-filesystem \
-	| relpipe-tr-guile --relation 'files.*' --where '(= $size 666)' \
+	| relpipe-tr-scheme --relation 'files.*' --where '(= $size 666)' \
 	| relpipe-out-tabular]]></m:pre>
 	
 		<p>Well, well… here we are:</p>
@@ -54,7 +54,7 @@
  ╰───────────────────────────────────────────────────────────────────────┴───────────────┴────────────────┴────────────────┴────────────────╯
 Record count: 13]]></m:pre>
 
-		<p>The <code>--relation 'files.*'</code> is a regular expression that says which relations should be processed in Guile – others are passed through unchanged.</p>
+		<p>The <code>--relation 'files.*'</code> is a regular expression that says which relations should be processed in Scheme – others are passed through unchanged.</p>
 		
 		<p>
 			The <code>--where '(= $size 666)'</code> is our condition. 
@@ -65,11 +65,11 @@
 		</p>
 		
 		<p>
-			Relational attributes are mapped to Guile variables with same name, just prefixed with <code>$</code>.
+			Relational attributes are mapped to Scheme variables with same name, just prefixed with <code>$</code>.
 			(we considered <code>
 				<abbr title="Bitcoin">₿</abbr>
 			</code> symbol, but <code>$</code> seems to be still more common on keyboards in 2019)
-			While relational attribute name is an arbitrary string, Guile variable names have some limitations, thus not all attributes can be mapped – those with spaces and some special characters are currently unsupported (this will be fixed in later versions by some kind of encoding/escaping).
+			While relational attribute name is an arbitrary string, Scheme variable names have some limitations, thus not all attributes can be mapped – those with spaces and some special characters are currently unsupported (this will be fixed in later versions by some kind of encoding/escaping).
 		</p>
 		
 		<p>
@@ -88,7 +88,7 @@
 		</p>
 		
 		<m:pre jazyk="bash"><![CDATA[relpipe-in-fstab \
-	| relpipe-tr-guile --relation 'fstab' --where '(string= $type "btrfs")' \
+	| relpipe-tr-scheme --relation 'fstab' --where '(string= $type "btrfs")' \
 	| relpipe-out-tabular]]></m:pre>
 	
 		<p>The Btrfs filesystems in our <code>fstab</code>:</p>
@@ -106,7 +106,7 @@
 		</p>
 
 		<m:pre jazyk="bash"><![CDATA[relpipe-in-fstab \
-	| relpipe-tr-guile --relation 'fstab' --where '(string-prefix? "/mnt" $mount_point)' \
+	| relpipe-tr-scheme --relation 'fstab' --where '(string-prefix? "/mnt" $mount_point)' \
 	| relpipe-out-tabular]]></m:pre>
 		
 		<p>So we can find filesystems mounted somewhere under <code>/mnt</code>:</p>
@@ -130,7 +130,7 @@
 		
 		<p>
 			Like in SQL, we can join multiple conditions together with logical operators AND and OR.
-			In Guile/Scheme these operators are also functions – they are written in the same <code>(</code>fashion<code>)</code>.
+			In Scheme these operators are also functions – they are written in the same <code>(</code>fashion<code>)</code>.
 		</p>
 		
 		<p>
@@ -139,7 +139,7 @@
 		
 		<m:pre jazyk="bash"><![CDATA[find /usr/share/icons/ -type f -print0 \
 	| relpipe-in-filesystem --file path --file size \
-	| relpipe-tr-guile --relation 'files.*' --where '(or (= $size 666) (= $size 1984) )' \
+	| relpipe-tr-scheme --relation 'files.*' --where '(or (= $size 666) (= $size 1984) )' \
 	| relpipe-out-tabular]]></m:pre>
 	
 		<p>Files with sizes 666 bytes or 1984 bytes:</p>
@@ -172,7 +172,7 @@
 		
 		<m:pre jazyk="bash"><![CDATA[find /usr/share/icons/ -type f -print0 \
 	| relpipe-in-filesystem --file path --file size \
-	| relpipe-tr-guile \
+	| relpipe-tr-scheme \
 		--relation 'files.*' \
 		--where '(and (string-suffix? ".svg" $path) (= $size 1984) )' \
 	| relpipe-out-tabular]]></m:pre>