somebody (with free time) should transliterate to CAL for fun and PR

6 views
Skip to first unread message

Raoul Duke

unread,
Jun 30, 2010, 7:47:40 PM6/30/10
to CAL Language Discussion
http://www.fatvat.co.uk/2010/06/orbit-simulator-in-haskell.html
since it came by way of Clojure ha ha oy veh.

Luke

unread,
Jul 13, 2010, 3:14:29 PM7/13/10
to CAL Language Discussion
OK Raoul...

Here's a CAL equivalent:
http://files.me.com/luke_e/conp69

I haven't spent any time really validating it, and there's no
visualisation... perhaps you can add that ;-)

It seems to pass quick check, i.e. in ICE (logged into the
OrbitSim.Orbit_Tests module):
quickCheck prop_EnergyConserved
passes.

The link above unzips to a full Eclipse project, so if you have the
Eclipse plug-in installed, you can just import the project.
Otherwise, just check out the two .cal files in the source and test
trees therein.
If you are using Eclipse, but haven't created an ICE run configuration
before, it's easy to do this:
* Make a new Run Configuration with org.openquark.cal.ICE as the main
class in the project "Quark_Binaries" (or whatever your quark binaries
project is called)
* Set the run configuration's VM arguments like this:
-Xms256m -Xmx1024m
-Dorg.openquark.cal.workspace.spec="StandardVault orbitsimTests.cws"
-Dorg.openquark.cal.ice.module=OrbitSim.Orbit_Tests

* Add the OrbitSim project to the run configuration's Classpath (User
Entries). Turn off the "add exported" and "add required" checkboxes
when you do this.

When you run this configuration, you should see ICE pop up in the
console. It will compile the code first time through, and should then
present the ICE prompt, logged to the "OrbitSim.Orbit_Tests" module.
Enter "quickCheck prop_EnergyConserved" and see if it passes for you!

Raoul Duke

unread,
Jul 13, 2010, 4:33:16 PM7/13/10
to cal_la...@googlegroups.com
On Tue, Jul 13, 2010 at 12:14 PM, Luke <luke....@gmail.com> wrote:
> Here's a CAL equivalent:
> http://files.me.com/luke_e/conp69

wow! you must blog this ;-)

Luke

unread,
Jul 13, 2010, 8:01:20 PM7/13/10
to CAL Language Discussion
Feel free to claim the 'scoop' yourself :-)

I'm not actively blogging at the moment - I'm a bit on-again off-again
blog-wise. Tend to strike up when I have a series of stuff to talk
about.
There's some exciting CAL related stuff coming down the pipe, but it's
not quite baked yet. That might be occasion enough for my next orgy
of blogging.


On Jul 13, 1:33 pm, Raoul Duke <rao...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages