Fork me on GitHub
#lein-figwheel
<
2015-11-06
>
eggsyntax17:11:45

Has anyone encountered difficulty getting rlwrap to work with figwheel? If so, did you find a solution? It doesn’t seem to work for me — the up arrow just prints out ^[[A. I have two dev boxes, and they share most of their key dotfiles (.bashrc, .inputrc, etc), and it works on one of them but not the other. I’m a bit baffled, haven’t been able to even find a clue.

eggsyntax17:11:27

Java, Clojure, Leiningen, Figwheel all up-to-date. Same project on both boxes. Fresh checkout of the project from the repo, same project.clj and ~/.lein/profiles.clj.

eggsyntax17:11:31

Same behavior on a fresh project created with lein figwheel.

eggsyntax17:11:43

Both boxes are macs running Yosemite.

darwin17:11:30

@eggsyntax: works for me just fine, rlwrap --version rlwrap 0.42 OS X 10.11.2 (developer beta)

eggsyntax17:11:08

Yep, same rlwrap version; also iTerm2.

eggsyntax17:11:46

I’m expecting it’s some quirk on the box, but damned if I know what it might be.

darwin17:11:40

nuke ~/.inputrc if exists

eggsyntax17:11:41

Tried that, it was definitely my best guess. But no joy. And again, it’s working fine on another box with the identical .inputrc (and other dotfiles identical as well).

darwin17:11:42

I got quite addicted to figwheel repl, couldn’t live without rlwrap there 😉

eggsyntax17:11:43

Yeah, it’s painful being without it, especially since it’s hard to train my finger not to hit that up-arrow 😛

eggsyntax17:11:27

Oh, cool, haven’t encountered cljs-devtools before. Thanks!

eggsyntax17:11:50

I’m gonna go in search of another command-line program that doesn’t have readline so I can figure out whether it’s figwheel-specific.

darwin17:11:02

@eggsyntax: try to create a pristine user account, log under it and try it there, to rule out your dot files

eggsyntax17:11:16

Oh, good idea, I hadn’t thought of that.

eggsyntax18:11:11

Nope, same behavior on vanilla user account.

eggsyntax18:11:27

Nice to know it's not anything in my dotfiles, though.

darwin18:11:15

what about some locales? maybe vanilla user account shares language/locales settings

darwin18:11:20

or a keyboard setup from original user account

eggsyntax18:11:53

Hmm, possible. I use Karabiner to do some keyboard customization, I'll try shutting that off.

eggsyntax18:11:35

I also use a Dvorak keyboard layout, so it could conceivably be that.

eggsyntax18:11:03

Damn, nope, neither of that. Not sure how locales settings would play in?

eggsyntax18:11:17

(other than keyboard layout)

eggsyntax18:11:21

Heh, if nothing else, this is a good reminder of how dependent I am on my various customizations 😉

eggsyntax18:11:29

OK, may not be figwheel-specific, but it's definitely not a universal rlwrap problem on this machine. Just tried another non-readline repl (SML) and rlwrap works properly there.

eggsyntax18:11:42

But since the problem is definitely specific to this computer, I'll stop using up bandwidth in this channel for it. But again, if anyone else has encountered this, I'd love to hear from you! @darwin thanks for all the good suggestions simple_smile

eggsyntax20:11:14

Haven't actually solved the problem, but for the record, using socat instead of rlwrap is a reasonable workaround. You can get socat with brew install socat or from http://www.dest-unreach.org/socat/ And this command will connect readline and figwheel (saving history in ~/.figwheel_history): socat READLINE,history=$HOME/.figwheel_history SYSTEM:"lein figwheel"

eggsyntax20:11:50

Also for the record, this problem is also reported at https://github.com/bhauman/lein-figwheel/issues/228, and the author found a solution (although it doesn’t apply for me, unfortunately).