Golly bugs

Has something gone haywire? Let us know about it!
User avatar
rowett
Moderator
Posts: 2848
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Golly bugs

Post by rowett » August 28th, 2022, 11:13 am

GUYTU6J wrote:
August 28th, 2022, 10:25 am
1. Open a B3/S23V pattern.
2. Hit Alt+G to convert to Super; new rule name is displayed as "LifeVSuper".
3. Hit Alt+H; a Golly note says that "Conversion failed. This 'LifeV' rule is not supported by the Super algo. To revert to the original rule..."
3'. Alternatively, Hit Alt+J; a Lua error says that "golly-4.2-win-64bit\Scripts\Lua\toStandard.lua:64: Given rule is not valid in any algorithm."
3. Was fixed above.
I've also just committed the fix for 3'.

You'll need a new build of Golly to see the changes.

User avatar
GUYTU6J
Posts: 1991
Joined: August 5th, 2016, 10:27 am
Location: 拆哪!I repeat, CHINA! (a.k.a. 种花家)
Contact:

Re: Golly bugs

Post by GUYTU6J » September 13th, 2022, 4:56 am

The following curvy python precedure reliably creates an obscure warning.

1. Save the following python script as repeat.py

Code: Select all

import golly as g
s = g.getselrect()
if s == []:
    s = g.getrect()
xy = [0, 0]
s = g.getcells(s)
if s == []:
    g.exit("Pattern is empty.")
disp = g.getstring("Enter displacement in form (x,y,t):", "2,14,14").split(",")
n = 0
try:
    disp = (int(disp[0]), int(disp[1]), int(disp[2]))
    n = int(g.getstring("How many times to repeat?", "1000"))
except:
    g.exit("Invalid input.")
g.new("repeated")
g.putcells(s, xy[0], xy[1], 1, 0, 0, 1, "xor")
for i in range(n):
    xy[0] += disp[0]
    xy[1] += disp[1]
    g.run(disp[2])
    g.putcells(s, xy[0], xy[1], 1, 0, 0, 1, "xor")
2. Start a new Golly
3. Set rule to W90 in QuickLife and draw a dot
4. Execute the script with predefined parameters
5. Before reaching full File size, click Cancel in the "Writing pattern file" popup window; a Golly warning saying File contains truncated pattern is expected.
6. Undo with ctrl+Z (NOT reset!)
7. Execute the script again
This will result in a Golly warning popping up, saying G_PyRun_SimpleString failed!, but then the first dialog in the script will pop up as usual.

Code: Select all

x = 60, y = 29, rule = B2-a/S12
8bo40bo$8bo38bobo$10b2o35bobo$7b3o37bo4$55bo$22b3o30b2o$3o4bobo43bo$
23b3o7bo19b2o$b3o4bo21b2obo6b2o$34bo$32bo18bo$32bo18bo5bo$57bo$16b3o
32bo$14b2o40bob2o$17bo17b2o19bo$17bo18bo$33b2o$34bo4$42bo$40bobo$40bob
o$40bo!

User avatar
Andrew
Moderator
Posts: 878
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Golly bugs

Post by Andrew » September 17th, 2022, 1:19 am

GUYTU6J wrote:
September 13th, 2022, 4:56 am
... This will result in a Golly warning popping up, saying G_PyRun_SimpleString failed! ...
I can reproduce this warning on my Mac but I've got no idea why it happens (the G_PyRun_SimpleString routine was added by Scorbie when we switched to support for Python 3, so maybe he could provide some clues). I suspect it's a spurious warning that can safely be ignored -- it doesn't seem to cause any problems if you run further Python scripts.

DroneBetter
Posts: 32
Joined: December 1st, 2021, 5:16 am
Location: The UK (a delightful place)
Contact:

Re: Golly bugs

Post by DroneBetter » November 18th, 2022, 1:54 pm

