ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

Catagolue browser extension

For general discussion about Conway's Game of Life.

Re: Catagolue browser extension

Postby Apple Bottom » May 2nd, 2017, 12:14 pm

BlinkerSpawn wrote:
Apple Bottom wrote:If loading them from files isn't possible in TamperMonkey you could modify the main script to just include them as strings instead; that should work, then.

How would I go about doing this?


Something like this:

var someScript = '
// pasted script
'

// code that uses someScript


See String on MDN. I seem to recall I used backticks instead of single or double quotes (these create ECMAScript template literals), but I couldn't tell you why anymore.
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Re: Catagolue browser extension

Postby Apple Bottom » August 22nd, 2017, 6:07 pm

I've pushed out version 4.2 to addons.opera.com. Changes in this version:

Version 4.2: New: identify (some) objects from jslife-20121230.
             New: handle sample soups for apgluxe seeds (l_*).
             New: word-wrap long apgcodes on haul pages.
             Improved: use correct sample soup overlay border colors for all
             symmetries.
             Internal: Added Angel Marin and Paul Johnson's SHA-256 script.


jslife object identification is based on precomputed lists of apgcodes, which, incidentally, is why it's limited to some objects: I never actually properly implemented this, but OTOH the lists have grown to a point where it'd be a shame to just throw them away.

In any case, the new version should (hopefully) be greenlit by the moderators over on a.o.c soon.

As usual, bug reports etc. are welcome.

EDIT: the extension was greenlit and published.
Last edited by Apple Bottom on August 24th, 2017, 7:34 am, edited 1 time in total.
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Re: Catagolue browser extension

Postby Apple Bottom » August 24th, 2017, 7:33 am

Version 4.3 has been pushed out to addons.opera.com and will hopefully be available before the weekend.

Changes in this version:

Version 4.3: New: add pattern name (if available) and Catagolue URL to RLE.
             New: one-click search by object name (if known).
             Improved: increase maximum RLE pattern size to 250x250.
             Changed: Put RLE comments before pattern header.
             Bugfix: handle Generations and Larger than Life rules in RLE
             headers.
             Internal: don't hardcode Catagolue URL.
             Known issue: RLE generation for Generations rules is broken.


Pattern file generation for Generations patterns may take a bit; RLE doesn't support multistate rules (...right?), so I'll have to hack up an MC encoder, and wrap my head around precisely how multi-state apgcodes work while I'm at it.
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Re: Catagolue browser extension

Postby rowett » August 24th, 2017, 8:32 am

Apple Bottom wrote:Pattern file generation for Generations patterns may take a bit; RLE doesn't support multistate rules (...right?), so I'll have to hack up an MC encoder, and wrap my head around precisely how multi-state apgcodes work while I'm at it.

RLE does support multistate rules - see here.

Here is a Generations pattern in RLE format:
x = 10, y = 10, rule = Star Wars
#D Star Wars Fun collection
#D
#D Steeplechase, p20
#D
#D Mirek Wojtowicz, May 1999
135.A$134.3A$4.CB118.A10.A$6.C9.A12.A6.A11.A6.A6.A..A11.A4.A8.A4.A4.A
11.A9.3A9.A$3.A.A.B7.3A10.3A4.3A9.3A4.3A4.6A9.3A..3A6.3A..3A..3A9.3A7.
AA.AA8.AA$A.6A8.A12.A6.A11.A6.A6.A..A11.A.AA.A8.A.AA.A.AA.A9.AA.AA5.AA
.A.AA7.A$BAA..A.A8.A12.A6.A11.A6.A6.A..A11.A.AA.A8.A.AA.A.AA.A8.AA.A.
AA5.AA.A.AA6.A$C.BA.CB8.3A10.3A4.3A9.3A4.3A4.6A9.3A..3A6.3A..3A..3A6.
AA.A.AA7.AA.AA7.AA$16.A12.A6.A11.A6.A6.A..A11.A4.A8.A4.A4.A8.AA.AA9.3A
8.A$111.3A11.A9.A$112.A21.3A$135.A16$37.A$36.3A15.A..A$37.A15.6A$37.A
16.A..A$36.3A15.A..A$37.A15.6A$37.A16.A..A49.CB$36.3A15.A..A49.A.A25.A
$37.A15.6A47.3A25.3A$4.CB31.A16.A..A12.A..A..A..A..A24.A27.A$6.C29.3A
15.A..A11.15A51.A$3.A.A.B29.A15.6A11.A..A..A..A..A35.A.C14.AA$A.6A29.A
16.A..A12.A..A..A..A..A34.3AB14.A$BAA..A.A15.A12.3A15.A..A11.15A34.A.A
14.A$C.BA.CB15.3A12.A15.6A11.A..A..A..A..A52.AA$23.A13.A16.A..A77.A$
23.A12.3A96.A$22.3A12.A96.3A$23.A13.A97.A$23.A12.3A$22.3A12.A$23.A13.A
$23.A12.3A$22.3A12.A$23.A$$105.AB$105.A.C11.C$104.3A11.B.A$105.A12.4A$
120.A
rowett
Moderator
 
