<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.scala.user">
    <title>gmane.comp.lang.scala.user</title>
    <link>http://blog.gmane.org/gmane.comp.lang.scala.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63409"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63408"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63407"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63406"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63405"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63404"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63403"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63402"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63401"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63400"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63399"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63398"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63397"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63396"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63395"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63394"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63393"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63392"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63391"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/63390"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63409">
    <title>Re: Future and nondeterministic dataflow</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63409</link>
    <description>&lt;pre&gt;Hi Andrew,

import scala.concurrent.{ Future, ExecutionContext }
import ExecutionContext.Implicits.global
val f = Future(1)
if (f.isCompleted) launchTorpedoes() else lobsterForEverybody()


Is the program above deterministic?

Cheers,
√


On Mon, May 20, 2013 at 11:02 PM, Andrew Gaydenko &amp;lt;andrew.gaydenko-Re5JQEeQqe8&amp;lt; at &amp;gt;public.gmane.orgm




&lt;/pre&gt;</description>
    <dc:creator>√iktor Ҡlang</dc:creator>
    <dc:date>2013-05-20T21:15:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63408">
    <title>Future and nondeterministic dataflow</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63408</link>
    <description>&lt;pre&gt;From Future#isCompleted scaladoc: 

   *Note: using this method yields nondeterministic dataflow programs.*

What does it exactly - *in terms of a code*  - mean?

&lt;/pre&gt;</description>
    <dc:creator>Andrew Gaydenko</dc:creator>
    <dc:date>2013-05-20T21:02:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63407">
    <title>Re: swing: scale &amp; translate mouse position</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63407</link>
    <description>&lt;pre&gt;Where do you have the graphics transform?


On Wed, May 15, 2013 at 6:41 AM, Boris Hollas &amp;lt;
hollas-jNDFPZUTrfSI6G3CRkLG2/hqMcnVdK/bs0AfqQuZ5sE&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:


&lt;/pre&gt;</description>
    <dc:creator>Naftoli Gugenheim</dc:creator>
    <dc:date>2013-05-20T20:03:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63406">
    <title>Re: Variable-length tuple?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63406</link>
    <description>&lt;pre&gt;I'll have to keep working on the example that Jed offered.  I didn't 
immediately understand it.  

I have a better, slightly less contrived illustrative code for what I am 
trying to accomplish.  The HeadHunter object is where I want to support an 
arbitrary number of arguments to the get function.  The HeadHunterSuiteclass should help show how it could be called.

object HeadHunter {
  def get[A](a:Seq[A]):Option[A] = 
    a.headOption
  def get[A,B](a:Seq[A],b:Seq[B]):(Option[A],Option[B]) = 
    (a.headOption, b.headOption)
  def 
get[A,B,C](a:Seq[A],b:Seq[B],c:Seq[C]):(Option[A],Option[B],Option[C]) = 
    (a.headOption, b.headOption, c.headOption)
  
}

class HeadHunterSuite extends WordSpec with ShouldMatchers {
  "HeadHunter" should {
    "be type safe and therefore awesome" in {
      import HeadHunter._
      get(Seq(1,2,3)) should equal (
          Some(1))
      get(Seq("strs","str2"), Seq(4,5,6)) should equal (
          (Some("strs"),Some(4)))
      get(Seq(true,false,true), Seq("str1","str2"), Seq(3)) should equal (
          (Some(true), Some("str1"), Some(3)))
    }
  }
}

Thanks!

Joe


On Sunday, 19 May 2013 15:58:47 UTC-5, Joe Barnes wrote:

&lt;/pre&gt;</description>
    <dc:creator>Joe Barnes</dc:creator>
    <dc:date>2013-05-20T15:06:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63405">
    <title>Re: Variable-length tuple?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63405</link>
    <description>&lt;pre&gt;Hi Miles, don't worry about missing that detail.  The example I gave is a 
bit contrived to avoid explaining the details of my project.  The 
parameterized types that I will be passing to my functions aren't of type 
Option[A] but some other Type[A] that doesn't have a None.

Joe


On Monday, 20 May 2013 08:53:38 UTC-5, Miles Sabin wrote:

&lt;/pre&gt;</description>
    <dc:creator>Joe Barnes</dc:creator>
    <dc:date>2013-05-20T14:32:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63404">
    <title>Re: Variable-length tuple?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63404</link>
    <description>&lt;pre&gt;Thanks for the reply.  I'll try to pick through this and get it working for 
my code.

Joe


On Sunday, 19 May 2013 17:50:05 UTC-5, Jed Wesley-Smith wrote:

&lt;/pre&gt;</description>
    <dc:creator>Joe Barnes</dc:creator>
    <dc:date>2013-05-20T14:30:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63403">
    <title>Re: Variable-length tuple?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63403</link>
    <description>&lt;pre&gt;
You should be able to do this with shapeless ... but one thing I'm
missing though ... what is the intended semantics if one of the
argument to f is None? Is there supposed to be a corresponding
default?

Cheers,


Miles

--
Miles Sabin
tel: +44 7813 944 528
skype: milessabin
gtalk: miles-XKJT71GPLR04Q++5jOxPmw&amp;lt; at &amp;gt;public.gmane.org
g+: http://www.milessabin.com
http://twitter.com/milessabin

&lt;/pre&gt;</description>
    <dc:creator>Miles Sabin</dc:creator>
    <dc:date>2013-05-20T13:53:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63402">
    <title>Re: Some language questions (about the "Action" and "Ok" concepts from the Scala Play API)</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63402</link>
    <description>&lt;pre&gt;Hi Josh,

Thanks for this explanation. Like the original poster, I was also curious 
to know what was going on!

Chris

On Monday, 26 March 2012 14:38:37 UTC+1, Josh Suereth wrote:

&lt;/pre&gt;</description>
    <dc:creator>Chris Beach</dc:creator>
    <dc:date>2013-05-20T10:18:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63401">
    <title>New Functional Programming Job Opportunities</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63401</link>
    <description>&lt;pre&gt;Here are some functional programming job opportunities that were posted

recently:



Test Engineer at Klarna

http://functionaljobs.com/jobs/146-test-engineer-at-klarna



Cheers,

Sean Murphy

FunctionalJobs.com


&lt;/pre&gt;</description>
    <dc:creator>Functional Jobs</dc:creator>
    <dc:date>2013-05-20T06:00:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63400">
    <title>Re: new warnings in 2.10 for enumerations</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63400</link>
    <description>&lt;pre&gt;
This is https://issues.scala-lang.org/browse/SI-6514

It is fixed in the forthcoming release, 2.10.2. We've just had a code
freeze for the first release candidate, so it's not far away.

Until then, remove -Ywarn-dead-code.

-jason

&lt;/pre&gt;</description>
    <dc:creator>Jason Zaugg</dc:creator>
    <dc:date>2013-05-20T04:09:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63399">
    <title>Re: new warnings in 2.10 for enumerations</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63399</link>
    <description>&lt;pre&gt;

I'm unable to reproduce. What compiler options are you using.

Here's what I tried:

  /code/scala cat sandbox/rp.scala
sealed trait ManeuverType

object ManeuverType { // enumeration of maneuver types

  case object alt extends ManeuverType // altitude maneuver
  case object vec extends ManeuverType // horizontal "vector" maneuver
  case object spd extends ManeuverType // speed manevuer
}
  /code/scala RUNNER=scalac scala-hash v2.10.1 -Ydead-code sandbox/rp.scala
[info] v2.10.1 =&amp;gt; /Users/jason/usr/scala-v2.10.1-0-g77b864e
  /code/scala RUNNER=scalac scala-hash v2.10.0 -Ydead-code sandbox/rp.scala
[info] v2.10.0 =&amp;gt; /Users/jason/usr/scala-v2.10.0-0-g18481ce

-jason

&lt;/pre&gt;</description>
    <dc:creator>Jason Zaugg</dc:creator>
    <dc:date>2013-05-20T03:54:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63398">
    <title>new warnings in 2.10 for enumerations</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63398</link>
    <description>&lt;pre&gt;I just upgraded from 2.9.2 to 2.10.1, and I am getting warnings that I did 
not get before. Here's the relevant code:

sealed trait ManeuverType

object ManeuverType { // enumeration of maneuver types

    case object alt extends ManeuverType // altitude maneuver
    case object vec extends ManeuverType // horizontal "vector" maneuver
    case object spd extends ManeuverType // speed manevuer
    }