Perhaps not a bug but when pasting a LifeHistory RLE into a Life universe, the cells in the History state are converted to those in the Alive state, please add an exception for all history rules to prevent this, it is extremely frustrating when I am trying to paste in guns from the Catagolue gun census (which use it so that the RLE's bounding box is that of the gun irrespective of phase), I must change the rule in LifeViewer before pasting it, or change Golly's rule back and forth. Could the default behaviour for pasting RLEs in be changed to enact the process of conversion when a rule is changed, so that this (and other such issues) wouldn't have to be implemented twice?
That concludes my post (I hope you liked it)

User avatar
dvgrn
Moderator
Posts: 9320
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Golly bugs

Post by dvgrn » November 18th, 2022, 2:40 pm

DroneBetter wrote:
November 18th, 2022, 1:54 pm
Perhaps not a bug but when pasting a LifeHistory RLE into a Life universe, the cells in the History state are converted to those in the Alive state, please add an exception for all history rules to prevent this, it is extremely frustrating when I am trying to paste in guns from the Catagolue gun census (which use it so that the RLE's bounding box is that of the gun irrespective of phase), I must change the rule in LifeViewer before pasting it, or change Golly's rule back and forth. Could the default behaviour for pasting RLEs in be changed to enact the process of conversion when a rule is changed, so that this (and other such issues) wouldn't have to be implemented twice?
Yup, this is a long-standing usability issue with LifeHistory, where the current workaround is not at all obvious from the GUI.

I'm not sure how soon this feature request will be added to Golly; it would be a rather fiddly adjustment with a lot of rare weird special cases that might need to be handled.

In the meantime, are you aware of the keyboard shortcuts that shift Golly back and forth between [Rule]Super (Alt+G), [Rule]History (Alt+H), and the standard two-state [Rule] (Alt+J)?

Generally if you've copied a LifeHistory pattern to the clipboard, and you're now staring at a two-state universe in Golly and want to paste in the copied pattern as two-state, you have two options:

1) if the universe is empty or you want to clear it before pasting, hit Ctrl+Shift+O to open the clipboard as a new pattern, then hit Alt+J.
2) to add the LifeHistory pattern to your existing two-state pattern, hit Alt+H to switch the universe to History mode, paste in the pattern, then hit Alt+J.

User avatar
LaundryPizza03
Posts: 2005
Joined: December 15th, 2017, 12:05 am
Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"

Re: Golly bugs

Post by LaundryPizza03 » November 19th, 2022, 6:06 am

dvgrn wrote:
November 18th, 2022, 2:40 pm
DroneBetter wrote:
November 18th, 2022, 1:54 pm
Perhaps not a bug but when pasting a LifeHistory RLE into a Life universe, the cells in the History state are converted to those in the Alive state, please add an exception for all history rules to prevent this, it is extremely frustrating when I am trying to paste in guns from the Catagolue gun census (which use it so that the RLE's bounding box is that of the gun irrespective of phase), I must change the rule in LifeViewer before pasting it, or change Golly's rule back and forth. Could the default behaviour for pasting RLEs in be changed to enact the process of conversion when a rule is changed, so that this (and other such issues) wouldn't have to be implemented twice?
Yup, this is a long-standing usability issue with LifeHistory, where the current workaround is not at all obvious from the GUI.

I'm not sure how soon this feature request will be added to Golly; it would be a rather fiddly adjustment with a lot of rare weird special cases that might need to be handled.

In the meantime, are you aware of the keyboard shortcuts that shift Golly back and forth between [Rule]Super (Alt+G), [Rule]History (Alt+H), and the standard two-state [Rule] (Alt+J)?

Generally if you've copied a LifeHistory pattern to the clipboard, and you're now staring at a two-state universe in Golly and want to paste in the copied pattern as two-state, you have two options:

1) if the universe is empty or you want to clear it before pasting, hit Ctrl+Shift+O to open the clipboard as a new pattern, then hit Alt+J.
2) to add the LifeHistory pattern to your existing two-state pattern, hit Alt+H to switch the universe to History mode, paste in the pattern, then hit Alt+J.
In the Mac edition, Option+G (equivalent to Alt) does nothing, Option+H fails to find LifeHistory in the rulefiles, and Option+J looks for "toLife.lua" which is now called "toStandard.lua"

Code: Select all

x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!
LaundryPizza03 at Wikipedia

The latest edition of new-gliders.db.txt and oscillators.db.txt have 35296 spaceships and 1451 oscillators from outer-totalistic rules. You are invited to help!

User avatar
dvgrn
Moderator
Posts: 9320
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Golly bugs

Post by dvgrn » November 19th, 2022, 9:25 am

LaundryPizza03 wrote:
November 19th, 2022, 6:06 am
In the Mac edition, Option+G (equivalent to Alt) does nothing, Option+H fails to find LifeHistory in the rulefiles, and Option+J looks for "toLife.lua" which is now called "toStandard.lua"...
This is what happens on any OS, when an older version of Golly is updated to a version that supports the Super algo and GollyPrefs is not re-generated. The only way that Golly would know about "toLife.lua" is if it's remembering the GollyPrefs settings from a previous version of Golly. It's a minor configuration problem, not so much a bug, and not at all specific to Macs.

There is an easy fix for this, as described here.

The whole situation is definitely not terribly user-friendly. However, this is a one-time upgrade problem, and it's good for people to know how to set up keyboard shortcuts -- they're so extremely useful for other reasons! There are all kinds of painful tasks in Golly that can be made un-painful by very short custom scripts mapped to keyboard shortcuts.

Anyway, eventually the news will get to everyone who had an old version of Golly installed, and all of those old GollyPrefs files will get adjusted to point to the new Super-algo Lua scripts.

Post Reply