supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* [announce] execline-2.4.0.0
@ 2018-03-31 23:15 Laurent Bercot
  0 siblings, 0 replies; only message in thread
From: Laurent Bercot @ 2018-03-31 23:15 UTC (permalink / raw)
  To: skaware, supervision


  Hello,
  execline-2.4.0.0 is out.

  As you all know by now, the main obstacle to adoption of skaware by
distributions and mainstream Unix folks is the user interface; so, the
obvious next improvements to skarnet.org software is to provide
interfaces people are comfortable with. This is true for s6 + s6-rc,
but this is also true for execline.

  One of the main criticisms that execline gets is that for its purpose,
i.e. light scripting and gluing components together, people are already
used to the standard Unix shell, and have trouble wrapping their minds
around a new scripting tool with a very different syntax.
  I am convinced that execline offers significant benefits over the
shell in certain circumstances - in particular, it is much easier to
autogenerate; still, I want to make it easier for regular shell users
to approach and understand execline.

  So, with user-friendliness as a major goal, with version 2.4.0.0,
some execline commands have changed names. Commands that provide
equivalent functionality of a shell construct are now named after
the shell's syntax for that construct. Specifically:

  background is now named &
  backtick is now named `
  define is now named =
  dollarat is now named $@
  elglob is now named *
  fdclose is now named >&-
  fdmove is now named >&
  fdswap is now named <>
  foreground is now named ;
  getpid is now named !
  heredoc is now named <<
  homeof is now named ~
  if is now named &&
  importas is now named $
  pipeline is now named |
  redirfd is now named <

  I believe this renaming allows users coming from the shell to get
acquainted with execline without changing too many of their habits
and smoothly transition to a new approach to scripting. For instance,
the examples/etc/execline-shell script now reads:

#!/bin/execlineb -S0
` -n home { && -nt { ` -n user { id -un } $ -u user user $ -D $user USER 
USER
< -w 2 /dev/null ~ ${USER} } echo / }
$ -u home home $ -D $home HOME HOME
tryexec { ${HOME}/.execline-shell $@ }
/bin/sh $@

  which indubitably mimics the readability of a shell script much more
than the same script using the old execline command names ever did.

  An added benefit of this change is brevity. Where previous names of
execline commands were verbose, and execline scripts could be long
to type and annoying to read, the new names are very short, which
allows execline to approach the terseness and reader-friendliness of
the shell. For instance, one of the execline quines now reads as such:

#!/bin/execlineb
= e "#!/bin/execlineb
= e $q${E}${q}
env e=$e
= q ${b}${q}
= b ${b}${b}
$ E e
echo $e"
env e=$e
= q \"
= b \\
$ E e
echo $e

  which is as short as a quine will ever be, while definitely looking
more like a shell script than quines for previous execline versions.

  Note that for execline, command brevity also means that you can fit
longer scripts into the limits of a command line, so the new version
allows you to write more featureful, more complete scripts without
hitting execline's inherent limitations. The benefits are numerous.

  I sincerely hope this change will help smooth the learning curve of
the execline syntax, and increase adoption of the language among
newbies and die-hard Unix veterans alike.

  https://skarnet.org/software/execline/
  git://git.skarnet.org/execline

  Enjoy,
  Bug-reports welcome.

--
  Laurent



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-31 23:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-31 23:15 [announce] execline-2.4.0.0 Laurent Bercot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).