BASE Meeting #5 minutes

0 views
Skip to first unread message

Dick Wall

unread,
Sep 10, 2008, 11:33:33 AM9/10/08
to Bay Area Scala Enthusiasts
Well, calling these minutes is a stretch, but here's what happened.

David Hall gave a great technical presentation on Scala MapReduce
using Hadoop. The result is a much more streamlined way of using
Hadoop from Scala than is possible with Java, but it still should be
familiar to Java users of Hadoop. An earlier version of SMR (which is
the name for the Scala MapReduce project) was actually build using
Actors, but when David switched to Hadoop he decided to keep it fairly
close to the Java API and just streamline and simplify it wherever
possible.

Some of the highlights from the talk were the explanations of
implicits and Manifests - the latter being a way to "cure" the
problems of type safe erasure in the Java implementation of generics.

Suggested for the next meeting (which will be on October 14th) is an
introduction to Actors, and David Hall and Jorge Ortiz volunteered to
put something together for this. I am also going to talk to the
Twitter engineers and see if they would be interested in talking about
Twitter using Scala, and if this can be worked out, it will take
priority.

We had strong attendance as well last night, with around 15 people (I
didn't count exactly, so that's a guess). It is good to see the
numbers going back up after vacation season.

Thanks

Dick

Raoul Duke

unread,
Sep 10, 2008, 12:47:17 PM9/10/08
to scala...@googlegroups.com
for those of us only able to watch from home, many thanks for the minutes!

Jorge Ortiz

unread,
Sep 10, 2008, 1:01:48 PM9/10/08
to scala...@googlegroups.com, David Hall
For those watching from home, David wrote a blog post about Scala
MapReduce that covers some of what he talked about last night:

http://scala-blogs.org/2008/09/scalable-language-and-scalable.html

He's also said he'll make his slides from the presentation available (soon?).

--j

David Hall

unread,
Sep 12, 2008, 7:46:19 PM9/12/08
to Bay Area Scala Enthusiasts
Sorry for the delay.

Uploaded to

http://groups.google.com/group/scala-base/web/smr.ppt?hl=en

more browsable:

http://groups.google.com/group/scala-base/files?hl=en

(I'm preparing to announce a release on the Scala mailing list, with
added support for "stages" of computation to checkpoint progress.)
-- David

Gregor N. Purdy Sr.

unread,
Sep 14, 2008, 12:36:33 PM9/14/08
to scala...@googlegroups.com
During the meeting I pointed out I'd had some trouble getting
implicits to
do what I wanted but the quick test during the session didn't have any
problem. I've extracted the idea into a simple test scenario.

First is the code for what I'd like to do. Second is the result of
throwing it
at scala 2.7.0 (final) and third is the result of throwing it at 2.7.2
RC1.

I'd like to be able to use foo.x = y and y = foo.x when x is a
property with
getter and setter methods taking an implicit for context.

----------

case class Context(val country : String) { }

class Foo {
var _x: String = "DEFAULT"
def x()(implicit context : Context) : String = _x
def x_=(value : String)(implicit context : Context) : Unit =
{ _x = value }
}

object Foo {
val foo = new Foo()
implicit val context : Context = Context("US")

def main(args: Array[String]) : Unit = {
foo.x = "Hello"
println(foo.x);
}

}

----------

If I change the two lines of code in main() to call the setter/getter
methods explicitly
then it works fine.

foo.x_=("Hello")
println(foo.x())

But, I want it to work as written above.

----------

$ scala
Welcome to Scala version 2.7.0-final (Java HotSpot(TM) Client VM, Java
1.5.0_13).
Type in expressions to have them evaluated.
Type :help for more information.

scala> case class Context(val country : String) { }
defined class Context

scala>

scala> class Foo {
| var _x: String = "DEFAULT"
| def x()(implicit context : Context) : String = _x
| def x_=(value : String)(implicit context : Context) :
Unit = { _x = value }
| }
defined class Foo

scala>

scala> object Foo {
| val foo = new Foo()
| implicit val context : Context = Context("US")
|
| def main(args: Array[String]) : Unit = {
| foo.x = "Hello"
| println(foo.x);
| }
|
| }
<console>:12: error: assignment to immutable value
foo.x = "Hello"
^

----------

$ scala
Welcome to Scala version 2.7.2.RC1 (Java HotSpot(TM) Client VM, Java
1.5.0_13).
Type in expressions to have them evaluated.
Type :help for more information.

scala> case class Context(val country : String) { }
defined class Context

scala>

scala> class Foo {
| var _x: String = "DEFAULT"
| def x()(implicit context : Context) : String = _x
| def x_=(value : String)(implicit context : Context) :
Unit = { _x = value }
| }
defined class Foo

scala>

scala> object Foo {
| val foo = new Foo()
| implicit val context : Context = Context("US")
|
| def main(args: Array[String]) : Unit = {
| foo.x = "Hello"
| println(foo.x);
| }
|
| }
<console>:12: error: reassignment to val
foo.x = "Hello"

Jorge Ortiz

unread,
Sep 15, 2008, 4:57:42 PM9/15/08
to scala...@googlegroups.com
If you remove the empty argument list on the getter then everything
works fine for me on 2.7.1

class Foo {
var _x: String = "DEFAULT"

def x(implicit context : Context) : String = _x


def x_=(value : String)(implicit context : Context) : Unit = { _x = value }
}

--j

Vlad Patryshev

unread,
Oct 6, 2008, 4:33:07 PM10/6/08
to scala...@googlegroups.com
Sorry, is there a meeting tomorrow?

Jorge Ortiz

unread,
Oct 6, 2008, 10:08:00 PM10/6/08
to scala...@googlegroups.com
Meetings are the second Tuesday of every month, so that would be next week, October 14.

--j
Reply all
Reply to author
Forward
0 new messages