sanity | 1 Oct 02:42 2007
Picon

Re: New Scala Plugin BETA 3


Hmm, seems to be working now, not sure what the issue was.

Regards,

Ian.

sean.mcdirmid wrote:
> 
> Definitely works with 3.4/3.3, not sure about 3.2. It could be that your
> 3.3 install is setup in a funky way. Anyways, be sure to "install new 
> feature" even if you are just updating, our version numbers aren't
> good enough to support update yet :( 
> 
> Sean
> 
> Quoting sanity <ian.clarke <at> gmail.com>:
> 
>> 
>> Ah, seems like the update site is back up.
>> 
>> I note that the plugin doesn't work with Eclipse 3.3.x, only Eclipse
>> 3.2
>> (which I'm downloading now).  Any ideas when its likely to work with
>> the
>> current Eclipse release?
>> 
>> Regards,
>> 
>> Ian.
(Continue reading)

sean.mcdirmid | 1 Oct 09:06 2007
Picon
Picon

Re: eclipse plugin hangs

In B4 it will. Is there anything showing up in the error log? 

Strange that you have to reboot XP, especially since the 
type checking goes on in a non-UI background thread.
Is threading in XP really that horrible?

Sean

Quoting Amir Michail <amichail <at> gmail.com>:

> Hi,
> 
> I'm getting hangs with the plugin that make Windows XP unusable to the
> point of having to reboot.
> 
> Perhaps the plugin could abort its operation if it is taking too long?
> 
> Amir
> 

sean.mcdirmid | 1 Oct 09:07 2007
Picon
Picon

Re: Support for -Ygenerics in Eclipse Plugin Beta3

I'm not a math person myself. I have one page of obligatory theory
in the paper, thankfully it can be completely ignored :)

Quoting Viktor Klang <viktor.klang <at> gmail.com>:

> Sorry man, my spatial intelligence is way higher than my downright
> mathematical, so if it isn't complete with pictures I'll waste too much
> time
> trying to break it down to understandable chunks :(
> 
> On 9/30/07, sean.mcdirmid <at> epfl.ch <sean.mcdirmid <at> epfl.ch> wrote:
> >
> > Well, if you are inkling for an idea of what I'm doing, you could
> check
> > out my 2001 OOPSLA paper "Jiazzi: New-age Components for
> > Old-fashioned Java." Basically, Scala is a good platform for open
> > classes, but it requires an inheritance pattern right now. Someday,
> > we might get some virtual class syntactic sugar, but its best to
> > play around with it first so we can get the constructs right.
> >
> > Quoting Viktor Klang <viktor.klang <at> gmail.com>:
> >
> > > "Its based on a virtual mixin layer pattern, I'll
> > > have to explain it in depth sometime."
> > >
> > > Haha, "Inheritance - now so complex it hurts. A lecture by Sean
> McDirmid
> > > of
> > > the EPFL"
> > > ;D
(Continue reading)

Viktor Klang | 1 Oct 09:38 2007
Picon

Re: Support for -Ygenerics in Eclipse Plugin Beta3



On 10/1/07, sean.mcdirmid <at> epfl.ch <sean.mcdirmid <at> epfl.ch> wrote:
I'm not a math person myself. I have one page of obligatory theory
in the paper, thankfully it can be completely ignored :)
 
Praise the Lord! :)
 
Viktor
 
 
 

Quoting Viktor Klang <viktor.klang <at> gmail.com>:

