Daniel Wellman | 1 Mar 2009 02:22
Picon
Gravatar

Re: Problem compiling using scala.swing from Maven plugin


Great, that does it.  Thank you - I hadn't thought that it might not be part
of the standard library.

Dan

David Bernard-3 wrote:
> 
> scala.swing is not part of the scala-library.
> add to your pom.xml
> 
>    <dependency>
>      <groupId>org.scala-lang</groupId>
>      <artifactId>scala-swing</artifactId>
>      <version>${scala.version}</version>
>    </dependency>
> 
> 

--

-- 
View this message in context: http://www.nabble.com/Problem-compiling-using-scala.swing-from-Maven-plugin-tp22267415p22268947.html
Sent from the Scala - User mailing list archive at Nabble.com.

Alex Boisvert | 1 Mar 2009 04:27
Favicon
Gravatar

Re: any explanation for scala implementation of iterable concatenation?

Do bikeshed discussions belong to a special type class?

class BikeShed shed where
paint :: color -> shed color -- make up some shed color

(<*>) :: shed (c1 -> c2) -> shed c1 -> shed c2 -- apply color over somebody else's

__~o
-\ <,
(*)/ (*) ::
shed c1 -> (c1 -> shed c2) -> shed c2 -- Luc Duponcheel's effecful bikeshed bind


On Sat, Feb 28, 2009 at 9:04 AM, James Iry <jamesiry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I propose "asBikeShed."  Or should that be "toBikeShed?"


On Sat, Feb 28, 2009 at 5:31 AM, Miles Sabin <miles-XKJT71GPLR04Q++5jOxPmw@public.gmane.org> wrote:
Oh dear ... I really didn't mean to start a bikeshedding exercise :-(

Cheers,


Miles

--
Miles Sabin
tel:    +44 (0)1273 720 779
mobile: +44 (0)7813 944 528
skype:  milessabin


Josh Suereth | 1 Mar 2009 05:10
Picon
Gravatar

Re: any explanation for scala implementation of iterable concatenation?

Do you really need a builder to make factories for sheds that store bikes?  Why not just a meta-factory that produces things that somewhat resemble bicycle sheds.  That way it's more reusable.

On Sat, Feb 28, 2009 at 12:14 PM, Viktor Klang <viktor.klang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:


On Sat, Feb 28, 2009 at 6:04 PM, James Iry <jamesiry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I propose "asBikeShed."  Or should that be "toBikeShed?"

Not to forget the elusive isBikeShed and asBikeShedFactoryBuilder
 
- Show quoted text -


On Sat, Feb 28, 2009 at 5:31 AM, Miles Sabin <miles-XKJT71GPLR04Q++5jOxPmw@public.gmane.org> wrote:
Oh dear ... I really didn't mean to start a bikeshedding exercise :-(

Cheers,


Miles

--
Miles Sabin
tel:    +44 (0)1273 720 779
mobile: +44 (0)7813 944 528
skype:  milessabin




--
Viktor Klang
Senior Systems Analyst

Jon Pretty | 1 Mar 2009 11:51

Re: issue with implicit conversion

Hi Raphael,

Raphael Jolly wrote:
> I would like to know if this is by design, or if not, if there is a
> chance that it might be corrected in the future.

Interesting.

So the issue is that whilst

   val z = x*y
   x + z

is fine,

   x + (x*y)

is not.

The reason is that the compiler logic which decides whether an implicit
conversion is applicable or not isn't considering the types of things
given that other implicits might be applied.  If you apply either
implicit explicitly, i.e. replace either x with coef2poly(x), it copes fine.

Implicits aren't transitive by design, but this isn't quite
transitivity, and you've clearly provided a case which seems like it
ought to be permitted, though I say that without having considered the
complete ramifications of such a change...

Maybe someone else has an opinion?

Jon

--

-- 
Jon Pretty | Sygneca Ltd.

Normen Müller | 1 Mar 2009 13:01

scala specs & progress bar

He,

I have the following scala specs:

mypackage.test.specific

class ATest extends JUnit4(ASpec)
object ASpec extends Specification { ... }

class BTest extends JUnit4(ASpec)
object BSpec extends Specification { ... }

mypackge.test

class AllTest extends JUnit4(
  mypackage.test.specific.ASpec,
  mypackage.test.specific.BSpec)

Both tests, ATest and BTest, are taking quite some time.  So my question is, if it is possible to display a
progress bar in eclipse's JUnit view similar to running Java JUnit tests.  For example, running similar
Java JUnit test displays the progress of each individual test and one can see the gree/ red bar increasing. 
Otherwise one always has to wait till the end of all scala specs to see the entire green/ red bar.

