Domain: scsh.net
Stories and comments across the archive that link to scsh.net.
Comments · 13
-
Re:Time to retire bash!
All they need is a more convenient API to control processes.
Have you seen scsh?
-
scsh and BeanShell
-
Scsh allows you to embed regexs within regexs
You might enjoy the novel way regular expressions are implemented in Scsh, the Scheme Shell.
http://www.scsh.net/ -
Re:"Linux" commandline should develop further
Have you looked at the Scheme Shell?
-
From a former C++ fan
Sorry for rather long and muddled post, and also for my poor English... Also, if you have allergic reaction to Lisp advocacy, don't read any further.
Some years ago when I had some spare time I was struggling a lot trying to make C++ a better language. I was trying to reinvent reflection, easy serialization, extend metaprogramming facilities and so on. My hopes were mostly in http://www.boost.org/">Boost C++ libraries.
At some point I've decided to try to write some extended metaobject generator, like Qt's moc, but friendlier to "modern C++", using GCCXML. In addition to generating reflection info, I was thinking of generating proxy classes and other stuff like this.
Among other things I've tried to do some of XML translation work using XSL (i.e. XML AST from GCCXML -> some more AST convenient XML representation -> (transformation) -> resulting metaobject AST. I've discovered some interesting things about XSL, e.g. that it's possible to "emulate" iteration (which is somewhat lacking in XSL) with recursion. Nevertheless after a few days of fighting with XSL I've decided to try some language which is more suited for processing various trees. Of course, when C++0x is ready, I thought, it will be the best language in all respects, including tree stuff, but as of now, STL+boost::lambda+whatever is still somewhat quirky (for instance, look at those 10 pages long error messages when you make a typo). So, although I was heavily influenced by standard myth-based mindset concerning Lisps (slow, interpreted, purely academic, "lost in a sea of parenthesis" and so on) I've decided to give Scheme a try, as I've heard that it can be used as a better XSL.
After playing with Scheme for a while, I've found out (to my surprise) that the language can be used for many other purposes besides list (tree) processing and simple scripting (as in Gimp). As an example, there are wonderful things like Scsh. It's possible to write Web applications, many Schemes can do OO. My deep respect to C++ (The Most Powerful Language Ever) began to fade, albeit slowly.
So I've begun to try to do some real things in Scheme. Disillusionment has come rather quickly due to the fact that a lot of critical stuff in Scheme (e.g. OO and packages) is not standardized and thus is 100% non-portable between implementations. Moreover, every implementation has its bugs and limitations, and when you come to the point when you need to change your implementation you discover that most of your code needs to be rewritten from scratch.
I was nearly ready to continue developing my "metaobject generator", pushing Scheme's role back to "better XSL". But something made me try Common Lisp before doing so.
What quickly became apparent to me from my CL experience is that most of problems Boost guys are fighting against are just plain nonexistent for Lispers. Look at this, for example: variant.hpp. A good workaround for C++ typing model. What do we have in Common Lisp?
(let ((x 5))
....
(setf x "abc") ;; no problems with types! ....)(sorry for mangled indentation)
Now look at this beauty: boost::lambda. Don't forget error messages it produces when you mistype something or stumble across a bug. CL example?
(mapcar #'(lambda (x)
;; any code you want ...)
my-list)Not to mention Lisp's GC versus boost::shared_ptr.
OK, these are areas where dynamic languages like Perl, Python and Ruby, and even statically typed like C# or Java are catching up to some degree. Now let's look at some CL's more-or-less unique features.
-
also a good book-SCSH.
Oh darn. No SCSH
-
Re:Another scripting language
I'm quite partial to scsh.
I mention this because I understand Ruby's semantics are like Scheme (but the syntax is different, or we'd call it a Scheme).
The intro from the scsh paper (Olin Shivers) convinced me to try it out:The intro he wrote where he referred to the 9mm Sig-Sauer, Prozac, and Jack Daniels was much more entertaining.
Unfortunately, compared with other Schemes that I was familiar with (MzScheme, StkLOS) I didn't feel like it was the next best thing in scripting languages.
-
Another scripting language
I'm quite partial to scsh.
I mention this because I understand Ruby's semantics are like Scheme (but the syntax is different, or we'd call it a Scheme).
The intro from the scsh paper (Olin Shivers) convinced me to try it out:
"Shell programming terrifies me. There is something about writing a simple shell script that is just much, much more unpleasant than writing a simple C program, or a simple COMMON LISP program, or a simple Mips assembler program ..."
He's not talking about a simple shell program (like "rm -fr /") -- but something with variables, control flow, conditionals, etc. -
Another scripting language
I'm quite partial to scsh.
I mention this because I understand Ruby's semantics are like Scheme (but the syntax is different, or we'd call it a Scheme).
The intro from the scsh paper (Olin Shivers) convinced me to try it out:
"Shell programming terrifies me. There is something about writing a simple shell script that is just much, much more unpleasant than writing a simple C program, or a simple COMMON LISP program, or a simple Mips assembler program ..."
He's not talking about a simple shell program (like "rm -fr /") -- but something with variables, control flow, conditionals, etc. -
Re:VBscript seems great...
you'd wanna use Lisp as your scripting language
Perish the thought.But that reminds me of the Scheme Shell Acknowledgements and I have to smile...
If I thought anyone cared, if I thought anyone would even be reading this, I'd probably make an effort to keep up appearances until the last possible moment. But no one does, and no one will. So I can pretty much say exactly what I think.
Oh, yes, the acknowledgements. I think not. I did it. I did it all, by myself.
-
The scheme shell!
Olin Shivers was one of my professors at Georgia Tech (and a great one at that), and he's also the author of the scheme shell. I always smile when I read the acknowledgements page.
-
Regarding schemes [Slightly Off Topic]
On the subject of schemes, be sure to check out the Scheme Shell . You may be particuluarly interested if you are looking for a cleaner way to write shell scripts.
Scsh has two main components: a process notation for running programs and setting up pipelines and redirections, and a complete syscall library for low-level access to the operating system, i.e. to POSIX, the least common denominator of more or less all Unices, plus widely supported extensions such as symbolic links and BSD sockets. Moreover, scsh provides an awk facility for pattern-directed computation over streams of records, a rich facility for matching regular-expression patterns in strings, event-based interrupt handling, user-level threads, a futuristic module system, and an interactive environment. Scsh comes with extensive documentation describing these and other features. -
One caveat about this paper...