A blog about the development and usage of GarlicSim, the open-source Pythonic framework for computer simulations.
Written by Ram Rachum, developer of GarlicSim.

GarlicSim Website

Twitter

GitHub Repository

Ram's Personal Website

17th May 2010

Text

Sphinx, `start_simpack`, tutorials, py2exe, architecture…

Working hard on GarlicSim 0.5. My official deadline: July 1st 2010.

I started using Sphinx for the documentation— It’s about time. I made a two-part tutorial. It’s completely written, but I won’t be releasing it until the 0.5 release. I’d want to make sure it’s working when I finish my changes and release.

It’s hard to remember all the things I’ve been doing. But I’ll try:

  • A start_simpack.py script, that creates a skeleton for a new simpack. Similar to Django’s startproject or startapp.
  • Lots of GUI improvements to garlicsim_wx. Menus, keyboard bindings, etc.
  • Changes to simpack architecture: Now every simpack needs to define its own State class, and step should be a method of it. I think it’s nicer.
  • I split the simpacks that were bundled into garlicsim to a new separate package, garlicsim_lib. I think this is a better idea than having them together with the core logic.
  • And of course, a whole lot of little fixes and improvements.

But the most profound change of all was something that I really didn’t foresee that I’ll be doing for this release. I added an ability to end the simulation from the step function. You can now raise an exception called EndWorld in your step function, and garlicsim will just mark that timeline as finished, and won’t try to crunch there any more.

It was a bit tricky to make a good architecture for the concept of an “end of the world”. My first attempt seemed to be good, but then I did the tutorial simpack and there was something wrong with it, and I had to rethink and redo that architecture. The way I did it now seems to work. I hope it will not cause any problems in the future…

I’m off to sleep now, good night!

(Update: This is an old blog post; Go here to get started with the current version of GarlicSim.)

Comments
All content in this website is copyright © 1986-2011 Ram Rachum.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License, with attribution to "Ram Rachum at ram.rachum.com" including link to ram.rachum.com.
To view a copy of this license, visit: http://creativecommons.org/licenses/by-sa/3.0/