This is not an urgent issue, just for convenience.

Cheers,
--

-- 
Normen Müller

Raphael Jolly | 1 Mar 2009 16:32
Picon
Favicon

Re: issue with implicit conversion

Hello,

Thanks for all the responses,

Jon Pretty wrote:
> Hi Raphael,
> 
> Raphael Jolly wrote:
>> I would like to know if this is by design, or if not, if there is a
>> chance that it might be corrected in the future.
> 
> Interesting.
> 
> So the issue is that whilst
> 
>    val z = x*y
>    x + z
> 
> is fine,
> 
>    x + (x*y)
> 
> is not.
> 
> The reason is that the compiler logic which decides whether an implicit
> conversion is applicable or not isn't considering the types of things
> given that other implicits might be applied.

Then how comes this simpler example is working:

class A

class B {
  def +(that: B) = new B
}

implicit def a2b(a: A) = new B

val a = new A

a+a // works

?

> If you apply either
> implicit explicitly, i.e. replace either x with coef2poly(x), it copes fine.

yes, but coef2poly(x) + (x*y) is not a satisfying mathematical
expression. I am seeking something similar to how the computer algebra
system Sage is working.

> Implicits aren't transitive by design, but this isn't quite
> transitivity, and you've clearly provided a case which seems like it
> ought to be permitted, though I say that without having considered the
> complete ramifications of such a change...

This would be fantastic.

Raphael

Jon Pretty | 1 Mar 2009 17:14

Re: Re: issue with implicit conversion

Hi Raphael,

Raphael Jolly wrote:
> Then how comes this simpler example is working:
> 
> [...]

I'd guess because the '+' defined isn't overloaded by the existence of 
'+' defined on the object, but I'm only speculating...

> yes, but coef2poly(x) + (x*y) is not a satisfying mathematical
> expression. I am seeking something similar to how the computer algebra
> system Sage is working.

Oh, I wasn't seriously suggesting you did that... ;-)

> This would be fantastic.

If nobody else has anything else to say about it in the near future, 
maybe post it as a bug report on the Scala bug tracker, and then it will 
either get fixed or rejected.

Cheers,
Jon

--

-- 
Jon Pretty | Sygneca Ltd.

Seth Tisue | 1 Mar 2009 17:46
Gravatar

Re: Re: issue with implicit conversion

>>>>> "Raphael" == Raphael Jolly <raphael.jolly@...> writes:

 Raphael> Then how comes this simpler example is working: [...]

Maybe the recursive nature of the Poly[Poly] type is what is confusing
the compiler.

I think it's a compiler bug and you should file a report.

--

-- 
Seth Tisue / http://tisue.net
lead developer, NetLogo: http://ccl.northwestern.edu/netlogo/

Raphael Jolly | 1 Mar 2009 18:27
Picon
Favicon

Re: issue with implicit conversion

Seth Tisue wrote:
>>>>>> "Raphael" == Raphael Jolly <raphael.jolly@...> writes:
> 
>  Raphael> Then how comes this simpler example is working: [...]
> 
> Maybe the recursive nature of the Poly[Poly] type is what is confusing
> the compiler.
> 
> I think it's a compiler bug and you should file a report.

done:

Issue with implicit conversion
http://lampsvn.epfl.ch/trac/scala/ticket/1756

Raphael

John Nilsson | 1 Mar 2009 18:46
Picon
John Nilsson <john@...>

Re: Can Scala be compiled and run without Java?

Is that really true? GCJ can compile bytecode to machine code ahead of
time. Would there be any special reason why this wouldn't work for
bytecode generated by the scala compiler?

BR,
John

On Thu, Feb 26, 2009 at 5:18 PM, Landei <Daniel.Gronau@...> wrote:
>
>
>
> Poperecinii Timur wrote:
>>
>> Hi,
>> the nature of my question is: can Scala exist on a machine without Java?
>> Because it seems that ideologically Scala was designed with Java in mind,
>> so you can really take the best from Scala re-using the libs from Java. An
>> example could be the GUI applications in Scala, which use Swing.
>>
>> Another question can I run and compile my Scala apps without Java
>> installed on the same machine?
>> Or is it something just really build on top of Java Framework?
>>
>
> Scala needs a VM, currently either the Java VM or .NET
>
> --
> View this message in context: http://www.nabble.com/Can-Scala-be-compiled-and-run-without-Java--tp22225009p22227617.html
> Sent from the Scala - User mailing list archive at Nabble.com.
>
>


Gmane