Page 151 of 178

Re: Pattern viewer for forum threads

Posted: February 3rd, 2025, 9:53 pm
by confocaloid
confocaloid wrote: February 3rd, 2025, 5:33 pm
rowett wrote: February 3rd, 2025, 5:30 pm Would you mind letting me know the specifics of your device? It will help with further optimization planning.
Firefox 134, otherwise the same device as previously:
confocaloid wrote: January 30th, 2024, 12:51 am Celeron 4205U, 4GB RAM, Ubuntu 22.04,
confocaloid wrote: July 20th, 2024, 12:37 pm [...] Laptop, Ubuntu 22.04 / GNOME 42.9, resolution 1366x768, [...]
rowett wrote: February 3rd, 2025, 8:31 pm LifeViewer build 1232 is about 50% faster loading patterns.
Opening the page Water strider in Firefox 134.0.2, Ubuntu 22.04:

Code: Select all

refresh rate 60Hz lv-plugin.js:1288:392
read embedded: 5400ms lv-plugin.js:64:239
page scan: 5448ms lv-plugin.js:66:157
Clicking on the infobox viewer takes 4-5 seconds, and doesn't appear to leave any additional output. The viewer says it is build 1232.

The wiki page's current revision is https://conwaylife.com/w/index.php?titl ... did=158454
The wiki page currently uses the following revision of the RLE page: https://conwaylife.com/w/index.php?titl ... did=158442

Re: Pattern viewer for forum threads

Posted: February 5th, 2025, 5:42 am
by rowett
dbell wrote: February 3rd, 2025, 7:55 pm Could the pattern viewer popup be made resizable like most other windows? That would be very handy for large patterns.

BCNU,
-dbell
LifeViewer build 1236 allows you to maximize/restore the viewer popup with hotkey F9.

Note the window must have focus.

Re: Pattern viewer for forum threads

Posted: February 5th, 2025, 9:16 am
by rowett
hotcrystal0 wrote: February 3rd, 2025, 8:23 pm
rowett wrote: February 3rd, 2025, 7:46 am LifeViewer build 1231 reduces the height of code boxes that contain valid patterns (i.e. have a SHOW IN VIEWER link). This is to give more real estate on the page.
Could there be the option to resize it to make it taller? (the default will be what it is right now, and it resets when you reload the page)
Not sure I understand. Do you want the option to have individual code boxes taller? What's the benefit?

Re: Pattern viewer for forum threads

Posted: February 5th, 2025, 4:15 pm
by hotcrystal0
Forgot it. How about make code boxes containing a rule and its ruletable after the RLE bigger?

Re: Pattern viewer for forum threads

Posted: February 6th, 2025, 11:25 am
by rowett
hotcrystal0 wrote: February 5th, 2025, 4:15 pm How about make code boxes containing a rule and its ruletable after the RLE bigger?
Nice idea. LifeViewer build 1237 will not reduce the height of a code box that contains an @RULE definition.

Code: Select all

x = 3, y = 3, rule = Life
2bo$obo$b2o!

What a lovely glider!
The rule is built-in.

Code: Select all

x = 3, y = 3, rule = EmbeddedRuleLife
2bo$obo$b2o!

What a lovely glider!

@RULE EmbeddedRuleLife

@TABLE
n_states:2
neighborhood:Moore
symmetries:permute

0,1,1,1,0,0,0,0,0,1
1,0,0,0,0,0,0,0,0,0
1,1,0,0,0,0,0,0,0,0
1,1,1,1,1,0,0,0,0,0
1,1,1,1,1,1,0,0,0,0
1,1,1,1,1,1,1,0,0,0
1,1,1,1,1,1,1,1,0,0
1,1,1,1,1,1,1,1,1,0

@NAMES
0 BACKGROUND
1 ALIVE

Re: Pattern viewer for forum threads

Posted: February 7th, 2025, 8:40 pm
by get_Snacked
get_Snacked wrote: February 7th, 2025, 8:15 pm EDIT:
wow!

Code: Select all

x = 19, y = 19, rule = LifeHistory
14.A$3D10.3A$D6.D4.5A.A$3D8.2A3.2A$D.D9.5A$3D10.3A$14.A$11.3A4$11.3A$
5.D8.A$3D2.3D5.3A$D6.D4.5A$3D8.2A3.2A$2.D9.5A.A$3D10.3A$14.A!
[[ PASTET 6 PASTE A! 7 2 ]]
[[ PASTET 5 PASTE A$3A$2.A! 5 12 ]]
i tried to paste in state-3 cells instead of state-1 cells to preserve the red marked cells, but the cells ended up being state-1 nevertheless:

Code: Select all

x = 19, y = 19, rule = LifeHistory
14.A$3D10.3A$D6.D4.5A.A$3D8.2A3.2A$D.D9.5A$3D10.3A$14.A$11.3A4$11.3A$
5.D8.A$3D2.3D5.3A$D6.D4.5A$3D8.2A3.2A$2.D9.5A.A$3D10.3A$14.A!
[[ PASTET 6 PASTE C! 7 2 ]]
[[ PASTET 5 PASTE C$3C$2.C! 5 12 ]]
how do i fix this?

Re: Pattern viewer for forum threads

Posted: February 8th, 2025, 3:45 pm
by rowett
get_Snacked wrote: February 7th, 2025, 8:40 pm i tried to paste in state-3 cells instead of state-1 cells to preserve the red marked cells, but the cells ended up being state-1 nevertheless

how do i fix this?
Try [[ PASTEMODE COPY ]] before the first paste.

Re: Pattern viewer for forum threads

Posted: February 11th, 2025, 12:18 pm
by rowett
Build 1240 adds Safe Mode which helps on low memory devices
  • toggle with Settings>Advanced>Safe Mode (hotkey Shift F9)
    • this setting is saved for the current browser on the current device
  • will not add SHOW IN VIEWER link when pattern uses [[ MAXGRIDSIZE 14 ]]
  • will not Launch Thumbnail when pattern uses [[ MAXGRIDSIZE 14 ]]
    • instead, RLE can be copied by clicking on the Thumbnail
      • this can be disabled with [[ NOCOPY ]]

Re: Pattern viewer for forum threads

Posted: February 15th, 2025, 10:16 am
by hotcrystal0
Can LifeViewer support RLEs beginning with "x rule =" again? It used to, but it doesn't anymore.

Re: Pattern viewer for forum threads

Posted: February 15th, 2025, 10:21 am
by confocaloid
Related discussion:
viewtopic.php?p=197979#p197979
viewtopic.php?p=197982#p197982
viewtopic.php?p=198014#p198014
hotcrystal0 wrote: February 15th, 2025, 10:16 am Can LifeViewer support RLEs beginning with "x rule =" again? It used to, but it doesn't anymore.
I don't see how it could be useful.

I see how it would be awkward and confusing ("principle of least astonishment"), and would unnecessarily complicate the RLE format ("keep it simple").

Re: Pattern viewer for forum threads

Posted: February 15th, 2025, 10:34 am
by hotcrystal0
confocaloid wrote: February 15th, 2025, 10:21 am Related discussion:
viewtopic.php?p=197979#p197979
viewtopic.php?p=197982#p197982
viewtopic.php?p=198014#p198014
hotcrystal0 wrote: February 15th, 2025, 10:16 am Can LifeViewer support RLEs beginning with "x rule =" again? It used to, but it doesn't anymore.
I don't see how it could be useful.

I see how it would be awkward and confusing ("principle of least astonishment"), and would unnecessarily complicate the RLE format ("keep it simple").
It’s for backwards compatibility.

Re: Pattern viewer for forum threads

Posted: February 15th, 2025, 10:38 am
by confocaloid
hotcrystal0 wrote: February 15th, 2025, 10:34 am
confocaloid wrote: February 15th, 2025, 10:21 am Related discussion: [...]
I don't see how it could be useful. [...]
It’s for backwards compatibility.
I don't see much reason to keep "backwards compatibility" for this case. As far as I know there was never any real need for the format you are suggesting, and there were very few attempts to use it (compared to the total amount of RLEs shared on the web), and IIRC posts were converted back to the existing supported RLE format by a moderator.

Re: Pattern viewer for forum threads

Posted: February 15th, 2025, 1:42 pm
by rowett
hotcrystal0 wrote: February 15th, 2025, 10:16 am Can LifeViewer support RLEs beginning with "x rule =" again? It used to, but it doesn't anymore.
No. It is now in line with Golly so patterns can be freely interchanged.

Re: Pattern viewer for forum threads

Posted: February 15th, 2025, 5:01 pm
by muzik
For alternating W rules could a special theme be implemented so that they look more like non-alternating rules?

So this:

Code: Select all

x = 18, y = 1, rule = W60|W102
2ob5o2b2obobobo!
would look more like this:

Code: Select all

x = 18, y = 1, rule = W60|W102
2ob5o2b2obobobo!
[[ COLOR DEAD 0 255 255 COLOR DEADRAMP 255 255 255 ]]
Alternatively, having them use the same alternating system that odd rules used might be a better idea.

While posting this I noticed that the first of these works but the second does not - unsure as to whether this is correct, if both should throw an error, or if neither should:

Code: Select all

x = 18, y = 1, rule = W60|W102
2ob5o2b2obobobo

Code: Select all

x = 18, y = 1, rule = W60|W102
2ob5o2b2obobobo
[[ COLOR DEAD 0 255 255 COLOR DEADRAMP 255 255 255 ]]

Re: Pattern viewer for forum threads

Posted: February 16th, 2025, 3:40 am
by rowett
muzik wrote: February 15th, 2025, 5:01 pm For alternating W rules could a special theme be implemented so that they look more like non-alternating rules?
I already recommended a similar approach with script commands.

If you're interested in special themes then I'm working on neighbour-count based cell colouring and will need colours for each Theme - more soon.
muzik wrote: February 15th, 2025, 5:01 pm While posting this I noticed that the first of these works but the second does not - unsure as to whether this is correct, if both should throw an error, or if neither should
They are both missing the RLE terminator character: !

Most parsers allow this to be missing so it's effectively optional. However, LifeViewer script commands can only be in comments or after the ! character which is why your second example is invalid.

Re: Pattern viewer for forum threads

Posted: February 16th, 2025, 10:41 am
by hotcrystal0
Could we have the ability to make custom themes in LifeViewer without having to use a script beforehand?

Re: Pattern viewer for forum threads

Posted: February 16th, 2025, 11:03 am
by unname4798
hotcrystal0 wrote: February 16th, 2025, 10:41 am Could we have the ability to make custom themes in LifeViewer without having to use a script beforehand?
Clicking on the CUSTOM button in Settings > Theme will show 16 of your custom themes in a 4x4 square. A free slot is labeled [+]. Clicking on a free slot will open a popup "Enter your custom theme name:". Enter the name, and said free slot will be occupied with your custom theme with your name. Clicking on the saved theme applies it. There is a delete button near each custom theme. Clicking on the DELETE button near a slot open a confirmation window saying "Do you want to delete this custom theme:" and the said theme's name. If you click Yes, the said slot will be freed. Clicking on the STANDARD button will return you back to the standard theme selection.

Re: Pattern viewer for forum threads

Posted: February 17th, 2025, 3:39 am
by rowett
LifeViewer is 10 years old! Happy birthday LifeViewer!

Many thanks to everyone who has contributed to make it what it is today. Much appreciated.

Re: Pattern viewer for forum threads

Posted: February 17th, 2025, 4:26 am
by hth3
Can you improve LifeViewer on mobile?

Re: Pattern viewer for forum threads

Posted: February 17th, 2025, 9:44 am
by rowett
hotcrystal0 wrote: February 16th, 2025, 10:41 am Could we have the ability to make custom themes in LifeViewer without having to use a script beforehand?
Unlikely, but thanks for the suggestion. I've got a lot of other higher priority stuff on the backlog.

Re: Pattern viewer for forum threads

Posted: February 17th, 2025, 9:44 am
by rowett
hth3 wrote: February 17th, 2025, 4:26 am Can you improve LifeViewer on mobile?
Depends on what improvements you are after.

Re: Pattern viewer for forum threads

Posted: February 17th, 2025, 9:52 am
by hth3
rowett wrote: February 17th, 2025, 9:44 am
hth3 wrote: February 17th, 2025, 4:26 am Can you improve LifeViewer on mobile?
Depends on what improvements you are after.
Zooming doesn't quite work. It randomly zooms away if I try to zoom with my hand.

Re: Pattern viewer for forum threads

Posted: February 17th, 2025, 4:43 pm
by muzik
Unless something has fundamentally changed about the X and Y commands since last time something about them seems quite broken. I'd expect this to center the camera on X=16 and Y=16, but it overshoots this position considerably:

Code: Select all

x = 29, y = 21, rule = Pulse2
2.7Q$2.Q5.Q$2.Q5.Q$2.K5.Q$5C3.Q$C.K.C3.Q$C.H.C3.Q$C.H.C3.Q$5C3.11Q$2.
Q.N3.Q9.Q$2.Q.5Q9.Q$2.Q15.Q$2.Q15.Q$.P2Q14.Q$.O.Q14.Q5.3Q$.3Q14.Q4.NQ
.K$18.K2.3H.4H$18.2H.3H.4H$18.2H.3H.4H$19.NQ.K2.4H$20.3Q!
[[ ICONS X 16 Y 16 ]]

Re: Pattern viewer for forum threads

Posted: February 17th, 2025, 6:17 pm
by rowett
muzik wrote: February 17th, 2025, 4:43 pm Unless something has fundamentally changed about the X and Y commands since last time something about them seems quite broken. I'd expect this to center the camera on X=16 and Y=16, but it overshoots this position considerably
That's not how camera coordinates work. Camera coordinates are different than pattern coordinates:
  • By default the camera is centered on the loaded pattern. [[ X 0 Y 0 ]] is the camera pan at that position.
  • Cell coordinate (0, 0) is the top left cell in the pattern and cell coordinate (pattern width - 1, pattern height - 1) is the bottom right cell.
By specifying [[ X 16 Y 16 ]] you are panning the camera down 16 cells and right 16 cells. This means that the cells in the pattern are displayed 16 cells up and left from the default centered position. Cell (16, 16) is now where the original top left cell of the pattern was.

In order to pan the camera so a specific cell at (cx, cy) is in the center of the window you calculate [[ X ]] and [[ Y ]] as follows:
X = cx - pattern width / 2
Y = cy - pattern height / 2

which for your pattern gives:
X = 16 - 29 / 2 = 2
Y = 16 - 21 / 2 = 6

[[ X 2 Y 6 ]]

Code: Select all

#C [[ ICONS X 2 Y 6 ]]
#C [[ SHOWINFOBAR ]]
x = 29, y = 21, rule = Pulse2
2.7Q$2.Q5.Q$2.Q5.Q$2.K5.Q$5C3.Q$C.K.C3.Q$C.H.C3.Q$C.H.C3.Q$5C3.11Q$2.
Q.N3.Q9.Q$2.Q.5Q9.Q$2.Q15.Q$2.Q15.Q$.P2Q14.Q$.O.Q14.Q5.3Q$.3Q14.Q4.NQ
.K$18.K2.3H.4H$18.2H.3H.4H$18.2H.3H.4H$19.NQ.K2.4H$20.3Q!
Alternatively, turn on the Info Bar with Settings>Advanced>Info Bar (hotkey Shift I) or script command [[ SHOWINFOBAR ]], pan the camera to where you want it, and read the X and Y locations from the information bar at the top.

Re: Pattern viewer for forum threads

Posted: February 17th, 2025, 7:00 pm
by muzik

Code: Select all

x = 140, y = 37, rule = Pulse2
63.22Q3.19Q$63.Q15.Q4.Q3.Q17.Q$63.Q15.Q4.Q3.Q17.Q$63.Q15.Q4.2Q.2Q17.Q
$63.Q15.Q5.3Q18.Q$63.Q15.4Q3.Q19.Q$63.N42.K$64C42.34C$C62HC42.C32HC$C
62HC42.C32HC$C2H4C3H3C4HC3H5C12H4C3H3C2H4C2H5C2HC42.C2H5CHC17HC5HC$C
6HCHC3HCH3C3HC20HCHC3HC5HCHC6HC42.C4HC3HC17HC5HC$C6HCH2C2HC3HC3HC20HC
H2C2HC5HCHC6HC42.C4HC3H4C3H4CH4C2HC2HC2HC$C3H3C2HCHCHC3HC3H4C5H4C5H3C
2HCHCHC2H3C2H4C3HC42.C4HC3HC3HCHC3HCHC3HCHCHC3HC$C2HC5HC2H2C3HC7HC12H
C5HC2H2CHC9HC2HC42.C4HC3HC3HCHC3HCHC3HCH2C4HC$C2HC5HC3HC3HC7HC12HC5HC
3HCHC9HC2HC42.C4HC3HC3HCHC3HCHC3HCHCHC3HC$C2H5C2H3C2H5CH4C13H5C2H3C2H
5CH4C3HC42.C4HC3HC3HC2H4CHC3HCHC2HC2HC$C62HC42.C32HC$C62HC42.C32HC$
64C42.10C23HC$K114.C2HC3HC13HC2HC$Q114.C3HCHC14HC2HC$Q114.C3HCHC3H3C
2HC3HCHC2HC$Q114.C4HC3HC3HCHC3HCHC2HC$3QP59QOP46Q4.C4HC3HC3HCHC3HCHC
2HC$110.Q4.C4HC3HC3HCHC3HC4HC$110.Q4.C4HC4H3C3H4CHC2HC$110.Q4.C23HC$
110.Q4.C23HC$110.Q4.25C$110.Q28.N$110.Q28.Q$110.Q28.Q$110.Q28.Q$110.Q
28.Q$110.Q28.Q$110.30Q!
[[ AUTOSTART ICONS ZOOM 48 X -6 Y 6 GPS 24
T 63 X -69 Y 6
T 80 X -37 Y -3 ZOOM 8
T 128 X -37 Y -3 ZOOM 8
T 144 X -6 Y -10 ZOOM 48
T 160 X 14 Y -14 ZOOM 16
T 192 X 14 Y -14 ZOOM 16
T 200 X 36 Y -15 ZOOM 48
T 210 X 53 Y 0 ZOOM 16
T 256 X 53 Y 0 ZOOM 16
T 272 X 0 Y 0 ZOOM 1 "10 Years\nCheers for everything!" ]]