|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
[scala] additional magic?Dear Scalarazzi,
Is there additional magic needed to play with delimited continuations in the 2.8 REPL? Best wishes, --greg Welcome to Scala version 2.8.0.r18915-b20091004170819 (Java HotSpot(TM) Client VM, Java 1.5.0_20). Type in expressions to have them evaluated. Type :help for more information. scala> reset { shift { k : (Int => Int) => k(7) } + 1 } * 2 reset { shift { k : (Int => Int) => k(7) } + 1 } * 2 <console>:5: error: not found: value reset reset { shift { k : (Int => Int) => k(7) } + 1 } * 2 ^ scala> :q :q [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 minute 29 seconds [INFO] Finished at: Thu Oct 15 09:53:42 PDT 2009 [INFO] Final Memory: 29M/55M [INFO] ------------------------------------------------------------------------ bash-3.2$ -- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com |
|
|
Re: [scala] additional magic?On Thu, Oct 15, 2009 at 5:56 PM, Meredith Gregory
<lgreg.meredith@...> wrote: > Is there additional magic needed to play with delimited continuations in the > 2.8 REPL? I don't think things have changed too much since I wrote this, http://www.nabble.com/Re%3A-Delimited-continuations-and-Scala-p22681864.html Cheers, Miles -- Miles Sabin tel: +44 (0)7813 944 528 skype: milessabin http://www.chuusai.com/ http://twitter.com/milessabin |
|
|
Re: [scala] additional magic?Dear Miles,
Thanks! Did you ever try this with mvn scala:console? i've missed some configuration value somewhere, but it's not working for me. <plugin> <groupId>org.scala-tools</groupId> <artifactId>maven-scala-plugin</artifactId> <executions> <execution> <goals> <goal>compile</goal> <goal>testCompile</goal> </goals> </execution> </executions> <configuration> <scalaVersion>${scala.version}</scalaVersion> <displayCmd>true</displayCmd> <args> <!-- arg>-target:jvm-1.5</arg --> <arg>-Xplugin:${scala.home}/src/continuations/build/pack/selectivecps-plugin.jar</arg> <arg>-cp</arg> <!-- also tried ${scala.home}/src/continuations/build/build.library --> <arg>${scala.home}/src/continuations/build/pack/selectivecps-library.jar</arg> </args> <jvmArgs> <jvmArg>-Xmx128m</jvmArg> </jvmArgs> </configuration> </plugin> Best wishes, --greg Welcome to Scala version 2.8.0.r18915-b20091004170819 (Java HotSpot(TM) Client VM, Java 1.5.0_20). Type in expressions to have them evaluated. Type :help for more information. scala> [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] wrap: java.lang.reflect.InvocationTargetException class scala.continuations.cps not found. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 14 seconds [INFO] Finished at: Thu Oct 15 10:58:37 PDT 2009 [INFO] Final Memory: 31M/56M [INFO] ------------------------------------------------------------------------ bash-3.2$ On Thu, Oct 15, 2009 at 10:07 AM, Miles Sabin <miles@...> wrote:
-- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com |
|
|
Re: [scala] additional magic?Dear Miles,
Actually, i tried it by hand, without scala:console and got the same problem. Do you have any recommendations? Best wishes, --greg bash-3.2$ env PATH=/Users/lgm/work/src/projex/biosimilarity/scala/build/pack/bin:/Users/lgm/work/src/devtools/javaSDK/soylatte16-1.0.2/bin:$PATH JAVA_HOME=/Users/lgm/work/src/devtools/javaSDK/soylatte16-1.0.2 SCALA_HOME=/Users/lgm/work/src/projex/biosimilarity/scala /Users/lgm/work/src/projex/biosimilarity/scala/build/pack/bin/scala -Xplugin:/Users/lgm/work/src/projex/biosimilarity/scala/src/continuations/build/pack/selectivecps-plugin.jar -cp $/Users/lgm/work/src/projex/biosimilarity/scala/src/continuations/build/build.library Welcome to Scala version 2.8.0.r18915-b20091004170819 (Java HotSpot(TM) Server VM, Java 1.6.0_03-p3). Type in expressions to have them evaluated. Type :help for more information. scala> Exception in thread "main" scala.tools.nsc.MissingRequirementError: class scala.continuations.cps not found. at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:456) at scala.tools.nsc.symtab.Definitions$definitions$.getClass(Definitions.scala:414) at scala.continuations.CPSUtils$class.MarkerCPSTypes(CPSUtils.scala:17) at scala.continuations.CPSAnnotationChecker.MarkerCPSTypes(CPSAnnotationChecker.scala:11) at scala.continuations.CPSAnnotationChecker$checker$$anonfun$3.apply(CPSAnnotationChecker.scala:162) at scala.continuations.CPSAnnotationChecker$checker$$anonfun$3.apply(CPSAnnotationChecker.scala:160) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:167) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:167) at scala.collection.LinearSeqLike$class.foreach(LinearSeqLike.scala:84) at scala.collection.immutable.List.foreach(List.scala:29) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:167) at scala.collection.immutable.List.flatMap(List.scala:29) at scala.continuations.CPSAnnotationChecker$checker$.transChildrenInOrder(CPSAnnotationChecker.scala:160) at scala.continuations.CPSAnnotationChecker$checker$.addAnnotations(CPSAnnotationChecker.scala:235) at scala.tools.nsc.symtab.AnnotationCheckers$$anonfun$addAnnotations$1.apply(AnnotationCheckers.scala:71) at scala.tools.nsc.symtab.AnnotationCheckers$$anonfun$addAnnotations$1.apply(AnnotationCheckers.scala:70) at scala.collection.LinearSeqLike$class.foldLeft(LinearSeqLike.scala:164) at scala.collection.immutable.List.foldLeft(List.scala:29) at scala.tools.nsc.symtab.AnnotationCheckers$class.addAnnotations(AnnotationCheckers.scala:70) at scala.tools.nsc.symtab.SymbolTable.addAnnotations(SymbolTable.scala:13) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3782) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3837) at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:3903) at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1146) at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$typeCompleter$1.apply(Namers.scala:509) at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$typeCompleter$1.apply(Namers.scala:507) at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1293) at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:747) at scala.tools.nsc.symtab.Symbols$Symbol.initialize(Symbols.scala:856) at scala.tools.nsc.symtab.Symbols$Symbol.annotations(Symbols.scala:117) at scala.tools.nsc.typechecker.Typers$Typer.addGetterSetter(Typers.scala:1295) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$10.apply(Typers.scala:1418) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$10.apply(Typers.scala:1418) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:167) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:167) at scala.collection.LinearSeqLike$class.foreach(LinearSeqLike.scala:84) at scala.collection.immutable.List.foreach(List.scala:29) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:167) at scala.collection.immutable.List.flatMap(List.scala:29) at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1418) at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1237) at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3477) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3779) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3824) at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1824) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1883) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1883) at scala.collection.immutable.List.loop$2(List.scala:125) at scala.collection.immutable.List.mapConserve(List.scala:142) at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1883) at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3473) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3779) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3824) at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$2.apply(Analyzer.scala:57) at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329) at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$2$$anonfun$run$1.apply(Analyzer.scala:51) at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$2$$anonfun$run$1.apply(Analyzer.scala:51) at scala.collection.Iterator$class.foreach(Iterator.scala:536) at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:280) at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$2.run(Analyzer.scala:51) at scala.tools.nsc.Global$Run.compileSources(Global.scala:799) at scala.tools.nsc.Interpreter.compileSources(Interpreter.scala:367) at scala.tools.nsc.Interpreter.compileString(Interpreter.scala:375) at scala.tools.nsc.InterpreterLoop$$anonfun$bindSettings$1.apply(InterpreterLoop.scala:123) at scala.tools.nsc.InterpreterLoop$$anonfun$bindSettings$1.apply(InterpreterLoop.scala:122) at scala.tools.nsc.Interpreter$$anonfun$beQuietDuring$2.apply(Interpreter.scala:100) at scala.util.control.Exception$Catch.apply(Exception.scala:77) at scala.tools.nsc.Interpreter.beQuietDuring(Interpreter.scala:98) at scala.tools.nsc.InterpreterLoop.bindSettings(InterpreterLoop.scala:122) at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:218) at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:379) at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:126) at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala) On Thu, Oct 15, 2009 at 11:02 AM, Meredith Gregory <lgreg.meredith@...> wrote: Dear Miles, -- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com |
|
|
Re: [scala] additional magic?On Thu, Oct 15, 2009 at 7:12 PM, Meredith Gregory
<lgreg.meredith@...> wrote: > Actually, i tried it by hand, without scala:console and got the same > problem. Do you have any recommendations? It's missing scala.continuations.cps which is part of the runtime library rather than the plugin. If the library classfiles are all where you would expect them to be then my guess is that you've mistyped the classpath. Cheers, Miles -- Miles Sabin tel: +44 (0)7813 944 528 skype: milessabin http://www.chuusai.com/ http://twitter.com/milessabin |
|
|
Re: [scala] additional magic?Dear Miles,
In the command line version i spotted the problem: a spurious $ prepended to the classpath. However, i've yet to spot the problem in the scala:console call. Best wishes, --greg
On Thu, Oct 15, 2009 at 11:33 AM, Miles Sabin <miles@...> wrote: On Thu, Oct 15, 2009 at 7:12 PM, Meredith Gregory -- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com |
|
|
Re: [scala] additional magic?You would need to add the continuations plugin to the configuration for the maven-scala-plugin. I'm not sure this artifact is being deployed to the maven repository. I need to take a look.
On Thu, Oct 15, 2009 at 2:38 PM, Meredith Gregory <lgreg.meredith@...> wrote: Dear Miles, |
| Free embeddable forum powered by Nabble | Forum Help |