> Sorry man, my spatial intelligence is way higher than my downright
> mathematical, so if it isn't complete with pictures I'll waste too much
> time
> trying to break it down to understandable chunks :(
>
> On 9/30/07, sean.mcdirmid <at> epfl.ch <sean.mcdirmid <at> epfl.ch> wrote:
> >
> > Well, if you are inkling for an idea of what I'm doing, you could
> check
> > out my 2001 OOPSLA paper "Jiazzi: New-age Components for
> > Old-fashioned Java." Basically, Scala is a good platform for open
> > classes, but it requires an inheritance pattern right now. Someday,
> > we might get some virtual class syntactic sugar, but its best to
> > play around with it first so we can get the constructs right.
> >
> > Quoting Viktor Klang <viktor.klang <at> gmail.com>:
> >
> > > "Its based on a virtual mixin layer pattern, I'll
> > > have to explain it in depth sometime."
> > >
> > > Haha, "Inheritance - now so complex it hurts. A lecture by Sean
> McDirmid
> > > of
> > > the EPFL"
> > > ;D
> > >
> > > Viktor
> > >
> > > On 9/30/07, sean.mcdirmid <at> epfl.ch < sean.mcdirmid <at> epfl.ch> wrote:
> > > >
> > > > Hi Andrew, NSC is pretty flat, I think you must be referring
> > > > to lampion. Its based on a virtual mixin layer pattern, I'll
> > > > have to explain it in depth sometime.
> > > >
> > > > Sean
> > > >
> > > > Quoting Andrew Foggin <andy <at> foggin.net >:
> > > >
> > > > > Andrew Foggin wrote:
> > > > > > sean.mcdirmid <at> epfl.ch wrote:
> > > > > >> This could be related to bug where the plugin doesn't
> support
> > > > > >> Java annotations. Honestly, I still don't have a clue about
> > > what's
> > > > > >> going on. The settings are being set correctly, but its
> like
> > > they
> > > > > >> don't matter. I'll look into this.
> > > > > >>
> > > > > > Unless I'm mistaken they are caused by the same problem.
> The
> > > compiler
> > > > >
> > > > > > settings you can set are specified per project
> > > > > > (scala.tools.eclipse.properties.CompilerSettings.scala ) but
> the
> > > > > > compiler settings that are actually used are global for the
> > > plug-in
> > > > > > (scala.tools.eclipse.ScalaPlugin.scala) and nowhere
> reference
> > > the
> > > > > > project settings.  So whatever you set is going to be ignored,
> and
> > > the
> > > > >
> > > > > > plug-in will use the default - which is always false for
> these
> > > boolean
> > > > >
> > > > > > settings.
> > > > > >
> > > > > Well, actually I am partly mistaken, because the plugin
> compiler
> > > > > settings are initialised in
> > > scala.tools.eclipse.ScalaPlugin#ProjectImpl,
> > > > >
> > > > > and therefore per-project, however they still don't check for
> > > > > user-specified settings.  At least this should be a lot easier
> to
> > > fix
> > > > > than what I initially thought :-)
> > > > >
> > > > > Andrew
> > > > >
> > > > > P.S. I'm really struggling to follow the many layers of
> > > inheritance
> > > > > within nested classes and traits that results from the nsc
> design.
> > > > > > Regards,
> > > > > >
> > > > > > Andrew Foggin
> > > > > >
> > > > > >> As of 2.6.1, I think generics will be on by default and
> > > everything
> > > > > >> should just work, I hope (as settings won't have to be
> > > > > reconfigured).
> > > > > >>
> > > > > >> Quoting Lalit Pant < lalit_pant <at> yahoo.com>:
> > > > > >>
> > > > > >>
> > > > > >>> Greetings,
> > > > > >>>
> > > > > >>> I'm having trouble using generic types in Java from my
> Scala
> > > code.
> > > > > I'm
> > > > > >>> running into this with the Beta3 version of the Plugin...
> > > > > >>>
> > > > > >>> For example: if I try to use a parameterized Java type
> like
> > > this:
> > > > > >>>     val jList = new java.util.ArrayList[String]()
> > > > > >>>
> > > > > >>> The Plugin shows me a compilation error:
> > > > > >>> java.util.ArrayList does not take type parameters
> > > > > >>>
> > > > > >>> I have jvm-1.5 and Ygenerics turned on in the Scala
> Compiler
> > > > > Properties
> > > > > >>> for
> > > > > >>> my Scala Project.
> > > > > >>>
> > > > > >>> The same code compiles fine with the command line scalac
> (when
> > > I
> > > > > use
> > > > > >>> the
> > > > > >>> -Ygenerics flag)
> > > > > >>>
> > > > > >>> Is this a know issue with the Plugin (I tried searching
> the
> > > > > list/forum
> > > > > >>> for
> > > > > >>> this issue, but did not come up with any hits).
> > > > > >>>
> > > > > >>> Thanks,
> > > > > >>> - Lalit
> > > > > >>> --
> > > > > >>> View this message in context:
> > > > > >>>
> > > > >
> > >
> http://www.nabble.com/Support-for--Ygenerics-in-Eclipse-Plugin-Beta3-
> > > > > >>>
> > > > > >> tf4539929.html#a12957075
> > > > > >>
> > > > > >>> Sent from the Scala mailing list archive at Nabble.com .
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>


St├ęphane Micheloud | 1 Oct 11:13 2007
Picon
Picon

Re: Patch to enable scala tools scripts to run on Solaris

Hi Stepan,

I fixed the issue in rev 12966.

    https://lampsvn.epfl.ch/trac/scala/changeset/12966

Thanks to everyone discussing the issue!

Bye
--Stephane

Stepan Koltsov wrote:
> Command
> 
> ${JAVACMD:=java} ${JAVA_OPTS:--Xmx256M} ${JAVA_OPTS:--Xms16M} ...
> 
> should work properly everywhere.
> 
> S.
> 
> On 9/17/07, stephane.micheloud <at> epfl.ch <stephane.micheloud <at> epfl.ch> wrote:
>> Does the following (added quotes) works on Solaris ?!
>>
>> ${JAVACMD:=java} ${JAVA_OPTS:="-Xmx256M -Xms16M"} ...
>>
>>
>> Bye
>> --Stephane
>>
>> Quoting Manpreet Singh <junkblocker <at> yahoo.com>:
>>
>>> Thus spake Randall R Schulz on 09/14/07 10:16:
>>>>> So basically, list the output of the following sequence.
>>>>>
>>>>> /bin/sh
>>>>> unset JAVA_OPTS
>>>>> echo ${JAVA_OPTS:=-Xmx256M}
>>>>> ${JAVA_OPTS:=-Xms16M}
>>>> The last one there should have a no-op command (a colon character) lest
>>>> the value substituted by $JAVA_OPTS (or the default value supplied if
>>>> it's empty or unset) be interpreted as a command.
>>>>
>>>>
>>> Right, that was an unintentionally split line. It should be
>>>
>>> # Change to sh
>>> /bin/sh
>>> # unset existing
>>> unset JAVA_OPTS
>>> # make sure unset really worked
>>> echo $JAVA_OPTS
>>> # try out the replacement
>>> echo ${JAVA_OPTS:=-Xmx256M} ${JAVA_OPTS:=-Xms16M}
>>>
>>> -manpreet
>>>
>>>>> I've tested what I proposed on Solaris, Linux (RH 4.x) and cygwin.
>>>>>
>>>>> -manpreet
>>>>
>>>> Randall Schulz
>>>>
>>>
>>
>>

cjkent | 1 Oct 14:16 2007
Picon

Channels and Actors


Hi

I've just started using channels with actors and it appears that a channel
has to be created while the body of its actor is running or there's no way
to connect it to the actor. Is that right or am I missing something?
Currently I can't see a way of creating a class that extends Actor and
exposes Channels as fields (except using vars but that feels like a hack and
is prone to race conditions unless you're careful).

All the example code I've seen that uses channels shows the channels passed
out of the actor by sending them as messages to other actors. Is this
supposed to be the only way that channels can be used and if so why? Channel
already has a constructor that takes an actor to use as its receiver but
it's not public. Would it be possible to make it public or is there a reason
why that wouldn't be a good idea?

Thanks
Chris

--

-- 
View this message in context: http://www.nabble.com/Channels-and-Actors-tf4547978.html#a12978145
Sent from the Scala mailing list archive at Nabble.com.

Amir Michail | 1 Oct 17:27 2007
Picon

Re: eclipse plugin hangs

On 10/1/07, sean.mcdirmid <at> epfl.ch <sean.mcdirmid <at> epfl.ch> wrote:
> In B4 it will. Is there anything showing up in the error log?
>

I don't know.  It's hard to do anything (e.g., switch between windows)
when this happens.  The desktop becomes highly unresponsive.

Maybe it's a memory leak?  I don't think it's a problem with XP theading.

Amir

> Strange that you have to reboot XP, especially since the
> type checking goes on in a non-UI background thread.
> Is threading in XP really that horrible?
>
> Sean
>
> Quoting Amir Michail <amichail <at> gmail.com>:
>
> > Hi,
> >
> > I'm getting hangs with the plugin that make Windows XP unusable to the
> > point of having to reboot.
> >
> > Perhaps the plugin could abort its operation if it is taking too long?
> >
> > Amir
> >
>
>

Klaus Ostermann | 1 Oct 17:29 2007
Picon

Family Polymorphism in Scala

Hi all,

I am trying to explore the features of Scala.

I am wondering why this code is not accepted:

abstract class A {
   type B
   def makeB() : B
}

class Test {
   def foo(a: A) = {
     a.makeB()
   }
}

The compiler complains that foo has an "illegal dependent method type".

Why doesn't this work?

How else could I encode family polymorphism?

Klaus

--

-- 
http://www.st.informatik.tu-darmstadt.de/staff/Ostermann/

Adriaan Moors | 1 Oct 18:00 2007
Picon

Re: Family Polymorphism in Scala

Hi Klaus,

Dependent method types are not yet enabled by default as they're not  
fully implemented yet. Your example works when supplying - 
Xexperimental on the command line, though.

regards,
adriaan

PS: you can encode support for dependent method types as follows (see  
also https://lampsvn.epfl.ch/trac/scala/ticket/102):

  trait Foo {
    type Arg
    type Prod
    def makeProd(a : Arg): Prod
  }

  // simulate dependent method types
  case class buildProd[TFoo <: Foo](foo: TFoo) {
    def apply(a: foo.Arg): foo.Prod = foo.makeProd(a)
  }

  object main {
    val myFoo = new Foo{type Arg=Int; type Prod=(Int, Int); def  
makeProd(i: Int) = (i, i)}

    buildProd(myFoo)(1)
  }

On 01 Oct 2007, at 17:29, Klaus Ostermann wrote:

> abstract class A {
>   type B
>   def makeB() : B
> }
>
> class Test {
>   def foo(a: A) = {
>     a.makeB()
>   }
> }

Erik Engbrecht | 1 Oct 18:57 2007
Picon

Re: eclipse plugin hangs

I don't know.  It's hard to do anything (e.g., switch between windows)
when this happens.  The desktop becomes highly unresponsive.

Maybe it's a memory leak?  I don't think it's a problem with XP theading.
 
Sean,
I don't know what Amir was doing, so this could be very different, but I managed to write a really stupid, buggy program this weekend that made Eclipse completely unresponsive because it was trying to write a huge amount of output to the console.  It would have been nice to be able to click the "stop" button to kill the program rather than having to kill Eclipse.
 
I was using Linux so once the Eclipse window was hidden the system returned to normal (with Eclipse using ~96% of the CPU).  I think you're right about Windows threading.  When the Eclipse window was displayed CPU usage was mostly split between Eclipse and X.
 
Perhaps the plugin could limit how fast it tries to write to the console so the UI thread doesn't get bogged down and unresponsive?
 
Amir,
 
This is completely off-topic but...
 
A runnaway application shouldn't make an entire OS unusable, and a runaway non-ui thread should not make an application unusable.  So this happening indicates a serious problem with the task scheduler of the operating system.
 
I suggest trying Linux or other Unix-like operating system.
 
-Erik

 
On 10/1/07, Amir Michail <amichail <at> gmail.com> wrote:
On 10/1/07, sean.mcdirmid <at> epfl.ch < sean.mcdirmid <at> epfl.ch> wrote:
> In B4 it will. Is there anything showing up in the error log?
>

I don't know.  It's hard to do anything (e.g., switch between windows)
when this happens.  The desktop becomes highly unresponsive.

Maybe it's a memory leak?  I don't think it's a problem with XP theading.

Amir

> Strange that you have to reboot XP, especially since the
> type checking goes on in a non-UI background thread.
> Is threading in XP really that horrible?
>
> Sean
>
> Quoting Amir Michail <amichail <at> gmail.com>:
>
> > Hi,
> >
> > I'm getting hangs with the plugin that make Windows XP unusable to the
> > point of having to reboot.
> >
> > Perhaps the plugin could abort its operation if it is taking too long?
> >
> > Amir
> >
>
>



--
http://erikengbrecht.blogspot.com/

Gmane