Gabriel Riba | 1 Sep 2005 01:56
Picon

xmlrpc scala servlet

Hi!

I am developping Scala XmlRpc web services in order to make multilanguage
applications.

Server side, as a Tomcat servlet, is working well and passes the xmlrpc.com
validator (http://validator.xmlrpc.com)

By now it only implements the raw specification at
http://www.xmlrpc.com/spec plus the introspection methods.

There is an example app. package with a phpxmlrpc client test page.

Anybody interested will find it at http://scalextric.sourceforge.net

Salut!

Irina Rychkova | 1 Sep 2005 20:52
Picon
Picon
Favicon

Nondeterminism in scala


Hello,
I wonder if it is possible to simulate nondeterminism in scala? For instance
if I need the function that will return one of the possible outputs from the
given list or range. Like "choose" or "any" in other languages.

Thank you!

Irina

robert kuzelj | 1 Sep 2005 22:22
Picon

Re: getting started

maybe this could be put onto the website?

>>I'm trying to run version 1.0.2 of the Scala Eclipse plugin with
>>Eclipse 3.1, Scala 1.4.0.0 and JDK 1.5.  When I go to add a 'New
>>Object,' the wizard won't enable the 'finish' button.  Any idea why?
> 
> 
> I think this problem has been reported before on this mailing list. I
> include here the reply at that time.
> 
> ====================================================================
> 
> Related to your problem, it seems to be a CLASSPATH problem. I
> reproduced your problem and I inspected the log file of eclipse (under
> workspace/.metadata/.log) and it seemed the plugin could not find
> scala.ScalaObject. This is due to the fact that version 1.4 of scala
> changed the directory structure to become more *NIX standard, and the
> lib/ directory (containing scala.jar et al) is no more where it was.
> Therefore, if you have scala 1.3.x.x it should work, but if you have the
> latest scala 1.4, you should change your scala home location under
> "Window/Preferences"/Scala tab by appending "share/scala-1.4.0.0" your
> scala installation directory. The directory you pass there should
> contain a "lib/" sub-directory with all the jars. I also noticed that
> sometime this does not help unless Eclipse is restarted. 
> 
> ======================================================================
> 
> Hope this helps,

i does indeed. thanks.
(Continue reading)

Vincent Cremet | 2 Sep 2005 10:03
Picon
Picon
Favicon

Re: Nondeterminism in scala

On Thu, 1 Sep 2005, Irina Rychkova wrote:

>
> Hello,
> I wonder if it is possible to simulate nondeterminism in scala? For instance
> if I need the function that will return one of the possible outputs from the
> given list or range. Like "choose" or "any" in other languages.

There is no Scala function for choosing randomly an element in a list, but I
guess you can define it yourself easily by using the static Java method 
"java.lang.Math.random" of the standard Java library (remind that you can
use Java from Scala).

Cheers.

Vincent Cremet.

Irina Rychkova | 2 Sep 2005 12:02
Picon
Picon
Favicon

Working with the List

Hello!

I got the problem while applying contains method for the List object in
scala.

The Idea is the following:

Object o1 {
class Message (s: someObjectType, d: someObjectType, v: Any) {
Val source = s;
Val destination = d;
......
}

}

Object o2{
//creation of empty message list
var MessageList: List[SEAMelement.Message]=Nil; 
...

// S,S1,D are someObjectType ..

 Object o2_1{
//definition of message1
 var Input_ms = new o1.Message (S, D, "AnyVal" );
 ....
}
 Object o2_2{
//definition of message 2
(Continue reading)

Vincent Cremet | 2 Sep 2005 13:06
Picon
Picon
Favicon

Re: Working with the List

Hi Irina,

just use the list method "exists" instead of "contains".

:-)

Vincent.

On Fri, 2 Sep 2005, Irina Rychkova wrote:

> Hello!
>
> I got the problem while applying contains method for the List object in
> scala.
>
> The Idea is the following:
>
> Object o1 {
> class Message (s: someObjectType, d: someObjectType, v: Any) {
> Val source = s;
> Val destination = d;
> ......
> }
>
> }
>
> Object o2{
> //creation of empty message list
> var MessageList: List[SEAMelement.Message]=Nil;
> ...
(Continue reading)

Raoul Duke | 2 Sep 2005 20:59
Picon

F#?

Hello,

It looks like F# from Microsoft is progressing quite impressively:
http://tinyurl.com/cqmp5. Unfortunately, it has some scary license
(OK, it actually isn't that bad as licenses go) and of course only
targets .Net. But I think it is neat that there is some serious
competition in the land of
you-got-your-functional-programming-in-my-oop!

sincerely.

Raoul Duke | 2 Sep 2005 21:12
Picon

Re: F#?

( ah, please note that what seems to be a broken link is the fault of
Gmane - it is apparently forcing the sentance period to be part of the
url, so sad! http://tinyurl.com/cqmp5 )

On 9/2/05, Raoul Duke <raould <at> gmail.com> wrote:
> Hello,
> 
> It looks like F# from Microsoft is progressing quite impressively:
> http://tinyurl.com/cqmp5. Unfortunately, it has some scary license
> (OK, it actually isn't that bad as licenses go) and of course only
> targets .Net. But I think it is neat that there is some serious
> competition in the land of
> you-got-your-functional-programming-in-my-oop!
> 
> sincerely.
>

Gabriel Riba | 7 Sep 2005 22:07
Picon

Iterator.range with negative step and ...

Hi!

this example does nothing silently:

def visit_downwards( arr: Array[ Sometype]) = {
     for( val ind <- Iterator.range( arr.length, 0, -1) {
          doSomething( arr( ind -1)) ;
     }
}

Trying to use Iterator.range for decreasing series gives you unexpected
results, until you discover that by design only works for increasing series.

It would help to get an Exception when step is negative for people to find
it out sooner.

Or better, implement it for negative steps too.

-----------------------------------------

Another non-bug

val ch = '0' ;

using  ch.isDigit  gives a compile error:
isDigit is not member of class Char

unlike the Scala Reference states in 12.2.6

------------------------------------------
(Continue reading)

Martin Odersky | 9 Sep 2005 16:11
Picon
Picon
Favicon

Re: Iterator.range with negative step and ...

Gabriel Riba wrote:
> Hi!
> 
> this example does nothing silently:
> 
> def visit_downwards( arr: Array[ Sometype]) = {
>      for( val ind <- Iterator.range( arr.length, 0, -1) {
>           doSomething( arr( ind -1)) ;
>      }
> }
> 
> Trying to use Iterator.range for decreasing series gives you unexpected
> results, until you discover that by design only works for increasing series.
> 
> It would help to get an Exception when step is negative for people to find
> it out sooner.
> 
> Or better, implement it for negative steps too.
> 
Good point. I fixed this so that it works for negative steps also. It 
will be rolled into the next release.

> One thing I long is a constructor for maps similar to the List( a, b, c)
> 
> as Map( Pair(key, value), Pair(k2,v2), ...)
> 
> or better  Map( k1 -> v1, k2 -> v2, ...)
> 
In fact, something like this exists for immutable maps, where you can 
write code like this:
(Continue reading)


Gmane