login
Header Space

 
 

#!/bin/sh: designing features for efficiency, flexibility and ease of use.

May 9, 2008 - 11:41am
Submitted by olecom on May 9, 2008 - 11:41am.
$ sed '' << 'EOF'
Before i will continue my anti-`make`, anti-kconfig/kbuild, i need you
to know about `sh` ideas. `sh` is power, integral part of UNIX. This is
the first and main userspace tool, as important as kernel itself. But
it has its legacy and design problems, as well as complete lack of
development in last 20 or so years.

ftp://flower.upol.cz/dts/ash0000_var/ideas
EOF

(i didn't see spam, i didn't see spam)

May 10, 2008 - 6:15am

dash-0.5.4/src/error.h

/*
 * These macros allow the user to suspend the handling of interrupt signals
 * over a period of time.  This is similar to SIGHOLD to or sigblock, but
 * much more efficient and portable.  (But hacking the kernel is so much
 * more fun than worrying about efficiency and portability. :-))
 */

I don't know if this was sarkasm or what? Or they are so, as i already know?

While Herbert is doing nice job fixing bugs and POSIXifying[0], he is much more into kernel funa-buga-stuff.

http://article.gmane.org/gmane.comp.shells.dash/53

[0] P in POSIX means either Proposed or was used in some Priprietary UNIX clone. No way it's portable. Just a buzzword.

Update with arithmetics:

May 12, 2008 - 9:58pm
From dash-owner@vger.kernel.org Tue May 13 04:07:21 2008
Date:	Tue, 13 May 2008 04:07:14 +0200
To:	dash list
Subject: arithmetics Re: command modifiers
Message-ID: <20080513020714.GA21428@flower.upol.cz>
Organization: Palacky University in Olomouc, experimental physics department
X-OS:	x86_64-pc-linux-glibc-debian

> To list of my failed shell inventions[0], i'd like to add following.
> 
> [0] ftp://flower.upol.cz/dts/ash0000_var/ideas

Arithmetics is the basic knowledge, anyone must have and develop over the
whole life. (i'm a dreamer)

Yet this is not the case in shell:

   original calculating size of variables in `sh` with `expr` and regular
   expressions. (no comments)

Now feature is implemented in shell natively, yet:

* only signed 32 values (don't say it's POSIX)
* "small" and "fast"` dash` has it in bulky bison and stuff (ou, crap)

For start, size and sign (thus, easy seek() in /dev/kmem, for example)

$(s32(...)) || $(s(...))
$(u32(...)) || $(u(...))
$(s64(...)) || $(ss(...))
$(u64(...)) || $(uu(...))

if this will have problems with $(), then more stupid postfix form:

$((...)s); $((...)uu)

Extending to the future: u128, or uuuu, etc.

maybe even to have

sizeof(s||u) = 32b; sizeof(S||U) = 16b; (for flexibility with 16-bit);
____

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary