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 ...
0
votes
0answers
2 views
on demand actor get or else create
I can create actors with actorOf and look them with actorFor. I now want to get an actor by some id:String and if it doesnt exist, I want it to be created. Something like this:
def getRCActor(id: ...
3
votes
1answer
29 views
Message equivalent of dependent method types
Thanks to this post I'm getting my head around dependent method types. I have a structure similar to the following
trait Environment{
type Population <: PopulationBase
protected trait ...
0
votes
2answers
25 views
Passing obtained values to other templates
I have a main template that captures a string:
@(captured: String)
.... other templating stuff
I have a sub template that wants to utilize @captured:
.... somewhere in this templating stuff we ...
2
votes
2answers
36 views
Hex String to Int,Short and Long in Scala
Just can't find a way to transform an Hex String to a number (Int, Long, Short) in Scala.
Is there something like "A".toInt(base)?
2
votes
0answers
43 views
Implicit resolution in scala 2.10.x. what's going on?
i am using scala 2.10.0-snapshot dated (20120522) and have the following scala files:
this one defines the typeclass and a basic typeclass instance:
package com.netgents.typeclass.hole
case class ...
0
votes
1answer
18 views
Cannot compile code if try to add JsonPut & JsonPost method in RestHelper class with the same path
I'm trying to add JsonPut & JsontPost method in a RestHelper class with the same path like bellow:
object MembershipAPI extends RestHelper with LogHelper {
serve {
case JsonPost("api" :: ...
-5
votes
0answers
27 views
Scala Training in U.S.A [closed]
Can you name a few good companies that provide Scala Training with facilities in the U.S.A.?
5
votes
0answers
62 views
Why does partially applied function defer class instantiation in Scala?
Imagine this code:
class Foo {
println("in Foo")
def foo(a: Int) = a + 1
}
Now, if we invoke:
new Foo().foo _
instance of class Foo will get created, as expected:
in Foo
res0: (Int) => ...
7
votes
0answers
148 views
Scala or Clojure Functional Programming best practices [migrated]
Dear functional programming hackers,
I did a lot of self-study coding, got some experience with Parallel Programming Models: Actors, Software Transactional Memory, Data Flow.
When I trying to apply ...
0
votes
0answers
23 views
Integrating native system libraries with SBT
What is a good way to integrate various SBT tasks with native libraries (for example, those from JOGL, LWGL, or JCuda? Specifically,
Is there a recommended way to include a native library in the run ...
0
votes
0answers
20 views
scala hibernate/jpa - ignore autogenerated bitmap$init$0 mapping
Trying to use hibernate/jpa with scala. Running into interesting issue.
This is my entity definition.
@Entity
class Product(n: String, d: Double) extends EntityBase {
def this() = this("", 0)
...
1
vote
1answer
41 views
Scala magic to make a private/protected member visible?
I am using an API where a trait is given like this:
package pkg
trait Trait {
private[pkg] def f = ...
private[pkg] val content = ...
}
I would like to access the variable content and ...
0
votes
1answer
40 views
Cannot find sbt launcher 0.11.2
I have a Play 2.0 app that uses sbt 0.11.2. However when I set up a new Play server, it grabbed the latest version of sbt 0.11.3. Now when I run sbt compile on the new server, it complains
Detected ...
1
vote
1answer
40 views
Have a common webapp in a multi module Java/scala project?
I'm using SBT/scala but this question could also apply to Maven/Java projects as SBT is based on Maven structures.
I'd like to set up a multi module application that shares a common webapp ...
-5
votes
0answers
47 views
Central Scala Archive Network?? Scala programming [closed]
Has anyone thought creating a CSAN Central Scala Archive Network similar to Perls CPAN?
-Dell