I’ve started trying. It takes a while, but configuring regular apgmera for b3s23/D8_1 and running it with -v 20 (or a large number) prompts it to start reviewing H8_1 hauls. I assume a similar method will work for the other clogged backlogs. I am not sure why the hacked version does not review hauls.
I should have access to my powerful desktop computer in an hour or two, and then I will start clearing the backlogs.
EDIT: It still takes a while, due to the size of the hauls, and I think that for H4_x1, they are being uploaded faster than I can verify them.
EDIT 2: ObjectServlet.java needs an update to allow Catagolue to properly 'officially' support the new GPU symmetries; here is the updated version:
Code: Select all
package com.cp4space.catagolue.servlets;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import com.cp4space.catagolue.census.Census;
import com.cp4space.catagolue.census.CommonNames;
import com.cp4space.catagolue.patterns.GolObject;
import com.cp4space.payosha256.PayoshaUtils;
import com.cp4space.catagolue.utils.SvgUtils;
import com.cp4space.catagolue.servlets.HashsoupServlet;
import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
public class ObjectServlet extends ExampleServlet {
public static boolean isExplicit(String apgcode) {
return (apgcode.charAt(0) == 'x');
}
public static int isUnofficial(String symmetry) {
if (symmetry.contains("/")) {
// Combined rulesym. Take the final component:
String[] symparts = symmetry.split("/");
return isUnofficial(symparts[symparts.length - 1], symparts[0]);
} else {
return isUnofficial(symmetry, "");
}
}
public static int isUnofficial(String symmetry, String rule) {
int symstat = 2;
if ((symmetry.length() <= 1) || (symmetry.length() > 50)) {
// Placing this first prevents later recursion limit problems.
symstat = 4;
} else if (symmetry.contains("wwei") || symmetry.contains("nonymous") || symmetry.contains("replit")) {
// Troll symmetry:
symstat = 3;
} else if (symmetry.equals("Uploads") || symmetry.equals("Saka_Test") || symmetry.equals("heavgolue") || symmetry.equals("yujhparty") || symmetry.equals("textarea")) {
// More troll symmetries:
symstat = 3;
} else if (symmetry.charAt(0) == 'i') {
// Inflated symmetry:
symstat = isUnofficial(symmetry.substring(1), rule);
if (symstat < 1) { symstat = 1; }
} else if ((rule == null) || (rule.length() == 0)) {
// Possible official symmetry on ANY grid:
if(isOfficialSquare(symmetry) || isOfficialHex(symmetry)) { symstat = 0; }
} else if (rule.charAt(rule.length() - 1) != 'h') {
// Possible official symmetry on a square grid:
if(isOfficialSquare(symmetry)) { symstat = 0; }
} else {
// Possible official symmetry on a hex grid:
if(isOfficialHex(symmetry)) { symstat = 0; }
}
return symstat;
}
public static String[] getOfficialSquareSymmetries() {
String[] offsyms = {"1x256", "2x128", "4x64", "8x32", "C1", // asymmetric;
"C2_1", "C2_2", "C2_4", "C4_1", "C4_4", // cyclic;
"D2_x", "D2_+1", "D2_+2", "D8_1", "D8_4", // dihedral;
"D4_+1", "D4_+2", "D4_+4", "D4_x1", "D4_x4", // dihedral;
// "D2_+1_gO1s0", "D2_+1_gO1s1", "D2_+1_gO1s2", // dihedral (w/ gutter);
"G1", // asymmetric (GPU);
"G2_1", "G2_2", "G2_4", "G4_1", "G4_4", // cyclic (GPU);
"H2_+1", "H2_+2", "H2_x", "H8_1", "H8_4", // dihedral (GPU);
"H4_+1", "H4_+2", "H4_+4", "H4_x1", "H4_x4"}; // dihedral (GPU).
return offsyms;
}
public static boolean isOfficialSquare(String symmetry) {
String[] offsyms = getOfficialSquareSymmetries();
for (int i = 0; i < offsyms.length; i++) {
if (symmetry.equals(offsyms[i])) { return true; }
}
return false;
}
public static boolean isOfficialHex(String symmetry) {
String[] offsyms = {"1x256", "2x128", "4x64", "8x32", "C1", // asymmetric;
"C2_1", "C2_4", "C3_1", "C3_3", "C6", // cyclic;
"D2_x", "D2_xo", "D4_x1", "D4_x4", "D6_1", // dihedral;
"D6_1o", "D6_3", "D12"}; //dihedral.
for (int i = 0; i < offsyms.length; i++) {
if (symmetry.equals(offsyms[i])) { return true; }
}
return false;
}
/**
* Auto-generated by Eclipse:
*/
private static final long serialVersionUID = 1L;
@Override
public String getTitle(HttpServletRequest req) {
String apgcode = req.getParameter("apgcode");
String pathinfo = req.getPathInfo();
if (pathinfo != null) {
String[] pathParts = pathinfo.split("/");
if ((pathParts.length >= 2) && (apgcode == null)) {
apgcode = pathParts[1];
}
}
if (apgcode == null) {
return "No object specified";
} else {
Map<String, String> namemap = new HashMap<String, String>();
CommonNames.getNamemap("std", namemap, false);
if (namemap.containsKey(apgcode)) {
return " (" + apgcode + ")!" + namemap.get(apgcode);
} else {
return apgcode;
}
}
}
@Override
public void writeHead(PrintWriter writer, HttpServletRequest req) {
String rulestring = req.getParameter("rule");
String apgcode = req.getParameter("apgcode");
String pathinfo = req.getPathInfo();
if (pathinfo != null) {
String[] pathParts = pathinfo.split("/");
if ((pathParts.length >= 2) && (apgcode == null)) {
apgcode = pathParts[1];
}
if ((pathParts.length >= 3) && (rulestring == null)) {
rulestring = pathParts[2];
}
}
if ((rulestring == null) || (apgcode == null)) { return; }
if ((rulestring.equals("")) || (apgcode.equals(""))) { return; }
String slashed = HashsoupServlet.gollifyRule(rulestring);
writer.println("<script type='text/javascript' src='/js/rle_tools.js'></script>");
writer.println("<script type='text/javascript' src='/js/codebox.js'></script>");
writer.println("<script type='text/javascript'>");
writer.println("function do_it() {");
writer.println(" var rle = cells_to_rle(decodeCanon(\"" + apgcode + "\"), \"" + slashed + "\");");
writer.println(" var prerle = \"#C [[ GRID THUMBLAUNCH THUMBSIZE 2 THEME Catagolue ]] <br>\\n\";");
writer.println(" var code = document.getElementById('code0');");
writer.println(" code.innerHTML = rle;");
writer.println(" var code1 = document.getElementById('code1');");
writer.println(" code1.innerHTML = prerle.concat(rle);");
writer.println(" }");
writer.println("</script>");
writer.println("<style type='text/css'><!--");
writer.println("div.codebox { padding: 3px; background-color: #FFFFFF; border: 1px solid #d8d8d8; font-size: 1em; }");
writer.println("div.selall { text-transform: uppercase; border-bottom: 1px solid #CCCCCC; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block; }");
writer.println("blockquote div.codebox { margin-left: 0; }");
writer.println("div.codebox code { overflow: auto; display: block; height: auto; max-height: 200px; white-space: normal; padding-top: 5px;font: 0.9em Monaco, \"Andale Mono\",\"Courier New\", Courier, mono; line-height: 1.3em; color: #8b8b8b; margin: 2px 0; }");
writer.println("--></style>");
}
@Override
public void writeContent(PrintWriter writer, HttpServletRequest req) {
String rulestring = req.getParameter("rule");
String apgcode = req.getParameter("apgcode");
String pathinfo = req.getPathInfo();
if (pathinfo != null) {
String[] pathParts = pathinfo.split("/");
if ((pathParts.length >= 2) && (apgcode == null)) {
apgcode = pathParts[1];
}
if ((pathParts.length >= 3) && (rulestring == null)) {
rulestring = pathParts[2];
}
}
if (apgcode == null || apgcode.length() == 0) {
writer.println("<p>No object has been specified. Please provide a valid apgcode to describe the object.</p>");
writer.println("<p>Sample objects:</p>");
writer.println("<ul>");
writer.println("<li><a href=\"/object/xp15_4r4z4r4/b3s23\">pentadecathlon (b3s23)</a></li>");
writer.println("<li><a href=\"/object/xs15_354cgc453/b3s23\">moose antlers (b3s23)</a></li>");
writer.println("<li><a href=\"/object/xq7_3nw17862z6952/b3s23\">loafer (b3s23)</a></li>");
writer.println("<li><a href=\"/object/xq3_mhqkzarahh0heezdhb5/b3s23\">dart (b3s23)</a></li>");
writer.println("<li><a href=\"/object/xp138_w8gw259r84z79431y1go4iszx42rik8w12/b3s23\">Gabriel's p138 (b3s23)</a></li>");
writer.println("<li><a href=\"/object/xq48_07z8ca7zy1e531/b36s23\">bomber (b36s23)</a></li>");
writer.println("</ul>");
writeIdentifyBox(writer, req);
writer.println("<p>Alternatively provide an apgcode and rulestring:</p>");
writer.println("<form action=\"/object\" method=\"GET\">");
writer.println("<table><tr><td><b>apgcode:</b></td><td colspan=\"2\"><input type=\"text\" name=\"apgcode\" size=\"40\"></td></tr>");
writer.println("<tr><td><b>rule:</b></td><td><input type=\"text\" name=\"rule\" value=\"b3s23\"></td>");
writer.println("<td><input type=\"submit\" value=\"Submit\"></td></tr></table>");
writer.println("</form>");
} else if (rulestring == null || rulestring.length() == 0) {
writer.println("<p>No rule has been specified. Please specify a rule or choose the " +
"<a href=\"/object/" + apgcode + "/b3s23\">default (b3s23)</a>.</p>");
writeComments(writer, req, "object_"+apgcode, CensusServlet.isAdmin());
} else {
GolObject golObject = new GolObject(rulestring, apgcode);
if (golObject.validatePattern()) {
writer.println("<table cellspacing=1>");
writer.println("<tr><td>");
if (isExplicit(apgcode)) {
writer.println("<script type='text/javascript' src='/js/lv-plugin.js'></script>");
writer.println("<div class=\"rle\"><div style=\"display:none;\">");
writer.println("<code id=\"code1\">#C [[ GRID THUMBLAUNCH THUMBSIZE 2 THEME Catagolue ]] <br>x = 1, y = 1, rule = B3/S23<br>b!</code></div>");
writer.println("<canvas width=\"240\" height=\"240\" style=\"margin-left:1px;\"></canvas></div>");
} else {
SvgUtils.apgToSvg(writer, rulestring, apgcode, 320, 320, 20);
}
writer.println("</td><td style=\"vertical-align:top\">");
/*
writer.println("<p>");
golObject.inlineDescription(writer);
writer.println("</p>");
*/
golObject.inlineAttributes(writer);
writer.println("</td></tr>");
writer.println("</table>");
{
Map<String, String> namemap = new HashMap<String, String>();
CommonNames.getNamemap("nfts", namemap, false);
if (namemap.containsKey(apgcode)) {
String[] identifiers = namemap.get(apgcode).split("|");
writer.println("<h3>Non-fungible token</h3>");
writer.println("<table cellspacing=1><tr><td style=\"vertical-align:top\">");
writer.println("<p>A <b>non-fungible token</b> of this pattern");
if (identifiers[1].equals("unminted")) {
writer.println("will be");
} else {
writer.println("has been");
}
writer.println("minted by its discoverer, available <a href=\"/nfts/" + identifiers[0] + "\">here</a>.</p>");
writer.println("</td><td>");
writer.println("<img src=\"/autogen/nfts/" + identifiers[0] + ".gif\" />");
writer.println("</td></tr></table>");
}
}
if (isExplicit(apgcode)) {
writer.println("<h3>Pattern RLE</h3>");
writer.println("<div class=\"rle\"><div class=\"codebox\"><div class=\"selall\">");
writer.println("Code: <a href=\"\" onclick=\"selectCode(this); return false;\">Select all</a>");
writer.println("</div><div><code id=\"code0\"></code></div></div>");
writer.println("<img src=\"/images/Clear.gif\" onload=\"do_it()\" /></div>");
}
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
String synthesis = Census.getMetadatum(datastore, rulestring, apgcode, "synthesis");
if (synthesis != null) {
writer.println("<h3>Glider synthesis</h3>");
writer.println("<script type='text/javascript' src='/js/lv-plugin.js'></script>");
writer.println("<div class=\"rle\"><div class=\"codebox\"><div class=\"selall\">");
writer.println("Code: <a href=\"\" onclick=\"selectCode(this); return false;\">Select all</a>");
writer.println("</div><div><code id=\"code2\">#C [[ GRID MAXGRIDSIZE 14 THEME Catagolue ]] <br>");
writer.println(synthesis.replace("\n", "<br>\n"));
writer.println("</code></div></div>");
writer.println("<canvas width=\"900\" height=\"480\" style=\"margin-left:1px;\"></canvas></div>");
}
writer.println("<h3>Sample occurrences</h3>");
String occurrences = Census.getMetadatum(datastore, rulestring, apgcode, "samples");
if (occurrences == null || occurrences.length() <= 1) {
writer.println("<p>There are no sample soups stored in the Catagolue.</p>");
} else {
String[] parts = occurrences.split("\n");
Map<String, Collection<String> > map = new TreeMap<String, Collection<String>>();
int abstotal = 0;
for (String part : parts) {
String symmetry = part.split("/")[0];
if (isUnofficial(symmetry) >= 3) { continue; }
abstotal += 1;
Collection<String> values = map.get(symmetry);
if (values==null) {
values = new ArrayList<String>();
map.put(symmetry, values);
}
values.add(part.replaceAll("%", "pct"));
}
if (abstotal == 0) {
writer.println("<p>There are no sample soups stored in the Catagolue.</p>");
} else {
writer.println("<p>There are "+String.valueOf(abstotal)+" sample soups in the Catagolue:");
}
for (int i = 0; i < 3; i++) {
boolean used = false;
for (Map.Entry<String, Collection<String> > entry : map.entrySet()) {
String symmetry = entry.getKey();
String symmetry2 = symmetry;
if (symmetry2.charAt(0) == 'G') {
symmetry2 = "C" + symmetry2.substring(1);
} else if (symmetry2.charAt(0) == 'H') {
symmetry2 = "D" + symmetry2.substring(1);
}
int symstat = isUnofficial(symmetry2);
if (symstat != i) { continue; }
String linkcolour = "blue";
try {
if (symmetry2.equals("C1")) {
linkcolour = "black";
} else {
MessageDigest md = MessageDigest.getInstance("SHA-256");
md.update(symmetry2.getBytes("UTF-8"));
String hexbytes = PayoshaUtils.bytesToHex(md.digest());
linkcolour = "#" + hexbytes.substring(0,6);
}
} catch (UnsupportedEncodingException e) {
} catch (NoSuchAlgorithmException e) {
}
if (!used) {
used = true;
if (i == 0) { writer.println("<h4>Official symmetries</h4>"); }
if (i == 1) { writer.println("<h4>Inflated symmetries</h4>"); }
if (i == 2) { writer.println("<h4>Unofficial symmetries</h4>"); }
if (i == 3) { writer.println("<h4>Troll symmetries</h4>"); }
writer.println("<table style=\"background:#a0ddcc;border:2px solid;border-radius:10px;width:100%\">");
writer.println("<tr><th>Symmetry</th><th>Soups</th><th>Sample soup links</th></tr>");
}
writer.println("<tr><td colspan=\"3\" style=\"padding-top:0;padding-bottom:0;margin:0\"><hr style=\"margin:0\" /></td></tr><tr>");
writer.println("<td style=\"max-width:200px;width:200px;min-width:200px\"><a href=\"/census/" + rulestring + "/" + symmetry + "\">" + symmetry + "</a></td>");
writer.println("<td>" + entry.getValue().size() + "</td><td>");
int ii = 0;
for (String part : entry.getValue()) {
String elem = "•";
String lcol = linkcolour;
writer.print("<a style=\"word-break:break-all;color:" + lcol + "\" href=\"/hashsoup/" + part + "/" + rulestring + "\">" + elem + "</a> ");
ii += 1; if (ii % 5 == 0) { writer.println(" "); }
}
writer.println("</td></tr>");
}
if (used) { writer.println("</table>"); }
}
writer.println("</p>");
}
writeComments(writer, req, "object_"+apgcode, true);
} else {
writer.println("<p>The apgcode prefix does not accurately reflect the behaviour " +
"of the pattern encoded in the suffix under the specified rule. As such, the " +
"provided apgcode is invalid in this rule.</p>");
}
}
}
}