ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

apgsearch and Python 3.x

For scripts to aid with computation or simulation in cellular automata.

apgsearch and Python 3.x

Postby Hdjensofjfnen » July 15th, 2018, 1:53 pm

Does anybody know how to format apgsearch so it runs with Python 3.x?
Life is hard. Deal with it.
This is my new favorite spaceship:
x = 8, y = 4, rule = B3-ek/S023
bobo$2obo3bo$bobo$3bo!
User avatar
Hdjensofjfnen
 
Posts: 629
Joined: March 15th, 2016, 6:41 pm
Location: (394234, -234231)

Re: apgsearch and Python 3.x

Postby dvgrn » July 15th, 2018, 6:05 pm

Hdjensofjfnen wrote:Does anybody know how to format apgsearch so it runs with Python 3.x?

Google can tell you most of the important stuff. However, it won't do you a whole lot of good, because apgsearch relies on Golly to do its Life-universe simulations for it, and Golly currently supports Python 2.x only.

Python 2.x is still being used by about a quarter of Python programmers, almost ten years after the first usable Python 3.x came out. I'm not sure when or if it will become a priority for the Golly Gang to make the jump to 3.x. In theory we'd like to see as many scripting tasks move to Lua as possible, since that will Just Work with no need for additional confusing Python installs.

But in practice, many of the more complex tasks that one might want to write a script for... are much easier to do in Python, because there are so many more libraries available. The old Python apgsearch is a case in point. I've ported a number of scripts from Python to Lua, and for simple scripts it's really fairly easy -- but I haven't been remotely tempted to try a Lua port of apgsearch.
User avatar
dvgrn
Moderator
 
Posts: 4907
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: apgsearch and Python 3.x

Postby AforAmpere » July 15th, 2018, 6:12 pm

If Python 3.x does get support, can we please keep support for 2.x? It would make it so that most Golly scripts would not require changing. Then, everyone has support, the 2.x people, and the 3.x people.
Things to work on:
- Find a (7,1)c/8 ship in a Non-totalistic rule (someone please search the rules)
- Find a C/10 in JustFriends
- Find a C/10 in Day and Night
AforAmpere
 
Posts: 750
Joined: July 1st, 2016, 3:58 pm

Re: apgsearch and Python 3.x

Postby dvgrn » July 15th, 2018, 7:05 pm

AforAmpere wrote:If Python 3.x does get support, can we please keep support for 2.x? It would make it so that most Golly scripts would not require changing. Then, everyone has support, the 2.x people, and the 3.x people.

That does sound nice in theory, but it also sounds like something of a nightmare in practice. How exactly would Golly know whether a script currently being run is supposed to be a Python 2.x script or a Python 3.x script? To make both types of scripts work, presumably everyone would have to install Golly, Python 2.7.x, and Python 3.x. This can be done, but I've run into some mysterious problems now and then that seem to be due to competing Python installs... anyway, it just seems like one install too many.

Now, I'm not likely to be doing any Golly upgrades to Python 3.x myself, so I probably shouldn't talk.

However, it seems likely to me that after said hypothetical upgrade, people who want to use Python 2.x scripts can just keep an older version of Golly around, instead of downloading the latest and greatest Golly.

We already have people writing scripts that work equally well in Python 2.7.x and Python 3.x. And I suspect many of the simpler Golly scripts that have been written to date can be automatically converted from 2.x to 3.x with few or no ill effects -- Golly could probably include the conversion script for a while, or pop up a message suggesting that it be tried.
User avatar
dvgrn
Moderator
 
Posts: 4907
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: apgsearch and Python 3.x

Postby 77topaz » July 15th, 2018, 8:29 pm

I'm a bit confused by this thread, because the latest version of apgsearch is already compatible with Python 3.x, without needing any further modifications. In fact, calcyman's comments in the link suggest it should be compatible with both 3.x and 2.x.
User avatar
77topaz
 
Posts: 859
Joined: January 12th, 2018, 9:19 pm

Re: apgsearch and Python 3.x

Postby dvgrn » July 15th, 2018, 8:54 pm

77topaz wrote:I'm a bit confused by this thread, because the latest version of apgsearch is already compatible with Python 3.x, without needing any further modifications. In fact, calcyman's comments in the link suggest it should be compatible with both 3.x and 2.x.

The way the question made sense to me was if Hdjensofjfnen wanted to run the old Python-script version of apgsearch, but with a computer that only had Python 3.x installed. If we're talking apgsearch 4.x, then your answer is much better.
User avatar
dvgrn
Moderator
 
Posts: 4907
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: apgsearch and Python 3.x

Postby Hooloovoo » July 16th, 2018, 12:43 am

dvgrn wrote:Python 2.x is still being used by about a quarter of Python programmers, almost ten years after the first usable Python 3.x came out. I'm not sure when or if it will become a priority for the Golly Gang to make the jump to 3.x.

Python 2.7 support will cease before 2020 as specified in PEP 0373.
It will become a priority in the next year and a half to add Python 3 support to Golly. Sooner seems better than later, to give time for scripts to be ported.
Hooloovoo
 
Posts: 21
Joined: July 11th, 2015, 8:59 pm

Re: apgsearch and Python 3.x

Postby Apple Bottom » July 16th, 2018, 4:15 am

77topaz wrote:I'm a bit confused by this thread, because the latest version of apgsearch is already compatible with Python 3.x, without needing any further modifications. In fact, calcyman's comments in the link suggest it should be compatible with both 3.x and 2.x.


Mind, that refers to the Python parts of apgluxe (apgsearch 4.x) and lifelib, not the pure-Python apgsearch running in Golly.

Given that apgsearch 4.x exists, though, what use case is there left for the 1.x series?
User avatar
Apple Bottom
 
Posts: 978
Joined: July 27th, 2015, 2:06 pm

Re: apgsearch and Python 3.x

Postby Hdjensofjfnen » July 16th, 2018, 9:00 pm

Apple Bottom wrote:Given that apgsearch 4.x exists, though, what use case is there left for the 1.x series?


I really despise the idea of downloading C++ just so apgsearch can run. C++ is such an unreadable and confusing language that it's really almost impossible to work with. :?
Life is hard. Deal with it.
This is my new favorite spaceship:
x = 8, y = 4, rule = B3-ek/S023
bobo$2obo3bo$bobo$3bo!
User avatar
Hdjensofjfnen
 
Posts: 629
Joined: March 15th, 2016, 6:41 pm
Location: (394234, -234231)

Re: apgsearch and Python 3.x

Postby Apple Bottom » July 17th, 2018, 3:46 am

Hdjensofjfnen wrote:I really despise the idea of downloading C++ just so apgsearch can run. C++ is such an unreadable and confusing language that it's really almost impossible to work with. :?


You can't really "download C++" as such, but I understand what you mean. I think.

That said, even if C++ is unreadable and/or confusing, what does it matter? You don't have to see sausages being made to enjoy eating them. From a user's point of view, a program's judged by how well it does its job.
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 978
Joined: July 27th, 2015, 2:06 pm

Re: apgsearch and Python 3.x

Postby Hdjensofjfnen » July 22nd, 2018, 7:42 pm

Also, speaking of apgsearch, none of the C1 soups that claim to have gotten "two pulsar quadrants" actually contain the oscillator.
Life is hard. Deal with it.
This is my new favorite spaceship:
x = 8, y = 4, rule = B3-ek/S023
bobo$2obo3bo$bobo$3bo!
User avatar
Hdjensofjfnen
 
Posts: 629
Joined: March 15th, 2016, 6:41 pm
Location: (394234, -234231)

Re: apgsearch and Python 3.x

Postby calcyman » July 23rd, 2018, 3:10 am

Hdjensofjfnen wrote:Also, speaking of apgsearch, none of the C1 soups that claim to have gotten "two pulsar quadrants" actually contain the oscillator.


What do you mean? The ones I've checked certainly do:

# m_P6PkexfnyjKc6081713
x = 16, y = 16, rule = B3/S23
bob3ob2o2bo2bo$b3ob4o6bo$ob4ob4o2bo$bo3bo2bobo4bo$bobobo4bo2b2o$3obo2b
3obo2b2o$2bob3o4bo2b2o$o2b2ob2ob5o$b2ob2o2b2o3b2o$3obo2b2obob4o$3bo3bo
b3ob2o$b3o3b6obo$4b4o3bobobo$ob2o2bo2bob2ob2o$4ob4o2b2ob2o$o3b4ob3ob3o
!


# l_xBJDC85ruGFj2599536
x = 16, y = 16, rule = B3/S23
2b5o5b3o$6obo2bo2b2o$obob2o2b3obobo$8b3obobo$b2o2b2o2bob3obo$bo4b2obob
2o2bo$obo3bo2b2o2bo$bobo2b2o2b2o2bo$b2o2bo2b3obobo$3ob2obobob2o$5obo3b
2obo$2obo2b2ob4obo$obobob2o2b3o2bo$ob2o2b2obo3b3o$b2o2b2o3b2o2bo$b2o4b
o4bob2o!


# n_iFZWuBeGCPeF205458
x = 16, y = 16, rule = B3/S23
3o2bo3bo2b2obo$bob3ob2obob3o$o3b2obo2bobo2bo$o3bob2obo3bobo$bo3b2o8bo$
3ob2o9bo$obob4ob2o3bo$ob3ob2obo2bo2bo$3o9b2obo$obo2bobob2o3bo$2o4bobo
3b4o$2b2o3bo5bobo$bo3b2o2b2o2b2o$b2ob2ob4ob4o$3obo2bob5o$o3bobo5b2obo!
What do you do with ill crystallographers? Take them to the mono-clinic!
User avatar
calcyman
 
Posts: 1733
Joined: June 1st, 2009, 4:32 pm

Re: apgsearch and Python 3.x

Postby Hdjensofjfnen » August 9th, 2018, 12:52 pm

Oops.
Looks like I was running in HighLife, dammit.
Life is hard. Deal with it.
This is my new favorite spaceship:
x = 8, y = 4, rule = B3-ek/S023
bobo$2obo3bo$bobo$3bo!
User avatar
Hdjensofjfnen
 
Posts: 629
Joined: March 15th, 2016, 6:41 pm
Location: (394234, -234231)


Return to Scripts

Who is online

Users browsing this forum: No registered users and 0 guests

cron