Skip to content

Commit

Permalink
Mon 16 Dec 2024 09:51:33 AM PST
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Dec 16, 2024
1 parent 67ea04f commit d4577ed
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion doc/control/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/run-ys/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/ys/index.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ In fact, even if you have them installed, the build will ignore them.</p>
Try:</p>
<pre class="language-bash"><code class="language-bash">$ ys <span class="token parameter variable">--help</span></code></pre>
<p>It should display:</p>
<pre class="language-text"><code class="language-text">ys - The YAMLScript (YS) Command Line Tool - v0.1.86<br><br>Usage: ys [<option...>] [<file>]<br><br>Options:<br><br> --run Run a YAMLScript program file (default)<br> -l, --load Output (compact) JSON of YAMLScript evaluation<br> -e, --eval YSEXPR Evaluate a YAMLScript expression<br> multiple -e values joined by newline<br><br> -c, --compile Compile YAMLScript to Clojure<br> -b, --binary Compile to a native binary executable<br><br> -p, --print Print the result of --run in code mode<br> -o, --output FILE Output file for --load, --compile or --binary<br><br> -T, --to FORMAT Output format for --load:<br> json, yaml, edn<br> -J, --json Output (pretty) JSON for --load<br> -Y, --yaml Output YAML for --load<br> -E, --edn Output EDN for --load<br> -U, --unordered Mappings don't preserve key order (faster)<br><br> -m, --mode MODE Add a mode tag: code, data, or bare (for -e)<br> -C, --clojure Treat input as Clojure code<br><br> -d Debug all compilation stages<br> -D, --debug-stage STAGE Debug a specific compilation stage:<br> parse, compose, resolve, build,<br> transform, construct, print<br> can be used multiple times<br> -S, --stack-trace Print full stack trace for errors<br> -x, --xtrace Print each expression before evaluation<br><br> --install Install the libyamlscript shared library<br> --upgrade Upgrade both ys and libyamlscript<br><br> --version Print version and exit<br> -h, --help Print this help and exit</code></pre>
<pre class="language-text"><code class="language-text">ys - The YAMLScript (YS) Command Line Tool - v0.1.87<br><br>Usage: ys [<option...>] [<file>]<br><br>Options:<br><br> --run Run a YAMLScript program file (default)<br> -l, --load Output (compact) JSON of YAMLScript evaluation<br> -e, --eval YSEXPR Evaluate a YAMLScript expression<br> multiple -e values joined by newline<br><br> -c, --compile Compile YAMLScript to Clojure<br> -b, --binary Compile to a native binary executable<br><br> -p, --print Print the result of --run in code mode<br> -o, --output FILE Output file for --load, --compile or --binary<br><br> -T, --to FORMAT Output format for --load:<br> json, yaml, edn<br> -J, --json Output (pretty) JSON for --load<br> -Y, --yaml Output YAML for --load<br> -E, --edn Output EDN for --load<br> -U, --unordered Mappings don't preserve key order (faster)<br><br> -m, --mode MODE Add a mode tag: code, data, or bare (for -e)<br> -C, --clojure Treat input as Clojure code<br><br> -d Debug all compilation stages<br> -D, --debug-stage STAGE Debug a specific compilation stage:<br> parse, compose, resolve, build,<br> transform, construct, print<br> can be used multiple times<br> -S, --stack-trace Print full stack trace for errors<br> -x, --xtrace Print each expression before evaluation<br><br> --install Install the libyamlscript shared library<br> --upgrade Upgrade both ys and libyamlscript<br><br> --version Print version and exit<br> -h, --help Print this help and exit</code></pre>
<p>In the next day or two we'll go over all of these options in detail.</p>
<p>Here's a quick example of how to run YAMLScript to process a file from the
internet that Google just told me about:</p>
Expand Down Expand Up @@ -902,9 +902,9 @@ Today we'll learn about all the things you can do with it.</p>
<h3>Welcome to Day 7 of the YAMLScript Advent Calendar</h3>
<p>On Tuesday you learned how to install YAMLScript.
Reminder, here's the quick way to install the latest version:</p>
<pre class="language-bash"><code class="language-bash">$ <span class="token function">curl</span> https://yamlscript.org/install <span class="token operator">|</span> <span class="token assign-left variable">PREFIX</span><span class="token operator">=~</span>/.yamlscript <span class="token function">bash</span><br>$ <span class="token builtin class-name">export</span> <span class="token assign-left variable"><span class="token environment constant">PATH</span></span><span class="token operator">=</span><span class="token environment constant">$HOME</span>/.yamlscript/bin:<span class="token environment constant">$PATH</span><br>$ ys <span class="token parameter variable">--version</span><br>YAMLScript v0.1.86</code></pre>
<pre class="language-bash"><code class="language-bash">$ <span class="token function">curl</span> https://yamlscript.org/install <span class="token operator">|</span> <span class="token assign-left variable">PREFIX</span><span class="token operator">=~</span>/.yamlscript <span class="token function">bash</span><br>$ <span class="token builtin class-name">export</span> <span class="token assign-left variable"><span class="token environment constant">PATH</span></span><span class="token operator">=</span><span class="token environment constant">$HOME</span>/.yamlscript/bin:<span class="token environment constant">$PATH</span><br>$ ys <span class="token parameter variable">--version</span><br>YAMLScript v0.1.87</code></pre>
<p>The best first command to run is <code>ys --help</code>:</p>
<pre class="language-bash"><code class="language-bash">$ ys <span class="token parameter variable">--help</span><br><br>ys - The YAMLScript <span class="token punctuation">(</span>YS<span class="token punctuation">)</span> Command Line Tool - v0.1.86<br><br>Usage: ys <span class="token punctuation">[</span><span class="token operator">&lt;</span>option<span class="token punctuation">..</span>.<span class="token operator">></span><span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token operator">&lt;</span>file<span class="token operator">></span><span class="token punctuation">]</span><br><br>Options:<br><br> <span class="token parameter variable">--run</span> Run a YAMLScript program <span class="token function">file</span> <span class="token punctuation">(</span>default<span class="token punctuation">)</span><br> -l, <span class="token parameter variable">--load</span> Output <span class="token punctuation">(</span>compact<span class="token punctuation">)</span> JSON of YAMLScript evaluation<br> -e, <span class="token parameter variable">--eval</span> YSEXPR Evaluate a YAMLScript expression<br> multiple <span class="token parameter variable">-e</span> values joined by newline<br><br> -c, <span class="token parameter variable">--compile</span> Compile YAMLScript to Clojure<br> -b, <span class="token parameter variable">--binary</span> Compile to a native binary executable<br><br> -p, <span class="token parameter variable">--print</span> Print the result of <span class="token parameter variable">--run</span> <span class="token keyword">in</span> code mode<br> -o, <span class="token parameter variable">--output</span> FILE Output <span class="token function">file</span> <span class="token keyword">for</span> --load, <span class="token parameter variable">--compile</span> or <span class="token parameter variable">--binary</span><br><br> -T, <span class="token parameter variable">--to</span> FORMAT Output <span class="token function">format</span> <span class="token keyword">for</span> --load:<br> json, yaml, edn<br> -J, <span class="token parameter variable">--json</span> Output <span class="token punctuation">(</span>pretty<span class="token punctuation">)</span> JSON <span class="token keyword">for</span> <span class="token parameter variable">--load</span><br> -Y, <span class="token parameter variable">--yaml</span> Output YAML <span class="token keyword">for</span> <span class="token parameter variable">--load</span><br> -E, <span class="token parameter variable">--edn</span> Output EDN <span class="token keyword">for</span> <span class="token parameter variable">--load</span><br> -U, <span class="token parameter variable">--unordered</span> Mappings don't preserve key order <span class="token punctuation">(</span>faster<span class="token punctuation">)</span><br><br> -m, <span class="token parameter variable">--mode</span> MODE Add a mode tag: code, data, or bare <span class="token punctuation">(</span>for -e<span class="token punctuation">)</span><br> -C, <span class="token parameter variable">--clojure</span> Treat input as Clojure code<br><br> <span class="token parameter variable">-d</span> Debug all compilation stages<br> -D, --debug-stage STAGE Debug a specific compilation stage:<br> parse, compose, resolve, build,<br> transform, construct, print<br> can be used multiple <span class="token builtin class-name">times</span><br> -S, --stack-trace Print full stack trace <span class="token keyword">for</span> errors<br> -x, <span class="token parameter variable">--xtrace</span> Print each expression before evaluation<br><br> <span class="token parameter variable">--install</span> Install the libyamlscript shared library<br> <span class="token parameter variable">--upgrade</span> Upgrade both ys and libyamlscript<br><br> <span class="token parameter variable">--version</span> Print version and <span class="token builtin class-name">exit</span><br> -h, <span class="token parameter variable">--help</span> Print this <span class="token builtin class-name">help</span> and <span class="token builtin class-name">exit</span></code></pre>
<pre class="language-bash"><code class="language-bash">$ ys <span class="token parameter variable">--help</span><br><br>ys - The YAMLScript <span class="token punctuation">(</span>YS<span class="token punctuation">)</span> Command Line Tool - v0.1.87<br><br>Usage: ys <span class="token punctuation">[</span><span class="token operator">&lt;</span>option<span class="token punctuation">..</span>.<span class="token operator">></span><span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token operator">&lt;</span>file<span class="token operator">></span><span class="token punctuation">]</span><br><br>Options:<br><br> <span class="token parameter variable">--run</span> Run a YAMLScript program <span class="token function">file</span> <span class="token punctuation">(</span>default<span class="token punctuation">)</span><br> -l, <span class="token parameter variable">--load</span> Output <span class="token punctuation">(</span>compact<span class="token punctuation">)</span> JSON of YAMLScript evaluation<br> -e, <span class="token parameter variable">--eval</span> YSEXPR Evaluate a YAMLScript expression<br> multiple <span class="token parameter variable">-e</span> values joined by newline<br><br> -c, <span class="token parameter variable">--compile</span> Compile YAMLScript to Clojure<br> -b, <span class="token parameter variable">--binary</span> Compile to a native binary executable<br><br> -p, <span class="token parameter variable">--print</span> Print the result of <span class="token parameter variable">--run</span> <span class="token keyword">in</span> code mode<br> -o, <span class="token parameter variable">--output</span> FILE Output <span class="token function">file</span> <span class="token keyword">for</span> --load, <span class="token parameter variable">--compile</span> or <span class="token parameter variable">--binary</span><br><br> -T, <span class="token parameter variable">--to</span> FORMAT Output <span class="token function">format</span> <span class="token keyword">for</span> --load:<br> json, yaml, edn<br> -J, <span class="token parameter variable">--json</span> Output <span class="token punctuation">(</span>pretty<span class="token punctuation">)</span> JSON <span class="token keyword">for</span> <span class="token parameter variable">--load</span><br> -Y, <span class="token parameter variable">--yaml</span> Output YAML <span class="token keyword">for</span> <span class="token parameter variable">--load</span><br> -E, <span class="token parameter variable">--edn</span> Output EDN <span class="token keyword">for</span> <span class="token parameter variable">--load</span><br> -U, <span class="token parameter variable">--unordered</span> Mappings don't preserve key order <span class="token punctuation">(</span>faster<span class="token punctuation">)</span><br><br> -m, <span class="token parameter variable">--mode</span> MODE Add a mode tag: code, data, or bare <span class="token punctuation">(</span>for -e<span class="token punctuation">)</span><br> -C, <span class="token parameter variable">--clojure</span> Treat input as Clojure code<br><br> <span class="token parameter variable">-d</span> Debug all compilation stages<br> -D, --debug-stage STAGE Debug a specific compilation stage:<br> parse, compose, resolve, build,<br> transform, construct, print<br> can be used multiple <span class="token builtin class-name">times</span><br> -S, --stack-trace Print full stack trace <span class="token keyword">for</span> errors<br> -x, <span class="token parameter variable">--xtrace</span> Print each expression before evaluation<br><br> <span class="token parameter variable">--install</span> Install the libyamlscript shared library<br> <span class="token parameter variable">--upgrade</span> Upgrade both ys and libyamlscript<br><br> <span class="token parameter variable">--version</span> Print version and <span class="token builtin class-name">exit</span><br> -h, <span class="token parameter variable">--help</span> Print this <span class="token builtin class-name">help</span> and <span class="token builtin class-name">exit</span></code></pre>
<h3>Ready, set, actions!</h3>
<p>The first thing to notice is that <code>ys</code> has 3 &quot;actions&quot;:</p>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

set -e -u -o pipefail

LIBYAMLSCRIPT_VERSION=0.1.86
LIBYAMLSCRIPT_VERSION=0.1.87
VERSION=${VERSION:-$LIBYAMLSCRIPT_VERSION}
export VERSION

Expand Down
Loading

0 comments on commit d4577ed

Please sign in to comment.