Skip to content

Commit

Permalink
Tue Dec 5 12:15:52 AM PST 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Dec 5, 2023
1 parent 9470400 commit 9c63007
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ release</a>.
What a coincidence!</p>
<p>At he moment there are only releases published for Linux x86_64 and macOS
aarch64.
If you happen to be running on one of those platforms, you run the following
If you happen to be running on one of those platforms, you can run the following
command to install YAMLScript's CLI, <code>ys</code>:</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">curl</span> https://yamlscript.org/install-ys <span class="token operator">|</span> <span class="token function">bash</span></code></pre>
<p>This installer defaults to installing <code>ys</code> into <code>/usr/local/bin</code> so you probably
Expand Down
2 changes: 1 addition & 1 deletion posts/advent-2023/dec-05/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="canonical" href="https://yamlscript.org/posts/advent-2023/dec-05/"><link href="/assets/main.f4ecd09b1608669889a9.css" rel="stylesheet"><link rel="preconnect" href="https://fonts.gstatic.com"><link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans&display=swap" rel="stylesheet"><title>Unwrapping Gifts | YAMLScript</title><link rel="icon" type="“image/x-icon”" href="/images/favicon.ico"><meta property="og:title" content="Unwrapping Gifts"><meta property="og:site_name" content="YAMLScript"><meta property="og:type" content="website"><meta property="og:url" content="https://yamlscript.org/posts/advent-2023/dec-05/"><meta name="twitter:card" content="summary_large_image"><meta name="description" content="Unwrapping Gifts 05 Dec 2023 | 4 min read It&#39;s certainly a relief now that I&#39;ve told you the big secret about YAMLScript. Now that you know..."><meta property="og:description" content="Unwrapping Gifts 05 Dec 2023 | 4 min read It&#39;s certainly a relief now that I&#39;ve told you the big secret about YAMLScript. Now that you know..."><meta name="description" content="Unwrapping Gifts 05 Dec 2023 | 4 min read It&#39;s certainly a relief now that I&#39;ve told you the big secret about YAMLScript. Now that you know..."><script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script><script>mermaid.initialize({startOnLoad:true});</script></head><body><div class="layout-wrapper"><header class="header"><div class="header__content"><h1 class="site-title"><a href="/"><img src="/images/yamlscript.svg"></a></h1><nav class="nav"><ul class="nav__list"><li class="nav-item"><a href="/blog">Blog</a></li><li class="nav-item"><a href="/about">About</a></li></ul></nav></div></header><main class="main"><article class="post"><header class="post__header"><h1>Unwrapping Gifts</h1><div class="post__details"><time datetime="2023-12-05">05 Dec 2023 </time><span>| </span><span>4 min read</span></div></header><main class="post__content"><p>It's certainly a relief now that I've told you the big secret about YAMLScript. Now that you know that YAMLScript is really Clojure, I don't have to dance around the subject anymore. I didn't want to scare you away by going Full-Lisp on you from the start!</p><p>Now we can just get into it. We can write, run and load YAMLScript until the cows come home.</p><p>But wait... How do we do that? You don't even have YS installed yet!</p><h3>Welcome to Day 5 of the YAMLScript Advent Calendar</h3><p>Today we're going to learn how to install YAMLScript a couple different ways.</p><p>Luckily for you I just finished creating the <a href="https://github.com/yaml/yamlscript/releases/tag/0.1.20">first official YAMLScript release</a>. What a coincidence!</p><p>At he moment there are only releases published for Linux x86_64 and macOS aarch64. If you happen to be running on one of those platforms, you run the following command to install YAMLScript's CLI, <code>ys</code>:</p><pre class="language-bash"><code class="language-bash"><span class="token function">curl</span> https://yamlscript.org/install-ys <span class="token operator">|</span> <span class="token function">bash</span></code></pre><p>This installer defaults to installing <code>ys</code> into <code>/usr/local/bin</code> so you probably need to run it as root or with <code>sudo</code>:</p><pre class="language-bash"><code class="language-bash"><span class="token function">curl</span> https://yamlscript.org/install-ys <span class="token operator">|</span> <span class="token function">sudo</span> <span class="token function">bash</span></code></pre><p>If you want to install it somewhere else, like say <code>~/local/bin</code>, you can do:</p><pre class="language-bash"><code class="language-bash"><span class="token function">curl</span> https://yamlscript.org/install-ys <span class="token operator">|</span> <span class="token assign-left variable">PREFIX</span><span class="token operator">=~</span>/local <span class="token function">bash</span></code></pre><p>Whereever you install it, make sure that the <code>$PREFIX/bin</code> directory is in your <code>PATH</code> environment variable.</p><p>YAMLScript also provides a release for <code>libyamlscript.so</code>, the YAMLScript shared library. You can install it like above but with (some variation of):</p><pre class="language-bash"><code class="language-bash"><span class="token function">curl</span> https://yamlscript.org/install-libyamlscript <span class="token operator">|</span> <span class="token function">bash</span></code></pre><h3>Building from Source</h3><p>The most reliable way to install YAMLScript is to build it from source. We've put a lot of effort into making this as easy as possible. You don't need any special prerequisites; just bash, curl and make.</p><p>The first thing you need to do is clone the YAMLScript repo:</p><pre class="language-bash"><code class="language-bash"><span class="token function">git</span> clone https://github.com/yaml/yamlscript</code></pre><p>Then you can build and install the CLI with:</p><pre class="language-bash"><code class="language-bash">$ <span class="token builtin class-name">cd</span> yamlscript<br>$ <span class="token function">make</span> build<br>$ <span class="token function">sudo</span> <span class="token function">make</span> <span class="token function">install</span></code></pre><blockquote><p>Note: Currently you should take care not to run <code>make build</code> as root. Since <code>make install</code> triggers <code>make build</code>, running <code>sudo make install</code> without first running <code>make build</code> may fail. This should be fixed soon.</p></blockquote><p>YAMLScript has a pretty sophisticated build system, built around GNU Make. Even though the build uses Java, Clojure and GraalVM, you don't need to install any of those things. In fact, even if you have them installed, the build will ignore them.</p><h3>Running YAMLScript</h3><p>Now that you have YAMLScript installed, you can run it. 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><code>ys - The YAMLScript (YS) Command Line Tool
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="canonical" href="https://yamlscript.org/posts/advent-2023/dec-05/"><link href="/assets/main.f4ecd09b1608669889a9.css" rel="stylesheet"><link rel="preconnect" href="https://fonts.gstatic.com"><link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans&display=swap" rel="stylesheet"><title>Unwrapping Gifts | YAMLScript</title><link rel="icon" type="“image/x-icon”" href="/images/favicon.ico"><meta property="og:title" content="Unwrapping Gifts"><meta property="og:site_name" content="YAMLScript"><meta property="og:type" content="website"><meta property="og:url" content="https://yamlscript.org/posts/advent-2023/dec-05/"><meta name="twitter:card" content="summary_large_image"><meta name="description" content="Unwrapping Gifts 05 Dec 2023 | 4 min read It&#39;s certainly a relief now that I&#39;ve told you the big secret about YAMLScript. Now that you know..."><meta property="og:description" content="Unwrapping Gifts 05 Dec 2023 | 4 min read It&#39;s certainly a relief now that I&#39;ve told you the big secret about YAMLScript. Now that you know..."><meta name="description" content="Unwrapping Gifts 05 Dec 2023 | 4 min read It&#39;s certainly a relief now that I&#39;ve told you the big secret about YAMLScript. Now that you know..."><script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script><script>mermaid.initialize({startOnLoad:true});</script></head><body><div class="layout-wrapper"><header class="header"><div class="header__content"><h1 class="site-title"><a href="/"><img src="/images/yamlscript.svg"></a></h1><nav class="nav"><ul class="nav__list"><li class="nav-item"><a href="/blog">Blog</a></li><li class="nav-item"><a href="/about">About</a></li></ul></nav></div></header><main class="main"><article class="post"><header class="post__header"><h1>Unwrapping Gifts</h1><div class="post__details"><time datetime="2023-12-05">05 Dec 2023 </time><span>| </span><span>4 min read</span></div></header><main class="post__content"><p>It's certainly a relief now that I've told you the big secret about YAMLScript. Now that you know that YAMLScript is really Clojure, I don't have to dance around the subject anymore. I didn't want to scare you away by going Full-Lisp on you from the start!</p><p>Now we can just get into it. We can write, run and load YAMLScript until the cows come home.</p><p>But wait... How do we do that? You don't even have YS installed yet!</p><h3>Welcome to Day 5 of the YAMLScript Advent Calendar</h3><p>Today we're going to learn how to install YAMLScript a couple different ways.</p><p>Luckily for you I just finished creating the <a href="https://github.com/yaml/yamlscript/releases/tag/0.1.20">first official YAMLScript release</a>. What a coincidence!</p><p>At he moment there are only releases published for Linux x86_64 and macOS aarch64. If you happen to be running on one of those platforms, you can run the following command to install YAMLScript's CLI, <code>ys</code>:</p><pre class="language-bash"><code class="language-bash"><span class="token function">curl</span> https://yamlscript.org/install-ys <span class="token operator">|</span> <span class="token function">bash</span></code></pre><p>This installer defaults to installing <code>ys</code> into <code>/usr/local/bin</code> so you probably need to run it as root or with <code>sudo</code>:</p><pre class="language-bash"><code class="language-bash"><span class="token function">curl</span> https://yamlscript.org/install-ys <span class="token operator">|</span> <span class="token function">sudo</span> <span class="token function">bash</span></code></pre><p>If you want to install it somewhere else, like say <code>~/local/bin</code>, you can do:</p><pre class="language-bash"><code class="language-bash"><span class="token function">curl</span> https://yamlscript.org/install-ys <span class="token operator">|</span> <span class="token assign-left variable">PREFIX</span><span class="token operator">=~</span>/local <span class="token function">bash</span></code></pre><p>Whereever you install it, make sure that the <code>$PREFIX/bin</code> directory is in your <code>PATH</code> environment variable.</p><p>YAMLScript also provides a release for <code>libyamlscript.so</code>, the YAMLScript shared library. You can install it like above but with (some variation of):</p><pre class="language-bash"><code class="language-bash"><span class="token function">curl</span> https://yamlscript.org/install-libyamlscript <span class="token operator">|</span> <span class="token function">bash</span></code></pre><h3>Building from Source</h3><p>The most reliable way to install YAMLScript is to build it from source. We've put a lot of effort into making this as easy as possible. You don't need any special prerequisites; just bash, curl and make.</p><p>The first thing you need to do is clone the YAMLScript repo:</p><pre class="language-bash"><code class="language-bash"><span class="token function">git</span> clone https://github.com/yaml/yamlscript</code></pre><p>Then you can build and install the CLI with:</p><pre class="language-bash"><code class="language-bash">$ <span class="token builtin class-name">cd</span> yamlscript<br>$ <span class="token function">make</span> build<br>$ <span class="token function">sudo</span> <span class="token function">make</span> <span class="token function">install</span></code></pre><blockquote><p>Note: Currently you should take care not to run <code>make build</code> as root. Since <code>make install</code> triggers <code>make build</code>, running <code>sudo make install</code> without first running <code>make build</code> may fail. This should be fixed soon.</p></blockquote><p>YAMLScript has a pretty sophisticated build system, built around GNU Make. Even though the build uses Java, Clojure and GraalVM, you don't need to install any of those things. In fact, even if you have them installed, the build will ignore them.</p><h3>Running YAMLScript</h3><p>Now that you have YAMLScript installed, you can run it. 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><code>ys - The YAMLScript (YS) Command Line Tool

Usage: ys [options] [file]

Expand Down

0 comments on commit 9c63007

Please sign in to comment.