Powerful scripting language & versatile interactive shell add sylixos support.
Go to file
2013-09-27 21:10:13 +08:00
async Implement reader with timeout using syscall.Select instead 2013-09-27 12:19:06 +08:00
doc Make metadata.md valid markdown by using ``` 2013-08-17 20:06:16 +08:00
edit edit: Parse Shift- function keys 2013-09-27 21:10:13 +08:00
eval eval: FILE_{CLOSE,NONE} -> FD_NIL, add comment 2013-09-19 18:15:23 +08:00
main Implement reader with timeout using syscall.Select instead 2013-09-27 12:19:06 +08:00
parse Use uintptr for fd in IO redirections. 2013-09-19 18:11:01 +08:00
.gitignore .gitignore: Add /t/ 2013-09-18 18:04:13 +08:00
LICENSE Add license (BSD 2-clause) 2013-07-26 14:46:24 +08:00
Makefile Use plain old make for building 2013-09-18 16:58:51 +08:00
README.md RADME: Add a "philosophy" section 2013-09-22 18:49:07 +08:00

das, an experimental Unix shell

This is a work in progress. Things may change and/or break without notice. You have been warned...

Philosophy

The basic idea is to have a shell that is also a decant programming language. Shells have long rejected such things as data structure beyond text arrays. Some support associative arrays, which may be assigned to variables but not passed as arguments to builtins or shell functions, making the use of them very tedious.

The lesson of Tcl has taught us the "everything is (unstructured) text" philosophy, which is also the idea underpinning classical Unix pipelines, is too limited for proper programming. Indeed, the power of Tcl often lies in the dynamic interpretation of text, assuming some predefined structure in it. Yet with shells, where such facilities are nonexistent, the attempts to build maintainable

However, the shell does come with a very powerful abstraction - the pipeline. It is basically a facility for concatenative programming. Consider the following code in lisp:

(set coll' (map f (filter pred coll)))

Written concatenatively, this can be - assuming put puts the argument to output (akin to echo), and set can take data from input in place of in the argument list:

put $coll | filter pred | map f | set coll2

The concatenative approach is much more natural (try reading both versions aloud).

[to be finished]

Building

You need go >= 1.1 to build this. Just run make. The resulting binary is called das.

Name

Indeed, das is not a very good name for a Unix shell. The name is actually a corrupted form of dash, which also happens to be the German definite neuter article.

I have some other ideas in mind. One of them is elv, since I found elvish to be a great adjective - I can't use "elf" though, since it's already taken and may be confused with the well known file format.

Another possible source of names is the names of actual seashells; but my English vocabulary is too small for me to recall any beyond "nautilus", which is both too long and already taken.

I'm not avoiding names ending in "sh" though; but I do find "bash" to be a terrible name. "fish" is clever, but it has a quite unpleasant adjective.

License

BSD 2-clause license. See LICENSE for a copy.