Posts: 725
Joined: January 31st, 2013, 2:34 am
Location: UK

Re: Catagolue browser extension

Postby muzik » August 24th, 2017, 8:38 am

Multistate apgcodes are basically multiple apgcodes, one for each state, separated by underscores.
2c/n spaceships project

Current priorities: see here
muzik
 
Posts: 2595
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Catagolue browser extension

Postby Apple Bottom » August 24th, 2017, 9:28 am

rowett wrote:RLE does support multistate rules - see here.


D'oh, of course -- you'd think I'd have seen enough of these on the forums to know! (I blame a lack of coffee.) Thanks for the pointer to the documentation!

muzik wrote:Multistate apgcodes are basically multiple apgcodes, one for each state, separated by underscores.


Not quite. An n-state rule will generally have fewer than n layers; see the wiki. (The explanation on there is based on what Calcyman previously said about these, I'll amend it with additional details once I've had the time to look at exactly how it's done.)

Apple Bottom wrote:Version 4.3 has been pushed out to addons.opera.com and will hopefully be available before the weekend.


And the new version is already live!
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Re: Catagolue browser extension

Postby BlinkerSpawn » August 24th, 2017, 9:50 am

Apple Bottom wrote:(The explanation on there is based on what Calcyman previously said about these, I'll amend it with additional details once I've had the time to look at exactly how it's done.)

Based on Calcyman's statement (and nothing else, so I may be wrong) I believe that it works like this:
Number the states with 1 being the live state and 2,3,... being the dying states in time order.
Break the state numbers down into binary: 1,10,11,100,101,...
Generate an apgcode for the subset of cells with a 1 in the unit place.
Generate an apgcode for the subset of cells with a 1 in the twos place.
Generate an apgcode for the subset of cells with a 1 in the fours place.
etc.
This creates a logarithmic set of apgcodes uniquely defining the pattern.
LifeWiki: Like Wikipedia but with more spaceships. [citation needed]
User avatar
BlinkerSpawn
 
Posts: 1470
Joined: November 8th, 2014, 8:48 pm
Location: Getting a snacker from R-Bee's

Re: Catagolue browser extension

Postby calcyman » August 24th, 2017, 10:40 am

BlinkerSpawn wrote:
Apple Bottom wrote:(The explanation on there is based on what Calcyman previously said about these, I'll amend it with additional details once I've had the time to look at exactly how it's done.)

Based on Calcyman's statement (and nothing else, so I may be wrong) I believe that it works like this:
Number the states with 1 being the live state and 2,3,... being the dying states in time order.
Break the state numbers down into binary: 1,10,11,100,101,...
Generate an apgcode for the subset of cells with a 1 in the unit place.
Generate an apgcode for the subset of cells with a 1 in the twos place.
Generate an apgcode for the subset of cells with a 1 in the fours place.
etc.
This creates a logarithmic set of apgcodes uniquely defining the pattern.


Almost. The dead state is 0, the live state is 1, and the remaining states are 2, 6, 10, 14, 18, ... in *reverse* chronological order. (This made for a more efficient algorithmic implementation.)
What do you do with ill crystallographers? Take them to the mono-clinic!
User avatar
calcyman
 
Posts: 1348
Joined: June 1st, 2009, 4:32 pm

Re: Catagolue browser extension

Postby Apple Bottom » August 24th, 2017, 6:57 pm

calcyman wrote:Almost. The dead state is 0, the live state is 1, and the remaining states are 2, 6, 10, 14, 18, ... in *reverse* chronological order. (This made for a more efficient algorithmic implementation.)


Right, thanks -- I actually understood that, and version 4.4 of the extension (currently awaiting moderator approval) now generates working RLE files for Generations rules:

Version 4.4: New: RLE generation for Generations rules.
             Improved: Recognize and handle grandfathered rulenames (klife
             and tlife).
             Improved: Don't encode trailing dead cells in RLE patterns.


This hasn't been tested extensively, mind; I've only really looked at three different patterns, xq4_46bqs8_08 in 23/38/3, as well as xq4_ggz2eggof1zx1_5fwguaz01ff7_55wgaazwff7_y1uazwfa_4cxo8zwcc6_z01 and xp32_ss2gzw11_wsfm76cg_x86668_wke2024_ws6i1_x1 in 23/3/11.

But these work, I didn't want to put in any more work testing; also, I wanted to get the new version out as quickly as possible, and besides I'm too smart to make mistakes anyway, right? ;) (Laziness, impatience and hubris -- the three great virtues of a programmer!)

EDIT: 4.4 was greenlit and is now available.
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Re: Catagolue browser extension

Postby Apple Bottom » August 28th, 2017, 5:25 am

Version 4.5 was uploaded before the weekend and is available -- this one has two changes:

Version 4.5: New: breadcrumbs navigation on census pages.
             New: display rule/symmetry/prefix in page titles.


I've been wanting to (mostly) wrap up breadcrumbs navigation for ages, and now I finally did. And having the rule etc. in page titles is very useful for tabbed browsing and bookmarks, since page titles don't all just say "Census - Catagolue" anymore (instead, they say e.g. "Census: B3/S23/C1 - Catagolue). Title headings on census pages are similarly changed.

I've also put the extension's files into a Github repo, so if anyone wants to adapt it for other browsers, that should be a bit easier now. (I don't know about Firefox, but for Chrome the extension may actually work largely unchanged, since Opera is based on Chrome these days.)

4.6 is already in the works, too.

EDIT: I've been asked about a Firefox version. The executive summary is:

  • There isn't one, and I have no current plans of making one.
  • Although the extension is still kind of based on the Greasemonkey content script model, using Greasemonkey/Tampermonkey/... to run it in Firefox likely won't work, as it's too large, too complex, and split across too many files now.
  • If you want to work on turning it into a proper Firefox extension, you're more than welcome!
  • There may be ways of running Chrome/Opera extensions in Firefox; Google is your friend.
  • I understand that Mozilla plans to abandon their own extension framework later this year and switch to Chrome's (which Opera also uses), at which point I may be able to provide a Firefox version of the extension myself.
  • Again, if you want to work on this right now, knock yourself out!
  • If you only want to use the extension, your best bet right now is to use Opera -- even if only for Catagolue.
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Re: Catagolue browser extension

Postby Apple Bottom » August 29th, 2017, 5:20 am

Version 4.6 has been uploaded and published on addons.opera.com. Changes:

Version 4.6: New: correct sample soups for the following symmetries not
             handled by the server:
                * AB_1x256_Test
                * AB_2x128_Test
                * AB_4x64_Test
                * AB_256x256_Test
                * AB_sha512_16x32_Test
                * AB_sha512_20x20_Test
                * 1x256X2
                * 1x256X2+1
             New: add pattern comments with sample soup information to sample
             soup RLEs.
             Improved: merge consecutive $'s in RLE patterns.
             Internal: added Paul Johnston's SHA-512 script.


Sample soups now look like this when you're using the extension (example: bi-pentadecathlon 1):

#N Bi-pentadecathlon 1
#C xp15_4r4y14r4z4r4y14r4
#C D2_x sample soup 1 of 1
#C https://catagolue.appspot.com/hashsoup/D2_x/m_EGQYus4MpyR315711260/b3s23
x = 16, y = 16, rule = B3/S23
boobbbbobboooooo$
oboboobobboobobb$
ooooobbooooooooo$
bbobobooboobbooo$
booobbbbbobboboo$
bobbbbobbbobobbo$
bbbobooooobooooo$
oooobboooobobbbo$
bbobbboooboobobb$
bboooboobooooobb$
oooobobboobboooo$
ooobbboooobooobo$
obobooobbooobobo$
oooobbobooooobob$
obooobobbbobbooo$
oboooooobboooboo!


Correct sample soups are also shown for a number of symmetries, including my own test symmetries as well wwei23's 1x256X2 symmetries. I know the latter have been somewhat controversial, but I have no horses in that particular race. This isn't an endorsement of these symmetries; I only want for Catagolue users to receive sample soups that actually produce the right objects.

If there's other symmetries for which you'd like to seee sample soup recomputation in the extension, let me know. (I don't think we're going to see sample soups for "Saka_Test" anytime soon, though...!)

Object RLE was tightened slightly, so (say) the trans-queen-bee-shuttle now looks like this:

#N Trans-queen-bee-shuttle
#C https://catagolue.appspot.com/object/xp30_w33z8kqrqk8zzzx33/b3s23/C1
x = 7, y = 22, rule = B3/S23
2b2o$2b2o4$3bo$2b3o$bo3bo$ob3obo$b5o11$3b2o$3b2o!


Rather than this:

#N Trans-queen-bee-shuttle
#C https://catagolue.appspot.com/object/xp30_w33z8kqrqk8zzzx33/b3s23/C1
x = 7, y = 22, rule = B3/S23
2b2o$2b2o$$$$3bo$2b3o$bo3bo$ob3obo$b5o$$$$$$$$$$$3b2o$3b2o!


As usual, if you find bugs etc., post here.

And if you're looking for a Firefox version, see the previous post.
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Re: Catagolue browser extension

Postby Apple Bottom » September 5th, 2017, 5:39 am

Opera has finally gone ahead and ack'ed version 4.7 (uploaded last week), with the following changes:

Version 4.7: New: correct sample soups for the following symmetries:
                 * 32x32
                 * AB_C1_2x2_32x32_Test
             New: display average objects/soup and soups/haul on census pages.
             New: display "official" symmetries in bold on rule overview pages.
             Changed: also include object and haul URLs in sample soup RLE.


The second-to-last item is already obsolete since the same thing was implemented server-side afterwards; it'll be gone in 4.8 (which I'll upload and submit for moderator approval right in a moment).

The 32x32 symmetry was used by wwei23, BTW, and just consists of four C1 soups glued together.
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Re: Catagolue browser extension

Postby Apple Bottom » September 6th, 2017, 5:24 am

4.8 has gone live on addons.opera.com. Changes in this version:

Version 4.8: New: correct sample soups for the following symmetries:
                 * MB_C1_2x2_32x32_Test (=AB_C1_2x2_32x32_Test)
             Improved: also use sample soup overlay on haul pages.
             Improved: sort "inflated" symmetries next to their "base"
               symmetries.
             Improved: keep overly long symmetries from breaking the layout on
               object pages.
             Improved: keep long roots from breaking haul overview pages.
             Removed: don't display "official" symmetries in bold on rule
               overview pages anymore (this was implemented server-side).
             Bugfix: avoid spurious NaN's in AB_*_Test sample soups.
             Internal: begin preparing for non-standard universe topologies.


I've held off on generating correct sample soups for inflated (i*) symmetries, on the assumption that this will be done server-side Real Soon Now, but if not, it wouldn't be a problem doing this in the extension. (So if there's no plans to do this for now... let me know.)

As usual, bug reports, suggestions, and patches are welcome.
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Re: Catagolue browser extension

Postby Apple Bottom » September 13th, 2017, 7:57 am

4.9 is live on addons.opera.com now, with just one change:

Version 4.9: New: correct sample soups for the following symmetries:
                 * AB_D2_x_skewgutter_Test


Rhombic requested support in apgsearch for a diagonal (skew-)gutter symmetry here. I implemented a test symmetry in 0.54+0.33i-ab2. This version of the browser extension reconstructs the correct sample soups for this symmetry.
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Re: Catagolue browser extension

Postby Apple Bottom » September 21st, 2017, 7:29 am

5.0 is now live on addons.opera.com. (This is not a new major release; the version number simply rolled around from 4.9 to 5.0, the same way it does in e.g. OpenBSD.)

Changes:

Version 5.0: New: encode objects in SOF format.
             New: one-click search by SOF on pentadecathlon.com.
             Changed: escape name/apgcode for one-click searches.


The SOF encoder is fairly primitive for now and only does a straightforward conversion of the object as represented by its apgcode; it does not attempt to work out the standard form (as defined on pentadecathlon.com). (Trying to that would require more machinery behind the scenes, e.g. the ability to evolve patterns; I'm also vaguely concerned about page load performance.)

Nonetheless it's good enough to find still lives on pentadecathlon.com, at the very least. (This, BTW, is what I was primarily after; also displaying the SOF code to the user is just an extra bonus, a low-hanging fruit to be picked while I was at it.)

One problem that remains open is linking to Mark Niemiec's life pages; I'd really like to allow the user to automatically feed a pattern into Mark's LifeSrch page, but since the search is performed client-side, this may not be possible.

As usual, bug reports (better yet, bug fixes), patches, ideas, thoughts etc. are welcome.
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Re: Catagolue browser extension

Postby Apple Bottom » October 5th, 2017, 4:46 am

Yadda yadda new version 5.1, yadda yadda already live, yadda yadda changelog:

Version 5.1: New: correct sample soups for the following symmetries:
                 * MB_bad8x8_test
                 * MB_dense1x8_test
                 * MB_dense2x8_test
Living proof that a little knowledge is a dangerous thing.

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 743
Joined: July 27th, 2015, 2:06 pm

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests