diff options
Diffstat (limited to 'src/blog/new-sh')
| -rw-r--r-- | src/blog/new-sh/index.gsp | 73 | 
1 files changed, 38 insertions, 35 deletions
| diff --git a/src/blog/new-sh/index.gsp b/src/blog/new-sh/index.gsp index 4646042..9da8e39 100644 --- a/src/blog/new-sh/index.gsp +++ b/src/blog/new-sh/index.gsp @@ -3,7 +3,7 @@ html lang="en" {  	body {  		header {  			div { -				h1 {-POSIX Pitfalls} +				h1 {-m4_abbr(POSIX) Pitfalls}  				m4_include(nav.gsp)  			} @@ -26,15 +26,16 @@ html lang="en" {  			h2 #prologue {-Prologue}  			p {-  				Since the moment I decided to take software development more seriously, -				I have been absolutely enamored by the Shell @x-ref{-1} — the POSIX -				shell to be more specific.  The syntax is questionable at times, and the -				available resources outside of the POSIX specification itself are -				absolutely piss-poor as a result of the average *NIX user failing to -				understand the difference between @code{-/bin/sh} and Bash @x-ref{-2}. -				What @em{-really} drew me into the Shell was the powerful idea of -				composability, and being able to combine simple tools to form a much -				more powerful one in only a handful of lines.  I talked more about this -				@a href="/blog/extend" {-in my previous post}. +				I have been absolutely enamored by the Shell @x-ref{-1} — the +				m4_abbr(POSIX) shell to be more specific.  The syntax is questionable +				at times, and the available resources outside of the m4_abbr(POSIX) +				specification itself are absolutely piss-poor as a result of the +				average *NIX user failing to understand the difference between +				@code{-/bin/sh} and Bash @x-ref{-2}. What @em{-really} drew me into the +				Shell was the powerful idea of composability, and being able to combine +				simple tools to form a much more powerful one in only a handful of +				lines.  I talked more about this @a href="/blog/extend" {-in my +					previous post}.  			}  			p {- @@ -44,18 +45,18 @@ html lang="en" {  				century in age.  It some things right — like the idea that you can use  				loops and conditional statements in a pipeline — but it also got a lot  				of things wrong, and these are things that we can improve on.  The most -				obvious deficiency in POSIX shells is the absolutely abhorrent handling -				of whitespace. +				obvious deficiency in m4_abbr(POSIX) shells is the absolutely abhorrent +				handling of whitespace.  			}  			p {- -				There have been quite a few alternatives to the POSIX shell made over -				the years, although I find this to be an area that is shockingly -				underdeveloped.  If you’re reading this, I implore you to attempt to -				design your own shell, no matter how simple.  If you know how to make -				one, you can experiment with new ideas!  If you don’t, it’s a really -				great learning experience, even if all your shell can do is spawn a -				process. +				There have been quite a few alternatives to the m4_abbr(POSIX) shell +				made over the years, although I find this to be an area that is +				shockingly underdeveloped.  If you’re reading this, I implore you to +				attempt to design your own shell, no matter how simple.  If you know +				how to make one, you can experiment with new ideas!  If you don’t, it’s +				a really great learning experience, even if all your shell can do is +				spawn a process.  			}  			aside { @@ -69,16 +70,17 @@ html lang="en" {  				}  			} -			h2 #alternatives {-Alternatives to POSIX} +			h2 #alternatives {-Alternatives to m4_abbr(POSIX)}  			p {-  				There are a few alternatives shells that have managed to garner a -				respectable userbase.  Fish, Powershell, Nushell, and Elvish just -				to name the ones I can think of off the top of my head have all managed -				to get a userbase while giving the finger to POSIX.  I do believe that -				ditching POSIX is a necessity to create a half-decent modern shell.  I -				have used Fish for close to a year before and it is probably my favorite -				of the bunch; it tries to do its own thing with its own ideas, but it -				still remains highly familiar for those coming from POSIX. +				respectable userbase.  Fish, Powershell, Nushell, and Elvish just to +				name the ones I can think of off the top of my head have all managed to +				get a userbase while giving the finger to m4_abbr(POSIX).  I do believe +				that ditching m4_abbr(POSIX) is a necessity to create a half-decent +				modern shell.  I have used Fish for close to a year before and it is +				probably my favorite of the bunch; it tries to do its own thing with +				its own ideas, but it still remains highly familiar for those coming +				from m4_abbr(POSIX).  			}  			p {- @@ -130,7 +132,8 @@ html lang="en" {  			p {-  				Take process redirection for example.  To properly compare the outputs -				of two processes in POSIX shell, we need to do this whole rigmarole: +				of two processes in m4_abbr(POSIX) shell, we need to do this whole +				rigmarole:  			}  			figure { @@ -158,13 +161,13 @@ html lang="en" {  			}  			p {- -				There are a few fundamental ‘problems’ I want to fix in Andy.  The first -				is whitespace handling; safe POSIX shell scripts will contain almost as -				many quotation marks to avoid word-splitting as Lisp programs contain -				parenthesis.  This is an absolute must, under no circumstance should -				strings be expanding into even more strings without the explicit consent -				of the user; it’s a recipe for disaster and it’s the shell-equivelant of -				the null-pointer-exception. +				There are a few fundamental ‘problems’ I want to fix in Andy.  The +				first is whitespace handling; safe m4_abbr(POSIX) shell scripts will +				contain almost as many quotation marks to avoid word-splitting as Lisp +				programs contain parenthesis.  This is an absolute must, under no +				circumstance should strings be expanding into even more strings without +				the explicit consent of the user; it’s a recipe for disaster and it’s +				the shell-equivelant of the null-pointer-exception.  			}  			p {- |