Re: Golly suggestions
Posted: June 15th, 2022, 6:56 am
You're absolutely correct I missed that.dvgrn wrote: June 14th, 2022, 4:38 pm I don't think the Weighted Life rule has any options to adjust how population is counted.
You're absolutely correct I missed that.dvgrn wrote: June 14th, 2022, 4:38 pm I don't think the Weighted Life rule has any options to adjust how population is counted.
Is the requirement here to have a settings UI that would allow state multipliers to be specified which would then impact how Golly displays the population count in the status bar?Extrementhusiast wrote: June 13th, 2022, 11:41 pm I'd be surprised if this hasn't been suggested so far, as it's exceedingly simple: having adjustable weights for each state when calculating population. Even a simple on/off checkbox for each state would be useful for many purposes! (This could probably be modeled after the Set Layer Colors dialog box, with similar behavior under rule changes.)
Code: Select all
x = 16, y = 16, rule = B3/S23
obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob$obobobobobobobob!
Code: Select all
x = 16, y = 16, rule = B3/S23
15(8(ob)$)8(ob)!
There's some prior art for this idea -- see this post by hotdogPi, for example, and the responses to it. That was just the most recent time that the idea has come up.wirehead wrote: June 19th, 2022, 9:06 am Now my idea is to take any repeating section and compress it by enclosing it in parenthesis with a number outside to say how many times to repeat, then repeating until the pattern can't be compressed further. So bobobobo would compress to 4(bo).
Whoops, I didn't see that post before! Thanks for pointing it out. I figured it would take a long time to be adopted anyway, since it's such a backwards-incompatible change.dvgrn wrote: June 19th, 2022, 9:16 am There's some prior art for this idea -- see this post by hotdogPi, for example, and the responses to it. That was just the most recent time that the idea has come up.
I'm not on the Discord (yet!), but I do know Python and Javascript. If the Caterer bot is written in either of those two languages I can help with it.dvgrn, on the URLE thread, wrote: May 23rd, 2021, 10:37 pm So if someone wants to work out a more compact alternative to RLE, I'd suggest that the best plan would be to work to get Caterer to support it, and get people on Discord to use it -- because it would really be potentially somewhat useful there.
What exactly are the "issues"? Other than not being compact or pretty. Writing an RLE encoder/decoder in a new language should be an almost trivial activity, a perfect "exercise for the student" kind of thing.wirehead wrote:The current RLE format has issues where the pattern is repetitive but does not repeat the same cell
That's actually an idea I had a while back. It would involve some serious pattern-segmentation algorithm but the simplest would probably be that used by move-object.py (flood fill of connected cells) which already works great for Life-like rules, but not very well at all for Wireworld where everything is connected.hkoenig wrote: June 19th, 2022, 1:57 pm Instead, come up with an encoding that defines the parts in terms of RLE (or apgcode), then specifies their placement by reference with a transformation and offset. Especially if repetition is your concern. That way you won't be breaking existing RLE encoders/decoders and other tools, but building on them.
Code: Select all
[block,2o$2o]
[b60,{block,0,0,1,0,0,1},{block,7,0,1,0,0,1},{block,3,3,1,0,0,1}]
[simkin gun,{b60,0,0,1,0,0,1},{b60,-17,-13,-1,0,0,-1},{herschel,.....................}]
A variety of this has already been done. See here.hkoenig wrote: June 19th, 2022, 1:57 pm A better solution might be to stop thinking of these huge constructions as a giant, single bit-array millions of cells wide. Instead, come up with an encoding that defines the parts in terms of RLE (or apgcode), then specifies their placement by reference with a transformation and offset. Especially if repetition is your concern. That way you won't be breaking existing RLE encoders/decoders and other tools, but building on them.
I see Chris got in a bit ahead of me, but I'll keep this here since it has more links...!hkoenig wrote: June 19th, 2022, 1:57 pmA better solution might be to stop thinking of these huge constructions as a giant, single bit-array millions of cells wide. Instead, come up with an encoding that defines the parts in terms of RLE (or apgcode), then specifies their placement by reference with a transformation and offset.
As far as I know, you could just hack giffer.py or giffer.lua because I think ffmpeg can convert from a gif. Although this will really eat up memory because giffer.lua doesn't compress the gif more if not many cells change.pcallahan wrote: July 5th, 2022, 1:48 pm It would be nice it there was a way to do it in Golly directly. I could write a script, though I would need to do some of the above steps in Python or Lua. Has anyone written something like this?
That does seem somewhat reasonable as a default.confocaloid wrote: July 7th, 2022, 8:49 am (Probably a relatively minor issue, but still) Suppose the current pattern is in a History version of a non-CGoL rule (for a concrete example: B3/S234cHistory). A consequence of choosing menu item "Control -> Set Algorithm -> QuickLife" or "Control -> Set Algorithm -> HashLife" seems that the rule is changed to Life. I think it would be more intuitive to keep the rule (in this example, B3/S234c) but drop the suffix "History" - in other words, the effect of "Control -> Set Algorithm -> QuickLife" or "Control -> Set Algorithm -> HashLife" on a pattern in the History version of some rule should be the same as when I go to "Control -> Set Rule..." dialog, manually remove the suffix "History" from the rule and press "OK".
On my installation (Golly 4.1), pressing Alt+J leads to a message "The script file does not exist: Scripts/Lua/toLife.lua". If I choose "toStandard.lua" from the filetree on the left, it usually works, but sometimes it displays "toStandard.lua:64:dvgrn wrote: July 7th, 2022, 10:10 am The way you're "supposed" to manage rule and algo changes with History and Super patterns is via Lua scripts, and their associated keyboard shortcuts: Alt+G to switch to a Super version of a rule, Alt+H to switch to a History version, and Alt+J to cleanly get rid of any extra states and go back to the standard two-state rule.
(Probably I should have posted about this issue in another thread - should this post be moved?) Here is a possible guess for my problem with "toStandard.lua". When I download and unpack "golly-4.1-gtk-64bit.tar.gz", there is a directory "golly-4.1-gtk-64bit/Rules/" which contains many rule files, including a file "Life.rule". If "Life.rule" is kept there, "toStandard.lua" seems to work without an error; if "Life.rule" is removed or renamed, "toStandard.lua" fails with error "toStandard.lua:64: Given rule is not valid in any algorithm." (Can someone reproduce this?) Edit 2: I get the same error (toStandard.lua fails without Rules/Life.rule) also in golly-4.2b1-gtk-64bit, and also in golly-4.2b1-win-64bit (using wine).dvgrn wrote: July 7th, 2022, 10:54 amThis part I don't understand, but I'd like to. There's some combination of rule and algo settings that causes this problem -- and it's something that I never do myself, so I never see this problem. If you can find a set of steps that reproduces this issue, I'd definitely like to know about it.confocaloid wrote: July 7th, 2022, 10:35 amIf I choose "toStandard.lua" from the filetree on the left, it usually works, but sometimes it displays "toStandard.lua:64:
Given rule is not valid in any algorithm." instead, after which "Script aborted" is displayed in status line and generation number is set to 1. (For example, I get this error now when trying to open and convert H-to-G-25Sep2021.rle.)
This is something that can happen when Golly is upgraded in a way that leaves the old GollyPrefs file in place. There isn't any "toLife.lua" in Golly 4.0+, but your GollyPrefs file comes from some version of earlier version of Golly that had Alt+J mapped to the Conway's-Life-only "toLife.lua" (before Chris Rowett put in the general algorithm that works the same way for a wide range of isotropic rules).confocaloid wrote: July 7th, 2022, 10:35 am On my installation (Golly 4.1), pressing Alt+J leads to a message "The script file does not exist: Scripts/Lua/toLife.lua".
This part I don't understand, but I'd like to. There's some combination of rule and algo settings that causes this problem -- and it's something that I never do myself, so I never see this problem. If you can find a set of steps that reproduces this issue, I'd definitely like to know about it.confocaloid wrote: July 7th, 2022, 10:35 amIf I choose "toStandard.lua" from the filetree on the left, it usually works, but sometimes it displays "toStandard.lua:64:
Given rule is not valid in any algorithm." instead, after which "Script aborted" is displayed in status line and generation number is set to 1. (For example, I get this error now when trying to open and convert H-to-G-25Sep2021.rle.)
I'd definitely like to understand these rare cases where toStandard.lua gives an error. I've seen it myself -- very early on, I think, during my initial testing of the toStandard, toHistory, and toSuper scripts. I've been unable to duplicate the problem recently. If you want to continue the investigation, we should probably move to discussing it in a Bugs & Errors thread, though.confocaloid wrote: July 7th, 2022, 10:35 amProbably these issues can be resolved in a simple way - I did not investigate it. It seems that toChangeState.lua works correctly for me, so I use this script to get rid of extra states. After that I convert to non-History version by going to the Set Rule dialog and removing the History suffix from the rulestring.
This sounds like a bug rather than a suggestion!hotdogPi wrote: July 17th, 2022, 12:16 pm I think I've mentioned this before, but if you have an RLE in the clipboard and try to click Run Clipboard, it tells you that Perl scripting is no longer supported. It should instead tell you that you have an RLE in the clipboard.
This doesn't happen on my end. Golly 4.1, Mac OS 12.4carsoncheng wrote: July 25th, 2022, 9:25 am Also, when I click and initiate a paste event at the same time, Golly quits with a wxWidgets debug warning. While I am using it as a quick way of force-quitting Golly when I want, someone may accidentally invoke this bug and lose their unsaved data on Golly.
You certainly don't need to access a Catagolue page or use lifelib to do an apgcode-to-RLE conversion. Here's a standalone Golly Python script that accomplishes that trick. If someone wants to port that to Lua, that would get rid of the dependency on Python as well.carsoncheng wrote: July 25th, 2022, 9:25 am Is it feasible to add a function to Golly that directly pastes an apgcode to the Golly layer without first accessing a Catagolue page or running a Python script using lifelib?
I was able to reproduce this, but only on my Mac and only when typing cmd-V rather than just V. I'm pretty sure the warning is spurious (due to a bug somewhere in the wxMac code) but I've committed a change that seems to avoid the warning so this problem should be fixed in the final 4.2 release.carsoncheng wrote: July 25th, 2022, 9:25 am Also, when I click and initiate a paste event at the same time, Golly quits with a wxWidgets debug warning.
Thanks for spotting those. I assume the duplicates *outside* the Replicators/Spaceships subfolders are the files that should be deleted?GUYTU6J wrote: August 15th, 2022, 9:20 am The latest Golly 4.2 contains a few duplicated patterns in the Non-Totalistic folder: ...
The commit only changed a file in the golly repository on sourceforge. I haven't uploaded a new version of the web app because it seems to be broken when I've tested it locally on my Mac using Safari or Chrome. Still investigating why that is so, but if I can't fix it then the web app might have to be frozen at its current old version. This was always an experimental version of Golly so people shouldn't really depend on its continued existence.This commit says it "updated patterns used by web version of Golly", but the collection on http://golly.sourceforge.net/webapp/golly.html hasn't been expanded.
Yes.Andrew wrote: August 15th, 2022, 6:46 pmThanks for spotting those. I assume the duplicates *outside* the Replicators/Spaceships subfolders are the files that should be deleted?GUYTU6J wrote: August 15th, 2022, 9:20 am The latest Golly 4.2 contains a few duplicated patterns in the Non-Totalistic folder: ...
I've just uploaded a new version of webGolly that contains all your suggested pattern changes. You'll probably need to force the page to be reloaded, which might take a while, so be patient. Eventually you should see this message in the status bar:GUYTU6J wrote: August 15th, 2022, 9:20 am This commit says it "updated patterns used by web version of Golly", but the collection on http://golly.sourceforge.net/webapp/golly.html hasn't been expanded.