This is the kind of project I really like; it's the way things should be. Very awesome. This should become universal. A barrier to adoption is that the installation process seems a bit scary/involved - if it was straightforward, this would fly off the shelves like hotcakes (...er), and become part of the standard bash distribution.
I wrote something similar recently (in terms of tech, not in terms of application): a parser for a language with which the user can specify another language (which is used to parse something else). With a lot of experience in it (including a compiler subject at uni), and having written similar things before, professionally and in research, and including reusing some aspects from previous code, it took me 2 weeks - in Java.
How long did it take you? I'm thinking it might have been much faster for you, even without those benefits I had, because you wrote in Haskell...
Does anyone know if there is a Haskell that targets the JVM? That could be a cool solution for me...
I want to note that while 2 weeks seems like a long time, it's fairly straightforward once you know how; the hard work is in what comes before it: coming up with the concept, the design of the language etc.
The first commit was on October 6, so this release took about three weeks of programming (mostly on the bus and when I should have been in bed sleeping). And you're totally right - a lot of the work was done in my head long before I typed "git init."
The very next thing on my to-do list is learning the right way to package this with Cabal so that a single command will install and configure it, and so I can provide pre-built Debian and Ubuntu packages.
Pre-built packages sounds perfect! Though I think you deserve a rest while you bask in adulation. :-) Your idea is worthy of the original unix hackers... and, in keeping with their spirit, made real.
BTW: I actually took a little over 2 weeks (2-3 days extra), and I was working full-time (though that amounts to only about 2-3 hours of 100% concentrated hacking); you also did extra stuff with integrating it with bash, and I'm sure fiddling with it a bit to make it a practically usable tool. So I think the implementation time is within a factor of 2, for Java vs. Haskell.
> Does anyone know if there is a Haskell that targets the JVM? That could be a cool solution for me...
While I'm far from an expert on the JVM, the primitive operations that it provides are probably a poor fit for Haskell. One could compile Haskell to the JVM, but some Haskell elements such as thunks would probably have to be emulated (with lots of overhead), and/or it would have some arbitrary limitations (such as problems with tail-call optimization) due to the implementation.
There would be a similar mismatch compiling Haskell to the WAM/BAM (Prolog) or Lua virtual machines. Most VMs are designed to run a specific programming model, if not a specific language, and have bytecodes for core operations that need to be efficient (unification in Prolog, table lookup in Lua, dynamic dispatch in Java, etc.). While I could see another primarily procedural/OO language running on the JVM, Java and Haskell are like SQL and LaTeX: the elements they have in common are too general to be useful.
Good idea for a tool, great writeup of the implementation. This struck home for me:
I realized recently that some things I do are so specialized that my parents and non-programmer friends will probably never get them. For example, Compleat is a program to generate programs to help you… run programs? Sigh. Well, maybe someone out there will appreciate it.
Just about all of my research falls into that category.
You all may be interested in these two ruby-based bash completion libraries: http://github.com/drnic/tabtab#readme and http://github.com/cldwalker/lightning#readme. The former is similar to compleat in wanting to make command completion easy to define but it does it through a ruby dsl instead of usage statements. The latter autocompletes paths given a yaml file of paths.
Nice! I hadn't seen these before. I was actually surprised not to find more similar work when I searched for it, so it's nice to know other people are dealing with the same problems.
I wrote something similar recently (in terms of tech, not in terms of application): a parser for a language with which the user can specify another language (which is used to parse something else). With a lot of experience in it (including a compiler subject at uni), and having written similar things before, professionally and in research, and including reusing some aspects from previous code, it took me 2 weeks - in Java.
How long did it take you? I'm thinking it might have been much faster for you, even without those benefits I had, because you wrote in Haskell...
Does anyone know if there is a Haskell that targets the JVM? That could be a cool solution for me...
I want to note that while 2 weeks seems like a long time, it's fairly straightforward once you know how; the hard work is in what comes before it: coming up with the concept, the design of the language etc.
BTW: "GitHub is Temporarily Offline." http://github.com