CoffeeScript has classes, which use the most canonical JS OOP stunts, tho
many sneer at the non-prototypal approach to programming.  Basic classes
are exactly the method==MyClass.prototype.method approach done in usual
prototypal inheritance.  Extended classes are simply a stack of prototypes,
from the base class at the bottom to the instance variables on the top.

AS uses all three module patterns:
- util.coffee is your basic set of utilities inside an object, thus the
functions can call each other via "this".
- shapes.coffee uses the "module" pattern, with a closure returning an
object with the exported procedures
- agentset, agentsets, and model.coffee all use CS classes

Check out coffeescript.org.

   -- Owen


On Wed, May 8, 2013 at 4:48 PM, Jochen Fromm <[email protected]> wrote:

> Looks good! Ants and boids, as usual. How did you solve the OOP-JS
> problem? Javascript is not really an object-oriented language, which would
> be useful to model agents.
>
> -J.
>
>
> Sent from Android
>
>
>
> -------- Original message --------
> From: Owen Densmore <[email protected]>
> Date:
> To: Jochen Fromm <[email protected]>,The Friday Morning Applied
> Complexity Coffee Group <[email protected]>
> Subject: Re: [FRIAM] AgentScript
>
>
> Its a very light weight NetLogo core written in CoffeeScript, coming in at
> under 1K lines of code, and using "literate programming" that's a
> coffeescript option.  By core, I mean it has just the model w/o UI due to
> our embedding into many other systems.
>
> Here's the github repo: https://github.com/backspaces/agentscript
>
> The demo models should run right on github.
>
> The wiki explains the approach we're taking.
>
> The docs are a bit ragged due to some quick commits, but the plan is to
> have the last code complete within the week, with docs matching
> shortly thereafter.
>
>    -- Owen
>
>
> On Wed, May 8, 2013 at 11:59 AM, Jochen Fromm <[email protected]> wrote:
>
>> What is AgentScript? A kind of NetLogo in Javascript, jQuery, or
>> CoffeeScript ? Sounds interesting.
>>
>> -J.
>>
>>
>> Sent from Android
>>
>>
>>
>> -------- Original message --------
>> From: Owen Densmore <[email protected]>
>> Date:
>> To: Complexity Coffee Group <[email protected]>
>> Subject: [FRIAM] Fwd: jashkenas/journo ยท GitHub
>>
>>
>> I realize our recent discussions have been away from tech, but this is an
>> interesting blend, so its here rather than wedtech.
>>
>> First of all, I decided that the bloat of current CMSs was ugly so wanted
>> a clean, easily programmable blog engine.  Jeremy Ashkenas was of like mind
>> and being one of the JS heros, he decided to write a blog engine, Journo,
>> in <500 lines of coffeescript.
>>
>> https://github.com/jashkenas/journo
>>
>> Why is this interesting?
>> - Culturally, he has so embraced Don Knuth's Literate Programming idea,
>> that I bet most folks looking at the url above didn't notice that it is the
>> actual program for Journo.  Seriously, it reads like a "readme" for a
>> project.  Nope.  It IS the project!
>> - Jeremy is serious about a whole new way of programming.  And even in
>> the open source world, he's found a way to monazite his work: he does code
>> reading for a fee.  We've made contact with him and are going to have
>> AgentScript reviewed by him for $2.5K.
>> - Most blogs/CMSs have become such bloatware that even the sophisticated
>> user/programmer cannot manage it or modify it.  It is not "theirs".
>>  Indeed, the configuration tasks overwhelm the actual program.
>> - 500 lines of code.  And the assumption you can read it, understand it,
>> and modify it.
>> - BTW: the 1.0 release of agentscript is coming in at just a bit over 900
>> lines of code and it really does provide a NetLogo equivalent system.
>> - This is a, dare I say it, paradigm shift.  Woo Woo!  But really, Jeremy
>> has entered a new era where you can code anything from your mainframe to
>> your watch with the same infrastructure.
>>
>> So when you can't really distinguish between your documentation and your
>> code .. maybe this is a Good Thing?
>>
>> Anyway, Back to our regularly scheduled programming.  Hmmm...
>>
>>    -- Owen
>>
>>
>> ============================================================
>> FRIAM Applied Complexity Group listserv
>> Meets Fridays 9a-11:30 at cafe at St. John's College
>> to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
>>
>
>
============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com

Reply via email to