text:
Final tribute to John Conway: FRACTRAN self-interpreter
It's time to conclude the series of John Conway challenges of mine.
Background
A FRACTRAN program consists of an ordered list of fractions. The program starts by taking a single integer as input. Each iteration of the program, it searches the list for the first fraction such that multiplying the number by that fraction produces another integer. It then repeats this process with the new number, starting back at the beginning of the list. When there is no fraction on the list that can be multiplied with the number, the program terminates and gives the number as the output.
You can find some tips and tricks for writing FRACTRAN programs in the previous challenge Collatz in FRACTRAN.
Challenge
Write a FRACTRAN program that

takes a FRACTRAN program P and its input number N encoded as an integer, and
halts if and only if the program P halts with the input N.

Use the following procedure for encoding P to get a single positive integer f(P):

Write down the numerator and denominator of each fraction in P in base b, using the value b as a separator.
Read the whole thing as a single number in base b+1.

You can choose the value of b, whether to put a separator at either end or not, and which number (numerator/denominator, first fraction/last fraction) comes first in the representation. One possible encoding is:
[455/33, 11/13, 1/11, 3/7, 11/2, 1/3]
int("1a3a11a2a3a7a1a11a11a13a455a33", 11) = 3079784207925154324249736405657

The input value must be in the form of \$p^{f(P)} q^N n\$, where \$p, q\$ are two distinct primes and \$n\$ is a number coprime to \$pq\$. You can choose the values of \$p,q,n\$. (This format is consistent with the 84-fraction answer on SO and the 48-fraction one linked below.)
The shortest program in terms of the number of fractions wins.
The best record available is 48 30 24 fractions by benrg!

I think you need a more careful restriction than “you can freely choose how you encode the input”—what stops me from “encoding” the input as 1 if P(N) halts and 2 if P(N) does not halt? You should at least require the encoding to be computable. Be aware that if that’s the only requirement, the challenge can be solved by interpreting programs in any Turing-complete language, with the conversion from FRACTRAN programs handled by the encoding function.

“it must be possible to reconstruct the original P and N from the input number through computation”—that’s the wrong direction to restrict. I can still “encode” the input as 1 · 3^P · 5^N if P(N) halts and 2 · 3^P · 5^N if P(N) does not halt.

@AndersKaseorg I guess I should settle with the encoding already used...

@AndersKaseorg how would you encode any answer to Collatz in FRACTRAN then? (My point is that's not a valid encoding because you are not able to encode any program in that)

@Leo The encoding of Collatz in FRACTRAN is either 1 · 3^P · 5^N or 2 · 3^P · 5^N for each N. It exists. There’s currently no stipulation that I need to be able to compute which one it is. Such a stipulation is what I was proposing when I said “you should at least require the encoding to be computable”. (The important direction is that (P, N) ↦ input should be required to be computable; it makes no difference whether input ↦ (P, N) is required to be computable.)

@AndersKaseorg Sorry, I got confused and was thinking that computability was part of the challenge instead of just in your comment. I agree with you :)

Just want to point out three brilliant people have already done this, so the current goal to beat is 48 fractions. I don't want to benefit from their ingenuity so I won't post it below, but here are the links to their work: 48-Lomont, 84-Amadeus, 1779-Beder, 1779-Beder-CodeGolf

Also, wondering if it isn't worth allowing Fractran interpreters in any language but giving a million extra brownie points to self-interpreters, and encouraging they be upvoted. (Not strictly necessary because it's an upvote-worthy feat in and of itself). I see there's already such a challenge on SO, but it was closed and never reposted here, that I could find. I think all the people who answered it then deserve the rep and recognition!

30 fractions
37^1/41^1
43^1/47^1
41^10*31^1*13^1/37^10*29^1
1/37^10
47^9*5^1/43^9*7^1
47^9/43^9*17^1
47^9/43^9*13^1
47^9/43^9*23^1
41^1*47^8/37^1*43^8*29^1
41^6*47^3/37^1*43^8*53^2
41^2*47^7*23^1*7^1/37^2*43^7*13^1*5^1
47^9*53^2/37^2*43^7*13^1
41^3*47^6*13^1/37^3*43^6*23^1
41^2*47^7*23^1*7^1*29^1/37^3*43^6*13^1*5^1
41^3*47^6/37^3*43^6*13^1
41^4*47^5*11^1/37^4*43^5*17^1
41^5*47^4*5^1/37^5*43^4*13^1
41^5*47^4/37^5*43^4*7^1
41^5*47^4/37^5*43^4*29^1
41^5*47^4*3^1/37^5*43^4*2^1
41^6*47^3*17^1/37^6*43^3*13^1
41^7*47^2*23^1/37^7*43^2*3^1
41^8*47^1*3^1*2^3/37^8*43^1*23^4
41^1*47^8*2^3*53^1/37^8*43^1*23^3
41^8*47^1*11^1*2^1/37^8*43^1*23^1
41^9*31^3/37^9*29^1
41^7*47^2*23^1*29^2/37^9*3^1
29^1/31^1
37^10*13^1/11^1
37^1/43^1

p = 2, q = 5, n = 37^5 * 43^4 * 53^1
b = 3, denominators first, last fraction first, separator at start and not at end
How does this work?
To make it easier to understand, assign meaningful names to the primes used:
ifracs=2 ifracsw=3 inum=5 inum_r=7 multiplicand=11 products=13 denominator=13 numerator=17 temp=23 multiplier=29 multiplier_r=31 stateA=37 stateA_r=41 stateB=43 stateB_r=47 p_indicator=53

Convert denominators to negative exponents, and then we can omit the ^ and * symbols (always including exponents even if 1). This produces a notation similar to Subtractpocalypse (which, as the linked page notes, becomes equivalent to FRACTRAN with a single change). Together with this, we use the name of a prime to refer to the exponent of that prime in the current number.
The state mechanism
stateA and stateB together form a state. 10 standard states (0,9), (1,8), (2,7), ..., (9,0) are chosen such that none has both components greater than or equal to another's; this way, an instruction can single out one state that it will execute only in, by subtracting the appropriate values from stateA and stateB.
To restore the state (same or different), we can't simply add back to stateA and stateB, as that would give the numerator and denominator a common factor. Instead, we add values corresponding to the new state to stateA_r and stateB_r, and the first two instructions transfer those values back to stateA and stateB:
# At the start
stateA_r -1  stateA +1
stateB_r -1  stateB +1

We use an abbreviated notation for these common parts:
State[M -> N] = stateA -M  stateB -(9-M)  stateA_r +N  stateB_r +(9-N)
State[N] = State[N -> N]

Also, the last instruction is used to automatically advance from one state to the next when nothing else executes:
# At the end
stateA +1  stateB -1

Parsing f(P)
# Start here-ish
State[5] ifracs -1  ifracsw +1
State[6] products -1  numerator +1
State[7] ifracsw -1  temp +1
State[8] temp -4  ifracsw +1  ifracs +3
State[8 -> 1] temp -3  ifracs +3  p_indicator +1

We start in state 5. There are some other instructions in state 5, but they do nothing at the start.
First, the value of f(P) is transferred from ifracs to ifracsw. The instruction in state 6 does nothing at the start.
The value is transferred from ifracsw to temp next. Then, in state 8, divide by 4 by repeatedly subtracting 4 from temp and adding 1 to ifracsw; simultaneously, 'refill' ifracs by adding the difference, which is 3, to it. After this finishes, the remainder will be left in temp.
The next instruction tests for the separator (3), changing to state 1 and also incrementing p_indicator and 'refilling' ifracs.
Suppose we haven't reached a separator. To reconstruct the base-3 number, we need to multiply the digits by 1, 3, 9, etc. This uses...
The multiplication subroutine
Multiplication happens automatically whenever the end of a state is reached, before moving on to the next state, with multiplicand nonzero. It adds to products the product of multiplicand and (multiplier+1), for a few reasons. It is implemented by these instructions:
# Multiplication (near the start)
stateA -10  stateA_r +10  multiplier -1  multiplier_r +1  products +1
stateA -10

# Multiplication (near the end)
multiplier_r -1  multiplier +1
multiplicand -1  stateA +10  products +1

The fourth of these instructions executes first. It decrements multiplicand, increments products (for the 1 added to multiplier), and adds 10 to stateA, enabling the upper two instructions. Then the first instruction runs repeatedly, transferring multiplier to multiplier_r while adding to products. The second instruction subtracts the added 10 from stateA, exiting this section, then the third instruction transfers multiplier_r back to multiplier, and this repeats until multiplicand is zero.
Back to parsing f(P)
State[8] temp -1  multiplicand +1  ifracs +1
# Multiplication occurs
State[9] multiplier -1  multiplier_r +3
State[9 -> 7] ifracsw -1  temp +1  multiplier +2

To activate multiplication, the last instruction of state 8 transfers temp to multiplicand, while 'refilling' ifracs. Multiplication occurs before the transition to state 9, adding the appropriate value for this digit to products.
Finally, we need to triple the effective multiplier, which means tripling multiplier and adding 2 to it. The instructions in state 9 accomplish that; the second one duplicates the instruction in state 7 as a way of testing whether we have reached the end of f(P), ending the program (since this is the last state) if so. (Note that, because we specified that f(P) begins with a separator, the end always happens after only one digit 0 is read, with multiplier=0, avoiding an infinite loop.)
Changing state immediately after filling multiplier_r from multiplier avoids a similar infinite loop. Going to state 7, the process repeats to read the next digit of f(P).
Handling the fraction
State[0] inum_r -1  inum +1
State[0] numerator -1
State[0] denominator -1
State[0] temp -1

State[1] multiplier -1
State[1 -> 6] p_indicator -2
State[2] denominator -1  temp +1  inum -1  inum_r +1
State[2 -> 0] denominator -1  p_indicator +2
State[3] temp -1  denominator +1
State[3 -> 2] denominator -1  temp +1  inum -1  inum_r +1  multiplier +1

p_indicator is initialised to 1, and incremented upon changing from state 8 to state 1. Thus, after reading the first (in this process; the last in the base-4 expansion) of each pair of numbers, which we have specified to be the numerator, multiplier is reset to 0, and since p_indicator is now 2, it becomes 0 with a change to state 6, where the value is transferred from products to numerator.
After reading the denominator, state 1 ends with p_indicator=1.
(Note that denominator is an alias for products -- they refer to the same prime.)
In state 2, the first instruction transfers denominator to temp and inum to inum_r simultaneously. This ends when denominator or inum reaches zero.
The second instruction checks for denominator being nonzero, which indicates that the number (original value of inum) was not divisible by the (original) denominator; it changes to state 0 while increasing p_indicator to 3. Then, the instructions in state 0 transfer inum_r back to inum, clear several values, and then continue to state 1 to clear multiplier and proceed to state 6 to resume reading f(P), with p_indicator reduced back to 1.
In state 3, temp is transferred back to denominator, and the second instruction returns to state 2 while repeating its first instruction (as before, this checks for completion) and incrementing multiplier.
If the loop exits here, then the number (original value of inum) was divisible by the (original) denominator, and multiplier contains the quotient minus 1 (for each iteration except the last).
State[3] denominator -1
State[4] numerator -1  multiplicand +1
# Multiplication occurs
State[5] products -1  inum +1
State[5] inum_r -1
State[5] multiplier -1

The final instruction of state 3 clears denominator (which is product). Then, in state 4, we transfer numerator to multiplicand, and with the transition to state 5, that value is multiplied by the quotient (recall that the multiplication subroutine uses multiplier+1). In state 5, we transfer products to inum, clear some values, and continue to repeat from the start.
The whole program with the updated notation
# Initialise: ifracs, inum; p_indicator=1, stateA=5, stateB=4
stateA_r -1  stateA +1
stateB_r -1  stateB +1

# Multiplication
stateA -10  stateA_r +10  multiplier -1  multiplier_r +1  products +1
stateA -10

State[0] inum_r -1  inum +1
State[0] numerator -1
State[0] denominator -1
State[0] temp -1

State[1] multiplier -1
State[1 -> 6] p_indicator -2
State[2] denominator -1  temp +1  inum -1  inum_r +1
State[2 -> 0] denominator -1  p_indicator +2
State[3] temp -1  denominator +1
State[3 -> 2] denominator -1  temp +1  inum -1  inum_r +1  multiplier +1

State[3] denominator -1
State[4] numerator -1  multiplicand +1
# Multiplication occurs
State[5] products -1  inum +1
State[5] inum_r -1
State[5] multiplier -1

# Start here-ish
State[5] ifracs -1  ifracsw +1
State[6] products -1  numerator +1
State[7] ifracsw -1  temp +1
State[8] temp -4  ifracsw +1  ifracs +3
State[8 -> 1] temp -3  ifracs +3  p_indicator +1
State[8] temp -1  multiplicand +1  ifracs +1
# Multiplication occurs
State[9] multiplier -1  multiplier_r +3
State[9 -> 7] ifracsw -1  temp +1  multiplier +2

# Multiplication
multiplier_r -1  multiplier +1
multiplicand -1  stateA +10  products +1

stateA +1  stateB -1

Well done.  Is this now the world champion FRACTRAN self-interpreter?

24 fractions
$$\frac{2}{3}, \frac{5}{7}, \frac{7^{12} 41}{5^{12} 23}, \frac{7^{13}}{5^{13} 37}, \frac{3^{10} 7^3 13}{5^{13} 31}, \frac{3^2 7^{11} 19^1 41}{2^2 5^{11} 29}, \frac{3^3 7^{10} 19^1 23}{2^3 5^{10} 29^1 41}, \frac{3^1 7^{12} 19^1 37}{2^3 5^{10} 29}, \frac{3^4 7^8 29}{2^4 5^8 19}, \frac{3^4 7^8 11^b 31}{2^4 5^8 13^{b+1}}, \frac{3^{13} 11^b}{2^4 5^9 13^b 41}, \frac{3^{12} 7^1 11^b 19}{2^5 5^8 13^b}, \frac{3^2 7^{10} 11}{2^4 5^8 13}, \frac{3^8 7^4 19^b}{2^8 5^4 29}, \frac{3^8 7^4 13}{2^8 5^4 31}, \frac{3^{12}}{2^{12} 29}, \frac{3^{13} 17^1 19}{2^{13} 37}, \frac{7^{13}}{2^{12} 5^1 23}, \frac{3^{12} 7^1 31}{2^{12} 5^1 11}, \frac{3^{12} 7}{2^{12} 5^1 17}, \frac{3^{10} 7}{2^{10} 5^1 41}, \frac{3^{10} 7^3 37}{2^{10} 5^3 17}, \frac{3^3 7^4}{2^1 5^6}, \frac{3^4 7^4}{2^8}$$
Plug in a base \$b\ge2\$ of your choice. The start state is \$31^{f(P)} 17^N 5^{13} 19\$. The program encoding has a sentinel digit on the high end only (same as m90's), and the denominator on the low end (opposite of m90's). If \$b=10\$, the program \$\frac{22}{7},\frac{355}{113}\$ encodes to int("a355a113a22a7", 11) = 32383861120629.
Explanation and annotated listing
This program uses the same double/quadruple state system as m90's 30-fraction program, but I'll call them "modes" to avoid confusion with FRACTRAN states.
A lot of the improvement of this solution comes from the observation that fractions can match ranges of modes as easily as single modes. Instead of using a subroutine or a loop variable (like m90's p_indicator) for code reuse, I use different modes with adjacent numbers, which can have any mix of shared and unshared code. Also, where m90's program has a single mode fallthrough rule at the bottom, I have two: if the mode is 1-7 then it's increased by 2, otherwise it's decreased by 4. Those two rules account for the majority of the control flow.
The basic algorithm is:

Modes 2, 4, 6, 8 read the denominator.
Modes 1, 3, 5, 7, 9 read the numerator while calculating \$\text{divmod}(\text{state} \times \text{numerator}, \text{denominator})\$. The intermediates (numerator and product) are never stored anywhere.
Modes 0 and 10-13 test the remainder, update the state, rewind the program, etc.

I tried to assign similar-looking (in base 10) register numbers to related purposes. The registers are:

2,3,5,7 are the mode variables.
11,13,31 hold the program. 13 and 31 are used to parse it, and 11 is a "counterweight" adjusted so that the full program is preserved as the sum. (m90 used a similar trick.)
23 and 41 hold the remainder and divisor (denominator). Values of (0, d-1), (1, d−2), …, (d−1, 0) represent a divisor of d and a remainder of 0, 1, … d-1.
17 and 37 hold the old state (saved in case the remainder is nonzero) and the new state (quotient of the division).
19 and 29 hold the place value when reading the denominator, and the old state times the place value when reading the numerator (so state × numerator is calculated for free).

I'll write \$[a{,}b]\rightarrow[c{,}d]\$ (where \$d-c=b-a\ge 0\$), or just \$[a{,}b]\$ if \$a=c\$, for a factor of \$\displaystyle \frac{3^c \, 7^{13-d}}{2^a \, 5^{13-b}}\$, which means "if we're in modes \$a\$ to \$b\$ inclusive then switch to modes \$c\$ to \$d\$ and also do whatever else is in this fraction."
Also, I'll give the two-digit primes slightly more descriptive names: prg11, prg13, prg31, div23, div41, st17, st37, plc19, plc29.
Stack Exchange tables and MathJax don't play well together, so no MathJax in the table.

3−1 2+1,7−1 5+1
Mode management, same as m90's program.

[0,0] st37−1,[0,1] div23−1 div41+1,[0,0]→[10,10] prg31−1 prg13+1
Mode 0: the designated starting point and also reached when division fails. Clear the quotient (st37) and remainder (div23). Halt if the program is exhausted, otherwise go to mode 10. The second instruction is shared with mode 1 (in fact, it's the only instruction in mode 1 aside from the default mode transition).

[10,12] div41−1,[10,10] st17−1 st37+1
Mode 10: clear the divisor and copy the saved FRACTRAN state back, then go to mode 8 (via the empty mode 6). The first instruction is shared with mode 12 (mode 11 is unused).

[8,9] plc29−1 plc19+b,[8,9] prg31−1 prg13+1
Mode 8 (denominator) or 9 (numerator): multiply the place value by b (does nothing on initial entry), and move the program to prg13, then go to mode 4/5.

[4,5] plc19−1 plc29+1,[4,5] prg13−(b+1) prg31+1 prg11+b
Mode 4/5 (den./num.): move the place value back to plc29, and compute prg31, prg13 = divmod(prg13, b+1).

[4,4]→[13,13] prg13−b prg11+b div41−1,[5,5]→[12,12] prg13−b prg11+b plc19+1
Mode 4/5: exit the loop if the sentinel digit is reached. Duplicated because they need different off-by-one fixups: after reading the denominator, decrement it, and after reading the numerator, set the place value to 1 for next time.

[4,5]→[2,3] prg13−1 prg11+1
Mode 4/5: if the digit is anything else, go to mode 2/3 to add the place value an appropriate number of times, then go to mode 8/9 (via the empty 6/7)

[2,2] plc29−1 plc19+1 div41+1
Mode 2/3: if we're reading the denominator, just add the place value.

[3,3] plc29−1 plc19+1 div41−1 div23+1,[3,3]→[1,1] plc29−1 plc19+1 st37+1
Mode 2/3: if we're reading the numerator, increment the remainder, or if it's equal to divisor−1, zero it (using mode 1) and increment the quotient. Exit to mode 4/5.

[12,13] plc29−1
Mode 12/13 (found the sentinel digit): discard the place value.

[13,13] st37−1 st17+1 plc19+1
Mode 13 (finished with the denominator): copy it to the place value and go to mode 9 to read the numerator.

[12,12]→[0,0] div23−1,[12,12] prg11−1 prg31+1,[12,12] st17−1
Mode 12 (finished with the numerator): if the remainder is nonzero then go to mode 0; otherwise, restore the original program, discard the divisor (see mode 10) and old state, and go to mode 8 to read the denominator.

[1,7]→[3,9],[8,13]→[4,9]
Default mode transitions.

Can this be improved?
Probably. It's just a PITA to satisfy all the constraints:

The modes have to be numbered to take advantage of default fallthrough, and also to keep modes with shareable instructions together, and also the halting mode has to be on the edge so it doesn't get caught in the default-fallthrough whirlpool.
One-time adjustments to registers can only be done during mode changes, but most of the mode changes are shared across a large number of modes. For example, m90's program tracks the place value minus 1. But that means that after you multiply it by b, you have to add b−1. But the mode transition where that would need to happen in my program is handled by the default rule, so I can't do it, or at least I don't see how.
The challenge has strict input requirements that limit potential optimizations. For example, if I could compute the quotient (new state) minus one, it would avoid an off-by-one error when the state is added to the place value which would otherwise be 1. But then there would be no point in the loop where the interpreter state had the form \$p^\text{state}q^\text{program}n\$; the closest you'd get would be \$p^{\text{state}-1}q^\text{program}n\$.

I think the ripest candidate for improvement is the unshared fractions in modes 4 and 5. The mode offsets of the jumps are different, but that's easy to fix by rearranging the modes. plc19+1 could be shared if I could subtract one from the state somewhere (as mentioned above). div41−1 could be eliminated by decrementing the program before parsing the denominator. The failed-division path does that anyway, but there's no place to do it in the successful-division path. That would be a nonissue if the challenge allowed the input state to be \$p^\text{state}q^{\text{program}-1}n\$. (It's funny that both input parameters seem to be improved by subtracting 1.)

Here are a few solutions not written by me! If one of these is yours, please feel free to post it separately and I'll remove it from this answer. These have all been in this comment for a while, but I'm converting it to an answer for greater visibility.
Collected Answers

48 fracs by Chris Lomont  ––  SE profile, I think.

84 fracs by Hai-Anh Trinh  ––  SE profile.

1779 fracs by Jesse Beder  ––  SE profile. Generating code.


text:
Build an interpreter for "Goggle kids Code"
Partially inspired by this question.
Overview
The execution of Goggle kids Code starts with an empty binary tape with 100 items, with the pointer starting at the index 0:
00000...
^

At the end of the execution, you can assume that the tape is implicitly outputted.
Instructions
Goggle kids Code is a simple language involving a stack-like tape.

/: Move the pointer right.
\: Move the pointer left.
>: Take two items from the tape, the left item and the current item. Zero the current item, move left, and set the item as 1 if left is larger than current, else 0.
=: Similar to >, but performs an equality comparison instead.

The only looping structure in Goggle kids Code is the repeat loop, which takes a strictly positive number on the right introduced by a x symbol. (So things like (...)x0 is impossible here.) The syntax for this is:
(...)xI

The parentheses can only contain single instructions, although you can introduce other instructions with commas.
Sample program + Explanation
((/,>)x4,/)x13

(         )x13  Do this 13 times:
 (   )x4            Do this 4 times:
  /                    Move right
   ,                   After that,
    >                  Greater than
        ,           After that,
         /          Move pointer right.

Another example that does something useful (fills 13 items from the tape with 1's):
(   )x13    Do this 13 times:
 /              Move right
  ,             After that,
   =            Equality

Rules

You can assume the tape pointer never wraps around.

The test cases won't abuse out-of-bounds tape-moving.

To simplify the solution, you are allowed to output part of the tape, as long as that part is modified.
You are allowed to have a different instruction mapping, but if you do that, please make sure to clarify which mapping you used.
You could ignore checking the commas in the source code, they'll always be there.

Instructions are always separated by the comma.

Test cases
The trailing 0 digits are omitted here, for compactness of example outputs.
((/,>)x4,/)x13  -> 0000000000000 (doesn't modify the tape)

(/,=,/)x13      -> 1111111111111

(/,=,/,/)x13    -> 1010101010101010101010101

(/,=)x13,/,=    -> 00000000000000000

(/,/,=,\)x3     -> 0100
```

Also, a link to where we can learn more about "Goggle kids Code" is much appreciated. I have tried searching for the term, but couldn't find any thing relevant. I also can't see the linked question, it says 404 not found.

Will the test case always have a loop out most? If not, suggest (/,=)x13,/,= as a test case.

Relevant: Google doodle - Turing machine. That's the closest thing I could find.

So Google is teaching kids Brainfuck?  I approve!

@Jonah I guess Google is teaching Boolfuck instead of Brainfuck.

Where you say "and set the item as 1 if left > current", I assume the > refers to ordinary numeric comparison and this isn't some sort of evil recursive definition?

@JDL Sorry about the confusion, I've edited to reflect that.

@SurculoseSputum I think I fixed that (I haven't tested out the link because the network I'm on has blocked it) by changing it to the Wayback Machine.

Assuming loops can be infinite, is this Turing-complete?

@mypronounismonicareinstate Prove it yourself, I have no idea...

I now realized it is not, because it cannot access infinite memory (either the infinite loop is "balanced" - that is, has equally many \ and /, and thus a finite amount of memory, or it is not "balanced" and all memory eventually becomes unreachable at the same rate it becomes reachable, so still a finite amount of memory)

Ruby, 89 bytes
t=[i=0]*100;(eval"[#$_]").flatten.map{|x|x<2?t[i-=1,2]=[x==t[i]-t[i+1]?1:0,0]:i+=x-3};p t

Try it online!
The translation map of the characters used for instructions is indicated in TIO header.

Python 2, 131 126 123 110 104 bytes
Saved 13 bytes thanks to @dingledooper's approach of flattening nested list using backtick.
Saved 2 bytes thanks to @l4m2
p,t=0,[0]*100
for i in`input()`:
 if"/"<i:i=int(i);p+=i/3-1
 if i<2:t[p:p+2]=cmp(*t[p:p+2])==i,0
print t

Try it online! or Verify all test cases
Takes input from STDIN, where /\>=x are replaced with 6210*
Big idea:
Python 2 input() implicitly evaluates the string read from STDIN. Thus, reading modified input like ((6,1)*4,2)*13 returns a nested tuple of integers, aka
((6, 1, 6, 1, 6, 1, 6, 1), 2, (6, 1, 6, 1, 6, 1, 6, 1), 2, ...)

Note that loops containing single instruction must be terminated with comma, e.g (1,)*10.
Now that all loops have been automatically unrolled for us, we just have to flatten the resulting tuple, and decode the instructions.
To flatten the nested tuple, we simply convert it to string, then takes all numerical characters.

@dingledooper Very clever approach, using back tick to flatten nested lists. Thanks!

p+=i/3-1 using 6 as /

Do rule allow printing a mix of 0 and false?

@l4m2 I'm not sure about this, but since False is 0, I see no reason this is not allowed.

but "False" is not "0"

It's generally been allowed.

@l4m2 I worded it poorly. False is considered functionally identical to 0, as per consensus. I'm not too sure about the mixing of False and 0, but I don't think that's a big problem.

@xnor It's printed and therefore we get string, and without eval I don't see any relation

JavaScript (Node.js), 149 bytes
s=>eval(`[${s.replace(/ \d+/g,'.toString().repeat($&)')}]+6`).replace(/\d/g,c=>c>4?p+=c-6:(X[p-1]=X[p-1]-X[p]==c,X[p--]=0),X=Array(100).fill(p=0))&&X

Try it online!

Retina 0.8.2, 135 bytes
,

\d+
$*
+`\([^()]+\)x|(?<=\(([^()]+)\)x1*)1
$1
^
0
{`(\d)/(\D*)((1)|0)?
$1$#4$2
(\d)\\(\D*)
$2$1
(?=(10>|(.)\2=))?.\d[>=](\D*)
$#1$+0

Try it online! Link includes test cases. Explanation:
,

Delete commas.
\d+
$*

Convert the multipliers to unary.
+`\([^()]+\)x|(?<=\(([^()]+)\)x1*)1
$1

Expand all repetitions from the inside out. (The last two stages can be performed by a single stage in Retina 1 at a saving of 19 bytes although you do then have to use ${3} instead of $+ in the last stage.)
^
0

Start with a tape with a 0. (The tape is automatically extended to the right as necessary, as this was slightly golfier than predefining the tape..)
{`

Process the instructions until they have all been executed.
(\d)/(\D*)((1)|0)?
$1$#4$2

Move right, extending the tape as necessary.
(\d)\\(\D*)
$2$1

Move left.
(?=(10>|(.)\2=))?.\d[>=](\D*)
$#1$+0

(In)equality. ($+ is used instead of $3 because the next character is a digit.)

JavaScript (Node.js), 235 bytes
p=>{s=[],l=Array(13).fill(i=q=0),e={'(':`s.unshift(1,i)`,')':`++s[0]<=parseInt(p.substr(i+1))?i=s[1]:s.splice(0,2)`,'/':`q++`,'\\':`q--`,'>':`l[q]=0,q--`,'=':`l[q]=0,q--,l[q]=+!l[q]`};while(i<p.length)eval(e[p[i++]]);return l.join('')}

Try it online!
JavaScript (Node.js), 231 bytes
p=>{s=[],l=Array(13).fill(i=q=0),e={'(':`s.unshift(1,i)`,')':`++s[0]<=parseInt(p.substr(i+1))?i=s[1]:s.splice(0,2)`,'/':`q++`,'\\':`q--`,'>':`l[--q]=0`,'=':`l[q]=0,l[--q]=+!l[q]`};while(i<p.length)eval(e[p[i++]]);return l.join('')}

Try it online!

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Golf Me a World Clock
Task
Write a program or function that takes as input a time in UTC, and outputs the equivalent time in 5 different cities around the world. The cities displayed are up to the programmer, but the time must be different in each city.
To prevent golfers from using overly obscure city names, the city names used must appear on this list: World Cities*, which corresponds to the list of cities and times found here.
As usual, Standard loopholes are forbidden, including fetching data from an external source.
*The times provided in the pastebin use daylight time and assume that the time is 0:30 UTC.
Example
Given as input 12:30AM, your output might be:
Athens: 3:30AM
London: 1:30AM
New York: 8:30PM
Seoul: 9:30AM
Beijing: 8:30AM

Input
You may take input in any reasonable format. You can choose to take the time as 24-hour time, or 12-hour time with AM and PM. Specify the input format in your answer.
Output
Output may also be in either 12-hour or 24-hour time. The city-time pairs may be in any order and any reasonable format, so long as it is possible to associate each city with the corresponding time.
Daylight Savings Time can safely be ignored (ie. you can either use the offsets from the pastebin above, or you can assume that all times are in daylight time, or alternatively all in standard time)
Scoring
This is code-golf. Happy golfing!

What is the format of the pastebin file? For instance, what does "London, 01:30" mean? (If DST are ignored, London should be UTC+0.)

@Arnauld Ah yes, the pastebin times use daylight time and are in reference to UTC 0:30. I'll specify that in the question

So, should we ignore the times in this file and just use it as a list of allowed cities?

@Arnauld Yes, you can ignore the times in that file. They might be useful to calculate the offset from UTC for a given city though

kyiv  lima  rome  oslo  suva  doha is what everyone will do, just making it simpler.

@dingledooper The times are required

Can I print all cities first, then times, in the same order?

@SurculoseSputum Yes, that's fine

Do the cities need to be spelt exactly as in the Pastebin, or could e.g. DC be used for Washington DC, Peking for Beijing or Rio for Rio de Janeiro?

@Duncan They should be spelled exactly as in the pastebin (you can ignore accents on letters though)

Would it be ok if I output more than 5 cities? And would it be ok to prepend the continent to the city name (e.g. “America/New_York” instead of “New York”?

@agtoever Sure, I don't see why not

I smell a Mathematica built-in.

A regex generator might be handy for this challenge

Python 2, 80 79 77 bytes
-1 byte thanks to Surculose Sputum.
24-hour time, input as hours, minutes.
h,m=input();i=h
exec"print'ALCADcaamucgimbroraaasoni'[i-h::5],i%24,m;i+=1;"*5

Try it online!
Example output for 0, 30 (12:30AM):
Accra 0 30
Lagos 1 30
Cairo 2 30
Amman 3 30
Dubai 4 30

79 bytes

@SurculoseSputum thanks a lot. For some reason I thought I need an additional UTC+5 city.

72 bytes by moving cities to input('...') prompt, albeit at the cost of readability. AccraLagosRomeKyivDubai can save another two.

@Duncan thanks for the suggestion, but I feel like this will be too similar to the other Python answer.

Python 2, 71 65 bytes
Save 2 bytes using @dingle dooper's printing through input() trick!

t=input('Accra Lagos Rome Kyiv Dubai ')
exec"print t%24,;t+=1;"*5

Try it online!
Takes input as a complex number (e.g 01:30 is inputted as \$1+30i\$), and prints out the list of cities, then the corresponding times. Uses 24-hour time.

The spaces could be left out, saving 5 bytes, and the comma in print t%24, can also be left out for another 1 byte

@Duncan thanks! It seems like most answer does have separator between city names and times, so I'll keep the spaces for now.

Bash + Core utilities, 79 78 72 bytes
for c in Amman Dubai Kabul Dhaka Seoul;{ TZ=Asia/$c date +$c\ %R -d$1Z;}

Try it online!
Input is passed as an argument, and output is on stdout. Both are in 24-hour time.

Google Sheets, 82 77 80 bytes
Saved 5 bytes by finding a shorter list of city names that are all off by 1 hour.
Added 3 bytes thanks to Surculose Sputum pointing out that I was referencing the wrong list.
=ArrayFormula(Split("Lagos,Rome,Kyiv,Dubai,Kabul",",")&Mod(A1+Column(A:E),24)&B1

Sheets will automatically add the trailing parentheses. Hours are input in A1 and minutes in B1.
Split(~) gives us the list of city names.
A1+Column(A:E) iterates the input time by ones.
Mod(~,24) accounts for when the clock rolls to the next day.
Split(~)&Mod(~)&B1 tacks on the minutes.
ArrayFormula(~) makes the whole thing work on arrays instead of just the first value.

There aren't any delimiters between the city name and the time because pretty costs bytes. It's fairly easy to distinguish between the end of the name and the start of the time, though, since none of the city names have numbers in them.

@SurculoseSputum Could you be more specific? All 5 listed appear in OP's list of allowed cities.

@SurculoseSputum My apologies. I had gotten the two lists confused in my copies. I have corrected the city names now. Thank you.

Befunge-93, 238 bytes
&&\" arccA",,,,,,:.\:.\" nammA",,,,,,3+:345*+`!v v    <
>    v v          `+*543:+3,,,,,,"Dhaka "\.:\.:_#<83*-^
^-*38>#_         :.\:.\" luoeS",,,,,,3+:345*+`!v v    <
>    v v          `+*543:+3 ,,,,,"Suva " \.:\.:_#<83*-^
^-*38>#_:.\:.@

Try it online!
Reads the hour and minutes from the input. For each city, except the first, it adds 3 to the hour, then checks whether it exceeds 23. If it does, it makes a small loop to subtract 24. The rest is just printing strings, moving the PC around and swapping the hours/minute to/from the top of the stack.

You can take the input in reverse order, removing the need for the initial swap: https://tio.run/##S0pNK81LT/3/X01NSSGxKDnZUUkHDKz0YoBISSEvMTcXJmasbWVsYqqlnaBYplCmAAQ2XHYgCsoDgwRtLVMTYyttY4gWJZeMxOxEBaUYPSsgile2sTDW0o3jitPVMrawU46H6YLZllOanxpMjm0KENuCS8uAlingsA1si8P//0bmXIaWAA

And the subtract 24-part for Amman can be moved to the front: https://tio.run/##S0pNK81LT/3/X01NSSGxKDnZUUkHDKz0YoBISSEvMTcXJmasbWVsYqqlnaBYxqVsY2GspVtmpwAEZUCokKCtZWpibKVtDFGr5JKRmJ2ooBSjZwVE8VwKcSCVNnG6WsYWdsrxCjDzc0rzU4MxzQeZCFTOhTAfCuDWKECsCS4tA9qiALUG4qo4Lpg1YFsc/v83MucytAQA. The same may be possible for Suva, but this is a little bit trickier

05AB1E, 25 bytes
Thanks to Kevin Cruijssen for shaving off 7 bytes.
”Accra‡¸«ÄçªâÈ”#ε¹N+24%²»

Try it online!
05AB1E, 32 bytes
Just another port of Surculose Sputum's answer. It produces quite an ugly output, due to joining by newlines.
”Accra Lagos«Ä KyivâÈ”#ε¹N+24%²»

Try it online!
Explanation (for both)
”...”           Compressed string with the cities
     #          Space-split
      ε         Map:
                    Implicit current city pushed
       ¹            First input:
        N+              Add by the iteration counter
          24%       Modulo by 24
             ²      Append the second input
              »     Join the whole stack by newlines.

-2 byte using a compressed string instead of dictionary string: .•Eān³ûζǝ₃δb¶«Ív¢L•™

25 bytes by using London and Baghdad instead of Lagos and Kyiv, which are part of the dictionary.

q, 43 40 bytes
{`Accra`Cork`Rome`Doha`Dubai!x+60*til 5}

No Tio unfortunately for q
q has built in time types that you can perform arithmetic with, so simple enough
Example:
q){`Accra`Cork`Rome`Doha`Dubai!x+60*til 5}00:30
Accra| 00:30
Cork | 01:30
Rome | 02:30
Doha | 03:30
Dubai| 04:30

If you can change, try using Doha (https://www.timeanddate.com/worldclock/qatar/doha) instead of Ammon.

Thanks Ismael! Switched from Lagos to Cork and Cairo to Rome aswell

in k4 this is down to 37 bytes {AccraCorkRomeDoha`Dubai!x+60*!5}

Vyxal, 26 bytes
5ɾ+₆+24%$S+`∴∷₇›†↵ƈ…±↑`5/Y

Try It Online!
Takes in <hour> <minute>, outputs an interleaved list of <time>|<city>.
My first Vyxal answer... it took me an embarrassingly long time to figure out how to properly deal with input.

Bash, 118 \$\cdots\$ 76 75 bytes
Saved a byte thanks to Duncan!!!
Saved a whopping 18 39 41 42 bytes thanks to David G.!!!
for d in Accra Lagos Rome Kyiv Dubai;do date -d$1Z+$((i++))hour +$d%R;done&

Try it online!
Input passed as command line argument.
Outputs to stdout.
Uses 24-hour time  format.

("Accra""Lagos""Rome""Kyiv""Dubai") saves four bytes at the cost of readability. Printing without a space saves another byte.

@Duncan Unfortunately, the first one just merges all the cities into one big string. But, although it's not as pretty, the second abides by the rules (I think) so nice one - thanks! :-)

c=(Accra Lagos Rome Kyiv Dubai) saves ten bytes.  Shells only need quotes if something is special.  So you can save five more by remove all the " and ' on the second line, and putting a \ before the space in the -d option.  Save one more by removing the space between the -d and its parameter.  (101)

Changing %H:%M to %R can save 3 btyes.  Might be specific to the version of date, but works on TIO.

@DavidG. Yes, I do know that (use bash a lot) but totally missed it. Didn't know about%R though. Really nice golfs - thanks! :D

@Noodle9 - you missed dropping the space between -d and $1today...

Another big one:  Since none of the city names include a %, you can put the ${c[d]} between the + and the %R, and eliminate the printf altogether.  It think that brings it down to 90.

A weird one:  eliminate c, make d iterate over the names, set "i=" before the loop, use $d instead of ${c[d]} and $((i++)) instead of $d.  seems to save another 7 characters.  If you are willing to trust that i is undefined, you can save 3 more by not initializing it at all.

Two more, if you've done the previous.  The escaped space before "hour" is needed when writing "$d hour" but not if writing "$((i++))hour"  In the former case, writing "$dhour" became a 5 character variable reference.

I decided to see what I could do with GNU date...   Instead of "today", one can write "jan1" or "Mon", or even just the letter for ones local timezone (which for TIO, would be "Z").  Alas, if you put nothing there, the "+2hour" becomes the timezone.

@DavidG. Wow! Unfortunately, i has to be initialised because you must be able to rerun functions. Fantastic golfing - thanks! :D

While i does have to be initialized, it does not have to be 0. blank works. It turns out that the $(( )) construct treats empty variables as 0. If you want, you can make it a one liner by using a space or ; instead of newline between the i= and for. Doesn't save bytes, but can be cute.   Another twist.  If you enclose the line in parentheses, the use of the variable is in a subprocess, so doesn't survive.  So if we can assume i (or some variable) to be uninitialized, it won't be afterwards either.   And (xxx) is one byte shorter than i=;xxx

@DavidG. Ah yes, running it all in a sub-shell does the trick! Nice one - thanks again! :D

If I had known I was going to shorten it by 1/3...   :-)     xxx& instead of (xxx) works, unless you try two invocations ( f 12:30; f 16:16 ) and expect to be able to reasonably read the results.  I note it but do not recommend it.

@DavidG. Yes, you'd be well in your rights to have posted this as your own separate answer now. Hey ho. Using the idea of running it all as a background task as that's allowed (I believe - it's certainly better than relying on one-off initialisations) - thanks one more time! :-)

C (gcc), 92 bytes
i;f(h,m){for(i=0;i<5;)printf("%s %d:%d;","AccraLagosRome.Kyiv.Dubai"+6*i++,(h+i)%24,m);}

Try it online!
Port of Bash, didn't check map
C (gcc), 94 bytes
i;f(h,m){for(i=0;i<15;i+=3)printf("%s %d:%d;","AccraAmmanDhakaSeoulSuva"+2*i,(h+i)%24,m);}

Try it online!
Port of Python solution, didn't check map

Jelly, 23 bytes
+Ɱ5%24;€⁹“F=ẓŒMdƲEṢ$Ṛ.»

A full program accepting two arguments, hours then minutes, which prints in an ugly format. Uses Algiers Amsterdam Amman Dubai Islamabad since they are the alphabetically earliest allowed cities with DST offsets of 1-5 hours from UTC.
Try it online!
How?
+Ɱ5%24;€⁹“F=ẓŒMdƲEṢ$Ṛ.» - Main Link: hour, H; minute M
 Ɱ5                     - map across [1..5] with:
+                       -   addittion (to H)
   %24                  - modulo by 24
        ⁹               - chain's right argument, M
      ;€                - concatenate to each
         “F=ẓŒMdƲEṢ$Ṛ.» - compressed string "Algiers Amsterdam Amman Dubai Islamabad"
                        -   (this new niladic chain forces the previous result to be printed)
                        - implicit print

Charcoal, 38 bytes
Ｅ⪪”↶+∧e-|GT⊘"↘w⌊⎇*↔ＪAN·”⁵⪫⟦ι﹪⁺Ｉθκ²⁴η⟧

Try it online! Link is to verbose version of code. Port of @SurculoseSputum's Python answer. Takes input as separate hours and minutes and uses the 24 hour clock. Explanation:
  ...               Compressed string of five cities
 ⪪   ⁵              Split into substrings of length 5
Ｅ                   Map over each substring
        ι           Current substring
           Ｉθ       Input hours as a number
          ⁺  κ      Plus current index
         ﹪    ²⁴    Modulo literal 24
                η   Input minutes
      ⪫⟦         ⟧  Joined with spaces
                    Implicitly print on separate lines

JavaScript, 65 bytes
Input f(h)(m). Outputs an array of arrays: [[City, mm, ss], ...].
h=>m=>`Accra
Lagos
Rome
Kyiv
Dubai`.split`
`.map(c=>[c,h++%24,m])

Try it online!

JavaScript, 66 bytes
Prettier. Outputs a string with City,mm,ss separated by newlines.
h=>m=>`Accra
Lagos
Rome
Kyiv
Dubai`.replace(/.+/g,M=>[M,h++%24,m])

Try it online!

JavaScript, 64 bytes
Uglier. Outputs a string without delimiters: Citymm,ssCitymm,ss....
h=>m=>`Accra Lagos Rome Kyiv Dubai `.replace(/ /g,_=>[h++%24,m])

Try it online!

JavaScript, 98 bytes
((h,m)=>['Accra','Lagos','Rome','Kyiv','Dubai'].map((e,i)=>console.log(e+' '+(h+i)%24+':'+m+';')))

Try it online!
Get the original idea from the C and so the Python guys.

You can save 2 bytes by changing (e,i)=>console.log(e+' '+(h+i)%24+':'+m+';') into (e,i)=>console.log`${e} ${(h+i)%24}:${m};` . You can save 1 more byte by changing ['Accra','Lagos','Rome','Kyiv','Dubai'] into 'Accra0Lagos0Rome0Kyiv0Dubai'.split(0). If you don't mind, you can save 1 byte by changing (h,m)=> into m=>h=>, requiring you to call it as (m=>h=>[...])(30)(0).

PHP 5.4+, 96 bytes
Yes, it's a fat boy :(
But was fun to write it!
foreach([Accra,Lagos,Cairo,Doha,Dubai]as$k=>$v)echo"\n$v ",date(H_i,strtotime("$argn {$k}hour"));

Run this with php -r (produces warnings).
The input format is flexible, as long as it can be interpreted by strtotime().
You can input hours in 12-hour or 24-hour formats, being displayed in 24-hour format.
The cities chosen were picked because they are NOT in DST at the time of this answer:

JavaScript (V8), 81 bytes
(h,m)=>'Accra-Lagos-Rome-Kyiv-Dubai'.split`-`.map(e=>console.log(e,h++%24+':'+m))

Try it online!

Wow - first time I seen this syntax of avoiding parentheses on the split function. Can you provide some reference?

I think this way you can call any function with one parameter.

@AnArrayOfFunctions The syntax used in the .split is allowed when you have a template string (the string with the accent character) as the only argument, which allows you to remove the parenthesis. However, using a number, in this case, removes the need for the template string. As I've suggested to another answer, using 'Accra0Lagos0Rome0Kyiv0Dubai'.split(0) has the same exact size, but is easier to read and understand what's going on.

W, 33 bytes
Just realized that my language is such a bad language. It doesn't even support dumping the stack...
☻|▓■°u:"≡∟◘Σ≡☺╖ⁿ╩]┼ε╝╣╗à_∙▬Cô\K←û

Uncompressed:
"3@374Ry<+o;<r>YwI+eA78P`5a(c0[+24mc1[{M

Explanation
"3@374Ry<+o;<r>YwI+eA78P`                % Compressed string containing the cities
                         5             M % In the range 1..5:
                          a              %    The current counter,
                           (             %    Decremented,
                            c0[+         %    Is added to the hours
                                24m      %    And modulo'd by 24
                                   c1[   %    Push the minutes
                                      {  %    Pair the two items

C# (Visual C# Interactive Compiler), 119 bytes
Input: hh:mm
Output: h:mm
t=>String.Concat("Accra,Lagos,Rome,Kyiv,Dubai".Split(',').Select((c,i)=>c+$":{(int.Parse(t[0..2])+i)%24}:{t[3..5]}\n"))

Try it online!

Perl 5, 548 bytes
Golfed vesrion, try it online!
use strict;use warnings;my %time_offsets = ('Athens' => 3,'Beijing' => 8,'London' => 1,'New York' => -4,'Seoul' => 9);my $input = '12:30 AM';my ($hour, $minute, $ampm) = $input =~ /^(\d{1,2}):(\d{2}) (AM|PM)$/;if ($ampm eq 'PM' && $hour != 12) {$hour += 12;} elsif ($ampm eq 'AM' && $hour == 12) {$hour = 0;}my %city_times;while (my ($city, $offset) = each %time_offsets) {my $local_hour = ($hour + $offset) % 24;$city_times{$city} = sprintf("%02d:%02d", $local_hour, $minute);}while (my ($city, $time) = each %city_times) {print "$city: $time\n";}

Ungolfed vesrion
use strict;
use warnings;

my %time_offsets = (
    'Athens' => 3,
    'Beijing' => 8,
    'London' => 1,
    'New York' => -4,
    'Seoul' => 9,
);

my $input = '12:30 AM';  # Replace with input from user

# Extract hour, minute, and AM/PM from input
my ($hour, $minute, $ampm) = $input =~ /^(\d{1,2}):(\d{2}) (AM|PM)$/;

# Convert 12-hour time to 24-hour time
if ($ampm eq 'PM' && $hour != 12) {
    $hour += 12;
} elsif ($ampm eq 'AM' && $hour == 12) {
    $hour = 0;
}

# Calculate time in each city
my %city_times;
while (my ($city, $offset) = each %time_offsets) {
    my $local_hour = ($hour + $offset) % 24;
    $city_times{$city} = sprintf("%02d:%02d", $local_hour, $minute);
}

# Output city times
while (my ($city, $time) = each %city_times) {
    print "$city: $time\n";
}

PowerShell, 123 bytes
Input can be in 12 or 24 hour format i.e. hh:mm OR hh:mm AM/PM
param($i)0..4|%{"{0}: {1}"-f("Accra","Lagos","Cairo","Amman","Dubai")[$_],([datetime]$i).AddHours($_).ToString("hh:mm tt")}

Try it online!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Convert a string to sentence case
Input:
A string (or the closest thing to that in your language)
Output:
The same string but converted to sentence case
Rules:

For this challenge, sentence case can be considered "The first letter of each sentence is capitalized. The rest are lowercase." (i.e. proper nouns do not have to be capitalized)
If the input does not include a period, it is treated as one sentence.
The other 2 punctuation marks used to end a sentence in english (? and !) can be considered periods
If a letter immediately follows a punctuation mark the same rules still apply (i.e. the first letter is capitalized and all following letters are lowercased until the next punctuation mark)

Sample test cases:
"hello world." // "Hello world."

"CODEGOLF IS FUN." // "Codegolf is fun."

"no period" // "No period"

"the ball was red. so was the balloon." // "The ball was red. So was the balloon."

"I love codegolf.stackexchange.com" // "I love codegolf.Stackexchange.Com"

"heLLo! hOW are yOU toDay? hOpEfulLy yOu are okay!" // "Hello! How are you today? Hopefully you are okay!"

This is code-golf, so the shortest code wins!

Suggested test case: “Everybody loves codegolf.stackexchange.com !!! ♡ 4 golf”.

All other punctuation marks - so ", ', ,, ;, -, ...?

You wouldn't normally capitalize a sentence after every ", ', ,, ;, -.
The challenge is to convert to standard sentence case

@Lebster I'll vote to re-open if you specify exactly which punctuation marks can end a sentence (if it's just ., ? and ! then remove the word "etc." since it adds ambiguity). A few more test cases would also be very helpful

It should also be specified what happens if there is a letter immediately after a period, or if that's even possible

Huh, I thought I had done those two things, I guess it must not have saved :(
Doing again now, thanks for the feedback!

"The other 2 punctuation marks used to end a sentence in english (? and !) can be considered periods" Are we able to replace these punctuation marks with periods? e.g. "heLLo! hOW are yOU toDay? hOpEfulLy yOu are okay!" // "Hello. How are you today. Hopefully you are okay."

@AaronMiller No

By a 'letter' do you mean just a-z and A-Z or must we also cater for accented characters as in Crème Brulée.

Your program can work with accented characters or it can break when fed with them, it is up to you

Some other cases: (1) Should hello.   world (more than one space after the period) should be converted to Hello.  World? (2) Can there be "empty sentences" -- e.g. .   or hello? !?

05AB1E, 3 bytes
l.ª

Try it online!
Nothing like a good old built-in answer! This converts the string to lowercase and then performs sentence case.

haha get outgolfed nerd.

I like how you've commented "get outgolfed nerd" on your own answer. xD

Vyxal, 1 byte
¡

Try it Online!
"Nothing like a good old built-in answer!" I suppose not younger lyxal, I suppose not.
Alternatively, a non-trivial 24 byte answer:
`([.?!])`ṡλ⇩⌈:Th~iǐȦṄ;Ẇṅ

Try it Online!
Explained
`([.?!])`ṡλ⇩⌈:Th~iǐȦṄ;Ẇṅ
`       `ṡ               # Split the input on the regex "[.?!]", keeping the thing that causes splits (wrapping something in `()` when regex splitting keeps it in the split list)
          λ          ;Ẇ  # To each second item of that list (guaranteed to not be punctuation), starting at index 0:
           ⇩⌈             #   Split the lowercase version of the string on spaces
             :Th~i        #   Get the first word by getting the first truthy index in the splitted string (because it may contain `""`s) and get the item at that index
                  ǐȦṄ     #   Replace the word at that index with a title-cased version of the string, and join the list on spaces.
                      ṅ   # Join the result on nothing

Python 3, 67 bytes
-7 bytes thanks to Surculose Sputum
If other punctuation like ! or ? are allowed.
lambda s:re.sub(r'\w[\w ]+',lambda x:x[0].capitalize(),s)
import re

Try it online!

Python 2, 53 bytes
lambda s:'. '.join(map(str.capitalize,s.split('. ')))

Try it online!

67 bytes in Python 3, since you can use x[0] instead of x.group(0).

@SurculoseSputum I wasn't aware of that trick. Thanks!

Erlang (escript), 77 bytes
If non-periods are allowed... well, that greatly golfs my program!
g(H)->[string:titlecase(string:lowercase(I))||I<-re:split(H,"(\\W[\\W ]+)")].

Try it online!
Explanation
g(H)->                      % Define a function.

re:split(H,"(\\W[\\W ]+)")  % Split the operand on "sentences", keeping the items reserved for splitting.

                            % I.e. none of the items from the string is missing after the split

||I<-   ]                   % For every item in a sentence,
[string:titlecase(string:lowercase(I))

                            %     Title case the sentence.
.                           % End the function.

JavaScript (Node.js), 101 bytes
s=>(s.reduce((a,c)=>c=='.'?(r+=c,'Upp'):c>' '?(r+=c['to'+a+'erCase'](),'Low'):(r+=c,a),'Upp',r=''),r)

Try it online!

Woah, how does this work lol

C (gcc), 80 \$\cdots\$ 87 76 bytes
Added 13 bytes to fix a bug kindly pointed out by Abigail.
c;b;f(char*s){for(b=1;c=*s;b|=ispunct(c))*s++=isalpha(c)?b?b=0,c&95:c|32:c;}

Try it online!
How
Capitalises the first letter and every letter after a punctuation mark.  Every other letter is converted to lower case. Simply prints everything else.

This fails on the amount is $15. Regardless of whether you interpret $ as a punctuation character, the 1 should remain as is, it being its own uppercase.

@Abigail Oops, wasn't dealing with numeric chars. Fixed now - thanks! :-)

Retina, 13 bytes
.+
$T
\b .
$L

Try it online!
Explanation
General approach is to convert every word to title-case, then un-convert the words that shouldn't have been converted
.+ Matches the entire string, $T converts it to title case (every word lowercase with an uppercase first character
\b . - \b Matches the position between a word-character and a non-word character (i.e. the end of a word without a full stop) followed by a space and any other character .
$L converts this to lowercase

perl -p, 33 bytes
$_=lc=~s/(^|\pP)\s*\K\pL/uc$&/erg

Try it online!
This lowercases the string, then upper cases any letter following either the beginning of the string, or after a punctuation character (skipping any whitespace in between). This does turn a string "foo, bar, baz" into "Foo, Bar, Baz", but that's how I read the requirement about all punctuation.

You can save two bytes by making the lc and the substitution separate statements. Try it online!

Python 3, 117 bytes
import re
f=lambda s:''.join(map(lambda p:re.sub(r'[a-z]',lambda m:m[0].upper(),p.lower(),1),re.split(r'([.?!])',s)))

Try it online!
For some reason, I made a solution that handles a few extra test cases that OP may or may not have cared about :) This is much longer than the current shortest Python solution, but I'd be sad to just throw this code away, so here it is!
Extra test cases:
"a.b.c" //  "A.B.C"
(no space after punctuation)

"hello.  goodbye" // "Hello.  Goodbye"
(more than one space after punctuation)

"I'M A ROBOT" // "I'm a robot"
(punctuation other than sentence terminator)

Commented solution:
f = (
  lambda string:
    ''.join(map(

      # Capitalize first letter in part
      lambda part: re.sub(
        r'[a-z]',
        lambda match: match[0].upper(),
        part.lower(),
        1
      ),

      # Split on punctuation
      re.split(r'([.?!])',string)

    ))
)

Go, 192 bytes
import(y"bytes";."regexp";u"unicode")
type k=[]byte
func f(s k)k{return MustCompile(`\w[\w ]+`).ReplaceAllFunc(s,func(b k)k{return append(k{byte(u.ToUpper(rune(b[0])))},y.ToLower(b[1:])...)})}

A port of @dingledooper's answer.
Attempt This Online!

Retina 0.8.2, 19 bytes
T`L`l
T`l`L`^.|\W .

Try it online! Link includes test cases. Explanation:
T`L`l

Lowercase everything.
T`l`L`^.|\W .

Uppercase the first character and any character that follows a non-word character and a space. It might not be the world's best heuristic but it works on the test case.

Red, 81 bytes
func[s][parse lowercase s[any[any" "p: change skip(p/1 - 32)thru["."|"!"|"?"]]]s]

Try it online!

Vim, 20 19 bytes
Saved 1 byte by using ~ to toggle casing instead of vU.
v$uqq~/[.!?]
w@qq@q

Try it online!
Explanation:
v$u                 # Selects whole line and changes it to lowercase
   qq               # Starts recording macro q
     ~              # Toggles uppercase on current character
      /[.!?]        # Jumps to next . ! or ?
            w       # Jumps to next non-whitespace character
             @q     # Calls macro q recursively
               q@q  # Ends macro q and calls it

Japt, 14 bytes
v r"^.|%W ."_u

Try it


text:
Test a polyomino against Conway criterion
Background
Conway criterion is a method to test if a given polygon can tile (i.e. cover without overlapping) an infinite plane. It states that a polygon can tile the plane if the following conditions are met:

The given polygon does not have any holes in it.
It is possible to choose six consecutive1 points \$A,B,C,D,E,F\$ on its perimeter, so that

The boundary part of \$A\$ to \$B\$ must be equal to that of \$E\$ to \$D\$ in its size, shape, and orientation;
Each of the boundary parts \$BC\$, \$CD\$, \$EF\$, and \$FA\$ must have 180-degrees rotational symmetry; and
At least 3 out of the six points must be distinct from each other.

1) By consecutive, the six points must appear in the given order if you walk around the shape in one direction (either CW (clockwise) or CCW (counter-clockwise)). A boundary part between two consecutive points may contain zero, one, or multiple line segments.
If all the conditions are met, the given shape can tile the plane using only translation and 180-degree rotation. However, failing the condition doesn't mean the piece can't tile the plane. This happens when the tiling involves 90-degree rotations and/or reflections, or the tiling does not use 180-degree rotation at all.
The following is one example that satisfies Conway criterion:

with its plane tiling:

Task
Given a polyomino without holes as input, determine if it satisfies Conway criterion.
You can take the input in any sensible ways, including but not limited to

a 2D grid;
a list of coordinates of the cells;
a list of coordinates on the boundary (including non-vertices or not);
a list of steps starting from some point on the perimeter in NSEW notation, ...

If you use the input format that describes the perimeter (e.g. the last two formats above), you can assume that the input (the sequence of points or steps on the perimeter) is given in certain direction (either CW or CCW), but you cannot assume that it starts at any certain position.
Standard code-golf rules apply. The shortest code in bytes wins.
Test cases
The test cases are given as 2D grid, where O is a part of the polyomino and . is an empty space.
True
the example above
OO........
OOOOOOOOOO
OOOOOOOOOO
....OOOOOO
....OOOOOO
....OOOOOO
....OOOOOO
....OOOOOO

the F pentomino
.OO
OO.
.O.
one possible set of points:
  A---E=F
  |   |
+-+ +-+
|   |
B-+ D
  | |
  +-C

OOO.
O.OO
E---D-C
|     |
F +-+ +-+
| | |   |
+-+ A---B

a nonomino that can tile with or without 180 degrees rotation
.O..
.OOO
OOO.
.OO.
.O..

can you spot ABCDEF here? (hint: two points out of ABCDEF are not on the vertices)
OOOO...
.OOOO..
OO.O...
O..OOOO

how about this? (hint: AB and DE are zero-length)
...OOOO.
OO.OO...
O..OOO..
OOOO....
..OOOOOO
..OO....

False
can tile the plane, but needs 90 deg rotation
.OOO.
OO.OO

cannot tile the plane at all
OOOO
O...
O.OO
OOO.

can tile with only translation, but not with 180 degrees rotation
...O
.OOO
OOO.
..OO

Can we assume that the six indicated points can always be taken to be lattice points on the boundary?

@GregMartin Yes, this can be proven.

Python 3.8 (pre-release), 371 ... 338 336 bytes
Takes as input a list of complex numbers, denoting the boundary coordinates in counterclockwise order.
-9 bytes thanks to @ovs
-2 bytes thanks to @Bubbler
import itertools as Z
def f(P):Q=P*2;I=Q.index;L=len;return any(L({*map(complex.__sub__,T:=(J:=lambda x,y:Q[(j:=I(p[x])):I(p[y],j)+1])(0,1),U:=J(3,4)[::-1])})<2<L({*p})and(L(T)==L(U))&all((B:=J(a,-~a%6))==[B[L(B)//2]-E+B[~L(B)//2]for E in B][::-1]for a in[1,2,4,5])for S in zip(*[Q[I(i):]for i in P])for p in eval('Z.'+dir(Z)[11])(S,6))

Try it online!

338 bytes with import itertools as Z and eval('Z.'+dir(Z)[11]) instead of combinations_with_replacement.

Try it online!

@ovs Very nice! That's a smart way of reducing extremely long function names.

You still have a len.

@Bubbler Good catch :)


text:
Is this a cube?
This challenge is a riff on Dion's challenge "Is this a rectangle?". The goal of this challenge is to write a program to decide whether or not some collection of tuples of integers represents a hypercube of some dimension.
Background
A hypercube is a generalization of a square.

A \$0\$-cube is a single point.
A \$1\$-cube is a line segment.
A \$2\$-cube is a square.
A \$3\$-cube is an ordinary cube.
An \$n\$-cube is a connected geometric object consisting of pairs of parallel line segments, perpendicular to each other and of the same length.

Example
For example, if you are given the input \$\{(0, 4, 0, 9), (2, 2, -4, 9), (-2, 0, -6, 9), (-4, 2, -2, 9)\}\$, then you should return a truthy value because these four points define a \$2\$-cube (a square).
You are allowed to input the data in any reasonable format—but the computation needs to work regardless of the input order of the points.
An \$n\$ cube has \$2^n\$ vertices, so if the list of numbers does not contain \$2^n\$ numbers, you must return a falsey value.
Challenge
This is a code-golf challenge, so shortest code wins.
Test data
Cubes:
[(1,9,7,7)]
[(1),(2)]
[(9,1,9),(1,2,9)]
[(0,0,5),(0,1,5),(1,0,5),(1,1,5)]
[(0,0,0),(0,0,1),(0,1,0),(0,1,1),(1,0,0),(1,0,1),(1,1,0),(1,1,1)]
[(0,0,0),(0,3,4),(0,-4,3),(0,-1,7),(5,0,0),(5,3,4),(5,-4,3),(5,-1,7)]

Non-cubes:
[(1,0,0),(0,1,0),(0,0,1),(1,1,1)]
[(0,0,0),(0,0,1),(0,1,0),(1,0,0)]
[(1,0,0),(0,1,0),(0,0,1)]
[(1,0,0,0,0),(0,1,0,0,0),(0,0,1,0,0),(0,0,1,1,1)]

If you'd like more test data, or if you'd like to suggest more test data, let me know.

In the first paragraph one can read "to decide whether or some"

Are you sure [(0,4,0),(0,1,1),(1,0,1),(1,1,1)] is a cube?

May we assume that all points have the same number of coordinates?

@Adám, yes, all points have the same number of coordinates.

Will the input points be distinct?

@xnor, yes, the list of points will be distinct.

This should be hacked

@PeterKagey Fail on 000 001 010 100

APL (Dyalog Unicode), 44 bytes
{≡/((÷∘⊃⍨1↓⍋⌷¨⊂)⍤1∘.(+.×⍨-)⍨)¨⍵(,⍳2⍴⍨⌊2⍟≢⍵)}

Try it online!
the argument ⍵ is a vector of coordinate vectors
,⍳2⍴⍨⌊2⍟≢⍵ build a hypercube as the cartesian product \$\{0,1\}^{\left\lfloor \log_2\left|\omega\right|\right\rfloor}\$
≡/(f)¨⍵(..) evaluate f for ⍵ and the 01 hypercube, and test if they match
∘.(+.×⍨-)⍨ matrix of pairwise distances
(÷∘⊃⍨1↓⍋⌷¨⊂)⍤1 sort each row and divide by its second element

Python, 262 \$\cdots\$ 305 303 bytes
Saved a whopping 19 bytes thanks to dingledooper!!!
Added 118 bytes to fix a bug kindly pointed out by xnor, Peter Kagey and l4m2.
lambda l,R=range,L=len:(n:=L(l))<2or(d:=L(bin(n))-3)and(p:=sorted([sum((x-y)**2for x,y in zip(i,j))for i in l for j in l]))==[i*p[n]for i in R(d+2)for _ in R(2**d*math.comb(d,i))]and(K:=R(L(l[0])))and L({sum(([sum(l[i][j]for i in R(n))for j in K][j]-n*l[i][j])**2for j in K)for i in R(n)})<2
import math

Try it online!
Inputs a list of points and returns True/False.
How
Calculates the square of the distances between all possible pairs of points (including self-pairs and both \$(p_i,p_j)\$ and \$(p_j,p_i)\$ for all points \$p_j\$ and \$p_i\$ where \$i\neq j\$) and normalises them by the smallest non-zero square distance.  For an \$n\$-cube we should then see a pattern of integers \$i = 0,1,\dots, n\$ each occurring \$2^{n}{n\choose i}\$ times.  This corresponds with the \$0\$s for all the self-pairs, and the square of the lengths of all the sides being \$a^2\$, and the square of the lengths of all the diagonals being \$2a^2, 3a^2,\dots, na^2\$.
Correction
Also checks that the given vertices are all equidistant from the centre of mass.

I feel like this should work and not give false positives, but I don't see how to prove it. The multiset of distances doesn't always determine the set of points. In one dimension, I found that [0, 1, 3, 3, 7, 8] and [0, 1, 1, 4, 6, 8] have the same multiset of pairwise distances even though they are not translations or reflections of each other. But it feels like the distances of vertices in a cube constraints it in a more structured way.

I think the points ${(0,0,0), (1,0,0), (\frac 12, \frac{\sqrt{3}}{2}, 0), (\frac 12, \frac{\sqrt{3}}{2}, 1)}$ meet this criteria but don't form a square. I'll see if I can rotate and scale this to make it fit on the integer lattice.

@PeterKagey So after rotation it's [(1,0,0,0,0),(0,1,0,0,0),(0,0,1,0,0),(0,0,1,1,1)]

@l4m2, thanks! I added a new test case to reflect this.

@PeterKagey Thanks - have added a correction.

@l4m2 Thanks - have added a correction.

@PeterKagey Do paths of 3 or more points determine a cube? (For my answer it's easily done)

Python 3, 339 338
lambda P:1==L(P)or P in map(g,permutations(P))
from itertools import*
L=len
Z=zip
D=lambda a,b:sum(x*y for x,y in Z(a,b))
def g(Q):B=[[x-y for x,y in Z(p,Q[0])]for p in Q[3-L(bin(L(Q))):]];return any(D(a,b)or D(a,a)-D(b,b)for a,b in combinations(B,2))or{tuple(x+sum(y)for x,y in Z(Q[0],Z(*C)))for C in product(*[(p,(0,)*L(p))for p in B])}

Try it online!
Takes a set of points as input.
Pseudocode explanation:
def f(points):
    let n = log_2(|points|)
    for each permutation Q of the points:
        let q be the first point in Q
        let B be the following n points, with q subtracted from each
        if all pairs of points in B are orthogonal and have equal magnitude:
            let S be the set of points which can be obtained by summing q and any subset of B
            if S == points: return True
    return False

Can definitely be golfed further but it's bedtime.

JavaScript (Node.js), 182 bytes
x=>(g=(q=(x,z)=>x.flatMap(a=>x.flatMap(c=>x.map(b=>z*a.reduce((s,v,i)=>s+(v-b[i])**2+(v-c[i])**2,0)))).sort((a,b)=>a-b))(x,K=x.length))+''==q(x.map(_=>[...(K++).toString(2)]),g[K]|0)

Try it online!
Check sums of length squares of A-B-C, where A,B,C can be same

JavaScript (Node.js), 258 bytes
x=>(q=(x,z)=>g=x.flatMap(a=>x.map(b=>z*a.reduce((s,v,i)=>s+(v-b[i])**2,0))).sort((a,b)=>b-a))([...x,x[0].map((_,i)=>x.reduce((s,v)=>s+v[i],P=0)/(K=x.length))],K)+''==q([x.slice(D=~Math.log2(K)).map(_=>!P++||.5),...x.map(_=>[...(K++).toString(2)])],g[0]/~D|0)

Try it online!
Similar to Noodle9's answer, but generate another square to compare rather than use formula and add midpoint like normal ones

Error like Noodle9's answer

I added a new test case to reflect this.

Haskell, 139 bytes
import Data.List
import Data.List.Ordered
c p=has[(2^n,n*2^n)|n<-[0..]](length p,length$group(sort[sum$(^2)<$>zipWith(-)x y|x<-p,y<-p])!!1)

Try it online!


text:
Analog clock using braille UTF8 characters
Inspired by Braille graphics and Build an analog clock.

The goal there is to create a tool that use terminal console to draw and animate a clock by using UTF-8 fonts \U2800: ⠀ to \U28FF: ⣿.
00:[⠀] 01:[⠁] 02:[⠂] 03:[⠃] 04:[⠄] 05:[⠅] 06:[⠆] 07:[⠇] 08:[⠈] 09:[⠉] 0A:[⠊]
0B:[⠋] 0C:[⠌] 0D:[⠍] 0E:[⠎] 0F:[⠏] 10:[⠐] 11:[⠑] 12:[⠒] 13:[⠓] 14:[⠔] 15:[⠕]
...
EA:[⣪] EB:[⣫] EC:[⣬] ED:[⣭] EE:[⣮] EF:[⣯] F0:[⣰] F1:[⣱] F2:[⣲] F3:[⣳] F4:[⣴]
F5:[⣵] F6:[⣶] F7:[⣷] F8:[⣸] F9:[⣹] FA:[⣺] FB:[⣻] FC:[⣼] FD:[⣽] FE:[⣾] FF:[⣿]

The program takes HEIGHT and WIDTH -- the height and width of the displayed clock in terminal characters -- as input.

From pixelWidth = WIDTH x 2 and pixelHeight = HEIGHT x 4 you have to build something like a map, drawn your clock as described then extract 2 pixel width and 4 pixel height characters to choose one of 256 character in \U2800 to \U28FF.

They must be upgraded every second!! Care of code efficiency! (not 1 second delay plus drawing time) +25 byte penalty if your clock drop any second!

The full circle of the clock is 1 point width, at 100% of ray, meaning ray could vary between horizontal (ray=pixelWidth/2) and vertical (ray=pixelHeight/2)!

12 hour ticks from 90% to 100% of ray.

60 minute ticks as single dot located at 90%, but displayed only if width > 20 (terminal width greather than 20 characters).

Hours arm length is 45% of ray.

Minutes arm length is 77% of ray.

Seconds arm is 88% or ray.

Seconds arm is 1 point width.

Hours and minutes arms have to be larger, for this, you will draw each of them 3 time: 1x centered, 1x shifted left by 1 dot and 1x shifted up by 1 dot.

Hours, minutes and seconds arms have to progress each second like a regular analog clock.

Of course, there could be some variants, mostly depending on how you drawn the circle. But as other graphic parts are lines, except some rare rounding bug, with a give size, at some precise time, all clock program could show same design... with some 1px difference somewhere... Some sample you could copy-paste:
A 18x8 clock at 10h10'42" like (without minutes ticks):
⠀⠀⠀⢀⣤⠒⠊⠉⠉⠋⠉⠑⠒⣤⡀
⠀⢠⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠑⡄
⢸⠓⠀⠀⠀⣀⡀⠀⠀⠀⠀⠀⢀⣠⣤⠀⠚⡇
⡇⠀⠀⠀⠀⠉⠛⢷⣦⣤⡶⠟⠛⠉⠀⠀⠀⢸
⡏⠀⣀⡠⠔⠒⠊⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⢹
⢸⡤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢤⡇
⠀⠘⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠃
⠀⠀⠀⠈⠛⠤⢄⣀⣀⣄⣀⡠⠤⠛⠁

A '39x15@3h42'02"`:
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡠⠤⠒⠒⠊⠉⡉⠉⢹⠉⢉⠉⠑⠒⠒⠤⢄⣀
⠀⠀⠀⠀⠀⠀⢀⡠⠒⠙⡆⠀⠂⠈⠀⠈⠀⠀⠀⠀⠀⠀⡸⠁⠀⠁⠐⠀⢰⠋⠒⢄⡀
⠀⠀⠀⠀⡠⠒⠁⠠⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠇⠀⠀⠀⠀⠀⠀⠀⠁⠄⠈⠒⢄
⠀⠀⣠⠊⠀⠄⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡜⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠠⠀⠑⣄
⠀⡰⠉⡉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢉⠉⢆
⢰⠁⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡎⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠈⡆
⡎⢀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡀⢱
⡧⠤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⡶⠶⠶⠾⠶⢶⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠤⢼
⢇⠈⡀⠀⢀⣀⣤⣤⡶⠶⠟⠛⠛⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⠛⠻⠆⠀⠀⠀⠀⠀⠀⠀⠀⢀⠁⡸
⠸⡀⠐⠀⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⢀⠇
⠀⠱⣀⣁⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣈⣀⠎
⠀⠀⠙⢄⠀⠂⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠐⠀⡠⠋
⠀⠀⠀⠀⠑⠤⡀⠐⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠂⢀⠤⠊
⠀⠀⠀⠀⠀⠀⠈⠑⠤⣠⠇⠀⠄⢀⠀⢀⠀⠀⠀⠀⠀⠀⠀⡀⠀⡀⠠⠀⠸⣄⠤⠊⠁
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⠤⢄⣀⣁⣀⣸⣀⣈⣀⡠⠤⠤⠒⠊⠉

Or a 48x24 @ 9h16'23":
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠤⠤⠒⠒⠊⠉⠉⠉⡏⠉⠉⠑⠒⠒⠤⠤⣀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡔⠊⠉⠀⠀⡀⠀⠄⠀⠂⠀⠀⠃⠀⠐⠀⠠⠀⢀⠀⠀⠉⠑⢢⣀
⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠊⠀⢳⠀⠐⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⡞⠀⠑⠢⡀
⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⠀⠈⠢⡀
⠀⠀⠀⠀⢀⠔⠁⢀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⡀⠈⠢⡀
⠀⠀⠀⢠⠊⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠑⡄
⠀⠀⡰⠓⠦⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠴⠚⢆
⠀⢠⠃⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀⠘⡄
⠀⡇⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⢸
⢸⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⡇
⡎⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⢱
⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠛⠻⠶⠶⠶⣦⣤⣤⣄⣀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸
⡏⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⣍⠙⠛⠻⠶⢶⣤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⢹
⢇⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠣⡄⠀⠀⠀⠀⠉⠉⠛⠛⠷⠶⣦⣤⣄⡀⠀⠀⠀⠈⠀⡸
⢸⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠁⠀⠀⠀⠁⠀⡇
⠀⡇⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢆⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⢸
⠀⠘⡄⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⢠⠃
⠀⠀⠱⡤⠖⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠓⡄⠀⠀⠀⠀⠀⠀⠀⠐⠲⢤⠎
⠀⠀⠀⠘⢄⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠣⡄⠀⠀⠀⠀⠈⠀⡠⠃
⠀⠀⠀⠀⠈⠢⡀⠈⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⠀⠁⢀⠔⠁
⠀⠀⠀⠀⠀⠀⠈⠢⡀⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀⠀⢀⠔⠁
⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢄⠀⡼⠀⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⢧⠀⡠⠔⠁
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠣⢄⣀⠀⠀⠁⠀⠂⠀⠄⠀⠀⡄⠀⠠⠀⠐⠀⠈⠀⠀⣀⡠⠜⠉
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠒⠒⠤⠤⢄⣀⣀⣀⣇⣀⣀⡠⠤⠤⠒⠒⠉

There is an accelerated sample of what they could look like, in a 80x24 terminal window, shot between 09h17'00" and 09h18'00"

Another sample in a small 20x10 window shot between 09h59 and 10h00:

This is code golf, so the shortest answer (in bytes) wins.

I think you need to clarify exactly what is required for this to challenge to work as code golf. Remember that the goal for solvers is to save as many bytes as possible while meeting the specification however minimally or literally, with no value on how nice the output is, so solvers need to know just how much or little is required in their ASCII art output.

@xnor I don't understand your comment... Clock must be drawable at any width and height, I think I did not miss something in requirement, Size of draw could be submited as argument, like: drawBrailleClock $COLUMNS $LINES. From there ray may vary between horizontal and vertical. size of path, tick and border is explained...

For instance, what characters should the outer circle be made of? What  does something like "minute path are 2 point width" mean when it's tilted? For the challenge to be fully specified, one needs to be able to derive exactly what symbol is to displayed at each coordinate for any size.

Ok, So in a 45° angle, 2 to 3 point witdh could use upto 4 points horizontaly and verticaly ⠻⣷⣄.... answer edited

I would recommend posting future challenges in our sandbox first. This seems like a neat idea, but there are some things that need to be clarified. In order to make this challenge well-specified enough for us to golf, it would be useful if you provided an ungolfed example program, or some pseudocode to show us how you want the results formatted. It may seem perfectly clear to you as the author, but we can't be entirely sure of what to output without more specification.

@xnor Question edited: I hope this could be reopened!

@RedwolfPrograms This question was edited. I think there is everything specified! If not, please tell me what's unclear...

@F.Hauri I think it's good now. You might want to specify exactly how the braille symbols should be chosen (or provide an example program), but for now I'll VTR since it's close enough in my opinion.

@RedwolfPrograms I've added a 3rd paragraph, trying to answer your comment. Is this readable?

@F.Hauri Yep, looks good!

how much graphical difference is allowed from the clock shown in your question? Do you have a reference implementation?

We have a list of default input formats, requiring specific input formats is unnecessary and could be problematic -- although you can roll it back if you don't like it.

@Razetime that's definitely hard to answer... but I assume that you can allow anything that "looks correct, with the correct components"

@xnor I see that the line drawing algorithms are not very well-specified, but so is every [tag:graphical-output] challenges. (for example  https://codegolf.stackexchange.com/questions/211460/plot-a-centered-circle ) Why is this one different?

@xnor Added a paragraph with  tolerance. and some sample could be copied as UTF-8 characters.

I've added some penalty, This is ok while no answer already exist and question still closed!?

Let's wait for xnor on that part. I think it's okay to not specify the line drawing algorithm. // Currently there are 3 reopen votes, and I didn't vote to reopen.

@xnor? // Aw, the reopen votes aged away.


text:
Make a program for printing a string in my esolang MAWP!
The task
Given an ascii string, output a program in my esolang MAWP that outputs the inputted string when run.
Useful functions in MAWP
Numbers from 0-9: Pushes the number to stack
M                 Takes the top two numbers off stack and pushes the sum to stack
A                 Takes the top two numbers off stack and pushes the difference to stack (xyA = y-x)
W                 Takes the top two numbers off stack and pushes the multiplied result to stack
P                 Takes the top two numbers off stack and pushes the floored divided result to stack (xyP = yx)
;                 Takes top number off stack and prints it as an ascii char

Test cases
Input: Hello, World!
Possible output: 89W;689MWA;269WW;269WW;1278WWA;159WA;48W;699WM;1278WWA;67W89WM;269WW;455WW;148WM;
Input: codegolf
Possible output: 929MW;278WWA;455WW;1689MWA;1849MWA;1278WWA;269WW;689MW;
Rules

There can be multiple solutions for each symbol, but the length must be minimal: for example, 04M5W5W; is unacceptable while 45W5W; is fine.
The stack starts with a 1 one it.
You may leave something on the stack
Your output may not print out other characters other than the string, and all of the character s must be given in the og order.
This is code-golf, so lowest byte score wins!

ASCII table for reference

Am I right that every output character is produced independently without interaction with other ones? That is, the solution combines the minimal programs to print each character, and concatenates the each followed by ;. Also, is the . at the end optional?

May I leave something in the stack while  program exit? May I output other characters and let them get ignored (just like what brainfuck do)?

@xnor yes, that is correct. The . was originally not optional, but now that i think about it i'm removing it from the challenge as it's an unnecessary addon.

@tsh You may leave something in the stack, you may not print out other characters.

Actually, the stack starting with a 1 seems to mean that you can produce 10 by adding 9 to it for exactly one character, since that consumes it. Is that intended?

@xnor that is fine.

@Dion Is an answer that doesn't take advantage of this invalid because it fails to have a minimal length expression for one of its symbols?

@xnor a 10 in ascii is whitespace, to get an actual character more operations are needed, and most of the time that 10 is not going to be worth it.

OK ... but is it never worth it? Do you know? It's not clear to me. So I still don't know if answers have to consider this by the challenge rules.

@xnor answers do have to consider the starting 1

Wouldn't 98W; be shorter than 9W8W; for H, or am I missing something?

@Dingus edited question

What number may the stack hold? May numbers in stack be negative? May numbers in stack be any large? What will happen if the number out of the range? Will it wrap (mod) or fail (program halt)?

Should program 94P68WM; output 2 or 0? (What order of top two number used when calculating "floored divided result"?) And what about 87P69WM;, 78P69WM;?

Are the A and P operations ever useful? If so, could you include some test cases with them?

All these comments make me think that modelling the challenge after your specific esolang introduced a lot of finicky details from the solver's point of view...

@tsh 1. Assume the number is infinite 2. yes 3.yes 4.Fail 5. The second number is divided/substracted from the top.

@xnor there are probably situations where they are, but i'm not sure. Will try to include some with them

Subtraction is probably useful for ASCII 79. Are the provided outputs for the test cases known to be optimal? Besides, since the stack doesn't start empty, it seems like it's not always optimal to concatenate the programs for printing each character individually.

@mypronounismonicareinstate 79 can still be done with just multiply and addition: 98W7M.

@Λ̸̸ Does 05AB1E have a way to add strings together? If so, i would advise you to use that by converting the integers to strings in each of the arrays

@Dion Is 56M55MW1M; a valid generation output for o?

@Λ̸̸ its not shorter than, for example, 94W1M3W; so no. Other than that, it does output o

Does xyA return x-y, y-x or |x-y|? Does xyP return x//y or y//x?

@Arnauld xyA is y-x ; xyP is y//x

@Λ̸̸ I think the best option for o is 1278WWA so that the 1 can be omitted if the initial 1 on the stack is still available.

@Dion If xyA is y-x, then your output for Hello, World! is not optimal. The e can be obtained with 689MWA, using the initial 1.

Oh, you might want to edit the challenge clarifying the subtraction and division in that case. When I read the word 'difference' I was under the impression it was |x-y|. And I program in stack-based languages pretty often, and xyP is almost always x//y. (Thanks for asking @Arnauld.)

@Arnauld An alternative for o is 94WM3W, also making use of the initial 1. That initial 1 can also make ! shorter than the 92M3W; that's used in the example: 48WM; (if it's still available)..

I misread the challenge when I voted to close it as a duplicate.  I won't hammer it open because 4 other people voted to close for different reasons.  It is unfortunate that my vote is the only one the site seems to care about.

can ! be used?

@Razetime this was created before I really developed MAWP, so, for the sake of this challenge, no

JavaScript (Node.js),  276 266  263 bytes
Saved 3 bytes thanks to @KevinCruijssen
i=>[v=[],O='',[...2**29+'4'].map(F=x=>F[v[x]=+x]=x)].map(s=_=>v.map(x=>v.map(y=>[x+y,x*y,y-x].map((z,o)=>(!F[z]&&V.push(z))|(S=~~s[x]-~s[y])<s[z]|S==s[z]&F[x]<2?F[s[z]=S,z]=F[x]+F[y]+'MWA'[o]:0)),V=[])&&v.push(...V))&Buffer(i).map(n=>O+=F[n]+';')||O.replace(1,'')

Try it online!
MAWP interpreter
Here is a simple MAWP interpreter I wrote to check the results.
function MAWP(code) {
  let stack = [ 1 ], out = "";

  function assertStkSz(n) { if(stack.length < n) throw "stack error"; }

  [...code].forEach(c => {
    switch(c) {
      case 'M': assertStkSz(2); stack.push(stack.pop() + stack.pop()); break;
      case 'A': assertStkSz(2); stack.push(stack.pop() - stack.pop()); break;
      case 'W': assertStkSz(2); stack.push(stack.pop() * stack.pop()); break;
      case 'P': assertStkSz(2); stack.push(stack.pop() / stack.pop() | 0); break;
      case ';': assertStkSz(1); out += String.fromCharCode(stack.pop()); break;
      default : stack.push(+c); break;
    }
  })
  return out;
}

Try it online!

|(S==s[z]&&F[x]<2) can be with one &, can it not? Or ||S==s[z]&F[x]<2 to also get rid of the parenthesis for -2.

@KevinCruijssen Actually, just |S==s[z]&F[x]<2 is perfectly fine. Thank you. :)

05AB1E, 151 150 bytes
žQÇεÑÅs¸˜2∍DT‹N59‹iPi©'WªëP®P-®„WMJëài`9-Dgi…9MWJ©NUë®NX-'M««]JR•4ñ4₄¬[Ý•5äŽ6þbT„WM‡5äøJ•XDŒ•27вǝεDg46N44‹è‹i©NUëW≠i®NX-ì'A«]"19M29MW"16ǝIÇƵPαè';ý1õ.;

Not too happy with the byte-count, but it could be worse..
Try it online or verify all ASCII characters.
Explanation:
I first tried to do the mapping of each printable ASCII character (integers in the range \$[32,126]\$) manually. With this, I've used the following strategy:
1) I've first determined all integers that can be formed by multiplying two single-digit integers:
  (32) → 48W
# (35) → 57W
$ (36) → 66W
( (40) → 58W
* (42) → 67W
- (45) → 59W
0 (48) → 68W
1 (49) → 77W
6 (54) → 69W
8 (56) → 78W
? (63) → 79W
@ (64) → 88W
H (72) → 89W
Q (81) → 99W

We can add or subtract a single digit from each of these numbers to form all integers in the range \$[32,90]\$:
! (33) → [48W1M] / 257WA
" (34) → 48W2M / [157WA]
% (37) → [66W1M] / 358WA
& (38) → 66W2M / 258WA
' (39) → 66W3M / [158WA]
) (41) → 58W1M / 167WA
+ (43) → [67W1M] / 259WA
, (44) → 67W2M / [159WA]
. (46) → [59W1M] / 268WA
/ (47) → 59W2M / [168WA]
2 (50) → [77W1M] / 469WA
3 (51) → 77W2M / 369WA
4 (52) → 77W3M / 269WA
5 (53) → 77W4M / [169WA]
7 (55) → 69W1M / 178WA
9 (57) → [78W1M] / 679WA
: (58) → 78W2M / 579WA
; (59) → 78W3M / 479WA
< (60) → 78W4M / 379WA
= (61) → 78W5M / 279WA
> (62) → 78W6M / [179WA]
A (65) → [88W1M] / 789WA
B (66) → 88W2M / 689WA
C (67) → 88W3M / 589WA
D (68) → 88W4M / 489WA
E (69) → 88W5M / 389WA
F (70) → 88W6M / 289WA
G (71) → 88W7M / [189WA]
I (73) → [89W1M] / 799WA
J (74) → 89W2M / 799WA
K (75) → 89W3M / 699WA
L (76) → 89W4M / 599WA
M (77) → 89W5M / 499WA
N (78) → 89W6M / 399WA
O (79) → 89W7M / 299WA
P (80) → 89W8M / [199WA]
R (82) → 99W1M
S (83) → 99W2M
T (84) → 99W3M
U (85) → 99W4M
V (86) → 99W5M
W (87) → 99W6M
X (88) → 99W7M
Y (89) → 99W8M
Z (90) → 99W9M

3) When there are two options, we want to prioritize the ones containing a digit 1 (since those is already initially on the stack, and we could potentially remove later on). When one of the two numbers contains a 1 I've put it in square-blocks in the list above. If both or neither contain a 1 it's irrelevant which one we choose.
4) Now that everything below 91 is covered, we are left with the integers in the range \$[91,126]\$.
I first determined all integers which could be formed by one single-digit integer multiplied by a two-digit integer in the range \$[10,18]\$, since 18 being 9+9 is the highest we could create:
[ (91) → 794MW
` (96) → 697MW
b (98) → 795MW
c (99) → 992MW
f (102) → 698MW
h (104) → 894MW
i (105) → 796MW
l (108) → 699MW
p (112) → 797MW
u (117) → 994MW
w (119) → 798MW
~ (126) → 799MW

5) And there are also some additional integers which can be formed by using three single digits outside of the ones above, which are edge cases in my program:
d (100) → 455WW
x (120) → 869MW
y (121) → 358WW
} (125) → 555WW

6) After that, we can use a similar strategy as we did in steps 2 and 3:
\ (92) → [794MW1M] / 4268WWA
] (93) → 794MW2M / 3268WWA
^ (94) → 794MW3M / 2268WWA
_ (95) → 794MW4M / [1268WWA]
a (97) → 697MW1M / 1795MWA
e (101) → 455WW1M / 1698MWA
g (103) → 698MW1M / 1894MWA
j (106) → [796MW1M] / 2699MWA
k (107) → 796MW2M / [1699MWA]
m (109) → [699MW1M] / 3797MWA
n (110) → 699MW2M / 2797MWA    *
o (111) → 699MW3M / [1797MWA]
q (113) → [797MW1M] / 4994MWA
r (114) → 797MW2M / 3994MWA
s (115) → 797MW3M / 2994MWA
t (116) → 797MW4M / [1994MWA]
v (118) → 994MW1M / 1798MWA
z (122) → [358WW1M] / 3555WWA
{ (123) → 358WW2M / 2555WWA
| (124) → 358WW3M / [1555WWA]

The one with * behind it is the only edge case after all these steps, since 19M29MW can be used that contains a 1, so is potentially shorter than both 699MW2M and 2797MWA.

As for the actual code to implement these steps and encode the input:
žQ                           # Push all printable ASCII characters
  Ç                          # Convert it to an integer list in the range [32,127]
   ε                         # Map each integer to:
    Ñ                        #  Get the divisors of the current integer
     Ås                      #  Get the middle (if it's a square) or middle two integers
       ¸˜2∍                  #  If it's a square, duplicate that integer
                             #  (so we only have pairs of integers now)
    D                        #  Duplicate the pair
     T‹                      #  Check for both whether they're a single digit (<10):
       y91‹i                 #  If the integer we're mapping over is below 91:
            Pi               #   If both values in the pair are a single digit:
              ©              #    Store the pair in variable `®` (without popping)
               'Wª          '#    And append a "W" to the list
             ë               #   Else:
              P              #    Pop and take the product of the duplicated pair
               ®P            #    Take the product of pair `®` as well
                 -           #    Subtract them from one another
              ®              #    Push pair `®`
              „WM            #    Push string "WM"
                 J           #    Join the pair together, and then all three together
           ë                 #  Else (the integer we're mapping over is above 90):
            ài               #   If either of the two integers is a single digit:
              `              #    Push both separated to the stack
               9-            #    Subtract 9 from the larger 2-digit integer
                 Dgi         #    If it's now a single digit:
                    …9MW     #     Push string "9MW"
                        J    #     And join all three together
                         ©   #     Store this in variable `®` (without popping)
                          NU #     And store the map-index in variable `X`
                   ë         #    Else:
                    ®        #     Push the string from variable `®`
                     N       #     Push the current map-index
                      X-     #     Subtract the saved map-index of `X`
                        'M  '#     Push an "M"
                          «« #     Join the three together
   ]                         # Close all if-statements and map
    J                        # Join each inner list together to a single string

We now have the following list:
["48W","148WM","248WM","57W","66W","166WM","266WM","366WM","58W","158WM","67W","167WM","267WM","59W","159WM","259WM","68W","77W","177WM","277WM","377WM","477WM","69W","169WM","78W","178WM","278WM","378WM","478WM","578WM","678WM","79W","88W","188WM","288WM","388WM","488WM","588WM","688WM","788WM","89W","189WM","289WM","389WM","489WM","589WM","689WM","789WM","889WM","99W","199WM","299WM","399WM","499WM","599WM","699WM","799WM","899WM","999WM","749MW","749MW1M","749MW2M","749MW3M","749MW4M","839MW","839MW1M","759MW","929MW","1010","929MW2M","689MW","689MW1M","849MW","769MW","769MW1M","769MW2M","939MW","939MW1M","1011","939MW3M","859MW","859MW1M","859MW2M","859MW3M","859MW4M","949MW","949MW1M","789MW","1012","1111","789MW3M","789MW4M","789MW5M","789MW6M","959MW"]

As you can see, it contains some errors like "1010","1011","1012","1111" for the edge cases [100,110,120,121] respectively as discussed earlier, which could be "455WW","869MW","358WW","555WW" instead; "789MW6M" for 125, which could be "555WW" instead; and "789MW3M" for 122, which could be "358WW1M" instead. So we fix those edge cases manually (except for "1011" since we already fix that edge case at the very end anyway):
R                            # Reverse the list
 •4ñ4₄¬[Ý•                   # Push compressed integer 1358555358869455
          5ä                 # Split it into 5 equal-size parts: [1358,555,358,869,455]
 Ž6þ                         # Push compressed integer 1783
    b                        # Convert it to binary: 11011110111
     T„WM‡                   # Transliterate "10" to "WM": "WWMWWWWMWWW"
          5ä                 # Also split it into 5 equal-size parts:
                             #  ["WWM","WW","WW","MW","WW"]
 ø                           # Pair the two lists together
  J                          # And join each inner pair together:
                             #  ["1358WWM","555WW","358WW","869MW","455WW"]
•XDŒ•                        # Push compressed integer 2149280
     27в                     # Convert it to base-27 as list: [4,1,5,6,26]
ǝ                            # Insert the strings at those indices in the reversed list

Then we'll change every case with ...2M or higher to x...A:
ε                            # Map each string to:
 Dg                          #  Get the length (without popping by duplicating first)
     N44‹                    #  Check if the map-index is below 44
                             #  (1 if truthy; 0 if falsey)
   46    è                   #  Use it to index into 46 (6 if truthy; 4 if falsey)
          ‹i                 #  If the length is smaller than that:
            ©                #   Store the current string in variable `®`
             NU              #   And the map-index in variable `X`
           ë                 #  Else:
            W                #   Get the smallest digit (without popping)
             ≠i              #   If it's NOT 1:
               ®             #    Push the string of variable `®`
                NX-          #    Push the map-index and subtract `X`
                   ì         #    Prepend this digit in front of the string
                    'A«     '#    And append an "A"
]                            # Close the if-statements and map

We now have the following (still reversed!) list:
["959MW","555WW","1555WWA","2555WWA","1358WWM","358WW","869MW","789MW","949MW1M","949MW","1949MWA","2949MWA","3949MWA","859MW1M","859MW","1859MWA","1011","939MW1M","939MW","1939MWA","769MW1M","769MW","849MW","689MW1M","689MW","1689MWA","455WW","929MW","759MW","839MW1M","839MW","1839MWA","2839MWA","3839MWA","749MW1M","749MW","999WM","899WM","799WM","699WM","599WM","499WM","399WM","299WM","199WM","99W","199WA","299WA","399WA","499WA","599WA","699WA","799WA","189WM","89W","189WA","289WA","389WA","489WA","589WA","689WA","188WM","88W","79W","179WA","279WA","379WA","479WA","579WA","178WM","78W","169WM","69W","169WA","269WA","369WA","177WM","77W","68W","168WA","159WM","59W","159WA","167WM","67W","158WM","58W","158WA","258WA","166WM","66W","57W","157WA","148WM","48W"]

Fix the final test case as discussed earlier:
"19M29MW"                    # Push string "19M29MW"
         16ǝ                 # And insert it at index 16

And then convert the input using this finished (still reversed) list:
I                           # Push the input-string
 Ç                          # Convert each character to its codepoint integer
  ƵP                        # Push compressed integer 126
    α                       # Take its absolute difference with each codepoint integer
     è                      # Index those into the list we created
      ';ý                  '# Join them together with a ";" delimiter
         1õ.;               # And remove the very first "1"
                            # (after which the result is output implicitly)

See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand why •4ñ4₄¬[Ý• is 1358555358869455; Ž6þ is 1783; •XDŒ• is 2149280; •XDŒ•27в is [4,1,5,6,26]; and ƵP is 126.

underrated answer

@RaghuRanganathan Thank you. :)