Hacker News new | past | comments | ask | show | jobs | submit login

This parallels my first exposure to scheme with guile, but in truth most repls suck more than they should. I can rant about pretty much all the ones I've ever used. With guile, I learned at some point that I had in fact built it with GNU readline support, and that I could activate it by putting in ~/.guile (analogous to $PYTHONSTARTUP):

    (use-modules (ice-9 readline))
Ahh, much better. Later interaction with Gambit Scheme was much nicer. Clisp was alright, more or less the same experience as Gambit. I hear DrRacket is nice but haven't tried it. Clojure uses jLine, so it's finicky. (I hate jLine.) Oh wait, I lied. You can use jLine, but it's not default:

    alias clj='java -cp /home/kevin/clojure-1.3.0/jline-0.9.94.jar:/home/kevin/clojure-1.3.0/math.combinatorics.jar:/home/kevin/clojure-1.3.0/clojure.jar jline.ConsoleRunner clojure.main'

But I like that Clojure has built-in (doc) and (dir). I like Node's colors and it has decent tabcompletion. PyPy's REPL is probably the coolest out-of-the-box experience I've had--it reminded me of MySQL with how it helpfully gives you edit access to a whole chunk of code you wrote over multiple lines with one up-arrow. PyPy did it better, though. I've used emacs' Slime before, it was pretty sweet, but I'm a vim guy. (I'm aware of the various screen hacks to get a more or less the same experience.) I haven't messed with R in a while but I remember it offered to save the state for next time I launched.

I totally agree with you that first impressions matter. If command history and a sane consistent parsing of left/right/backspace/delete aren't features in your repl it's unusable, I can tolerate other deficiencies. It's especially annoying when REPLs are encouraged by the users of some language and they still stink. Python's (before I started using PyPy even!) is really the only one I've spent a lot of time in building a program, iteratively, albeit that's after disabling those annoying '>>> ' and '... ' prefixes so I can copy/paste-file/save/modify/paste-repl variations back and forth without pain. The rest of the repls I use mostly for isolated "will this work" style of questions since it's faster to check with the computer than simulate it myself in my head.

Regarding Clojure and JLine and the general niceness of REPLs, honestly I thinks it's a bit of a distraction. You don't need JLine at all, if you want to run a Clojure REPL in xterm or Terminal.app, just use rlwrap.

Most people who end up doing serious Clojure development move on to something more integrated, like SLIME for Emacs, slimv or the screen hacks you mentioned for vim, or Counterclockwise for Eclipse. I would much prefer the Clojure/core devs work on making Clojure awesome than re-inventing readline.

Anyway, once you've used the SLIME analogue for your language of choice, where you can select regions of code in your editor buffer for evaluation, copying and pasting to and from a REPL seems rather quaint.

I agree somewhat that first impressions are important, but I think that most programmers spend more time thinking than writing code, and that's especially true when you're first learning a language, and it's a big shift from that languages you know. I don't think that unfamiliarity with the tooling should be this big turn off, yet everyone makes it out to be one. When I started learning Clojure, my first impressions were based on the features of the language, and that's way more interesting than the fact that clj is a bit raw and rough around the edges.

Overall I agree with you. When I was a newbie programmer I was turned off by Python's forced indentation, and that cost my younger self about 6-8 months (when I looked at it again) of fun times that could have been had earlier. Now I'm capable of looking past the blemishes when trying something, but if it's a particularly grating blemish I'm going to spend less time looking at it by nature. (Thanks for the reminder about rlwrap, I was trying to remember what that command was called a few days ago. I hadn't considered using it instead of jLine as I've had bad experiences with it as well; a minute of playing around indicates it's at least as good. Which is sad for jLine. I wonder if `lein repl` uses jLine or rlwrap...)

I suspect I'll eventually outgrow my quaint process of copy/pasting here and there and embrace some variant of vim-slime. I agree most programmers spend more time thinking than writing code, but the two aren't so separate; what I like tremendously about repls in general is the ability to think with the aid of the computer, it speeds things along a lot. When the computer and I produce something worth keeping I save it. Of course I like my couch sessions (in lieu of a hammock) when they're needed.

It's easy to make it seem like a problem is bigger than it is. For all the ranting I can do about repls for various systems, it's not that big a deal in the grander scheme of things. (With repls specifically it's just an annoyance that readline behavior isn't default like it should be, not necessarily unfamiliarity with the ecosystem at large.) If the biggest criticism of Clojure is its crappy default repl, then one should think it must be a killer language if no other criticisms were mounted instead. (Personally I've only done a few applications with it but I'm already convinced it's fantastic even if I can think of some issues more important than the repl.)

Have you tried pry for ruby?

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact