Golly 2.1 release candidates
- Andrew
- Moderator
- Posts: 1039
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Golly 2.1 release candidates
Release candidates for Golly 2.1 are available for testing:
http://www.trevorrow.com/golly/golly-2.1-win.zip (Windows)
http://www.trevorrow.com/golly/golly-2.1-mac.zip (Mac OS 10.4+, Universal)
http://www.trevorrow.com/golly/golly-2.1-gtk.tar.gz (Linux)
Please report any problems here, or to the golly-test mailing list:
https://lists.sourceforge.net/lists/listinfo/golly-test
If no major problems are reported then I hope to upload these builds to sourceforge in about a week.
See Help > Changes for a list of all the changes in this version. Here's a summary of the more important changes:
- Golly can download patterns, rules and scripts -- see Help > Online Archives.
- Zip files can be opened and processed as described at the bottom of Help > File Formats.
- Translucent buttons for speed/scale/scroll functions now appear in a corner of the viewport.
- Layer bar buttons now show each layer's name rather than its numeric position.
- All Python scripts now need to explicitly import the golly module.
- The open command can now be used to run a given Perl/Python script.
- New scripting commands: opendialog, savedialog, getclipstr, setclipstr, getdir, setdir.
- The appdir and datadir commands are deprecated; use the new getdir command.
- The color of dead cells (state 0) is now handled like all other states
- Golly restores a layer's default colors whenever you create a new pattern or load a pattern.
- The base step can now be changed temporarily via the new Set Base Step dialog in the Control menu.
- Paste now supports "And" mode.
- Menu items can show single-character keyboard shortcuts.
- Fixed a bug with Random Fill (Golly wasn't initializing the seed!).
- Fixed a bug that prevented the getkey command from returning uppercase letters.
Have fun!
Andrew (on behalf of the Golly Gang)
http://www.trevorrow.com/golly/golly-2.1-win.zip (Windows)
http://www.trevorrow.com/golly/golly-2.1-mac.zip (Mac OS 10.4+, Universal)
http://www.trevorrow.com/golly/golly-2.1-gtk.tar.gz (Linux)
Please report any problems here, or to the golly-test mailing list:
https://lists.sourceforge.net/lists/listinfo/golly-test
If no major problems are reported then I hope to upload these builds to sourceforge in about a week.
See Help > Changes for a list of all the changes in this version. Here's a summary of the more important changes:
- Golly can download patterns, rules and scripts -- see Help > Online Archives.
- Zip files can be opened and processed as described at the bottom of Help > File Formats.
- Translucent buttons for speed/scale/scroll functions now appear in a corner of the viewport.
- Layer bar buttons now show each layer's name rather than its numeric position.
- All Python scripts now need to explicitly import the golly module.
- The open command can now be used to run a given Perl/Python script.
- New scripting commands: opendialog, savedialog, getclipstr, setclipstr, getdir, setdir.
- The appdir and datadir commands are deprecated; use the new getdir command.
- The color of dead cells (state 0) is now handled like all other states
- Golly restores a layer's default colors whenever you create a new pattern or load a pattern.
- The base step can now be changed temporarily via the new Set Base Step dialog in the Control menu.
- Paste now supports "And" mode.
- Menu items can show single-character keyboard shortcuts.
- Fixed a bug with Random Fill (Golly wasn't initializing the seed!).
- Fixed a bug that prevented the getkey command from returning uppercase letters.
Have fun!
Andrew (on behalf of the Golly Gang)
Re: Golly 2.1 release candidates
Will Golly ever be able to run patterns in a toroidal or cylindrical universe (or can it already)?
-Matthias Merzenich
- Nathaniel
- Site Admin
- Posts: 905
- Joined: December 10th, 2008, 3:48 pm
- Location: New Brunswick, Canada
- Contact:
Re: Golly 2.1 release candidates
It can sort of do toruses right now, but only via scripting (and that Python script could easily be modified for a cylindrical universe). In Golly 2.1 go to Help -> Online Archives -> Golly Scripts Database and select "torus.py". It uses the current selection as the torus.Sokwe wrote:Will Golly ever be able to run patterns in a toroidal or cylindrical universe (or can it already)?
Re: Golly 2.1 release candidates
I assumed it could be accomplished with scripting, but a more direct implementation might be faster (is this true?).
-Matthias Merzenich
- Nathaniel
- Site Admin
- Posts: 905
- Joined: December 10th, 2008, 3:48 pm
- Location: New Brunswick, Canada
- Contact:
Re: Golly 2.1 release candidates
Almost certainly.Sokwe wrote:I assumed it could be accomplished with scripting, but a more direct implementation might be faster (is this true?).
- Andrew
- Moderator
- Posts: 1039
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Re: Golly 2.1 release candidates
Yes, a lot faster. Support for toroidal universes is very high on my wish list, so there's a good chance it will make it into version 2.2. I have a piece of paper sitting on my desk with various scribbled notes and diagrams describing what needs to be done, so it's "just" a matter of finding the time.Sokwe wrote:I assumed it could be accomplished with scripting, but a more direct implementation might be faster (is this true?).
Note that torus.py can be sped up by not updating the viewport every gen. Below is an improved version that only does an update depending on the current step size (which you can change using the usual keyboard shortcuts). It also replaces the somewhat dangerous "for i in range(0,gens)" with "for i in xrange(gens)" -- the latter won't allocate huge amounts of memory if the user types in a very large gen number. (Nathaniel, I'll upload this improved version to the scripts database soon.)
Code: Select all
# A script that emulates Life on a toroidal universe, rather than the infinite
# planar universe that is the default in Golly.
# Author: Nathaniel Johnston (nathaniel@nathanieljohnston.com), June 2009.
# The torus used is whatever the current selection in Golly is.
# The user may enter the number of generations that they would like
# the pattern to evolve for.
import golly as g
from glife import validint
# --------------------------------------------------------------------
def run_torus(gens):
for i in xrange(gens):
top_cells = g.getcells([cur_sel[0],cur_sel[1],cur_sel[2],1])
bot_cells = g.getcells([cur_sel[0],cur_sel[1]+cur_sel[3]-1,cur_sel[2],1])
lef_cells = g.getcells([cur_sel[0],cur_sel[1],1,cur_sel[3]])
rig_cells = g.getcells([cur_sel[0]+cur_sel[2]-1,cur_sel[1],1,cur_sel[3]])
g.putcells(top_cells, 0, cur_sel[3])
g.putcells(bot_cells, 0, -cur_sel[3])
g.putcells(lef_cells, cur_sel[2], 0)
g.putcells(rig_cells, -cur_sel[2], 0)
g.setcell(cur_sel[0]-1, cur_sel[1]-1, g.getcell(cur_sel[0]+cur_sel[2]-1,cur_sel[1]+cur_sel[3]-1))
g.setcell(cur_sel[0]+cur_sel[2], cur_sel[1]-1, g.getcell(cur_sel[0],cur_sel[1]+cur_sel[3]-1))
g.setcell(cur_sel[0]-1, cur_sel[1]+cur_sel[3], g.getcell(cur_sel[0]+cur_sel[2]-1,cur_sel[1]))
g.setcell(cur_sel[0]+cur_sel[2], cur_sel[1]+cur_sel[3], g.getcell(cur_sel[0],cur_sel[1]))
g.run(1)
g.clear(1)
g.dokey(g.getkey()) # allow keyboard interaction
exp = g.getstep()
if exp < 0: exp = 0 # ignore delay
currstep = g.getbase()**exp
if int(g.getgen()) % currstep == 0:
g.update()
cur_sel = g.getselrect()
if len(cur_sel) == 0: g.exit("Please make a selection.")
s = g.getstring("Enter the number of generations to run for:","", "Toroidal evolution")
if not validint(s):
g.exit('Bad number: %s' % s)
g.show('Processing...')
run_torus(int(s))
g.show('Finished.')
- Andrew
- Moderator
- Posts: 1039
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Re: Golly 2.1 release candidates
Golly 2.1 is now available from sourceforge:
https://sourceforge.net/projects/golly/files/
No change were made to the builds on my site.
https://sourceforge.net/projects/golly/files/
No change were made to the builds on my site.
Re: Golly 2.1 release candidates
I guess I should upgrade from Golly 1.2, then.
Actually, I think it's time for me to get a whole new Linux distro. This one (Mepis) came from a CD-ROM in a library book, about 5 years ago (and I couldn't upgrade it, as I had a Windows-only modem
).
Actually, I think it's time for me to get a whole new Linux distro. This one (Mepis) came from a CD-ROM in a library book, about 5 years ago (and I couldn't upgrade it, as I had a Windows-only modem
Re: Golly 2.1 release candidates
Hi,Andrew wrote:Golly 2.1 is now available from sourceforge:
https://sourceforge.net/projects/golly/files/
No change were made to the builds on my site.
Could we please get a fix for python on 64 bit platforms into golly for 2.2? To work with 64 bits I need to apply the
following diff. This is not a portable fix. I do not know cpp well enough to suggest a generic version...
With the fix below I am able to run the soup scripts using golly 2.1.
Thanks
Ed
--- ../a/golly-2.1-src/wxpython.cpp 2009-09-03 20:19:47.000000000 -0400
+++ wxpython.cpp 2009-10-02 20:13:38.510491339 -0400
@@ -106,7 +106,7 @@
{
// startup/shutdown
void(*G_Py_Initialize)(void) = NULL;
- PyObject*(*G_Py_InitModule4)(char*, struct PyMethodDef*, char*, PyObject*, int) = NULL;
+ PyObject*(*G_Py_InitModule4_64)(char*, struct PyMethodDef*, char*, PyObject*, int) = NULL;
void(*G_Py_Finalize)(void) = NULL;
// errors
@@ -145,7 +145,7 @@
// redefine the Py* functions to their equivalent G_* wrappers
#define Py_Initialize G_Py_Initialize
-#define Py_InitModule4 G_Py_InitModule4
+#define Py_InitModule4_64 G_Py_InitModule4_64
#define Py_Finalize G_Py_Finalize
#define PyErr_Occurred G_PyErr_Occurred
#define PyErr_SetString G_PyErr_SetString
@@ -185,7 +185,7 @@
} pythonFuncs[] =
{
PYTHON_FUNC(Py_Initialize)
- PYTHON_FUNC(Py_InitModule4)
+ PYTHON_FUNC(Py_InitModule4_64)
PYTHON_FUNC(Py_Finalize)
PYTHON_FUNC(PyErr_Occurred)
PYTHON_FUNC(PyErr_SetString)
- Andrew
- Moderator
- Posts: 1039
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Re: Golly 2.1 release candidates
Sure! Thanks for the patches -- I'll include them soon (with appropriate guards to allow for 32-bit or 64-bit compilation).ddt wrote:Could we please get a fix for python on 64 bit platforms into golly for 2.2?
Just curious, but which version of Python do you have installed?
Edit: Ignore that question -- I just saw in an earlier post that you have 2.6.2.
Re: Golly 2.1 release candidates
I just wanted to say, I think the Golly Ticker is freaking sweet!
Re: Golly 2.1 release candidates
I really like Golly.
Is there a way to rotate a selection 90 deg?
Is there a way to rotate a selection 90 deg?
- Nathaniel
- Site Admin
- Posts: 905
- Joined: December 10th, 2008, 3:48 pm
- Location: New Brunswick, Canada
- Contact:
Re: Golly 2.1 release candidates
Select the region then go to Edit -> Rotate Clockwise/Anticlockwise.Eylrid wrote:Is there a way to rotate a selection 90 deg?
Re: Golly 2.1 release candidates
Thank you!