Skip to main content

All Questions

1 vote
1 answer
54 views

Scala REPL missing commands

I have installed scala through coursier. Running scala --version in the terminal gives the following: C:\Users\Me>scala --version Scala code runner version: 1.4.3 Scala version (default): 3.5.1 ...
MukundKS's user avatar
  • 135
1 vote
0 answers
162 views

How to set Intellij Scala REPL environment variables?

When invoking the Scala REPL in intellij (Tools --> Scala REPL), how can environment variables be manipulated for the REPL session? After launching the REPL a run configuration is created, but ...
Ramón J Romero y Vigil's user avatar
0 votes
0 answers
41 views

Update value printed to console

I'm attempting to update a value printed to the console in order to implement a simple REPL that supports predictive commands. So after "->" is printed to the screen using Console.print(&...
blue-sky's user avatar
  • 54k
1 vote
0 answers
368 views

Setting javaOptions in sbt:console task

How can I set javaOptions in an sbt project so that they'll be properly propagated inside the sbt:console task? I want have the vector incubator module visible inside the sbt console repl. By adding ...
Bartosz Witkowski's user avatar
0 votes
1 answer
152 views

Why spark-shell throws NoSuchMethodException while calling newInstance via reflection

spark-shell throws NoSuchMethodException if I define a class in REPL and then call newInstance via reflection. Spark context available as 'sc' (master = yarn, app id = application_1656488084960_0162). ...
核心力量's user avatar
1 vote
1 answer
491 views

Cannot use :paste in Scala 3.0.0 REPL

In Scala 2.x I use :paste for multi-line pasting. I am using Scala 3.0.0 and using the same approach throws an error: scala> :paste Unknown command: ":paste", run ":help" for a ...
Jaime Montoya's user avatar
0 votes
1 answer
236 views

Ammonite Ivy Import Fails For Joda Time

I have the following in my predef.sc file and when I load Ammonite via my terminal, it fails for one library, the joda-time: import $ivy.`org.typelevel::cats-core:2.1.1`, cats._, cats.implicits._ ...
joesan's user avatar
  • 15.5k
4 votes
1 answer
366 views

Expand Code to Raw AST Scala 3 in the REPL

I am currently doing a lot of compiler research. This not only entails to writing compiler plugins but also modifying the dotty compiler, from the parser to the typer. Therefore I need to constantly ...
sinanspd's user avatar
  • 2,734
0 votes
1 answer
489 views

Running Scala function from command line

I'm working on an exercise. I need to create a java project that can be run from the scala command line. The final output should be this: scala> int2str(6) res0: String = six scala> int2str(65) ...
PinkBubbleGoApe's user avatar
-1 votes
1 answer
45 views

Why value of y and +y is same in scala REPL in below scenario

scala> val y=20 val y: Int = 20 scala> y val res0: Int = 20 scala> +y val res1: Int = 20
Prakhar Vaish's user avatar
-1 votes
3 answers
91 views

Return only value without function name in Scala

I am new to Scala. I am trying to return a value from some scala code in Spark and I also get the function name along with the result. for ex executing below def getHistory() : Long = { 1 + 1 } ...
user1324887's user avatar
1 vote
1 answer
331 views

Easiest way to access ZIO test generators from Scala REPL?

I'm just starting out using ZIO in Scala. I've written some Scalacheck-style tests using ZIO's Gen type, and they appear to work, but I'd like to manually test the generators in the REPL to ensure ...
Adam R. Nelson's user avatar
0 votes
0 answers
97 views

Scala REPL shows nothing when I type functions

When I type functions in Scala REPL in IntilliJ it shows nothing while it supposed to show return value (I think) here is a function I use to calculate grades then decides whether it's bigger than ...
Mahmoud Ahmed's user avatar
0 votes
1 answer
637 views

Scala REPL. First it says "illegal start of definition", then "error: not found: type" when I try it a different way

Sorry guys - I know these questions get asked a lot on the Scala forum, but I've tried following posts on here and I've run into a roadblock either way, so I'd be really grateful for any help from ...
Only_me's user avatar
  • 37
0 votes
0 answers
41 views

Why Scala in REPL (or worksheet) and Scala in IDE don't work the same? [duplicate]

I'm a beginner learning Scala. I was referring to the Scala documentation. The documentation says: The REPL isn’t 100% the same as working with source code in an IDE, so there are a few things you ...
Vraj Kotwala's user avatar

15 30 50 per page
1
2 3 4 5
16