Maybe this year. Maybe next year. To be honest I'm in a period when I'm a bit bored by the thought of working on Golly (but don't worry too much -- such periods have never lasted more than a few months!).muzik wrote:I want to know, when will the next update for the mobile version come out?
Golly 2.8b3 (Perl is dead, long live Lua)
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Re: Golly 2.8b3 (Perl is dead, long live Lua)
I'm assuming you mean all the scripts you write? I've never found the need to do that.Scorbie wrote:Almost all golly scripts convert golly's cell lists to list of cell coordinates.
You could write a zip-like function as in the following example, but I'm struggling to see why you would want to do that. Just seems to add an extra level of complexity.That's why there are posts saying "You can do it with zip(celllist[::2], celllist[1::2]) in Python!" in the scripts thread.
I haven't used Lua, so I am not sure what is the best practice to achieve the same thing. Does anybody know this?
Code: Select all
local g = golly()
local function zip(cellarray)
-- convert one-state cell array: { x1, y1, x2, y2, ... xn, yn }
-- to array of cell coordinates: { {x1,y1}, {x2,y2}, ... {xn,yn} }
if (#cellarray & 1) == 1 then
-- cellarray has an odd number of ints
g.exit("Given cell array is multi-state.")
end
local coords = {}
for i = 1, #cellarray, 2 do
coords[#coords + 1] = { cellarray[i], cellarray[i+1] }
end
return coords
end
local carray = g.getcells(g.getrect())
local coords = zip(carray)
g.note(carray[1]..","..carray[2]) -- displays x1,y1
g.note(coords[1][1]..","..coords[1][2]) -- ditto
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Hmm! That is very strange! I must be writing it all wrong or maybe we are doing different things.Andrew wrote:I'm assuming you mean all the scripts you write? I've never found the need to do that.
Well on non-trivial scripts I write, I had to:
Seperate patterns to still lifes.
Find a target inside a pattern.
See if two patterns are identical (this is in fusefinder, but I guess we could do this without zipping by using another layer...)
Get the cells + their boundaries (i.e. empty cells adjacent to a live cell)
Re: Golly 2.8b3 (Perl is dead, long live Lua)
This has more than likely been asked before, but will there ever be support for non-totalistic rules in Golly without having to generate a rule table? LifeViewer is capable of this:
Code: Select all
x = 5, y = 3, rule = B36_S2-i34q
5o$5o$5o!
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
This was asked before and Andrew's answer was "probably no, we have other priorities."muzik wrote:This has more than likely been asked before, but will there ever be support for non-totalistic rules in Golly without having to generate a rule table? LifeViewer is capable of this:
Code: Select all
x = 5, y = 3, rule = B36_S2-i34q 5o$5o$5o!
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Scorbie wrote:This was asked before and Andrew's answer was "probably no, we have other priorities."
What are said priorities?
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
The biggest change for Golly 2.8 is Lua support, which will make it possible to run scripts without a separate Perl or Python install, or the attendant versioning and 32-vs-64-bit headaches. Personally I'm hoping to get some significant updates in for the Life Lexicon and the pattern collection as well, though here it is June already and those projects aren't exactly done yet.muzik wrote:Scorbie wrote:This was asked before and Andrew's answer was "probably no, we have other priorities."
What are said priorities?
That said, I think the "probably no" has been adjusted to something a bit more positive recently. Not to name any names or make promises on anyone else's behalf, but at least we have a new potential contributor who is looking at adding the necessary code for native isotropic rule support. Check the golly-test list on Sourceforge for details...!
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Wait. Chris is the developer of LifeViewer, right?dvgrn wrote: The biggest change for Golly 2.8 is Lua support, which will make it possible to run scripts without a separate Perl or Python install, or the attendant versioning and 32-vs-64-bit headaches. Personally I'm hoping to get some significant updates in for the Life Lexicon and the pattern collection as well, though here it is June already and those projects aren't exactly done yet.
That said, I think the "probably no" has been adjusted to something a bit more positive recently. Not to name any names or make promises on anyone else's behalf, but at least we have a new potential contributor who is looking at adding the necessary code for native isotropic rule support. Check the golly-test list on Sourceforge for details...!
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Long time no reply... I am pretty sure he is!muzik wrote:Wait. Chris is the developer of LifeViewer, right?
Is it intended behavior for indexing in gplus to change the original pattern?
I don't think anybody has used this feature...
Run the following, for example.
Code: Select all
local g = golly()
local gp = require "gplus"
local orig = gp.pattern("2o!") -- domino
local temp = orig[10] -- temp is empy, but...
g.exit(#orig) -- orig is empty too?!!Code: Select all
import golly as g
import glife
orig = glife.pattern("2o!") # Domino
temp = orig[10]
g.exit(str(orig)) # Cell list of a domino, as expected.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
I want to know, why are some named rules not listed on the scroll down thing on the mobile version?
Such as DryLife (B37/S23) and Live Free or Die (B2/S0)
Such as DryLife (B37/S23) and Live Free or Die (B2/S0)
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
It doesn't. Lua's length operator (#) only returns sensible results for strings and for tables that use integer indices starting at 1. To get the length of the cell array stored in the table created by gp.pattern you have to do this:Scorbie wrote:Is it intended behavior for indexing in gplus to change the original pattern?
Code: Select all
g.exit(#orig.array)
Re: Golly 2.8b3 (Perl is dead, long live Lua)
I had to stop somewhere. My original plan was to provide some interface for letting you create your own names (as in desktop Golly's Set Rule dialog) but I ran out of enthusiasm.muzik wrote:why are some named rules not listed on the scroll down thing on the mobile version?
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Well, since I'm that one demon who forces extra and unneccesary tasks upon developers:
I feel like Life-like rules should only show up when QuickLife and HashLife are selected, Generations when Generations rules are selected, etc.
I feel like Life-like rules should only show up when QuickLife and HashLife are selected, Generations when Generations rules are selected, etc.
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Ahh, thanks. I looked at the code indeed and didn't get what went wrong. Thought it was some lua black magic. Good to know, thanks againAndrew wrote:It doesn't. Lua's length operator (#) only returns sensible results for strings and for tables that use integer indices starting at 1. To get the length of the cell array stored in the table created by gp.pattern you have to do this:Scorbie wrote:Is it intended behavior for indexing in gplus to change the original pattern?See the m.pattern function in Scripts/Lua/gplus/init.lua for details.Code: Select all
g.exit(#orig.array)
Re: Golly 2.8b3 (Perl is dead, long live Lua)
For those who are not so familiar with Lua, here is moonscript that compiles to Lua and looks a lot like python (with some significant differences) I think one could reuse most of python's syntax, although I think lua's syntax itself is acceptable.
http://leafo.net/posts/moonscript_overview.html
http://moonscript.org/reference/
http://leafo.net/posts/moonscript_overview.html
http://moonscript.org/reference/
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Another question that has probably been asked a lot, but will Golly ever be able to simulate odd Wolfram rules?
It says that they have the same problems as B0 rules, so why not use a similar approach?
Code: Select all
x = 1, y = 1, rule = W21
o!
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Ok just installed this, had been using 2.6. I'm not sure if I did something wrong regarding GollyPrefs before opening the new version but it doesn't seem to adapt to my 4K monitor, while 2.6 never had this problem. The infoboxes and toolbars are too small to reasonably use and I'm wondering what to change to fix this.
Physics: sophistication from simplicity.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
I'm not planning to do it.muzik wrote:Another question that has probably been asked a lot, but will Golly ever be able to simulate odd Wolfram rules?
Re: Golly 2.8b3 (Perl is dead, long live Lua)
More details please. Is this on Windows, Mac or Linux? 64-bit or 32-bit? More technical info on your monitor would be handy. A screenshot would be even more useful (especially one comparing 2.6 with 2.8b3).biggiemac wrote:Ok just installed this, had been using 2.6. I'm not sure if I did something wrong regarding GollyPrefs before opening the new version but it doesn't seem to adapt to my 4K monitor, while 2.6 never had this problem. The infoboxes and toolbars are too small to reasonably use and I'm wondering what to change to fix this.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Windows 10, 64-bit golly on 64-bit OS, N501VW Asus laptop.Andrew wrote:More details please. Is this on Windows, Mac or Linux? 64-bit or 32-bit? More technical info on your monitor would be handy. A screenshot would be even more useful (especially one comparing 2.6 with 2.8b3).biggiemac wrote:Ok just installed this, had been using 2.6. I'm not sure if I did something wrong regarding GollyPrefs before opening the new version but it doesn't seem to adapt to my 4K monitor, while 2.6 never had this problem. The infoboxes and toolbars are too small to reasonably use and I'm wondering what to change to fix this.
Screenshots of 2.6 and of 2.8b3 upon launch.
Edit: 2.7 also has the behavior of 2.8. Both do not scale to 4K monitors, at least not without some modification I am still unaware of. I also have the problem where golly presently crashes running python scripts but I remember seeing a thread somewhere about that so it is likely not 2.8 specific.
Physics: sophistication from simplicity.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Yuk! Thanks for doing the screenshots. I've done some googling and it looks like there is a known bug in the wxWidgets code on Win 10 with 4K monitors. There seems to be a simple fix so some time in the next day or two I'll do a new build for you to try.biggiemac wrote:Windows 10, 64-bit golly on 64-bit OS, N501VW Asus laptop.
Screenshots of 2.6 and of 2.8b3 upon launch.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
@biggiemac: I've uploaded a new 64-bit Windows build so please give it a try and let me know if it fixes the scaling problem. It should look very similar to 2.6.
After unpacking the .zip file I recommend creating a new, *empty* GollyPrefs file in the same folder as the .exe file. That might fix your Python scripting problem. (If you were able to run Python scripts in 2.6 then you should be able to do the same with 2.8, assuming your 2.6 version is also 64-bit.)
After unpacking the .zip file I recommend creating a new, *empty* GollyPrefs file in the same folder as the .exe file. That might fix your Python scripting problem. (If you were able to run Python scripts in 2.6 then you should be able to do the same with 2.8, assuming your 2.6 version is also 64-bit.)
Re: Golly 2.8b3 (Perl is dead, long live Lua)
The scaling problem has been fixed, thanks!
The Python scripts crash the same as before. My issue was that my previous computer had a 32-bit python and 32-bit Golly and scripts worked. When I got this computer I installed 64-bit Python, but Golly transferred with the backup so it was 32-bit 2.6. I simply hadn't ever needed to run a script. Now I would like to, so I tried installing a 64-bit version of Golly, at which point I decided to update to 2.8.
The Python scripts crash the same as before. My issue was that my previous computer had a 32-bit python and 32-bit Golly and scripts worked. When I got this computer I installed 64-bit Python, but Golly transferred with the backup so it was 32-bit 2.6. I simply hadn't ever needed to run a script. Now I would like to, so I tried installing a 64-bit version of Golly, at which point I decided to update to 2.8.
Physics: sophistication from simplicity.
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Good to hear -- thanks for the report!biggiemac wrote:The scaling problem has been fixed, thanks!
I see in another thread that you installed Python 2.7.11. There is a known bug with that version, so you need to uninstall it, then download and install an earlier version like 2.7.10 (64-bit of course).The Python scripts crash the same as before. ...
- Apple Bottom
- Posts: 1034
- Joined: July 27th, 2015, 2:06 pm
- Contact:
Re: Golly 2.8b3 (Perl is dead, long live Lua)
Python 2.7.12 actually came out a few weeks ago. Does that fix said bug?Andrew wrote:I see in another thread that you installed Python 2.7.11. There is a known bug with that version, so you need to uninstall it, then download and install an earlier version like 2.7.10 (64-bit of course).
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!
Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_
Proud member of the Pattern Raiders!