Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Schemesh: Fusion between Unix shell and Lisp REPL. Parent comment
In shells, "test" and "[" are often used after "if", as for example
if test -f "some_file" do_something fi if [ "$FOO" != "" ] do_something_else fi
(if (file-regular? "some_file') (sh-run {do_something}))
Also, "test" implements a mini-language full of one-letter operators: `-f FILE` `COND1 -a COND2` `COND1 -o COND2` etc.
I really don't miss it, as I find the equivalent in Scheme to be more readable - and of course more general
(file-regular? "FILE") (and COND1 COND2) (or COND1 COND2)
There are no comments on this comment yet.
In shells, "test" and "[" are often used after "if", as for example
Schemesh does not have a shell builtin "if", you switch to Scheme for that: Thus the need for "test" and its alias "[" is reduced.Also, "test" implements a mini-language full of one-letter operators: `-f FILE` `COND1 -a COND2` `COND1 -o COND2` etc.
I really don't miss it, as I find the equivalent in Scheme to be more readable - and of course more general
etc.