<div dir="ltr"><div><div>Okay, here's another idea.<br><br></div>I have parametrized the readline collection over the readline/edit/etc. library. You can do:<br><br></div><div>> (require editline)<br><br></div><div>For the editline equivalent.<br><br>It also falls back to no line editing (rather than throwing an exception), if the library is not there.<br><br></div><div>The source is here: <a href="https://github.com/LeifAndersen/readline">https://github.com/LeifAndersen/readline</a><br><br></div><div>I'm thinking we could distribute the editline collection with Racket (treating libedit the same way we currently treat other native packages such as libcairo). And then we can make xrepl default.<br><br></div><div>Would this be doable?<br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><br></div>~Leif Andersen</div></div></div>
<br><div class="gmail_quote">On Wed, Dec 3, 2014 at 5:50 PM, Eli Barzilay <span dir="ltr"><<a href="mailto:eli@barzilay.org" target="_blank">eli@barzilay.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Dec 3, 2014 at 6:22 PM, Sam Tobin-Hochstadt<br>
<<a href="mailto:samth@cs.indiana.edu">samth@cs.indiana.edu</a>> wrote:<br>
> On Wed, Dec 3, 2014 at 6:10 PM, Eli Barzilay <<a href="mailto:eli@barzilay.org">eli@barzilay.org</a>> wrote:<br>
>><br>
>>>> If you're talking about implementing line editing yourself, then my<br>
>>>> personal reaction to that would be "wonderful", but doing it properly<br>
>>>> is something that is difficult and easy to underestimate....<br>
>>><br>
>>> I've already done this (admittedly it only works on OS X, but most<br>
>>> Linux terminals work exactly the same with a few different<br>
>>> constants). You can see what I have so far here:<br>
>>> <a href="https://github.com/LeifAndersen/racket-line-editor/blob/master/main.rkt" target="_blank">https://github.com/LeifAndersen/racket-line-editor/blob/master/main.rkt</a><br>
>><br>
>> If this works, I'd be thoroughly impressed -- so I tried it.  I ran<br>
>> through a bunch of configurations that I use:<br>
><br>
> None of which was OS X, which was what Leif's email explicitly said it<br>
> _only works on_.<br>
<br>
</span>My point wasn't "it doesn't work outside of OSX", I was talking about "a<br>
few different constants" being a bad underestimation: they're not few,<br>
they're not constant, and the interfaces for getting them is what you'd<br>
expect from something that started to grow in the 70s.<br>
<span class=""><br>
<br>
> I think we should wait till he has a version which he says works<br>
> before telling people to avoid making contributions.<br>
<br>
</span>You should re-read my email: if there's anything that I'm telling, it's<br>
the exact opposite.  A point that I repeated more than once.<br>
<br>
The thing is that it would be easy to not say anything, and watch this<br>
approach of "try a few escapes and see what works" fail.  And it will<br>
fail, because, again, they're not constant, and you can't just get some<br>
magic combination that works for 90% of the people -- even just xterm on<br>
just linux is something that can (and often is) configured in many<br>
different ways.  So what I'm doing is the opposite: I point at how such<br>
a thing should be written for it to survive -- but I appreciate Leif's<br>
time enough to warn him that this is a much bigger thing than what he<br>
seems to think.<br>
<br>
(And to be clear, the reason for this is that I've seen probably around<br>
3 to 5 serious attempts that got dumped; and I have encountered these<br>
issues multiple times, so I know that it's hard enough that even getting<br>
simple code to work, code that I intended only for my own use, even that<br>
was pretty hard, enough to go chase old VT references and obscure man<br>
pages.)<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:<br>
                    <a href="http://barzilay.org/" target="_blank">http://barzilay.org/</a>                   Maze is Life!<br>
</div></div></blockquote></div></div>