Release: 0.11.3 - Many bug fixes, Scala language support

1 view
Skip to first unread message

David Brackeen

unread,
May 4, 2008, 4:34:10 PM5/4/08
to PulpCore
As always, links to downloads and change log:
http://code.google.com/p/pulpcore/downloads/list
http://pulpcore.googlecode.com/svn/trunk/CHANGES

This release contains many bug fixes. Thanks to everyone for
submitting bugs, and special thanks to shawn_t who has really put
PulpCore though the paces in the last few weeks.

So, I was initially wary of adding extra language support because the
libraries are so huge. But Tom Palmer submitted a 4K game using Scala
to the Java4K contest:
http://java4k.com/index.php?action=games&method=view&gid=187
After using ProGuard, the huge 3MB+ Scala library gets whittled away
to virtually nothing, and his game was under 4K.

Scala is an awesome language, and its implicit defs and operator
overloading allow for some nice syntax for PulpCore's properties.
Compare Java:
if (sprite.x.get() == 5) {
sprite.x.set(sprite.x.get() + 115);
sprite.x.animateTo(5, 1000, Easing.NONE, 1000)
}

And Scala:
if (sprite.x == 5) {
sprite.x += 115
sprite.x -> (5 dur 1000 delay 1000)
}

Much better, isn't it? The current Scala support could use more work,
but the current example (in temples/scala) is a good starting point.
For those who want to try it.
Enjoy!


David Brackeen

unread,
May 4, 2008, 5:53:52 PM5/4/08
to PulpCore
Oops, I accidently uploaded a version that printed pointless logging
statements to the console. It's fixed now. If you're one of the three
people that downloaded it, please download again. (The SHA1 Checksum
of the correct file is 4ffcf0bfc72ae3b357e53293ed211cc225cb59de)

On May 4, 1:34 pm, David Brackeen <brack...@gmail.com> wrote:
> As always, links to downloads and change log:http://code.google.com/p/pulpcore/downloads/listhttp://pulpcore.googlecode.com/svn/trunk/CHANGES

Bruno Garcia

unread,
May 5, 2008, 1:56:59 AM5/5/08
to PulpCore
Oh, wow! I've been looking at Scala and was actually going to come on
Jabber to bug you about it, you read my mind! Once again, your work on
Pulpcore is much appreciated.

*rewrites game in Scala*

On May 4, 8:34 pm, David Brackeen <brack...@gmail.com> wrote:
> As always, links to downloads and change log:http://code.google.com/p/pulpcore/downloads/listhttp://pulpcore.googlecode.com/svn/trunk/CHANGES

Andres Quijano

unread,
May 5, 2008, 7:38:30 AM5/5/08
to pulp...@googlegroups.com
how serious is the performance hit using Scala?

David Brackeen

unread,
May 5, 2008, 2:26:21 PM5/5/08
to pulp...@googlegroups.com
Scala is quite fast. See: http://dmy999.com/article/26/scala-vs-groovy-static-typing-is-key-to-performance
Besides static typing, Scala also uses Java's primitive types where it can (you don't have to choose between int and Integer - there's just Int, and the Scala compiler chooses for you). 

Groovy 1.6 is supposed to make large performance gains, but it I'm not sure could only be used with ProGuard because it relies on reflection, and from what I've read online Groovy does stuff under-the-hood that would require an applet to be signed.

Jonathan Chung

unread,
May 5, 2008, 10:17:20 PM5/5/08
to PulpCore
I'm currently using a combination of Java and Janino to create a Java-
like "scripting" language. I shied away from Scala because of the
distribution size but would reconsider it if it is indeed as small as
you say. How much is "virtually nothing?"

David Brackeen

unread,
May 5, 2008, 11:20:15 PM5/5/08
to pulp...@googlegroups.com
Runtime evaluation of Scala (interpreting) is a different story - I think you'll need the entire library for that. Or most of it.

The compiled Scala version of PulpCore's HelloWorld is about 3K bigger. It does use more of PulpCore, and of course it will be bigger the more stuff from Scala's library you use.
Reply all
Reply to author
Forward
0 new messages