Pattern viewer for forum threads

For discussion directly related to ConwayLife.com, such as requesting changes to how the forums or wiki function.
ColorfulGabrielsp138
Posts: 288
Joined: March 29th, 2021, 5:45 am

Re: Pattern viewer for forum threads

Post by ColorfulGabrielsp138 » August 17th, 2021, 7:22 am

rowett wrote:
August 17th, 2021, 6:06 am
ColorfulGabrielsp138 wrote:
August 17th, 2021, 5:46 am
I tried to post a troll, but failed.

Code: Select all

x = 0, y = 0, rule = R1,C2,S2,4-7,10,12-13,18-19,21,27,B2,5-7,11,13,15,19,21,27,NW010903090009030901
2o$2o$$3b2o$3b2o!
I suspect your State Weights are incorrectly specified. When you're using single hex digits to specify a weight then 8 to f represent 0 to -7. So where you have the digit 9 it means -1.

Use pairs of hex digits if you want values greater than 7.

See here for more information.
It worked! Thanks! But will it ever support triple or even more hex digits?

Code: Select all

x = 31, y = 5, rule = R1,C2,S2,4-7,10,12-13,18-19,21,27,B2,5-7,11,13,15,19,21,27,NW010903090009030901
bo7b2o6b2o7b2o$3o6bobo5bobo6bo2bo$bo10bo$13bo5bobo5bo2bo$12b2o6b2o7b2o!

Code: Select all

x = 21, y = 21, rule = LifeColorful
11.E$10.3E$10.E.2E$13.E4$2.2B$.2B$2B$.2B15.2D$19.2D$18.2D$17.2D4$7.C$
7.2C.C$8.3C$9.C!
I have reduced the glider cost of quadratic growth to eight and probably to seven. Looking for conduits...

User avatar
muzik
Posts: 4270
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik » August 17th, 2021, 6:58 pm

rowett wrote:
August 15th, 2021, 11:47 am
muzik wrote:
August 15th, 2021, 7:00 am
Is there any reason in specific why generation counts use a 64-bit float?
JavaScript.
So I assume the only data type for numbers is a 64-bit float, and there are no natively supported integer-only or such data types?

----

New bug: Fast Identify causes this to die at the world border, reporting a period-2 oscillator which does not seem to exist and history cells that never fade:

Code: Select all

x = 0, y = 0, rule = B2-a3-eiry4t5eijkn6-i/S1c2n3ekqy4eyz5-acy6-i78
3bo2b2o$4b2o2bo$2b7o$8obo$2b7o$o3b2o2bo$2b2o2b2o!
[[ THEME Blues ZOOM 1.0 ]]

User avatar
bubblegum
Posts: 955
Joined: August 25th, 2019, 11:59 pm
Location: click here to do nothing

Re: Pattern viewer for forum threads

Post by bubblegum » August 17th, 2021, 8:25 pm

muzik wrote:
August 17th, 2021, 6:58 pm
So I assume the only data type for numbers is a 64-bit float, and there are no natively supported integer-only or such data types?
There are two - Number and BigInt (infinite-length integer); BigInt is relatively new and for compatibility with older browsers like Internet Explorer, which nobody uses, you'll want to stick with Number.

(Also, NaN is a Number.)
Each day is a hidden opportunity, a frozen waterfall that's waiting to be realised, and one that I'll probably be ignoring
sonata wrote:
July 2nd, 2020, 8:33 pm
conwaylife signatures are amazing[citation needed]
anything

pzq_alex
Posts: 104
Joined: May 1st, 2021, 9:00 pm
Location: in the life universe

Re: Pattern viewer for forum threads

Post by pzq_alex » August 18th, 2021, 12:03 am

LifeWiki article on LifeHistory wrote: State 5: start alive; enters state 4 upon death, and will never reappear during evolution.

Code: Select all

x = 5, y = 5, rule = LifeHistory
.A$2.A$3A2$4.E!
[[ AUTOSTART GPS 8 T 0 PAUSE 1 T 4 PAUSE 1 T 8 PAUSE 0.5 LOOP 30 ]]
-------------
muzik wrote:
August 17th, 2021, 6:58 pm
New bug: Fast Identify causes this to die at the world border, reporting a period-2 oscillator which does not seem to exist and history cells that never fade:

Code: Select all

x = 0, y = 0, rule = B2-a3-eiry4t5eijkn6-i/S1c2n3ekqy4eyz5-acy6-i78
3bo2b2o$4b2o2bo$2b7o$8obo$2b7o$o3b2o2bo$2b2o2b2o!
[[ THEME Blues ZOOM 1.0 ]]
It also sometimes causes the pattern to die at ~500 or ~1000 generations, and also creates non-fading history cells.

User avatar
bubblegum
Posts: 955
Joined: August 25th, 2019, 11:59 pm
Location: click here to do nothing

Re: Pattern viewer for forum threads

Post by bubblegum » August 18th, 2021, 12:52 am

pzq_alex wrote:
August 18th, 2021, 12:03 am
LifeWiki article on LifeHistory wrote: State 5: start alive; enters state 4 upon death, and will never reappear during evolution.

Code: Select all

x = 5, y = 5, rule = LifeHistory
.A$2.A$3A2$4.E!
[[ AUTOSTART GPS 8 T 0 PAUSE 1 T 4 PAUSE 1 T 8 PAUSE 0.5 LOOP 30 ]]
yes this is intentional move on
Each day is a hidden opportunity, a frozen waterfall that's waiting to be realised, and one that I'll probably be ignoring
sonata wrote:
July 2nd, 2020, 8:33 pm
conwaylife signatures are amazing[citation needed]
anything

User avatar
rowett
Moderator
Posts: 2446
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett » August 18th, 2021, 3:49 pm

muzik wrote:
August 17th, 2021, 6:58 pm
Fast Identify causes this to die at the world border, reporting a period-2 oscillator which does not seem to exist and history cells that never fade:
Fixed, thanks for reporting!

ColorfulGabrielsp138
Posts: 288
Joined: March 29th, 2021, 5:45 am

Re: Pattern viewer for forum threads

Post by ColorfulGabrielsp138 » August 19th, 2021, 3:14 am

LifeViewer says "1 births" instead of "1 birth"

Code: Select all

x = 21, y = 21, rule = LifeColorful
11.E$10.3E$10.E.2E$13.E4$2.2B$.2B$2B$.2B15.2D$19.2D$18.2D$17.2D4$7.C$
7.2C.C$8.3C$9.C!
I have reduced the glider cost of quadratic growth to eight and probably to seven. Looking for conduits...

User avatar
muzik
Posts: 4270
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik » August 20th, 2021, 12:16 pm

bubblegum wrote:
August 17th, 2021, 8:25 pm
muzik wrote:
August 17th, 2021, 6:58 pm
So I assume the only data type for numbers is a 64-bit float, and there are no natively supported integer-only or such data types?
There are two - Number and BigInt (infinite-length integer); BigInt is relatively new and for compatibility with older browsers like Internet Explorer, which nobody uses, you'll want to stick with Number.
That's weird, because this following overflow implies the existence of some sort of 32-bit integer data type:

Code: Select all

x = 2, y = 8, rule = B3/S23
bo$o$bo$bo$bo$bo$bo$bo!
[[ HISTORYSTATES 4294967359 ]]

Code: Select all

x = 2, y = 8, rule = B3/S23
bo$o$bo$bo$bo$bo$bo$bo!
[[ HISTORYSTATES 4294967296 ]]

Code: Select all

x = 2, y = 8, rule = B3/S23
bo$o$bo$bo$bo$bo$bo$bo!
[[ HISTORYSTATES 4294967298 ]]

User avatar
muzik
Posts: 4270
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik » August 20th, 2021, 12:44 pm

I'm not sure if this is intended but it's quite irritating: for patterns with reversestart, the reset button (after some amount of playback first) will set them to forward playing on the first press.

Code: Select all

x = 3, y = 3, rule = MargSingRot
13o!
[[ REVERSESTART ]]
Compare:

Code: Select all

x = 3, y = 3, rule = MargSingRot
13o!

User avatar
bubblegum
Posts: 955
Joined: August 25th, 2019, 11:59 pm
Location: click here to do nothing

Re: Pattern viewer for forum threads

Post by bubblegum » August 20th, 2021, 3:54 pm

muzik wrote:
August 20th, 2021, 12:16 pm
That's weird, because this following overflow implies the existence of some sort of 32-bit integer data type:
Interesting - Number cannot overflow, as any number larger than about 1.8×10^38 is rounded up to Infinity. Additionally, no numeric types built-in to JavaScript are signed.

However, some operations, such as >>> (zero-fill right shift) and Array.prototype.length return unsigned 32-bit integers only, so the culprit might be one of those used on the value - or maybe LifeViewer is only reading a u32.
Each day is a hidden opportunity, a frozen waterfall that's waiting to be realised, and one that I'll probably be ignoring
sonata wrote:
July 2nd, 2020, 8:33 pm
conwaylife signatures are amazing[citation needed]
anything

User avatar
rowett
Moderator
Posts: 2446
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett » August 20th, 2021, 4:29 pm

bubblegum wrote:
August 20th, 2021, 3:54 pm
muzik wrote:
August 20th, 2021, 12:16 pm
That's weird, because this following overflow implies the existence of some sort of 32-bit integer data type:
However, some operations, such as >>> (zero-fill right shift) and Array.prototype.length return unsigned 32-bit integers only, so the culprit might be one of those used on the value - or maybe LifeViewer is only reading a u32.
Javascript supports Typed Arrays. In this case LifeViewer's script parser is storing parsed numeric arguments in a Uint32Array.

User avatar
rowett
Moderator
Posts: 2446
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett » August 21st, 2021, 3:21 am

muzik wrote:
August 20th, 2021, 12:44 pm
I'm not sure if this is intended but it's quite irritating: for patterns with reversestart, the reset button (after some amount of playback first) will set them to forward playing on the first press.
Fixed, thanks for reporting!

AforAmpere
Posts: 1296
Joined: July 1st, 2016, 3:58 pm

Re: Pattern viewer for forum threads

Post by AforAmpere » August 24th, 2021, 10:45 am

LV seems to sometimes just choose whatever it wants for gens/frame if that is set high enough, even if it is set differently. With the pattern here, setting it to 28 gens/frame, even at 1 fps, seems to give a completely random real gens/frame.
Wildmyron and I manage the 5S project, which collects all known spaceship speeds in Isotropic Non-totalistic rules.

Things to work on:
- Find a (7,1)c/8 ship in a Non-totalistic rule

User avatar
rowett
Moderator
Posts: 2446
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett » August 24th, 2021, 11:03 am

AforAmpere wrote:
August 24th, 2021, 10:45 am
LV seems to sometimes just choose whatever it wants for gens/frame if that is set high enough, even if it is set differently. With the pattern here, setting it to 28 gens/frame, even at 1 fps, seems to give a completely random real gens/frame.
It's because by default LifeViewer will throttle playback if updates are taking too long to ensure responsiveness.

You can disable performance throttling with Settings->Playback->Throttle.

User avatar
muzik
Posts: 4270
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik » August 24th, 2021, 12:12 pm

Is the reset button supposed to appear usable even in cases where it wouldn't do anything?

User avatar
rowett
Moderator
Posts: 2446
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett » August 24th, 2021, 1:18 pm

muzik wrote:
August 24th, 2021, 12:12 pm
Is the reset button supposed to appear usable even in cases where it wouldn't do anything?
Yes

User avatar
muzik
Posts: 4270
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik » August 31st, 2021, 10:43 am

Could warnings of some sort be added to functions which aren't yet fully supported (e.g. Identify on Margolus, Identify on hexagonal/triangular rules pertaining to missing parameters, and selections and rotation/flipping of said selections in hexagonal/triangular rules) to indicate that they're not yet fully developed and to clarify that unexpected behaviour may arise as a result?

User avatar
muzik
Posts: 4270
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik » August 31st, 2021, 11:32 am

Is TRACK limited intentionally? It seems a bit overly restrictive, and prevents the comfortable tracking of faster-than-light patterns. I assume these restrictions were put in place before higher range rule support?

Code: Select all

x = 0, y = 0, rule = B3/S23
!
#C [[ TRACK 2 2 PASTEMODE 6 PASTEDELTA 2 2 PASTET EVERY 1 0 16384 PASTE
71b2o$72bo$72b2o$73bo$73b2o$74bo$74b2o$75bo$75bo$75bo$76bo$76bo$76bo$
76bo$76bo$76bo$76bo$76bo$76bo$76bo$76bo$76bo$75bo$75bo$75bo$74bo$74bo$
73bo$72b2o$71bo$70bo$69bo$67b2o$65b2o$64bo$62b2o$61bo$59b2o$57b2o$55b
2o$53b2o$52bo$50b2o$48b2o$45b3o$43b2o$39b4o$37b2o$o33b3o$b2o29b2o$3bo
23b5o$4b2o14b7o$6b14o! ]]

Code: Select all

x = 0, y = 0, rule = B3/S23
!
#C [[ TRACK 3 3 PASTEMODE 6 PASTEDELTA 3 3 PASTET EVERY 1 0 16384 PASTE
71b2o$72bo$72b2o$73bo$73b2o$74bo$74b2o$75bo$75bo$75bo$76bo$76bo$76bo$
76bo$76bo$76bo$76bo$76bo$76bo$76bo$76bo$76bo$75bo$75bo$75bo$74bo$74bo$
73bo$72b2o$71bo$70bo$69bo$67b2o$65b2o$64bo$62b2o$61bo$59b2o$57b2o$55b
2o$53b2o$52bo$50b2o$48b2o$45b3o$43b2o$39b4o$37b2o$o33b3o$b2o29b2o$3bo
23b5o$4b2o14b7o$6b14o! ]]
Also, not sure if this is a bug or not, but within the region that gets pasted over, all history cells are replaced with was-always-dead cells and all alive cells are replaced with newly born looking cells, but the pattern behaviour remains overall unchanged:

Code: Select all

x = 0, y = 0, rule = B3/S23
!
#C [[ TRACK 0.5 0 PASTEMODE 6 PASTEDELTA 1 0 PASTET EVERY 2 0 16384 PASTE
71b2o$72bo$72b2o$73bo$73b2o$74bo$74b2o$75bo$75bo$75bo$76bo$76bo$76bo$
76bo$76bo$76bo$76bo$76bo$76bo$76bo$76bo$76bo$75bo$75bo$75bo$74bo$74bo$
73bo$72b2o$71bo$70bo$69bo$67b2o$65b2o$64bo$62b2o$61bo$59b2o$57b2o$55b
2o$53b2o$52bo$50b2o$48b2o$45b3o$43b2o$39b4o$37b2o$o33b3o$b2o29b2o$3bo
23b5o$4b2o14b7o$6b14o! ]]

Sokwe
Moderator
Posts: 2035
Joined: July 9th, 2009, 2:44 pm

Re: Pattern viewer for forum threads

Post by Sokwe » August 31st, 2021, 9:27 pm

When using a script blocker such as NoScript or uBlock on pages with embedded viewers (e.g., here or here), the viewer doesn't appear, but there is a large blank area where the viewer would be. It seems that the canvas element is still being produced, but it can't be drawn on by LifeViewer. If I disable javascript directly in the browser using debugging options, the canvas doesn't seem to be created, and there's no large blank area.

The reason I bring this up is that I want to replace the images in the Lifeline wiki articles with LifeViewer thumbnails, but I would like the images to still appear if JavaScript is disabled. The wiki template LV:Viewer is used to embed the viewer on wiki pages, and it has an option to replace the viewer with specified content when JavaScript is disabled, but due to the reasons stated above, it doesn't work with script blockers.

I consider this a low priority, but if the fix is easy, I would appreciate it. I tried a few things on the wiki, but I wasn't able to get the desired behavior.

Edit: extremely low-priority request: have camera angle work for hexagonal and triangular grids.
-Matthias Merzenich

User avatar
rowett
Moderator
Posts: 2446
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett » September 1st, 2021, 4:27 am

Sokwe wrote:
August 31st, 2021, 9:27 pm
When using a script blocker such as NoScript or uBlock on pages with embedded viewers (e.g., here or here), the viewer doesn't appear, but there is a large blank area where the viewer would be. It seems that the canvas element is still being produced, but it can't be drawn on by LifeViewer. If I disable javascript directly in the browser using debugging options, the canvas doesn't seem to be created, and there's no large blank area.
Short answer: not sure there's anything I can do about it.

Detail:
LifeViewer uses an HTML5 <canvas> element for the display.

For example:

Code: Select all

<canvas width="640" height="520"></canvas>
will create a 640x520 canvas.

The <canvas> element requires Javascript for drawing.

If Javascript is disabled in the browser then the <canvas> is not displayed, and instead any text defined in the <canvas> element is displayed:

Code: Select all

<canvas width="640" height="520">Please enable Javascript to see the canvas!</canvas>
However, if you're using NoScript or uBlock they use Content-Security-Policy HTTP headers to tell the browser it's not allowed to load Javascript. In this case Javascript is enabled in the browser, but the security policy blocks the browser from loading it. So the <canvas> is displayed (since Javascript is enabled) but LifeViewer can't run since it was blocked from loading.

Sokwe wrote:
August 31st, 2021, 9:27 pm
Edit: extremely low-priority request: have camera angle work for hexagonal and triangular grids.
Thanks for the request - it's highly unlikely.

User avatar
rowett
Moderator
Posts: 2446
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett » September 1st, 2021, 10:23 am

muzik wrote:
August 31st, 2021, 11:32 am
Is TRACK limited intentionally? It seems a bit overly restrictive, and prevents the comfortable tracking of faster-than-light patterns. I assume these restrictions were put in place before higher range rule support?
I will extend the allowed range in a future build.

Sokwe
Moderator
Posts: 2035
Joined: July 9th, 2009, 2:44 pm

Re: Pattern viewer for forum threads

Post by Sokwe » September 1st, 2021, 12:34 pm

rowett wrote:
September 1st, 2021, 4:27 am
However, if you're using NoScript or uBlock they use Content-Security-Policy HTTP headers to tell the browser it's not allowed to load Javascript. In this case Javascript is enabled in the browser, but the security policy blocks the browser from loading it. So the <canvas> is displayed (since Javascript is enabled) but LifeViewer can't run since it was blocked from loading.
Thanks for the info. Would it be possible (or reasonable) to create the canvas element dynamically with JavaScript, so that it won't be created if JavaScript is disabled? Again, this is low-priority, since I doubt there are many people who would use this site with script-blockers anyway.
-Matthias Merzenich

User avatar
rowett
Moderator
Posts: 2446
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett » September 2nd, 2021, 3:51 pm

Sokwe wrote:
September 1st, 2021, 12:34 pm
Would it be possible (or reasonable) to create the canvas element dynamically with JavaScript, so that it won't be created if JavaScript is disabled?
Yes it's possible. It will need coordination with Nathaniel since the templates that generate the embedded viewers here on the forum and Wiki will need to change. I'll put it on the backlog.

Post Reply