You cannot post messages because only members can post, and you are not currently a member.
Description:
The main forum for questions and discussions about the Scala programming. In particular, the following should go to this list:
newbie questions.
programming experiences and questions.
|
|
|
ScalaMock 3 Preview Release
|
| |
I've just released a preview of ScalaMock 3. Instead of all that fiddly mucking around with compiler plugins that ScalaMock 2.x required, it now uses macros (thanks, Eugene et al!). It's not yet quite as capable as ScalaMock 2.x (for example, it can't yet mock singleton/companion objects or object creation), but it is functional enough to be useful, I believe. And I've gone far enough to be convinced that macros are going to be a more fruitful long-term approach than continuing down the compiler plugin route.... more »
|
|
Injured by Type-Erasure
|
| |
Dear all,
In a class X of mine, I'd like to have two overloads of a method f like
class X {
class Y(X, I)
def f(is: I*) = Y(this, is: _*)
def f(vs: V*) = Y(this, (for(v <- vs) yield v.x): _*) //line 53
...
but, the compiler emits
double definition: method f:(vs: V*)X.this.Y and method f:(is:... more »
|
|
const functor (or parameterized type)
|
| |
So, there seems to be no way to define a constant functor (or a constant
parameterized type), or am I wrong?
class ConstantFunctor[T[_](value: T[???]) extends Functor[T] {
def map[A, B](f: (A) => B) = value
...
Scalaz has a special class called Const, but I was kind of lost trying to
figure out how it could be useful.... more »
|
|
Stable Compiler API docs for download or online
|
| |
This is probably a silly question, but I have Googled unsuccessfully...
Where can I view online or download the Scaladocs for the 2.9.2
version of the compiler API? The link to the nightly build is easy to
find, but I can't find 2.9.2.
I guess I could download the 2.9.2 from Github and build the docs... more »
|
|
mapperdao v1.0.0-rc9
|
| |
MapperDao is an ORM library for scala and java with drivers for the following databases: - oracle - postgresql - mysql - derby - sql server - h2 - The library can be found at [link] - Documentation can be found at the wiki : [link]... more »
|
|
Akka: scheduling self-cancelling tasks?
|
| |
I'm trying to schedule tasks which are unique to an object: I want the
tasks to happen every so often, but only as long as that object is
"active". In order to do this in a generic way, i'm trying to define a
thing.schedule, which looks exactly like scheduler.schedule, but kills the
task after the object is no longer active:... more »
|
|
Internal compiler error in Scala 2.9.2 related to specialization
|
| |
Hi,
I'm getting the following exception when trying to specialize a trait in my
project:
scala.tools.nsc.symtab.Types$T ypeError: type mismatch;
found : Seq[com.viungo.simulator.expr. Expr[T]]
required: Seq[com.viungo.simulator.expr. Expr[Double]]
at scala.tools.nsc.typechecker.Co ntexts$Context.error(Contexts. scala:298)... more »
|
|
How to set URL to accept Mime types?
|
| |
I'm working on an app that gets an XML resource form the web. Like
this.
val url = new URL("[link]");
val data = scala.io.Source.fromURL(url).m kString
It works on some servers I use but on one I get an HTTP 406 error.
I believe it is because the particular server labels the content as... more »
|
|
|