My personal website
git clone git://
Log | Files | Refs

20211012-execline.html (3851B)

      1 <!DOCTYPE HTML>
      2 <html lan=en>
      3   <head>
      4     <title>My thoughts on execline | Cem's Website</title>
      5     <meta charset="utf-8">
      6     <meta name="Description" content="Cem Keylan's Website">
      7     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
      8     <style>
      9       html {font-family:monospace;font-size:16px;color:#282a36;}
     10       body {
     11 	  width: 90%;
     12 	  max-width: 1050px;
     13 	  margin-left: auto;
     14 	  margin-right: auto;
     15 	  margin-top: 20px;
     16 	  overflow: none;
     17           overflow-y: scroll;
     18 	  padding-right: 10px;
     19 	  padding-left: 10px;
     20       }
     21       a{text-decoration:none;font-weight:bold;color:#282a36;}
     22       a:hover{text-decoration:underline;}
     23       @media (prefers-color-scheme: dark) {
     24           html {color: white;background:#282a36;}
     25           a{color:white;}
     26       }
     27     </style>
     28     <link rel="stylesheet" href="/static/syntax.css">
     29     <script src="/static/highlight.pack.js"></script>
     30     <script>hljs.initHighlightingOnLoad();</script>
     31   </head>
     32   <body>
     33     <div class="header">
     34       <nav>
     35         <a href='/'>index</a> |
     36         <a href="/software.html">software</a> |
     37         <a href="/blog.html">blog</a> |
     38         <a href="/contact.html">contact</a> |
     39         <a href="/sysmgr">sysmgr</a> |
     40       </nav>
     41     </div>
     42     <hr>
     43     <p>
     44 <h1>My thoughts on execline</h1>
     46 <p>With the gaining popularity of the <a href="">s6-rc</a>, I have recently decided to check out
     47 <a href="">execline</a>. It is a shell-like scripting language that is built around chaining
     48 commands together. There is no interpreter, there is no &lsquo;built-in&rsquo; functionality
     49 even though the docs might make you think there are. Execline is best described
     50 as a suite of tools that imitate the functionality of a shell.</p>
     52 <p>There are a ton of information on the execline&rsquo;s page, especially discussing
     53 why skarnet prefers execline instead of <code>/bin/sh</code>. Those points are mostly
     54 valid, shells are a nightmare, and they suck at being compliant to the POSIX
     55 specification. What I don&rsquo;t agree with the <a href="">why not sh</a> page, however, is the
     56 part on performance. Even though execline does not have an interactive shell
     57 implementation of its own, it is still much slower than other shells simply by
     58 its design. Since the design of execline is built on process chaining, it
     59 requires spawning new processes for things as basic as variable declaration.
     60 Variable manipulation is the cheapest operation you would expect from a shell,
     61 but in execline, every operation costs the same regardless of how simple it is.</p>
     63 <p>Throughout my weeks of toying around with execline, I have came to the
     64 conclusion that execline is much better in simple scripts only. Execline is
     65 as usable as any shell out there, but even with its advantages over <code>sh</code>,
     66 execline is only better if it&rsquo;s simple. Execline is really good for certain
     67 specific situations such as service scripts (as used in s6-rc), or where you
     68 were already meant to chain a couple of commands together. After all, skarnet
     69 already presents these limitations on the website of execline.</p>
     71 <p>Execline can be leveraged as how s6-rc compiles service databases with other
     72 utilities, but I don&rsquo;t think it can be used as a shell replacement itself. It&rsquo;s
     73 not the next shiny thing to jump on to replace all your shell scripts with
     74 (unless you have really basic shell scripts). It does not have the flexibility
     75 nor the performance of the shell for scripts that can be considered a little
     76 over than the &ldquo;basic&rdquo;.</p>
     77     </p>
     78     <a href="/blog/20211012-execline.txt">This page in plain-text</a>
     79     <hr>
     80     <p class=footer>Copyright &copy; 2019-2021 Cem Keylan</p>
     81   </body>
     82 </html>