Questions tagged [scala-2.9]

Version 2.9 of the Scala language for the JVM.

Version 2.9 included many changes, notably the introduction of parallel collections.

Scala is a general purpose programming language principally targeting the Java Virtual Machine. Designed to express common programming patterns in a concise, elegant, and type-safe way, it fuses both imperative and functional programming styles. Its key features are: statically typed; advanced type-system with type inference; function types; pattern-matching; implicit parameters and conversions; operator overloading; full interop with Java.

See for more information.

102 questions
0
votes
3 answers

How does scala intersection & match elements in a set

I have two sets of objets and I want to get the intersection of the two sets. The objects in the sets look like this @BeanInfo class User { @JsonProperty @BeanProperty var name:String = "" @JsonProperty @BeanProperty var id:Long = 0 …
Matt Higgins
  • 183
  • 3
  • 10
0
votes
1 answer

Scalac Memory Usage

I've been trying to compile the NeHe tutorial for scala (link) and scalac (2.9.0, linux) uses up all my ram and then some. I basically can't compile it. Why does it use so much ram? Is there a workaround? Cheers, Lucas
Lucas
  • 1,869
  • 4
  • 20
  • 36
0
votes
1 answer

for comprehension with futures in scala translation to flatMap

I have been looking at this How are Scala Futures chained together with flatMap? and the corresponding article as well on translating for comprehension. I am slowly adding stuff to my for comprehension and am stuck as I guess the code I thought…
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
0
votes
4 answers

more readable scala pattern for matching success

I find the Success case is frequently buried in a match of many errors and one success. Is there another way to write this more cleanly such that sucess stands out perhaps by having all errors in a partial function? Or perhaps, there is another…
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
0
votes
3 answers

stack overflow on overriding lazy val in scala

I have trimmed my code down to the following. I am confused why I am getting a stack overflow between the two filter methods (one in my trait and one in my superclass) object TestingOutTraits { val TestHandler = new Object with MySuper with…
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
0
votes
2 answers

What is the difference between different function creations

This question is heavily related to my other question (and may lead to me solving that one) but is definetely different. how to allow passing in a => AnyRef function and call that function I have been playing with different function creations and I…
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
0
votes
1 answer

GATLING Scala feeder into file

I am trying to feed the values of a feeder that supplies Id's into a .txt File. Is their any way to extract values directly from the feeder without having to extract the Id from each session?
user2313658
  • 41
  • 1
  • 2
  • 7
0
votes
1 answer

Scala Implement time counter

I need to implement a time counter that counts the number of seconds that have passed once program has entered .during. Then if the counter value has met or exceeded a set number of seconds, the function within the doIf will execute. Time counter…
user2313658
  • 41
  • 1
  • 2
  • 7
0
votes
2 answers

Compiling and running functions by name in Scala?

Following along in this Masters thesis[1] to learn parsing in Scala, but can't figure out how to get this example working (see pages 28-29): import util.parsing.combinator.JavaTokenParsers trait ArithParser extends JavaTokenParsers { def expr:…
A T
  • 13,008
  • 21
  • 97
  • 158
0
votes
1 answer

Scala-IDE: How to compile and execute multiple source code files in Eclipse?

I am reading Martin Odersky's Programming in Scala, and I have been using vi and the command line to compile so far. I want to learn to use Eclipse and the Scala-IDE plug-in, but I lack a basic understanding of compiling and executing multiple…
David Kaczynski
  • 1,246
  • 2
  • 20
  • 36
-1
votes
1 answer

How to detect when a user click a hyperlink on a web browser made in scala

I am making a simple web browser in Scala 2.9. This is only using HTML (no CSS, JavaScript, etc.). I used EditorPane to show the website. Can anyone tell me how to detect a hyperlink on that page and when a user clicks on any hyperlink and…
Mr Atwal
  • 1
  • 1
-1
votes
2 answers

for comprehension from flatMap and future to future

I would like something like runProgram2 but currently that part does not compile. Is there a way to write it somewhat like runProgram2 but so it compiles.. package transformer import scala.concurrent.{ExecutionContext, Promise, Future} import…
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
1 2 3 4 5 6
7