About me
x
Jonhnny Weslley

About The Author

My name is Jonhnny Weslley. At the time of writing I’m twenty-three. I’ve lived in Campina Grande, Brazil, since 2008. Previously, I lived for most of my life in Caxias, Brazil.

Research

I am M.Sc. candidate in the Federal University of Campina Grande, Brazil, working as research assistant with Francisco Brasileiro in the Distributed Systems Laboratory. My current research concentrates on the design and implementation of the distributed file system BeeFS which focuses on the specific setting of corporate desktop networks, while remaining flexible to add easily new machines to a running system. Previously, I have focused on challenges in implementation of Nodewiz's improvements. Nodewiz is a scalable peer-to-peer and fault-tolerant resource and service discovery for overlay networks and grids that supports multi-attribute and range queries.

My research interests include parallel programming, MapReduce, distributed data storage and distributed file systems.

Feel free to contact me.

(or press ESC or click the overlay)

Scala Shell

Friday, September 12, 2008

Scala Shell (scalash) is a shell for programming in Scala. Scalash is run from the command line and allows the programmer to experiment with code in real time. It allows you to enter Scala commands at the prompt and have the interpreter respond immediately.
A quick summary of the features present:

  • colourized output (highlighting)
  • auto-completion, aka Tab-completion
  • start script support - when an interactive shell is started, Scala Shell reads and executes commands from ~/.scalarc, if that file exists.
  • persistent history (~/.scala_history)
  • command history
  • command load




You can install the current release directly with Scala Bazaar:

sbaz update
sbaz install scalashell-scala

7 comments:

sanity said...

It didn't work, see here

Jonhnny Weslley said...

The jline-<VERSION>.jar file must be in CLASS_PATH env variable. Try:

sbaz install jline

bwanab said...

After installing jline I got:

scala:0> Exception in thread "main" java.lang.ClassNotFoundException: binder0
at scala.tools.nsc.interpreter.AbstractFileClassLoader.findClass(AbstractFileClassLoader.scala:27)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at scala.tools.nsc.Interpreter.bind(Interpreter.scala:543)
at org.scalashell.scalash.ScalaShell$$anonfun$bindSettings$1.apply(ScalaShell.scala:64)
at org.scalashell.scalash.ScalaShell$$anonfun$bindSettings$1.apply(ScalaShell.scala:61)
at scala.tools.nsc.Interpreter.beQuietDuring(Interpreter.scala:110)
at org.scalashell.scalash.ScalaShell.bindSettings(ScalaShell.scala:61)
at org.scalashell.scalash.ScalaShell.repl(ScalaShell.scala:106)
at org.scalashell.scalash.ScalaShell.run(ScalaShell.scala:183)
at org.scalashell.scalash.Main$.main(Main.scala:54)
at org.scalashell.scalash.Main.main(Main.scala)

Jonhnny Weslley said...

Hi bwanab,
what is the scala and jline versions used?

bwanab said...

scala: 2.7.2.RC2
jline: 0.9.91

Daya Sharma said...

it seems scalashell-scala doesn't behave like 'irb' ruby interactive shell in that the tab completion doesn't work for either method names or class names.

Could you possibly tell me where does tab completion work ? Or what is it that I need to do to make it work.

thanks,
-daya

Jonhnny Weslley said...

Hi Daya Sharma,
The current version doesn't support tab completion for either method names, just for commands. Tab completion for methods is under development.

Post a Comment

Older Post Home