I read on the guile user mailing list that version 0.2 of scsh for guile has been released. This got me thinking what a real lisp-powered interactive shell would need in order to be useful:
1. A modified version of sweet-expressions, where barewords are treated as string literals instead of symbols. Bareword string literals could be used along with normal quoted string literals 2. Some way to designate what is a symbol. Bash uses $var or "$var" for variable substitution. A scheme shell could use , and ,@ (the unquote and unquote-splicing operators) for this purpose. The REPL would then need to convert barewords to strings, and then quasiquote the parsed S-expr before evaluating it 3. If a bareword or a string literal is at the head of a list, it should automatically be interpreted as a function name 4. If a function is called that does not exist in the current scope, the *runtime* needs to call a dispatch function to search for a command in $PATH that matches the function name and execute it. Any arguments would be coerced into strings, and the command would return either an exit code, or stdout/stderr filehandles, or maybe both. If no matching command is found in $PATH, throw an exception. This kind of runtime missing method dispatch can be done in perl and ruby, but I'm not sure about guile 5. Requiring the user to hit enter twice after each command is too onerous for an interactive shell. One-line commands could be typed without any indentation, and thus only require hitting enter once. Multi-line commands would then require indentation, and pressing enter twice to execute the command. By distinguishing between one-line commands and multi-line commmands, you can easily enter one-line commands quickly, but still use multi-line commands when necessary 6. It would be great if such a "sweet shell" (swsh) could be packaged in a repository for easy access. Does anyone know the current status of the guildhall? I'm not sure how much work it would take to tweak sweet-expressions to do this, but it would make for a killer app. I've always wanted an interactive shell that could use macros, and guile seems like the perfect fit. Ben On Aug 6, 2012, at 10:44 AM, Ben Booth <benwbo...@gmail.com> wrote: > Transitioning it to guile would be easy for us, though not really necessary. > The guile folks might like it, though. > > One nice benefit of porting scsh to guile is that guile is already installed > on most linux systems. It would also be nice to have native 64-bit support, > although I think the reason it's 32-bit-only has to do with its system call > api bindings. > ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss