Their REPLs are more powerful than UNIX shell, you get the whole OS at your disposal using the same language.
The REPLs are graphical, similar to the ideas being brought back by IPython.
Combining objects or functions on the REPLs is Zen compared to the simple UNIX pipes.
No really. I have not yet decided how error/exception (http://www.haskell.org/haskellwiki/Error_vs._Exception) handling should work.
I actually like how golang does it - errors with panic/recover, exceptions with return values. But I have not been able to make a decision yet - the situation is a bit more complex than golang. As a result there is no if/else builtin yet, let alone raise and try/except (or panic and recover).
I haven't thought much about FFI yet. But since in shells you interact with other programs so much, adding FFI would a worthy attempt.
> - A somewhat more succinct syntax, with metaprogramming kept in mind.
Coming up with syntax is actually the hardest thing I find when writing Elvish, since there is much more syntax constraints for a shell. Would be happy to hear advices.
> - A JIT, eventually.
Maybe later.
http://en.wikipedia.org/wiki/Common_Object_Request_Broker_Ar...
By these guys?
Whatever happened to that?
http://google.com/search?q=xml-rpc
Still being used some.
Does there exist anything like 'type protocols' across languages? Would it be feasible?
- Grep the output of ps, without having to count column numbers or do special work to preserve the header line after filtering.
- Search for files matching some conditions, without remembering the weird and unique syntax of find(1) - instead you would write something vaguely along the lines of
ls | filt {< $1.size 500} {eq $1.type file}
where the stuff after the pipe is the shell language, so theoretically more memorable than find -size -500c -type f -maxdepth 1
As a bonus, if you want to cache the output for multiple searches rather than going through the the kernel every time
(OS X find is rather slow on huge source trees), you can save the output of ls to a file and keep the rest the same. Good luck doing that with find.- Handle filenames with spaces and newlines without issues. Simple, but newlines at least are near impossible to solve in the standard shell environment - only a few select tools support null-separated lists. Spaces are easier... unless you want such extravagances as multiple filename columns in a table.
Of course it's not that simple: structured data can sometimes be hard to work with and formatting for display is an issue; Unix's "everything should be plain text" philosophy didn't come out of nowhere.
But I honestly believe that it's time to reexamine that tenet.
> parser directory/file.lang | interpreter
Does this make sense? Would it have some utility?
First, it's universal. Python and Perl and Java all have huge ecosystems, but one of the few places where programs written in all those languages can come together is the shell. By "real programming language" I don't mean some monstrosity with its own packages and whatnot. I just mean a simple principled language to tie things together that doesn't feel like a Turing tarpit.
Second, its highest priority is efficient interactive (REPL) use (although, as a "real language", it should be much better than bash for scripts as well). Some languages have good REPLs, but most don't, and there are important design considerations for them.
For example, if you're banging out a one-liner where you have some data and make a series of transformations on it - thinking through each step in turn - you don't want to have to write functions in reverse order of application, third(second(first(data))). With pipelines, it's forward, first | second | third. In a batch program (in both imperative and functional languages, though more often in imperative), you might avoid this by performing each step as a separate statement, assigning each result to a descriptive variable. But interactively, who has time for variable names? (The elvish author makes a similar argument in the readme.) Yet few languages support this outside of OOP dot syntax, which only works in a subset of cases.
- Focus on the lispy parts of sh - prefix functions everywhere and a simple, regular syntax. Not that anything with FD redirections as a primitive can get anywhere near S-expressions' simplicity, but shell is naturally more regular than most programming languages (even if bash goes out of its way to be complex).
- Be a real programming language that doesn't make you reach for awk or perl (separate, incompatible environments) to do moderately complex things sanely.
- Emphasize using pipelines rather than 'backwards' function application to naturally string together operations.
- Emphasize lambdas.
- Typed (i.e. non-string) pipes.
- Syntax highlighting.
- Nonzero-exit modeled as exceptions. (I think elvish is doing this, but I haven't reviewed the code in detail.)
Things I want but don't see in the readme include:
- A story for passing typed data around between processes (potentially in different languages) rather than just builtins. I'm not sure exactly what the story should be, but it should exist.
- A somewhat more succinct syntax, with metaprogramming kept in mind.
- A JIT, eventually.
There seems to be a lot more in the first category than the second... give up? But elvish isn't anywhere near done, and I want to do things all my own way for once. I'll keep going, and post my project on HN if it gets anywhere. :)
But to the OP, congratulations on elvish. Hope it gets finished and seriously takes off.