all repos — min @ f3bd4b10b41a0b6e546e7475dc160732e6b6452d

A small but practical concatenative programming language.

Updated docs.
Fabio Cevasco h3rald@h3rald.com
Sat, 15 Jun 2024 20:59:16 +0200
commit

f3bd4b10b41a0b6e546e7475dc160732e6b6452d

parent

c5f03c63cd8879f5d8e7e92e3df5b2b05ef252ce

M site/contents/learn-extending.mdsite/contents/learn-extending.md

@@ -30,7 +30,7 @@

``` 'quickpows require :qp -2 *qp/pow3 *qp/pow2 puts ;prints 64 +2 qp.pow3 qp.pow2 puts ;prints 64 ``` ## Specifying your custom prelude program
M site/contents/learn-operators.mdsite/contents/learn-operators.md

@@ -114,7 +114,7 @@ ) operator

This definition will add a `j` sigil that will process the following string as JSON code, so for example: - j"{\"test\": true}" + j"{\\"test\\": true}" ...will push the following dictionary on the stack:

@@ -323,8 +323,8 @@ constructor point

(num :x num :y ==> dict :out) ( {} - x %x - y %y + x 'x dset + y 'y dset @out ) ) ::
M site/contents/reference-dstore.mdsite/contents/reference-dstore.md

@@ -31,7 +31,7 @@ > > Example

> > > > Assuming that **ds** is a datastore, the following program retrieves all elements of teh collection **posts** whose author field is set to "h3rald": > > -> > ds "posts" (/author "h3rald" ==) dsquery +> > ds "posts" ('author dget "h3rald" ==) dsquery #} {#op||dsread||{{sl}}||{{dstore}}||
M site/contents/reference-global.mdsite/contents/reference-global.md

@@ -471,8 +471,8 @@ > >

> > The following program: > > > > {1 :a 2 :b 3 :c} ( -> > (dup /a succ succ %a) -> > (dup /b succ %b) +> > (dup 'a dget succ succ 'a dset) +> > (dup 'b dget succ 'b dset) > > ) tap > > > > Returns `{3 :a 3 :b 3 :c}`.#}
M site/contents/reference-http.mdsite/contents/reference-http.md

@@ -19,8 +19,8 @@ > >

> > The following code constructs {{d}} and passes it to the **request** operator to perform an HTTP GET request to <http://httpbin.org/ip>: > > > > {} -> > "GET" %method -> > "http://httpbin.org/ip" %url +> > "GET" 'method dget +> > "http://httpbin.org/ip" 'url dset > > request #}

@@ -63,7 +63,7 @@ > > ((true) ("Invalid Request: $1" url quote %))

> > ) case > > :body > > ; Prepare the response -> > {} body %body +> > {} body 'body dset > > dup puts! > > ) > > ; The request handler is ready, give it the name handler

@@ -71,8 +71,8 @@ > > :handler

> > > > ; Create the parameter dictionary for the server > > {} -> > handler %handler -> > 5555 %port +> > handler 'handler dset +> > 5555 'port dset > > > > ; Start server > > "Server started on port 5555." puts!