CGoL Programming Language

For discussion of specific patterns or specific families of patterns, both newly-discovered and well-known.
Post Reply
User avatar
squareroot12621
Posts: 682
Joined: March 23rd, 2022, 4:53 pm

Re: CGoL Programming Language

Post by squareroot12621 » April 28th, 2022, 4:51 pm

I know I have double-posted, but I added part of my adding/subtracting circuitry:

Code: Select all

x = 270, y = 199, rule = B3/S23Super
259.2U$259.U.U$261.U4.2U$257.4U.2U2.U2.U$257.U2.M.M.U.U.2U$260.M.M.M.
U$261.2M.M.U$265.U2$251.2U$252.U7.2M$252.U.U5.2M$4.N.N246.UM$S3.N.N$.
2S.3N253.3H5.H$2S4.N255.H6.H$6.N254.H5.3H2$10.2N$6.S5.N250.MU$7.2S.2N
230.2U10.2H7.U$6.2S4.N230.U9.H.H8.3U$10.2N195.2Q32.U13.H10.U$207.Q.Q31.
5U14.2U$209.Q4.2Q30.U13.U$205.4Q.2Q2.Q2.Q25.U2M12.U.U$205.Q2.M.M.Q.Q.
2Q24.U15.MU$9.L36.2N.N.N.N2.N3.N7.pA17.2N.N.N.N2.N2.2N7.pA17.2N.N.N.N
2.N2.2N7.pA17.2N.N.N.N2.N2.N.N6.pA9.L9.M.M.M.Q27.U3M7.2H$10.L9.2N23.N
3.N.N.2N.N2.2N5.3pA16.N3.N.N.2N.N4.N4.3pA16.N3.N.N.2N.N4.N4.3pA16.N3.
N.N.2N.N2.N.N4.3pA9.L10.2M.M.Q25.2U3.M3.2M2.H.H$11.L4.S5.N22.N.N.N.N.
N.2N3.N4.pA19.N.N.N.N.N.2N3.N4.pA19.N.N.N.N.N.2N2.2N4.pA19.N.N.N.N.N.
2N2.3N3.pA12.L14.Q25.U2.U2M4.2M2.H$12.L4.2S2.N23.N.N.N.N.N2.N3.N4.2pA
18.N.N.N.N.N2.N2.N5.2pA18.N.N.N.N.N2.N4.N3.2pA18.N.N.N.N.N2.N4.N3.2pA
11.L40.2U.U$13.L2.2S2.N25.2N2.N2.N2.N2.3N24.2N2.N2.N2.N2.3N24.2N2.N2.
N2.N2.2N25.2N2.N2.N2.N4.N16.L2Q3.2N5.3N.2N25.U$14.L5.3N175.L.Q3.N.N.2M
.N3.N.N24.2U$15.L34.N38.N.N2.N35.N3.N35.N3.N2.N.N18.L.Q.Q.2N2.2M.3N.N
.N$16.L29.N2.N.N34.N2.N.N.N.N30.N2.N.N.N.N11.pA18.N2.2N2.N.N.N.N18.L2.
QM.N.N4.N3.N.N$17.L27.3N.N.N17.2pA5.2pA7.3N.3N.N.N13.2pA5.2pA7.3N2.N2.
N.N10.2pA4.pA3.2pA7.3N2.N2.N.N.3N9.2pA5.2pAL5.N.N4.3N.2N33.UM$18.L27.
N2.N.N17.2pA5.2pA8.N4.N.N.N13.2pA5.2pA8.N2.N.N.N.N9.2pA5.2pA2.2pA8.N3.
N2.N.N3.N9.2pA5.2pAL9.3H5.H34.U$19.L30.N40.N2.N3.pA31.N3.N11.pA4.2pA16.
3N2.N4.N18.L2.N2.2N4.H6.H30.3U$14.2O4.L10.N40.2pA22.2pA.2pA11.2pA33.pA
3.pA40.2pA4.L.2N2.N.N2.H5.3H30.U$14.2O5.L4.S3.2N40.2pA19.5pA14.2pA78.
2pA4.L2.N2.2N$22.L4.2S2.N61.pA2.pA101.L2.N2.N.N36.2U$23.L2.2S3.N61.pA
2.pA89.2pA10.L.3N.2N5.MQ31.U$17.2O5.L5.3N61.2pA88.3pA.2pA8.L12.Q32.U.
U$17.2O6.L23.2pA38.2pA38.2pA38.2pA13.pA.pA.2pA8.L13.3Q19.U10.UM$26.L22.
2pA12.pA25.2pA38.2pA38.2pA11.2pA.pA11.L16.Q17.3U$14.2O11.L35.pA.pA130.
L34.U$14.2O12.L16.2pA5.2pA9.3pA19.2pA5.2pA31.2pA5.2pA31.2pA5.2pA4.pA2.
pA13.L35.MU$6.2O21.L15.2pA5.2pA11.pA19.2pA5.2pA31.2pA5.2pA31.2pA5.2pA
20.L21.2U48.MU$7.O22.L146.pA2.pA3.pA8.L23.U48.MU$7.O.O21.L28.H39.H39.
H36.pA2.GpA2.pA7.L24.U.2U$8.2O22.L158.L26.U2.U$178.pA4.pA6.L28.2M$10.
3N.N2.N.N3.N3.N152.2pA7.L44.2M$11.N2.2N.N.N3.N2.2N160.L45.2M$11.N2.N.
2N2.N.N4.N159.L$11.N2.N2.N2.N.N4.N158.L$10.3N.N2.N3.N4.3N156.L$31.B18.
H39.H39.H39.H13.L58.M3.2U$32.B16.H39.H39.H39.H13.L58.U.M3.U11.H$21.2O
7.3B16.3H37.3H37.3H37.3H10.L58.U.U3.U13.H$6.2L12.O160.L55.2M.U.U3.U12.
3H$8.L10.2O.2O156.L56.2M.U2.4U.U5.UM$9.2L9.O2.2O154.L61.U.U3.U.U5.U$11.
L5.O2.2O2.2O152.L58.2U.2U2.U2.U.U2.3U$12.2L3.O.2O4.O151.L60.U.U2.2U3.
U3.U$14.L3.O157.L49.2M10.U.U$15.2L158.L50.2U11.U$17.L156.L$14.2O2.2L153.
L$14.2O4.L4.2O145.L$21.2L2.2O144.L$23.L146.L$17.2O5.2L143.L$17.2O7.L141.
L$27.2L138.L$14.2O13.L136.L$13.O2.O13.2L133.L$6.2O6.O.O147.L$7.O8.2O.
3N.N2.N.N3.N130.L$7.O.O7.O2.N2.2N.N.N3.N129.L$8.2O3.2O5.N2.N.2N2.N.N129.
L$13.2O5.N2.N2.N2.N.N128.L$13.2O4.3N.N2.N3.N128.L$14.O.2O140.L$14.3O2.
2N136.L$15.O5.N9.2O123.L$20.N8.O4.O120.L$19.N134.L$19.3N6.O2.2O2.O117.
L$28.O2.2O2.O116.L$6.L144.L$7.L21.O4.O115.L$8.2L15.2O4.2O3.B112.L$10.
L14.2O10.B110.L$11.2L22.3B109.L$13.L8.2O122.L$14.2L6.2O121.L$16.L127.
L$17.2L124.L$14.2O3.L5.2O115.L$14.2O4.2L3.2O114.L$22.L117.L$23.2L114.
L$17.2O6.L112.L$17.2O7.2L109.L$136.L$14.2O119.L$14.2O5.2O111.L$6.2O12.
O.O110.L$7.O11.2O111.L$7.O.O11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N2.3N2.N2.N.N3.N$86.L14.2M.M.Q12.N$86.L13.M.M
.M.Q11.N$86.L10.Q2.M.M.Q.Q.2Q7.N$85.L11.4Q.2Q2.Q2.Q7.N$85.L15.Q4.2Q8.
N$85.B13.Q.Q10.2I.N$85.B13.2Q11.I2.N$84.B25.I.I$84.L25.2I$84.L15.Q$84.
L13.3Q$83.L13.Q$83.L13.MQ$83.L$83.L14.2N2.3N.2N$82.L12.H2.N.N.N3.N.N$
82.L13.H.2N2.3N.N.N$82.L11.3H.N.N.N3.N.N$82.L15.N.N.3N.2N$81.L5.QM$81.
L4.Q.Q5.2M6.2N3.N$81.L4.Q7.2M8.N.N.N$81.L3.2Q15.2N2.3N$80.L23.N.N.N$80.
L18.Q2.2N2.N.N$80.L14.2M.M.Q$80.L13.M.M.M.Q$79.L11.Q2.M.M.Q.Q.2Q$79.L
11.4Q.2Q2.Q2.Q$79.L15.Q4.2Q$79.L13.Q.Q$78.L14.2Q! [[ ZOOM 2 ]]
I need help implementing my ideas (next paragraph) into CGoL. Here are my ideas:
I have four mechanisms, each one corresponding to a specific gun (labeled GUN #).
  1. The first mechanism is for adding/subtracting (ADD/SUB). It needs a start glider; an optional glider which, if present, subtracts instead of adds; and a number of gliders, which will each add or subtract one from a sliding block memory. The code, translated into English, is ADD/SUB[START, ADD or SUB, (number of gliders)].
  2. The second mechanism is for multiplying. I expect this to be harder to implement. It needs a start glider and a number of gliders, the number of gliders being the factor to which the number in the memory is multiplied. (In an absence of gliders after the start glider, the number is reset to zero.) The code is MUL[START, (number of gliders)].
  3. The third mechanism is for storing the number in the sliding block memory in another one. It needs a start glider and an optional glider. If the optional glider is present, it will detect when the two numbers in the sliding block registers are equal, and produce a glider that sets the first sliding block memory to zero. The code is STORE[START, DETECT or NO].
  4. The fourth mechanism is for printing one of twelve symbols: a space, a decimal point, and the ten digits. It only needs one glider, the one to trigger the printing. The digit printed depends on what the value of the sliding block memory is:
    • 0: space
    • 1: decimal point
    • 10n+2+digit: digit
    The code is PRINT[(number in memory)].
I know this is all very complicated, but if we can compile this, we can do all sorts of things. :D

Post Reply