tags:

views:

107

answers:

2

I installed scala-2.8.0.RC3 by extracting the tgz file into my cygwin (vista) home directory. I made sure to set $PATH to scala-2.8.0.RC3/bin.

I start the REPL by typing:

$ scala
Welcome to Scala version 2.8.0.RC3 (Java HotSpot(TM) Client VM, Java 1.6.0_20).
Type in expressions to have them evaluated.
Type :help for more information.

scala>

Now when I tried to enter an expression

scala> 1 + 'a'

the cursor hangs there without any response. Granted that I have chrome open with a million tabs and VLC playing in the background, but CPU utilization was 12% and virtual memory was about 75% utilized. What's going on ? Do I have to set the CLASSPATH or perform other steps.

A: 

Have you tried sending Ctrl+Break to your Scala process ?

For a Java process this will force a dump of all the thread states and you'll be able to see what each thread is doing, what it's waiting on, if it's deadlocked etc.

Brian Agnew
+1  A: 

There is an enormous start-up cost for the REPL (which includes the compiler, of course), but it does not use fsc, it is self-contained within a single JVM. Using it gradually causes JVM bytecode to be converted to native code, after which it's very fast.

Randall Schulz