On Wed, Jan 8, 2014 at 12:45 PM, Sean Corfield <s...@corfield.org> wrote:
> It has a perfectly good REPL and the ability to evaluate live code > anywhere on the REPL "canvas" is very useful since you can sketch out > multiple pieces of related code side-by-side. > > I guess I don't understand why your view of what LT provides is so > negative? > That's a good question, and maybe enough has changed that I need to give it another try. On the surface, it didn't appear that much had changed so I haven't really spent significant time with Light Table recently. When I first played around with Light Table, I was strongly disturbed by the lack of a REPL. First, I have absolutely no interest in having executable test-out-this-code snippets interspersed with the actual program code, unless it is a formal test that is intended to stick around and uses something like clojure.test. This means I have to create a separate file and pretend that this file-with-live-execution is a REPL. But it's not. 1. A REPL puts you "inside" a namespace and interactively move around between namespaces. Within a namespace, you have access to all the aliases and referred names available within that namespace. If I set up an independent file, the file itself presumably needs its own namespace header. This means to simulate being "in a namespace" I have to use that namespace *and* clone the entire header from that namespace. I have to keep these headers in sync, and the notion of moving between namespaces is a heavyweight, annoying activity. 2. A REPL has a notion of a command history, letting you easily redo a recent command. Each command and response becomes part of a log that you can copy or save to a file if you want. With a file, there's no simple way to "execute the command I executed two times ago". You have two options: copy and paste the command again and re-execute it, or, the more common option is probably to just go back up to the previous command and hit ctrl-enter (overwriting the previous answer). And you don't really end up with a log of commands and responses, you just end up with a file containing the sequence of commands. The assumption is that this can all be reevaluated in the future. But if your commands are, for example, queries to some rapidly changing database, this assumption is false. A big part of how I use Clojure is that I build a suite of functions that allow me to interactively explore problems. I program for a while, building those functions, and then I switch to the REPL to use what I have built. I switch around between namespaces, I make queries to live databases that are always changing, I call my functions on the results of those queries. I hit "Ctrl-Up" to re-execute the query from a few minutes ago to see if anything has changed. Sometimes, I copy the whole log of my interactions off to a file; sometimes I don't. When I fired up Light Table a while back, I felt completely hamstrung -- I couldn't do anything the way I ordinarily would do it. The notion of executing statements that live in a file didn't feel anything like the workflow I was used to. It seemed distinctly weaker. On top of that, at the time I tried it, Light Table couldn't properly handle long and lazy outputs from functions. I also couldn't figure out how to observe anything that printed to stdout. Because of that, I couldn't use most of the REPL tools I was used to using (e.g., doc/source/pprint/trace) and the features in Light Table didn't seem to be a compensation for having those tools. With each new version of Light Table, I go through this process of thinking, "Hmmm, I wonder if they have a usable REPL yet." I pop open Light Table, read the docs which talk about the Instarepl quick start and the live-code execution feature, no way to create a project from scratch, and no discussion of a project repl. I shrug and say, "Guess they aren't seriously targeting Clojure development yet; seems like all the focus lately is on JavaScript and Python and underlying infrastructure code." I shut it down and figure I'll try again in a few months. This time, I got excited because the announcement said there was lots of "Clojure love" in this release. Again, I didn't see anything obviously new relating to Clojure in the docs. So I'm left wondering, "Does the Light Table team really think this current state is adequate for Clojure development? If so, what am I missing?" This prompted my earlier question. I'm willing to accept that I might be underestimating the value of what is currently there, and will give it an earnest try. I would also welcome detailed workflow stories of how other users interact with Light Table. -- -- 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/groups/opt_out.