Hi All, I've posted a small experimental project I've been working on the past day that I thought was somewhat novel called mapfs:
https://github.com/kunstmusik/mapfs It allows using a Clojure map like a filesystem. An example recording of it in use is here: http://kunstmusik.com/mapfs.gif The project is currently a command-line app that loads a map from an .edn file and provides a shell. You can use familiar commands like cd, rename, mv, cat, and pwd to navigate key paths in the map and read/modify values. The idea came as a result of reading all the REPL talk on clojure-dev, and also that I wanted a simple way to track some data in some projects of mine. I had already started on a simple todo system but then the idea to have a generic fs on a map seemed fun and more useful for creating adhoc structured data for various purposes. The result is the app acts somewhere between a REPL and shell. You can execute functions as commands, so you can do things like pipe results using threading macros, i.e.: mapfs> ->> (cat :key) (str "The value of :key is ") which would format the value of the key in the current path to a string. For my own purposes, this has been neat for recording notes and values that I can later view or process with clojure functions. I can imagine having a way to extend the available commands by registering namespaces from other libraries, but I'm not certain yet what way to go for that. It's somewhat at proof-of-concept stage at the moment, so there are certainly bugs and things to work out, but I think it's already enough for testing out the idea. Hopefully this makes making your own data and small utility apps from just Clojure functions pretty easy. (That's the goal at least!) If you'd like to take it for a spin, you can clone the repo and use "lein run todo.edn". (There's also a mapfs shell script there for running with a generated uberjar.) Also, running "help" in the shell shows built-in functions. I'd also like to mention this uses jline[1] for console processing, which provides a whole lot of great features (i.e. history, vim/emacs key bindings, tab completion support). Cheers! steven p.s. - I didn't see any existing projects like this, but if so, please let me know, I'd be happy to learn more about them! [1] - https://github.com/jline/jline2 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.