- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
rich repl console
Fri, 2009-08-07, 10:22
I've just started work on a rich swing-based console for the REPL, similar in concept to this:http://rghosh.free.fr/text_console.html
This could give us some nice benefits over working with the raw O/S console such as sensible copy/paste behaviour with ctrl-c & ctrl-v, colour highlighting, menu options to explore and manipulate the classpath, available package space, AST, etc.
It also works around the problem with MS windows where j-line hangs if launched in a spawned process with redirected I/O
If anyone's already started anything like this, or has idea/suggestions/warnings/etc, then I'm happy for the feedback.
This could give us some nice benefits over working with the raw O/S console such as sensible copy/paste behaviour with ctrl-c & ctrl-v, colour highlighting, menu options to explore and manipulate the classpath, available package space, AST, etc.
It also works around the problem with MS windows where j-line hangs if launched in a spawned process with redirected I/O
If anyone's already started anything like this, or has idea/suggestions/warnings/etc, then I'm happy for the feedback.
Fri, 2009-08-07, 11:17
#2
Re: Re: rich repl console
On Fri, Aug 7, 2009 at 10:58 AM, Kevin
Wright wrote:
> Just to confirm... this would be something to go in the nsc codebase, hence
> the decision to start with scala-internals
I think it'd would be a better plan to make the minimal changes
necessary to the nsc codebase to allow this kind of thing to be done
externally. If nothing else, all of the IDEs would benefit from
something this sort.
Cheers,
Miles
Fri, 2009-08-07, 11:27
#3
Re: Re: rich repl console
I'm not sure why it would go into the nsc codebase. DRMacIver started
a project like this some time ago, though I can't find it now.
Emacs is pretty good at handling the Scala REPL, either from within
the Scala mode, or just from an M-x shell with no configuration. Yes,
on Windows too. Yes, I realise most Windows users won't use emacs.
2009/8/7 Kevin Wright :
> Just to confirm... this would be something to go in the nsc codebase, hence
> the decision to start with scala-internals
>
> On Fri, Aug 7, 2009 at 10:22 AM, Kevin Wright
> wrote:
>>
>> I've just started work on a rich swing-based console for the REPL, similar
>> in concept to this:
>> http://rghosh.free.fr/text_console.html
>> This could give us some nice benefits over working with the raw O/S
>> console such as sensible copy/paste behaviour with ctrl-c & ctrl-v, colour
>> highlighting, menu options to explore and manipulate the classpath,
>> available package space, AST, etc.
>> It also works around the problem with MS windows where j-line hangs if
>> launched in a spawned process with redirected I/O
>>
>> If anyone's already started anything like this, or has
>> idea/suggestions/warnings/etc, then I'm happy for the feedback.
>
>
Fri, 2009-08-07, 16:47
#4
Re: Re: rich repl console
Got to say, I'm especially liking Mile's suggestion; just push in the relevant hooks to nsc.If we can pull out the existing repl/console stuff as well like MainGenericRunner and the jline dependency then even better!
This would help with IDEs, it would also be useful for allowing a REPL connection to a remote JVM for diagnostic purposes.
The emacs thing is interesting, but seems to be heading in a different direction from my current plans. One of my goals is being able to launch the REPL console directly via the scala maven plugin or SBT with the project classpath already set up.Of course, the emacs plugin would be more than happy to use any new hooks...
On Fri, Aug 7, 2009 at 11:15 AM, Ricky Clarkson <ricky.clarkson@gmail.com> wrote:
This would help with IDEs, it would also be useful for allowing a REPL connection to a remote JVM for diagnostic purposes.
The emacs thing is interesting, but seems to be heading in a different direction from my current plans. One of my goals is being able to launch the REPL console directly via the scala maven plugin or SBT with the project classpath already set up.Of course, the emacs plugin would be more than happy to use any new hooks...
On Fri, Aug 7, 2009 at 11:15 AM, Ricky Clarkson <ricky.clarkson@gmail.com> wrote:
I'm not sure why it would go into the nsc codebase. DRMacIver started
a project like this some time ago, though I can't find it now.
Emacs is pretty good at handling the Scala REPL, either from within
the Scala mode, or just from an M-x shell with no configuration. Yes,
on Windows too. Yes, I realise most Windows users won't use emacs.
2009/8/7 Kevin Wright <kev.lee.wright@googlemail.com>:
> Just to confirm... this would be something to go in the nsc codebase, hence
> the decision to start with scala-internals
>
> On Fri, Aug 7, 2009 at 10:22 AM, Kevin Wright
> <kev.lee.wright@googlemail.com> wrote:
>>
>> I've just started work on a rich swing-based console for the REPL, similar
>> in concept to this:
>> http://rghosh.free.fr/text_console.html
>> This could give us some nice benefits over working with the raw O/S
>> console such as sensible copy/paste behaviour with ctrl-c & ctrl-v, colour
>> highlighting, menu options to explore and manipulate the classpath,
>> available package space, AST, etc.
>> It also works around the problem with MS windows where j-line hangs if
>> launched in a spawned process with redirected I/O
>>
>> If anyone's already started anything like this, or has
>> idea/suggestions/warnings/etc, then I'm happy for the feedback.
>
>
--
Ricky Clarkson
Java Programmer, AD Holdings
+44 1565 770804
Skype: ricky_clarkson
Google Talk: ricky.clarkson@gmail.com
On Fri, Aug 7, 2009 at 10:22 AM, Kevin Wright <kev.lee.wright@googlemail.com> wrote: