Page 7 of 18

Re: Thread for your script-related questions

Posted: March 29th, 2021, 8:09 am
by dvgrn
PkmnQ wrote:
March 29th, 2021, 7:37 am
I know of a script that turns patterns to apgcodes, but is there a script that turns apgcodes to patterns?
This script by Ilmari Karonen seems to fit the bill. I haven't tested it, but the comments show a good level of awareness of the different apgcode variants.

Tangential note: I knew the name "Ilmari Karonen" was familiar, but I had no idea why. Turns out one of my first blog posts was about a question he asked on the comp.theory.cell-automata newsgroup, which was more or less the public predecessor of the conwaylife.com forums.

I didn't even remember that I had started that blog that early (first post in late 2004). Memories of that time are very hazy -- had electricity even been invented back then, let alone the Internet? It's clear from the pattern format that this was before LifeViewer's time, at least.

Re: Thread for your script-related questions

Posted: March 29th, 2021, 8:22 am
by PkmnQ
dvgrn wrote:
March 29th, 2021, 8:09 am
PkmnQ wrote:
March 29th, 2021, 7:37 am
I know of a script that turns patterns to apgcodes, but is there a script that turns apgcodes to patterns?
This script by Ilmari Karonen seems to fit the bill. I haven't tested it, but the comments show a good level of awareness of the different apgcode variants.

Tangential note: I knew the name "Ilmari Karonen" was familiar, but I had no idea why. Turns out one of my first blog posts was about a question he asked on the comp.theory.cell-automata newsgroup, which was more or less the public predecessor of the conwaylife.com forums.

I didn't even remember that I had started that blog that early (first post in late 2004). Memories of that time are very hazy -- had electricity even been invented back then, let alone the Internet? It's clear from the pattern format that this was before LifeViewer's time, at least.
I can't even load in a loafer.

Re: Thread for your script-related questions

Posted: March 29th, 2021, 8:30 am
by dvgrn
PkmnQ wrote:
March 29th, 2021, 8:22 am
I can't even load in a loafer.
Why not, exactly? Please try being more specific in bug reports -- it seems silly to have to go through several cycles of posts to painfully extract the relevant information from people.

I saved the script to Golly's Scripts/Python directory, entered "xq7_3nw17862z6952", and ended up with a downward-traveling loafer, as expected.

Re: Thread for your script-related questions

Posted: March 29th, 2021, 8:32 am
by PkmnQ
dvgrn wrote:
March 29th, 2021, 8:30 am
PkmnQ wrote:
March 29th, 2021, 8:22 am
I can't even load in a loafer.
Why not, exactly? Please try being more specific in bug reports -- it seems silly to have to go through several cycles of posts to painfully extract the relevant information from people.

I saved the script to Golly's Scripts/Python directory, entered "xq7_3nw17862z6952", and ended up with a downward-traveling loafer, as expected.
Wait, sorry. I accidentally pasted it into a filename which might've removed some important characters.
Edit: I pasted it in properly this time and it works. Sorry for the confusion.

Re: Thread for your script-related questions

Posted: April 1st, 2021, 5:29 am
by GUYTU6J
Is lifelib capable of analyzing methuselahs, i.e. given a pattern RLE, can any function output its lifespan, bounding box, MCPS, final population, etc?

Re: Thread for your script-related questions

Posted: April 7th, 2021, 4:27 pm
by cgoler2
Where is searchRule-matchPatt2.lua?

A Java question not related to CA (sorry)

Posted: April 10th, 2021, 1:56 am
by GUYTU6J
How do I compile and run the Java QuasiTiler from https://sourceforge.net/projects/quasitiler/? I have installed Java —

Code: Select all

java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) Client VM (build 25.281-b09, mixed mode, sharing)
— but my command prompt doesn't recognize "javac".

Re: Thread for your script-related questions

Posted: April 19th, 2021, 8:10 am
by yujh
How to make viewers on other websites (html5?)

Re: Thread for your script-related questions

Posted: April 19th, 2021, 8:37 am
by dvgrn
yujh wrote:
April 19th, 2021, 8:10 am
How to make viewers on other websites (html5?)
Meaning, you want to set up LifeViewer to work outside of the context of the forums or LifeWiki?

Here are some sample HTML files that do basically that. You can run those pages offline, at the expense of probably using an older version of LifeViewer. (I haven't bothered to update the checked-in version of lv-plugin.js past Build 521, whereas the current version is something like 597.)

Instead of the line '<script src="lv-plugin.js"></script>', you could point the browser to some other location, like

Code: Select all

<script src="https://www.conwaylife.com/forums/styles/prosilver/template/lv-plugin.js"></script>
If you do that, then you'll always be working with the latest version of LifeViewer -- as long as conwaylife.com isn't down and you have a working Internet connection.

Otherwise, you just need to follow the exact HTML structure given in the samples, and LifeViewer will see it and use it:

Code: Select all

<div class="viewer">
	<a href="" onclick="updateViewer(this); return false;">View Standalone</a><br>
	<textarea rows=4 cols=75>
#C put RLE here
#C [[ "with LifeViewer waypoint script commands" ]] if you want them
x = 3, y = 3, rule = B3/S23
3o$o$bo!
	</textarea>
	<br>
	<canvas width="1024" height="512"></canvas>
</div>
Canvas size, textarea height, link text, etc., can be adjusted as needed. LifeViewer is mainly looking for the div with a class of "viewer", and inside that, a textarea containing the RLE, and a canvas.

There's probably something subtle I've forgotten about the "View Standalone" link at the top, but maybe someone else can explain that.

Re: Thread for your script-related questions

Posted: April 20th, 2021, 4:19 am
by bibunsekibun
Is there an Isotropic Non-totalistic Spaceship search script that can be run without C++?

Re: Thread for your script-related questions

Posted: April 20th, 2021, 4:34 am
by Schiaparelliorbust
bibunsekibun wrote:
April 20th, 2021, 4:19 am
Is there an Isotropic Non-totalistic Spaceship search script that can be run without C++?
Yes, try rlifesrc.

Re: Thread for your script-related questions

Posted: April 20th, 2021, 5:31 am
by bibunsekibun
Schiaparelliorbust wrote:
April 20th, 2021, 4:34 am
bibunsekibun wrote:
April 20th, 2021, 4:19 am
Is there an Isotropic Non-totalistic Spaceship search script that can be run without C++?
Yes, try rlifesrc.
Wow, Thank you so much!

Re: Thread for your script-related questions

Posted: April 20th, 2021, 5:42 am
by yujh
What about a rule generator for alternating rules? Like viewtopic.php?f=11&t=719&start=75#p72993 but generate the rule table but not only running a pattern.

Re: Thread for your script-related questions

Posted: April 26th, 2021, 12:21 pm
by LaundryPizza03
Why do the parameters B34/S1567/o3n1v/l108 in gfind mysteriously get stuck so quickly?

Re: Thread for your script-related questions

Posted: April 26th, 2021, 11:28 pm
by Sokwe
LaundryPizza03 wrote:
April 26th, 2021, 12:21 pm
Why do the parameters B34/S1567/o3n1v/l108 in gfind mysteriously get stuck so quickly?
It does seem to be getting stuck at depth 73 and can't complete the depth-first step. I also tried giving it a large queue size and it still appears to get stuck in the breadth-first step.

Interestingly, I ran it with Paul Tooke's modified gfind (compiled with PATCH04 commented out to allow for searches above logical width 14) and it finds a ship at depth 73:

Code: Select all

x = 36, y = 22, rule = B34/S1567
6bobo18bobo$6bobo2bo12bo2bobo$4b2o7b2o6b2o7b2o$5bobo2bob2obo4bob2obo2b
obo$4bo3bobo3bo6bo3bobo3bo$4b2o5bo2bo6bo2bo5b2o$7b4o6b2o6b4o$3bo2bo4b
2o10b2o4bo2bo$3bob2o5b2o3b2o3b2o5b2obo$2bobo4b3o3b6o3b3o4bobo$b5o2bo3b
3o6b3o3bo2b5o$5bobo2bo4b6o4bo2bobo$b4ob3ob2obo8bob2ob3ob4o$5bo4b4obo4b
ob4o4bo$5bo3b3obobo4bobob3o3bo$2o3b3o2bobo2b6o2bobo2b3o3b2o$3bob2o2bob
obo3b2o3bobobo2b2obo$2bo3b4o2b5o2b5o2b4o3bo$4bo2b9o4b9o2bo$11b3obo4bob
3o$13bobob2obobo$15bo4bo!
It then completes the depth-first step normally. Without actually looking at any code, I would guess the problem is in success(), which should print a complete spaceship detected by terminal() (one could check if it gets stuck after terminal() returns true). Perhaps an older version of gfind will work (such as v4.6, on which Paul's modification is based). Then one could look at the changes between versions to get an idea of what's causing the problem.

Re: Thread for your script-related questions

Posted: April 28th, 2021, 10:57 am
by LaundryPizza03
Sokwe wrote:
April 26th, 2021, 11:28 pm
LaundryPizza03 wrote:
April 26th, 2021, 12:21 pm
Why do the parameters B34/S1567/o3n1v/l108 in gfind mysteriously get stuck so quickly?
It does seem to be getting stuck at depth 73 and can't complete the depth-first step. I also tried giving it a large queue size and it still appears to get stuck in the breadth-first step.

Interestingly, I ran it with Paul Tooke's modified gfind (compiled with PATCH04 commented out to allow for searches above logical width 14) and it finds a ship at depth 73:

Code: Select all

x = 36, y = 22, rule = B34/S1567
6bobo18bobo$6bobo2bo12bo2bobo$4b2o7b2o6b2o7b2o$5bobo2bob2obo4bob2obo2b
obo$4bo3bobo3bo6bo3bobo3bo$4b2o5bo2bo6bo2bo5b2o$7b4o6b2o6b4o$3bo2bo4b
2o10b2o4bo2bo$3bob2o5b2o3b2o3b2o5b2obo$2bobo4b3o3b6o3b3o4bobo$b5o2bo3b
3o6b3o3bo2b5o$5bobo2bo4b6o4bo2bobo$b4ob3ob2obo8bob2ob3ob4o$5bo4b4obo4b
ob4o4bo$5bo3b3obobo4bobob3o3bo$2o3b3o2bobo2b6o2bobo2b3o3b2o$3bob2o2bob
obo3b2o3bobobo2b2obo$2bo3b4o2b5o2b5o2b4o3bo$4bo2b9o4b9o2bo$11b3obo4bob
3o$13bobob2obobo$15bo4bo!
It then completes the depth-first step normally. Without actually looking at any code, I would guess the problem is in success(), which should print a complete spaceship detected by terminal() (one could check if it gets stuck after terminal() returns true). Perhaps an older version of gfind will work (such as v4.6, on which Paul's modification is based). Then one could look at the changes between versions to get an idea of what's causing the problem.
I can't compile those now, so you try: B35/S16/o3n1u/l108.

EDIT: Found using ikpx2. The search in this rule is very memory-intensive for some reason.

Code: Select all

x = 33, y = 36, rule = B35/S16
9bo3b3ob3o3bo$7bo2bob2o5b2obo2bo$7bobobo4bo4bobobo$5bo4b3o7b3o4bo$8bo2bo3bobo
3bo2bo$2bob2o3bob2o3bo3b2obo3b2obo$bo4b2o17b2o4bo$ob4ob3o4bo3bo4b3ob4obo$4bo
5bobo7bobo5bo$b2o2bo2bo4bob3obo4bo2bo2b2o$14bo3bo$4bobo5bo7bo5bobo$b2obobo3bo
11bo3bobob2o$3bo4bobo4bobo4bobo4bo$bo9b2o2bobo2b2o9bo$2o8bob2o2bo2b2obo8b2o$b
o3b3obo13bob3o3bo$o2bobo4bo4bobo4bo4bobo2bo$6bobo7bo7bobo$b3obob3ob2o7b2ob3ob
ob3o$7bob4o7b4obo$9bob2o7b2obo2$7bobo2b2o5b2o2bobo$12bo7bo$11b2ob2ob2ob2o$10b
2o9b2o$9b3o2bo3bo2b3o$8b3o3bo3bo3b3o$8b3o2bo5bo2b3o$8bobo3bo3bo3bobo$6b3ob2o
2bobobo2b2ob3o$9bo2bo2bobo2bo2bo2$11bo2b2ob2o2bo$12bo7bo!

Re: Thread for your script-related questions

Posted: May 7th, 2021, 9:36 pm
by cgoler2
Is there a Lua script that converts

Code: Select all

x =3, y =3, rule =B3/S23
bo$2bo$3o!
into

Code: Select all

x =3, y =3, rule =B3/S23
bob$
bbo$
ooo$
?

Re: Thread for your script-related questions

Posted: May 7th, 2021, 10:28 pm
by dvgrn
cgoler2 wrote:
May 7th, 2021, 9:36 pm
Is there a Lua script that converts

Code: Select all

x =3, y =3, rule =B3/S23
bo$2bo$3o!
into

Code: Select all

x =3, y =3, rule =B3/S23
bob$
bbo$
ooo$
?
I don't know of one. But I discovered recently that I had forgotten all the Golly-related Lua that I used to know, so apparently I need some practice.

I checked in this script for you -- pat-to-ascii.lua:

Code: Select all

-- pat-to-ascii.lua
-- select a pattern in Golly, run this script,
--   and a plaintext ASCII format version of
--   the pattern will be copied to the clipboard
--
-- For a variant producing Life Lexicon format, see also
--   http://conwaylife.com/forums/viewtopic.php?p=64427#p64427

local g = golly()
r = g.getselrect()
s=""
for y = 0, r[4] do
  for x = 0, r[3] do
    if g.getcell(x+r[1], y + r[2]) == 1 then
      s = s.."*"
    else
      s = s.."."
    end
  end
  s = s.."\n"
end

g.setclipstr(s)
Changes to the above to make it produce the RLE format that you're asking for, are absolutely completely trivial, to the point where anyone can do it even if they don't know anything about programming. It currently works on a selection in Golly and writes the output to the clipboard -- so it would take just a little bit more fiddling to start with a standard RLE pattern in the clipboard and end with a Catagolue-style RLE pattern in the clipboard.

If you can't see how, just ask more script-related questions here until you can see how.

Re: Thread for your script-related questions

Posted: May 24th, 2021, 11:20 pm
by wwei47
Is there a way to get RLS to generate a list of search results, like JLS's save results to file option?

Re: Thread for your script-related questions

Posted: May 25th, 2021, 9:32 am
by yujh
wwei47 wrote:
May 24th, 2021, 11:20 pm
Is there a way to get RLS to generate a list of search results, like JLS's save results to file option?
Yes and obvious. There's a choice in the searching page

Re: Thread for your script-related questions

Posted: May 26th, 2021, 12:21 pm
by wwei47
Why does ntzfind core dump when I try to use it to search B01e2c3i4e/S1e3y4et?

Re: A Java question not related to CA (sorry)

Posted: May 28th, 2021, 9:52 am
by GUYTU6J
Continued from this post:
GUYTU6J wrote:
April 10th, 2021, 1:56 am
How do I compile and run the Java QuasiTiler from https://sourceforge.net/projects/quasitiler/? I have installed Java —

Code: Select all

java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) Client VM (build 25.281-b09, mixed mode, sharing)
— but my command prompt doesn't recognize "javac".
I realized that a completely different thing called Java(TM) SE Development Toolkit 16 (64-bit) is required to use command "javac". However, the existence of jdk prevents me from running other .jar files like SeedsOfDestruction.v0-5.jar by simply clicking on it. Why is there such a conflict?

Re: Thread for your script-related questions

Posted: May 31st, 2021, 8:47 pm
by wwei47
How can I contact Jason Summers? I keep getting Server Error 500 from their Oscillizer.

Re: Thread for your script-related questions

Posted: May 31st, 2021, 9:25 pm
by ihatecorderships
wwei47 wrote:
May 31st, 2021, 8:47 pm
How can I contact Jason Summers? I keep getting Server Error 500 from their Oscillizer.
It says on their site that their email is jason1@pobox.com, so try that.

Re: Thread for your script-related questions

Posted: June 5th, 2021, 2:11 pm
by pzq_alex
How can I get ikpx2.2 to extend a specified partial?