And here are the warnings:

[warn] /home/Maneuver.scala:12: dead code following this
construct
[warn]     case object alt extends ManeuverType // altitude maneuver
[warn]                 ^
[warn] /home/Maneuver.scala:13: dead code following this
construct
[warn]     case object vec extends ManeuverType // horizontal "vector" 
maneuver
[warn]                 ^
[warn] /home/Maneuver.scala:14: dead code following this
construct
[warn]     case object spd extends ManeuverType // speed manevuer
[warn] 

What changed in the language or compiler to cause these warnings? Thanks.

--Russ P.                ^

&lt;/pre&gt;</description>
    <dc:creator>Russ P.</dc:creator>
    <dc:date>2013-05-20T03:33:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63397">
    <title>Re: Variable-length tuple?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63397</link>
    <description>&lt;pre&gt;I believe Shapeless HList was designed exactly with the purpose of solving
this kind of problems.

Thanks,
-Vlad


On Sun, May 19, 2013 at 1:58 PM, Joe Barnes &amp;lt;barnesjd-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:


&lt;/pre&gt;</description>
    <dc:creator>Vlad Patryshev</dc:creator>
    <dc:date>2013-05-19T23:02:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63396">
    <title>Re: Variable-length tuple?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63396</link>
    <description>&lt;pre&gt;We have something similar (using shapeless) to do command-line option
parsing. Basically we pass in a function of variable arity and it will work
out the length from that, chomping off that many arguments from a list.

The code we use is here:
https://bitbucket.org/atlassian/kadai/src/master/cmdopts/src/main/scala/kadai/cmdopts/CmpOpts.scala?at=master

and an example usage is here:
https://bitbucket.org/atlassian/kadai/src/master/cmdopts/src/main/scala/kadai/cmdopts/Example.scala?at=master

All of the work is done in the opt method:

  def opt[H &amp;lt;: HList, N &amp;lt;: Nat, F, R](t: T, f: F)(    implicit
hlister: FnHListerAux[F, H =&amp;gt; R],    length: LengthAux[H, N],
toHList: FromTraversable[H],    size: ToInt[N]): Option[R] =    for {
    ts &amp;lt;- if (size() &amp;gt; 0) tailfind(t) else rawdata.find { _ == t }.map
{ _ =&amp;gt; Nil }      hl &amp;lt;- toHList(ts.take(size()))      op &amp;lt;-
nonFatalCatch.opt { hlister(f)(hl) }    } yield op


where the T is the input type (in practice always String) and R is the
output type. The various implicits witness that we can get the
arguments of our function as an HList, that we can work out the length
of that HList, that we can turn our rawdata (a field in this case)
into an HList, and that we can turn our size into an Int value so we
can take that many elements from ou rawdata.


It takes a little while to puzzle though, but it works really well and
is nice and compact.


cheers,

jed.



On 20 May 2013 06:58, Joe Barnes &amp;lt;barnesjd-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:


&lt;/pre&gt;</description>
    <dc:creator>Jed Wesley-Smith</dc:creator>
    <dc:date>2013-05-19T22:50:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63395">
    <title>Variable-length tuple?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63395</link>
    <description>&lt;pre&gt;I've started an open-source project (SNMP4S&amp;lt;https://github.com/barnesjd/snmp4s&amp;gt;if you're interested), and I've run into a snag trying to accomplish my 
type-safety goals.  I *think* what I need is some kind of variable-length 
tuple.  A list won't work because the type of the contents are 
parameterized with different.  A tuple accomplishes what I need, but I have 
to hand-write a function for every number of arguments I hope to support. 
 It is much like Scala's limit on functions having at most 22 parameters.

To avoid gory details of my project, suppose I wanted to have this Tuplizerclass below.  I really like what the 
Consumer class looks like because each variable returned infers the correct 
type.  However, I'd like to avoid hand-writing the 3 different functions 
and be able to support an arbitrary number of Options passed to f.

class Tuplizer {
  def f[A](a:Option[A]):A = ???
  def f[A, B](a:Option[A], b:Option[B]):(A,B) = ???
  def f[A, B, C](a:Option[A], b:Option[B], c:Option[C]):(A,B,C) = ???
  // ...
  
}

class Consumer {
  def t:Tuplizer = new Tuplizer
  
  def use = {
    val a = t.f(Some(1))
    val (b, c) = t.f(Some("String"), Some(5))
    val (d, e, f) = t.f(Some(7), Some("Other"), Some(true))
  }
}

The best hint I've found towards accomplishing this is to use shapeless per this 
post &amp;lt;http://stackoverflow.com/a/10487475&amp;gt;.  But I don't think that helps 
me get a varying number of args.  Any good ideas?

&lt;/pre&gt;</description>
    <dc:creator>Joe Barnes</dc:creator>
    <dc:date>2013-05-19T20:58:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63394">
    <title>Re: another type mismatch.</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63394</link>
    <description>&lt;pre&gt;An interesting link! Thanks!
It certainly is relevant to my problem.

Yves


Le lundi 13 mai 2013 16:27:09 UTC+2, yves a écrit :

&lt;/pre&gt;</description>
    <dc:creator>yves</dc:creator>
    <dc:date>2013-05-19T15:20:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63393">
    <title>Re: another type mismatch.</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63393</link>
    <description>&lt;pre&gt;Yves, you could look at the proposal about encoding of virtual classes 
in Scala. I found this link:
https://wiki.scala-lang.org/display/SIW/VirtualClasses
but there might be others. I believe understanding of the mechanism will 
clarify a lot of things for you.

Regards,
Jan

On 13.05.2013 16:27, yves wrote:

&lt;/pre&gt;</description>
    <dc:creator>Jan Vanek</dc:creator>
    <dc:date>2013-05-19T14:14:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63392">
    <title>Re: Best way to declare a typeclass having a superclass</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63392</link>
    <description>&lt;pre&gt;Thanks for your answers!

Le samedi 18 mai 2013 12:34:45 UTC+2, Lars Hupel a écrit :

&lt;/pre&gt;</description>
    <dc:creator>Julien Richard-Foy</dc:creator>
    <dc:date>2013-05-19T13:50:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63391">
    <title>Scala 2.11 compiler response speed improved?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63391</link>
    <description>&lt;pre&gt;Hi all,

it seems to me that ScalaLab based on the latest 2.11 build has improved
response ("startup") time.

Does compiler improvements introduced recently (after 2.11 M2) in 2.11?

Stergios

&lt;/pre&gt;</description>
    <dc:creator>Stergios Papadimitriou</dc:creator>
    <dc:date>2013-05-19T13:02:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63390">
    <title>Re: [ANNOUNCE] mysql-async and postgresql-async 0.2.2 released</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63390</link>
    <description>&lt;pre&gt;I'm accepting proposals for scalability testing :)

It's rather hard to make statements here, since it would definitely
allow you to keep 10k connections to the database, but can you use 10k
connections? Is the database going to allow you to make 10k
connections to it? How much memory overhead and GC time will 10k
connections will cause in your app? (every prepared statement is an
object and also takes up memory on both ends)

I think the main advantage is allowing you to follow the flow of a
framework like Akka, Spray or blueeyes, where the flow is usually
async by nature. If you're using JDBC, you need to "jump out" of the
main framework loop and block for it, when using these async drivers
you can just do it the way the framework works, since every db call
produces a future.

But if anyone has ideas on how this could be tested, I'm all ears :)
-
Maurício Linhares
http://mauricio.github.io/ - http://twitter.com/#!/mauriciojr


On Sat, May 18, 2013 at 6:51 PM, Flavio W. Brasil &amp;lt;fwbrasil-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Maurício Linhares</dc:creator>
    <dc:date>2013-05-19T05:08:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/63389">
    <title>Re: [ANNOUNCE] mysql-async and postgresql-async 0.2.2 released</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/63389</link>
    <description>&lt;pre&gt;Hi.  

I am developing an integration with Activate (http://activate-framework.org/). I've tested the postgresql driver and it works very well!
I am anxious to see what are the performance and scalability characteristcs of the driver.


&lt;/pre&gt;</description>
    <dc:creator>Flavio W. Brasil</dc:creator>
    <dc:date>2013-05-18T21:51:43</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.scala.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.scala.user</link>
  </textinput>
</rdf:RDF>
