"Show in Viewer" should be readded for invalid RLEs

For discussion directly related to ConwayLife.com, such as requesting changes to how the forums or home page function.
Post Reply
User avatar
muzik
Posts: 5897
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

"Show in Viewer" should be readded for invalid RLEs

Post by muzik » January 17th, 2022, 12:14 pm

For probably a couple of years now, code boxes which contain invalid patterns/RLEs (as opposed to things which are not patterns at all) have been made to not display a "Show in Viewer" link on the top. I've grown to quite dislike this change for a handful of reasons:

-Why exactly is a given pattern invalid? We're given no way of knowing without either manual inspection (and for subtle errors, things can be easy to miss, and I'd rather not be wasting time on looking for something not immediately obvious when LifeViewer could be telling me exactly what went wrong in seconds) or manually copying and pasting the pattern in question over to another tab containing a LifeViewer input box (which, while potentially less time-consuming for diagnostics, still takes more time than I'd like it to).
-What is the pattern in question supposed to look like? Again, there's no way to know without opening the pattern in another LifeViewer window or Golly or something else (and there's no guarantee that Golly supports the rulespace in the first place and won't just immediately reject the entire rule file).
-It's kind of inconsistent as well. Invalid script commands don't stop a pattern from being viewed, so why should an invalid RLE (especially one which can be confirmed to be an RLE in the first place)?

I'm creating a separate thread for this since I'm not sure whether it's Chris or Nathaniel who'd be in control of making such a change to allow these to be playable.

One thing I would like to note is that I'd like to preserve the ability to see at a glance whether a pattern is valid without having to open the viewer. Currently the (persistent after the page fully loads since it takes time to fetch ruletables and the like) absence of "show in viewer" on a code box indicates this - but that's what this thread is intending to get rid of, so perhaps we could have it be phrased differently: valid RLEs could have the link be "play in viewer" (since the pattern would usually be playable if this shows up), whereas invalid RLEs (which the site recognises as RLEs rather than any old text, but are otherwise invalid for some reason or another) use "show in viewer" instead (as the pattern within would only be viewable, and further interactivity would be limited).

----

Here's a list of several different types of errors, compiled here for testing purposes, and as a demonstration of patterns that may not have been obviously flawed. The first three of these, despite being invalid, actually do have the ability to be shown in LifeViewer, unlike the rest (feel free to add "the forum doesn't perfectly distinguish between valid and invalid RLEs before forbidding what can be run" to the above list of reasons I want to see this change):

Bounded grid which is too large

Code: Select all

x = 10, y = 10, rule = B3/S23:T10000,10000
2o2b2obobo$o2bo3bo$b3o2bobo$o4bo$2bo2b3obo$4bobo2bo$7ob2o$bo5b2o$5b4o$
2o4bobo!
Pattern which is too large

Code: Select all

x = 10, y = 10, rule = B3/S23
2o2b2obobo$o2bo3bo$b3o2bobo$o4bo$2bo2b3obo$4bobo2bo$7ob2o$bo5b2o$5b10000o$
2o4bobo!
Invalid states in a pattern

Code: Select all

x = 10, y = 10, rule = B3/S23History
GA2.2A.A.A$A2.A3.A$.3A2.A.A$A4.A$2.A2.3A.A$4.A.A2.A$7A.2A$.A5.2A$5.4A
$2A4.A.A!
Now for examples which can't be shown, but should:

Repeated number in isotropic non-totalistic rulestring

Code: Select all

x = 4, y = 4, rule = B3-j3j/S23
bo$o$o2bo$3o!
HROT [R]History

Code: Select all

x = 4, y = 4, rule = R1,C0,S2-3,B3History
bo$o$o2bo$3o!
Partially-unbounded HROT

Code: Select all

x = 10, y = 10, rule = R1,C0,S2-3,B3:T100,0
3o5b2o$o8bo$2bo4bobo$3b4o$3bo2bo$3bo2bo$3b4o$obo4bo$o8bo$2o5b3o!
Invalid bounded grid

Code: Select all

x = 9, y = 18, rule = B3/S23:S30*
b2o$bo$bo$2o$3b2o$3bo$3bo$3bo$2b2o$5b2o$5bo$5bo$5bo$4b2o$7b2o$7bo$7bo$
6b2o!
Range-0 HEOT

Code: Select all

x = 3, y = 3, rule = R0,C2,S0,B0
3o$3o$3o!
Generations with less than 2 states

Code: Select all

x = 3, y = 3, rule = /2/1
3A$A.A$3A!
Invalid character/excessive number in R1 OT Moore

Code: Select all

x = 10, y = 3, rule = B3/S239
b2o4bo$obo4bobo$2bo4b2o!
Unbounded B0 in HROT

Code: Select all

x = 8, y = 8, rule = R1,C0,S2-3,B0-3
b6o$2o4b2o$o2b2o2bo$ob4obo$ob4obo$o2b2o2bo$2o4b2o$b6o!
Excessive number in HROT

Code: Select all

x = 10, y = 10, rule = R1,C0,S2,B3,9
2o6b2o$ob6obo$b2o2bob2o$bo2b2o2bo$b6obo$bob6o$bo2b2o2bo$b2obo2b2o$ob6o
bo$2o6b2o!
Generations B0

Code: Select all

x = 8, y = 8, rule = 2/03/3
3bo$3bobo$bo$6b2o$2o$6bo$2bobo$4bo!
Invalid transition map

Code: Select all

x = 8, y = 8, rule = MAPERROR
o4bo!
Invalid character in Wolfram rule / Wolfram rule below 0

Code: Select all

x = 8, y = 8, rule = W-1
o!
Odd / B0 Wolfram rule

Code: Select all

x = 8, y = 8, rule = W1
o!
Excessive Wolfram rule

Code: Select all

x = 8, y = 8, rule = W256
o!
Margolus with non-15 B0

Code: Select all

x = 7, y = 3, rule = M14,15,13,12,11,10,9,8,7,6,5,4,3,2,1,0
o3b3o$3o2bo$bo!
Margolus with 15 B0 but no D15

Code: Select all

x = 7, y = 3, rule = M15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,1
o3b3o$3o2bo$bo!
Odd triangular bounded grid (HROT)

Code: Select all

x = 21, y = 20, rule = R1,C0,S0,12,B1,NL:T21,21
4b13o3bo$3bo7b4o3b3o$2bo7bo2b2o2bo2bo$2bo7bo2bob2o3bo$bo7bo3b2obo3bo$b
o6bo3bo4bo2bo$o6bo2b3o5b3o$o6bobo2bo3b5o$o5bobo3bob2o2b3o$o5b2o2bob2o
3bob2o$o4bo5b2o3bo3bo$o3bo5b2o3bo4bo$o2bo5bobo2bo4b2o$obo4b2o2bobo5b2o
$b6o4bobo5b2o$11b2o6b2o$11b2o5bobo$11b2o5bobo$11b2o3b2o2bo$10b11o!
Odd triangular bounded grid

Code: Select all

x = 21, y = 20, rule = B1/S0ZL:T21,21
4b13o3bo$3bo7b4o3b3o$2bo7bo2b2o2bo2bo$2bo7bo2bob2o3bo$bo7bo3b2obo3bo$b
o6bo3bo4bo2bo$o6bo2b3o5b3o$o6bobo2bo3b5o$o5bobo3bob2o2b3o$o5b2o2bob2o
3bob2o$o4bo5b2o3bo3bo$o3bo5b2o3bo4bo$o2bo5bobo2bo4b2o$obo4b2o2bobo5b2o
$b6o4bobo5b2o$11b2o6b2o$11b2o5bobo$11b2o5bobo$11b2o3b2o2bo$10b11o!
Unsupported HROT bounded grid type

Code: Select all

x = 10, y = 10, rule = R1,C0,S2-3,B3,NM:K100,100
2o2b2obobo$o2bo3bo$b3o2bobo$o4bo$2bo2b3obo$4bobo2bo$7ob2o$bo5b2o$5b4o$
2o4bobo!
Non-existent INT transition presence or negation

Code: Select all

x = 9, y = 5, rule = B3-z/S23
6b3o$5bo2bo$o7bo$obo5bo$2o3bobo!
I'll likely add or reply with more examples in future for further testing.
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.

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

Re: "Show in Viewer" should be readded for invalid RLEs

Post by dvgrn » January 17th, 2022, 12:56 pm

It certainly is likely to be mysterious to most users, for some of these cases, why the "Show in Viewer" link doesn't appear. The "Show in Viewer" link is all LifeViewer's work, as far as I know -- LifeViewer runs through the forum page looking for code blocks, and basically inserts the "Show in Viewer" link into the HTML at the appropriate spots, but only if it thinks it can display the pattern.

Code blocks that aren't recognized as patterns -- e.g., Python or Lua scripts! -- don't display the "Show in Viewer" link. For the script cases, and text-display cases like these (the three code blocks at the bottom) ... we probably don't want LifeViewer adding anything. It's also nice if quoted pattern code blocks that have been shortened (sometimes still including the header line to show bounding box size, sometimes not) also don't show a Show in Viewer link, since they've been deliberately damaged.

So it's kind of tricky to add links in all the right places without adding links in the wrong places. Maybe it could be a feature request to have LifeViewer add something other than a link, like a "** BAD RULE NAME**" error message or something, depending on the error -- or a link to hypothetical LifeViewer-related error documentation on LifeWiki, maybe? We'll see if Chris wants to put that on the backlog.

However, having a list of common formatting errors along these lines would certainly be helpful, so it's probably a good idea to add a LifeWiki page showing the different formatting problems -- whether or not any changes get made to LifeViewer. So that could be a good next step, regardless.

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

Re: "Show in Viewer" should be readded for invalid RLEs

Post by rowett » January 17th, 2022, 2:41 pm

muzik wrote:
January 17th, 2022, 12:14 pm
For probably a couple of years now, code boxes which contain invalid patterns/RLEs (as opposed to things which are not patterns at all) have been made to not display a "Show in Viewer" link on the top.
They will now display a "Show Pattern Error" link which will popup a dialog showing what the issue is.

Post Reply