I actually just pulled out a port of the Flocker's demo that is present in the ScalaOnMason repo. The SugarScape portion of the code was written as part of an experiment with family polymophisim in agent-based modeling. I ran a bit short of time and ended up taking some (ugly) expedient hacks, so it may not be the best example. 

Coincidentally, your previous email and a fellow GMU student convinced me to write a tutorial demonstrating how to use MASON from Scala. I started this morning. The repository with run instructions are currently online at: Presently, I'll be doing some refactoring to make it more idiomatic Scala. (My code is not idiomatic.) The more expository tutorial will be online later this week, coinciding with the refactored code. (I'll send an email to this list, assuming Sean has no problem with that.) I figure Boid's is equally well-known, but easier to grok as a tutorial.

On Sun, Feb 12, 2012 at 4:22 PM, Chris Hollander <[log in to unmask]> wrote:
My source isn't online yet, no. I'm sure it will be at some point, but
we're still doing pretty heavy work on the software. Part of the
reason I haven't paid too much care to the inspector issue is because
I don't actually run my sim with the GUI unless I want to see
something specifically related to the spatial patterns. Normally I
just do straight data dumps for multiple replications and then look at
everything in R or python as part of the analysis.

I think I will tell some of the newer people here to look at your code
though, it might make it easier for them to pick up scala since
Sugarscape is sort of the base-level agent-based model that everybody
in my lab is familiar with.

On Sat, Feb 11, 2012 at 7:44 PM, John Nelson <[log in to unmask]> wrote:
> Chris. Is your source online? I do 95% of my work in Scala these days and
> have not had trouble with the inspectors.
> When I first started playing with MASON, I did so exclusively through Scala
> with the MASON jars in the lib directory of a sbt project.
> See: for my first attempt with Scala and
> Mason. (It was tried, put online for some friends to read, and never really
> updated.)
> As a lot of people have said, (most visibly
> Yammer:, Scala can be
> unexpectedly and painfully slow in some places. For an agent-based modeling
> library, I would think you really do have to pay close attention. From (my)
> perspective as a library user, I care way less about efficiency than
> readability, in my code anyway.
> On Sat, Feb 11, 2012 at 7:36 PM, Chris Hollander <[log in to unmask]>
> wrote:
>> I noticed the Scala code too, Sean. I've been using it a lot with
>> MASON lately. The sim I'm working on right now is actually coded in
>> 100% scala, linked to the MASON jar, and built in maven. It makes
>> things a lot easier to work with, even if it is a little slower than
>> pure java in some places.
>> The only hitch I've hit using scala with MASON is that my inspectors
>> don't want to work properly when I go to look at an individual agent,
>> but honestly I haven't care enough to really try and figure out why...
>> On Sat, Feb 11, 2012 at 7:26 PM, Sean Luke <[log in to unmask]> wrote:
>> > Full GPL?  Wouldn't that prohibit people from distributing models
>> > without source?  [hmmm, maybe it's not possible to do so...]
>> >
>> > Anyway, congratulations Seth.  Also I note a bunch of Scala in the
>> > NetLogo source.  How long have you guys been embedding Scala in the system?
>> >
>> > Sean
>> >
>> > On Feb 11, 2012, at 2:13 PM, Seth Tisue wrote:
>> >
>> >> Sean> Wait, NetLogo's gone fully open source?  When did this happen,
>> >> Sean> Seth?
>> >>
>> >> Yes, GPL license since October.  (MASON and other toolkits being open
>> >> source already was helpful for this, so, thank you.)
>> >>
>> >> --
>> >> Seth Tisue | Northwestern University |
>> >> lead developer, NetLogo: