text:
Operation Unz̖̬̜̺̬a͇͖̯͔͉l̟̭g͕̝̼͇͓̪͍o̬̝͍̹̻
I'm sure you're all familiar with Z̃͗̇̚͟Ḁ̬̹̈̊̂̏̚L̜̼͊ͣ̈́̿̚G̱̮ͩ̃͑̆ͤ̂̚Õ̷͇͉̺̜̲ͩ́ͪͬͦ͐ ̪̀ͤͨ͛̍̈͢ĝ̭͇̻̊ͮ̾͂e̬̤͔̩̋ͮ̊̈ͭ̓̃n͖͎̘̭̯̳͎͒͂̏̃̾ͯe͕̖̋ͧ͑ͪ̑r̛ͩa̴͕̥̺̺̫̾ͭ͂ͥ̄ͧ͆t͍̻̘̆o͓̥ͤͫ̃̈̂r̹̤͇̰̻̯̐ͮ̈́ͦ͂͞. If not, you can play with the classical generator a bit. Zalgo text is unicode text that started as English text and had a bunch of combining characters to make it hard to read artistic.
This is operation unzalgo. The object is to undo the generate zalgo text operation. Since only combining characters were added, only combining characters have to be removed. We're only going to be operating on English, because of course we are. However, all proper English text must to come through unmutated. That is, if you were fed proper English, you must output your input. Sounds easy, right? Not so fast. English has combining characters, just not very many, and people are slowly forgetting they exist.
The rules:
1) You may either strip combining characters or filter out all invalid characters, at your discretion. This doesn't have to work at all languages because the operation itself makes no sense if we started with something that wasn't English text. Abandon hope all ye who enter here.
2) You may assume that unicode normalization was not executed after zalgo generation; that is all added combining characters are still combining characters.
3) All printable ASCII characters (codepoints between 0x20 and 0x7E inclusive) must survive, as well as tab (0x09), and newline (0x0A).
4) English has diaresis over vowels. These must survive whether expressed as natural characters or combining characters.
Vowel table (Each group of three is in the form (unmodified character, single character, combining characters):
a ä ä A Ä Ä
e ë ë E Ë Ë
i ï ï I Ï Ï
o ö ö O Ö Ö
u ü ü U Ü Ü
y ÿ ÿ Y Ÿ Ÿ

The combining diaresis character is code-point 0x308.
5) English does not have diaeresis over consonants. You must dump them when constructed as combining characters.
6) British English has four ligatures. These must survive:
æ Æ œ Œ

7) The following symbols must survive:
Editor substitution table (includes smart quotes in both directions):
… ¼ ½ ¾ ‘ ’ “ ” ™

Symbol table:
$ ¢ £ ¬ † ‡ • ‰ · ° ± ÷

8) If you get something like ö̎̋̉͆̉ö͒̿̍ͨͦ̽, both oo and öö are valid answers.
9) Input may contain both zalgo and non-zalgo characters; and the non-zalgo characters should be unmodified: if somebody sends 'cöoperate with dͧḯ̍̑̊͐sc͆͐orͩ͌ͮ̎ͬd̄̚', they should still get back 'cöoperate with discord' not 'cooperate with discord'.
10) If any character is not specified, it doesn't matter what you do with it. Feel free to use this rule to lossily compress the keep-drop rules.
11) Your program must handle all unicode codepoints as input. No fair specifying a code-page that trivializes the problem.
Additional test cases:
"z̈ ỏ"        "z o"
"r̈ëën̈ẗr̈ÿ"    "rëëntrÿ"  (don't outsmart yourself)

I have been informed  this case is also excellent but it's starting point contains a few characters with unspecified behavior. If you maul Θ, Ό, Ɲ, or ȳ I don't care.
A pretty comprehensive test input:
    cöoperate with dͧḯ̍̑̊͐sc͆͐orͩ͌ͮ̎ͬd̄̚ æ Æ œ Œ…¼½¾‘’“”™$¢£¬†‡•‰·°±÷

a ä ä A Ä Ä
e ë ë E Ë Ë
i ï ï I Ï Ï   Z̃͗̇̚͟Ḁ̬̹̈̊̂̏̚L̜̼͊ͣ̈́̿̚G̱̮ͩ̃͑̆ͤ̂̚Õ̷͇͉̺̜̲ͩ́ͪͬͦ͐ ̪̀ͤͨ͛̍̈͢ĝ̭͇̻̊ͮ̾͂e̬̤͔̩̋ͮ̊̈ͭ̓̃n͖͎̘̭̯̳͎͒͂̏̃̾ͯe͕̖̋ͧ͑ͪ̑r̛ͩa̴͕̥̺̺̫̾ͭ͂ͥ̄ͧ͆t͍̻̘̆o͓̥ͤͫ̃̈̂r̹̤͇̰̻̯̐ͮ̈́ͦ͂͞
o ö ö O Ö Ö
u ü ü U Ü Ü
y ÿ ÿ Y Ÿ Ÿ
Unz̖̬̜̺̬a͇͖̯͔͉l̟̭g͕̝̼͇͓̪͍o̬̝͍̹̻

ö̎̋̉͆̉ö͒̿̍ͨͦ̽
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅ

It's at the bottom now; lower z̖̬̜̺̬a͇͖̯͔͉l̟̭g͕̝̼͇͓̪͍o̬̝͍̹̻ like you had should be fine, right? :)

@tjjfvi The ordering isn't consistent across refreshes.

This challenge is similar to this one but is way more comprehensive. Should we close the other one as dupe?

JavaScript (Node.js), 45 bytes
s=>s.replace(/([aeiouy]̈)|[̀-ͯ҉]/ig,'$1')

Try it online!
More readable version:
s=>s.replace(/([aeiouy]\u0308)|[\u0300-\u036f\u0489]/ig,'$1')

Great. And now it will only boil down to how to apply a replacement regex in any other programming language.

I tried porting this to Java. It did not go well

Looks like this regex can parse HTML.

I just love how the regex appears. Took me a moment to realize what was going on, there.

@BenjaminUrquhart the Java version works fine. But whatever you used to copy the input text, made a canonicalization. I just took your solution and copied the input text from the JavaScipt tio and it works and why not. Since the question said “you may assume that unicode normalization was not executed after zalgo generation” you can go ahead with that. Note that s->s.replaceAll("(?i)([aeiouy]̈)|\\pM","$1") is even shorter (it only looks longer).

For as long as the problem-description is, these solutions are pretty disappointing lol

Perl 5 (-pC -Mutf8), 30 28 bytes
using tsh regex, upvote him. -2 bytes thanks to DomHastings
s/[aeiouy]̈\K|[̀-ͯ҉]//gi

TIO

(+1 byte), adding /i flag, to fix for uppercase

You can save a couple of bytes using \K instead of $1: Try it online!

thank you, how could I not think about it, i used it in that other answer from me

Japt, 22 bytes
Another port of tsh's solution
r"(%ÿ)|[̀-ͯ҉]""$1

Try it or run all test cases

Hey. We're having trouble figuring out what's up with % in the regex.

@Joshua, % is the RegEx escape character in Japt v1.x and y is its character class for vowels+y, so %y -> \y -> [AEIOUYaeiouy]. You can read more about Japt's RegEx implementation in the docs.

nooo the code itself feels like zalgo >: (

Retina, 64 49 bytes (44 chars)
Removes combining diaresis only if not for a vowel, then removes any character not in the character class. \p{L} is a handy class for Unicode letters.
i`(?<![aeiouy])\u0308

[^	-÷\p{L}‘-™\u0308]

Try it online!
This successfully ensures no dotted consonants remain, and it preserved the dots over the vowels in a way that passes rules #4 and #9.
Test on a real-world example: Try it online!

If I copy the regex in @tsh's answer, I get this for 27 chars (31 bytes):
i`(?!(?<=[aeiouy])̈)[̀-ͯ҉]

Try it online!

Maybe you can take the regexp in my javascript answer. (I dont speak Retina, so maybe)

Copying the replacement from @tsh's answer would save you another 4 bytes.

Actually, those are characters, not bytes, so you'd have to recalculate in UTF8. (TIO counts characters as bytes because it's assuming you're using ISO 8859-1.)

Stax, 27 25 24 bytes
Ç╣>ñ↓í$▐wø⌐∞≤Ö1e╖ÖÅ╤Δ╩+º

Run and debug it
Now handles the Y, and uses no regex.
Unpacked, ungolfed, and commented, it looks like this:
400Vk|r push range array [400, 401, ..., 998, 999]
776X-   store 776 in the X register, and remove it from the array
-       remove all the *remaining* codepoints from the input
{       start a block for filtering the remaining string
  x-    subtract 776 from the codepoint; this will be truthy for all other values
  M     bitwise-or; if there's only a single value on the stack, no-op
  Vv'y+ "aeiouy"
  _]v#  current character in lowercase; is it in the vowels?
  s     swap top two stack entries so the lower value can be used in next iteration
f       complete the filter and output implicitly

Run this one

Explanation would be appreciated

@data: I added some comments.

Jelly, 29 bytes
768r2ȷỌ
ẹ9ị¢¤©fẹⱮØyF‘ƊœPḟ€¢j®

Try it online!
A full program that unzalgos its argument. Filters out all characters with code points between 768 and 2000 except diareses on vowels.
Explanation
Helper link: characters from code point 768 to 2000 inclusive
768r2ȷ  | Range from 768 to 2000 inclusive
      Ọ | Convert from code points to characters

Main link
ẹ                     | All indices in input string of:
 9ị¢¤©                | - the ninth character in the helper link (i.e.  ̈) (which is also copied to the register for use at the end)
      f      Ɗ        | Filter keeping only those in the result of the following, applied to the original input as a monad:
       ẹⱮ             | - Indices of each of the following:
         Øy           |   - Vowels plus y
           F          | - Flatten
            ‘         | - Decrease by 1
              œP      | Now split the original input at each of these indices, discarding the character at the index itself (which will be a diaresis following a vowel)
                ḟ€¢   | Filter each of these lists discarding any characters in the helper link
                   j® | Join using the stored diaresis

+1 f͠͡o͝r̕ ̟̗̼̹̉̐̐ͪͬ̑͌͊̄̃̉̑̒̒͟ḃ̠͉̬̳̪͓͕͎ŏ̘̳̬̗͎̆ͦ͛ỵ͈͗̋̇͗̒̒̀̑̎c̘͎͚̞͈̘ͬ̽̊o̼̳͉̟ͮ̏͌̃̀͒ͧ̃t͎̬̼͛͛̋͆͌t͙̥͎̘͔͕̋͑i̲̮͙͕̫ͯ̊̄̈́̍̉̿̈̌n̫̥͕̞͖̺ͮ̋̏̆̒͗ͅg̘̻̜̟̩̺̈̌̈́͆̿ ̠͙̙̣̆̿͋ͫͅͅw̸̟̽̿̾ͬ̎͢ỉ̵̝͖̜̼̺͡͞t̩̳̫͙̋ͮ̏ͤͅh̴̥̬͓̭͙͊̇̔ ̵̖̥̩̟͌̐̅̎̄͗̈́͑́m̵̑͑̊ͨͮ͊͛ͦ̉ͪ̍̆́҉̝͖̥̕ͅe̶̛͔͍̹̰͚̰̯͈ͭ̌͛̋ͣ̂̓̃͂͆̚̕͟!̵̻̯͍͕̦̰̥̬͚͍ͨͥ̉̈́ͨ͂͗̎͌͊ͧ̈ͮ͑̅̅̇̔͞

PowerShell, 43 bytes
$args-ireplace'([aeiouy]̈)|[̀-ͯ҉]','$1'

Try it online!
+1 to @tsh.
Readable versions:
$args-ireplace'([aeiouy]\u0308)|[\u0300-\u036f\u0489]','$1'

$args-ireplace"([aeiouy]$([char]0x308))|[$([char]0x300)-$([char]0x36f)$([char]0x489)]",'$1'

JavaScript (ES6), 51 chars/60 bytes
Complete golfness:
x=>x.replace(/([^   -ʷ -₿™̈]|(?![^aeiouy])̈)/giu,"")

Escaped golfness: (As Unicode escape sequence doesn't exist, I write u+xxxx as <xxxx>.)
x=>x.replace(/([^\u0009-\u02b7\u2000-\u20bf\u2122\u0308]|(?![^aeiouy])\u0308)/giu,"")

Swift, 115 chars, 119 bytes (UTF-8)
import UIKit
let f={(s)in(""+s).replacingOccurrences(of:"([aeiouy]̈)|[̀-ͯ҉]",with:"$1",options:.regularExpression)}

(based on tsh regex)

Java (JDK), 120 50 bytes
s->s.replaceAll("(?i)([aeiouy]̈)|[̀-ͯ҉]","$1")

Try it online!
Based on Holger comment and Benjamin Urquhart comment, itself based on tsh regex.

The question explicitly says “You may assume that unicode normalization was not executed after zalgo generation”, so you don’t need to decompose the characters, just fix the input (as all other solutions also assume decomposed characters). See also this comment

@Holger you're right, so I took your solution and made the post a community wiki.

So it did work after all. Unicode is a strange thing.  PS: I saw the comment

Python, 63 bytes
Uses the tsh regex
lambda s:re.sub("(?i)([aeiouy]̈)|[̀-ͯ҉]","\\1",s)
import re

TIO

05AB1E, 32 bytes
žAžHŸ776©KçKεÇ¤®Qi¬žOsçlå≠iн]˜çJ

This took longer than it should have, and I'm still not very happy with the result.. Definitely room for improvements..
Removes all characters with code-points in the range \$[512,65536]\$, except for vowels with diareses.
Try it online.
Explanation:
žA                # Push builtin 512
  žH              # Push builtin 65536
    Ÿ             # Create a list with these ranges: [512,513,514,...,65534,65535,65536]
     776          # Push 776
        ©         # Store it in variable `®` (without popping)
         K        # Remove it from this list
          ç       # Convert all these integers to characters with these code-points
           K      # And remove all those characters from the (implicit) input-string
ε                 # Then map all remaining characters to:
 Ç                #  Get the code-points of the current character
  ¤               #  Get the last code-point (without popping the code-points themselves)
   ®Qi            #  And if it's equal to variable `®` (776):
      ¬           #   Get the first code-point (without popping the code-points themselves)
       žO         #   Push builtin "aeiouy"
         s        #   Swap to get the first code-point again
          ç       #   Convert it to a character
           l      #   Then to lowercase
            å≠i   #   And if it's NOT in the vowel-string:
               н  #    Pop the code-points, and only leave the first code-point
                  #  (implicit elses: keep the code-point list)
]                 # Close both if-statements and the map
 ˜                # Flatten the list of lists of code-points
  ç               # Convert these code-point integers back into characters
   J              # And join the character-list back together to a single string
                  # (after which the result is output implicitly)


text:
Draw Recamán's sequence with ASCII
Recamán's sequence (A005132) is a mathematical sequence, defined as such:
$$A(n) = \begin{cases}0 & \textrm{if } n = 0 \\
A(n-1) - n & \textrm{if } A(n-1) - n \textrm{ is positive and not already in the sequence} \\
% Seems more readable than
%A(n-1) - n & \textrm{if } A(n-1) > n \wedge \not\exists m < n: A(m) = A(n-1)-n \\
A(n-1) + n & \textrm{otherwise}
\end{cases}$$
An alternative, simpler verbal explanation is as follows:

Subtract unless you can't (the number is negative, or has been used before), in which case add.

The first few terms are \$0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11\$
Now, there is already this challenge which asks you to generate the nth term of the sequence. This one is slightly different.
Challenge
Given a number n, draw the first n terms of the sequence. What do I mean by 'draw'? Let me demonstrate:

Draw a number line max([A(y) for y<=n]) units long. We'll assume n is 5, for now, so the number line is 6 units long (since the largest of \$A(1) = 0\$, \$A(2) = 1\$, \$A(3) = 3\$, \$A(4) = 6\$ and \$A(5) = 2\$ is \$6\$). Make the line from underscores, starting at 0:

______

Start with the transition between the first and second terms: that is, 0 and 1. Use | and - to draw a square (equal length and height), going upwards. In this case, we'll have to miss out the - because the distance is only 1.

||
______

Now, we'll draw on the next step (\$A(2) = 1\$ to \$A(3) = 3\$) on the bottom of the line (we alternate between up and down each time):

||
______
 | |
 |-|

As you can see, this line also has a height of 2, since the height must be equal to the distance between the two terms.
If we continue, we will eventually get to:
   |--|
   |  |
|| |  |
______
 |||  |
 |||  |
  |   |
  |---|

Rules

If there is a - and | colliding, the later one takes priority.
There may be preceeding/trailing spaces before/after the image, but trailing/preceeding _s or -s are not allowed (exception is 0- or 1- indexing)
You can choose to set the 0 point just before the first _ on the number line, or just after it.
No alternative characters for -, | or _ may be used.
This is code-golf, so shortest answer in bytes wins.

Test case
Here is another test case, with n=10
            |-------|
            ||-----||
            ||     ||
  |----|    ||     ||
  |    |    ||     ||
  ||--||    ||     ||
  ||  ||    ||     ||
||||  ||    ||     ||
_____________________
 |||  ||   |||     ||
 |||  ||   |||     ||
  |   ||   |||     ||
  |---||   |||     ||
       |   |||     ||
       |---|||     ||
           ||------||
           |--------|

It is not clear where left edge of square should be placed.

@DaniilTutubalin I'm not sure I understand what you mean.

basically, statement only specifies that we need to draw squares (width = height) and that they should alternate between up and down. There are no instructions about squares' size and position. In test case I see that 2 squares may have the same position of left edge.

I think As you can see, this line also has a height of 2, since the height must be equal to the distance between the two terms., as well as You can choose to set the 0 point just before the first _ on the number line, or just after it. wrap this up pretty well.

I think the test case for n=10 is  wrong from 13-> 20 onwards.

Also one of your test cases and the description has the central line stop one space to the left of $Max(A(n))$ and the other test case it runs all the way to the right. My solution for now uses the second but I could easily change it.

|--||----||--|_

Jelly, 70 65 bytes
µ_ż+ɗLṪ>Ƈ-ḟ⁸Ḣṭµ¡µL;ⱮṀ’ṭr,;ɗƝJW,RN¹ƭƲ€$+Lp""ƲZẎ€Ʋ‘ŒṬ×"J$»/ị“-|_ ”Y

Try it online!
A full program taking a single integer \$n\$ via STDIN and outputting the ASCII art based on zero-indexing.

source: Stack Exchange

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

sort: votes


text:
Inscriptio Labyrinthica
In the burial place of King Silo of Asturias there is an inscription that reads SILO PRINCEPS FECIT (King Silo made this).

The first letter is found in the very middle, and from there one reads by going in any non-diagonal direction radiating outward.  The final letter is found on all four corners.  In this challenge, you'll generalize the process to make them.
Input
A string (or equivalent), and an integer.  You may make the following assumptions about the input:

The string will have an odd length.
The integer will be an odd number between 1 and one less than twice the length of the string.

Output
An inscriptio labyrinthica for the string, using the integer for the height or width (see models for height examples).  Output should be each letter with no spaces, line break as default to your system/language.
Test cases
Note that an input of 1 or (length * 2 - 1) will result in a horizontal or vertical palindrome.
 Input: FOO, 3    Input: BAR, 1    Input: BAR, 3    Input: BAR, 5

Output: OOO      Output: RABAR    Output: RAR       Output: R
        OFO                               ABA               A
        OOO                               RAR               B
                                                            A
                                                            R

 Input: ABCDE, 5   Input: ABCDE, 3   Input: *<>v^, 5

Output: EDCDE     Output: EDCBCDE           ^v>v^
        DCBCD             DCBABCD           v><>v
        CBABC             EDCBCDE           ><*<>
        DCBCD                               v><>v
        EDCDE                               ^v>v^

Scoring
This is code-golf so shortest answer in bytes wins.  Standard loopholes forbidden.

not totally unrelated

Can the input contain spaces? If so, how should they be handled?

@Nitrodon Sure, and no special handling, just treat them as any other character.  So inputing A B C,1 would result in C B A B C (using a value of 1 since I can't show verticality in comments ha)

The last test case says height is 3, but the output has 5 rows.

@RootTwo oops, fixed, thanks

@Giuseppe, I thought of that one, too but I also think we've had an even more similar one with output always being a length*2-1 square.

@shaggy I did too, but I couldn't find it and after about two weeks up on meta, no one seemed to find it.

May we take input as a list of characters?

Hey, guifa, nice to see you around here! :-)

@Charlie clearly you've been missing all my Perl6 answers :-)  I expect an answer from you too since it's inspired by the fifth king of Spain (well, of Asturies, but Asturies ye España, y tolo demás ye tierra conquistao haha)

May we take the width instead of the height?

@attinat sure, why not.

@RobinRyder Hmm... that seems to be one of the more contentious issues in the or equivalent meta.  But sure, I hate being overly restrictive.

@guifa Do we need to be consistent on whether the int is height or width?

J, 27 bytes
([{~]+/&(|@i:)#@[-1+])-:@<:

Try it online!
An example will clarify the high-level approach.
Consider 'ABCDE' f 3
We notice that what we seek is simply the "cross addition" table of 1 0 1 and 3 2 1 0 1 2 3, which looks like this:
4 3 2 1 2 3 4
3 2 1 0 1 2 3
4 3 2 1 2 3 4

We then pull those indexes from the original string: [{~.
All the rest of the code is just boring arithmetic and the use of i: to construct the arguments 1 0 1 and 3 2 1 0 1 2 3.

Jelly, 12 bytes
Uṡṛ‘HɗŒBŒḄZY

Try it online!
A dyadic link taking the string as its left and height as its right argument. Returns a string with line breaks. If a list of strings were acceptable for output, I can remove the final Y saving a byte. Interestingly the original “SILO PRINCEPS FECIT” looks to me like ASCII art of a 3D diamond when I look at it on TIO.
Explanation
U            | Reverse input
 ṡ   ɗ       | All overlapping substrings of the length given by:
  ṛ          | - The right argument
   ‘         | - Incremented by 1
    H        | - Halved
      ŒB     | Concatenate to the reverse, keeping a single copy of the last character (so creating a palindrome)
        ŒḄ   | Do the same, but this time using the lists of characters generated by the last atom
          Z  | Transpose
           Y | Join with newlines

I clicked on the try it just to see and yes, indeed, it does 3D.  Weird but cool.

R, 93 91 87 bytes
-2 bytes thanks to Giuseppe.
-4 bytes by inputting the width rather than the height, as allowed by OP.
function(s,W,w=W%/%2,h=length(s)-w-1)write(s[1+outer(abs(-w:w),abs(-h:h),`+`)],1,W,,"")

Try it online!
Takes input as a vector of characters. The key part is s[1+outer(abs(-w:w),abs(-h:h),'+')].
First compute \$w\$ and \$h\$ such that the output is of size \$(2w+1)\times(2h+1)\$.
In the output, we want the character in position \$(i,j)\$ to be the character at index \$1+|i-h|+|j-w|\$ in the input. This corresponds to the outer sum of abs(-w:w) and abs(-h:h) (abs(-h:h) is a short way of writing the vector \$[h, h-1, h-2, \ldots, 2, 1, 0, 1, 2, \ldots, h-1, h]\$). For instance, outer(abs(-2:2), abs(-1:1), '+') gives
32123
21012
32123

(we then need to add 1 because R is 1-indexed.) The 0 in the centre is where the first letter of the input should go.
The rest is formatting.

Charcoal, 25 19 bytes
Ｅ⊘⊕η✂θι⁺ι⁻Ｌθ⊘⊖η‖Ｏ←↑

Try it online! Link is to verbose version of code. Explanation:
Ｅ⊘⊕η✂θι⁺ι⁻Ｌθ⊘⊖η

Draw a quarter of the inscription.
‖Ｏ←↑

Reflect to complete the inscription.

Impressive! I am new to the site, I apologize in advance if what follows are a couple of dumb questions. 1. Those are definitely 19 characters, but are they also 19 bytes? and 2. In what encoding that text would take 19 bytes?

Yeah, encoded in UTF-8 this will take 19 characters, but actually 51 bytes. With UTF-16, this still takes 39 bytes to encode.

@damix911 Charcoal has its own encoding, which can be found on its wiki. I think characters outside the code page cost 3 bytes. The deverbosifier tries to compute the correct length but it doesn't bother transcribing to the actual encoding, which is annoying.

@Neil Okey, seems legit!

Japt -R, 19 16 bytes
z
ò@VÔtXUaVÊ)êÃê

Try it
z\nò@VÔtXUaVÊ)êÃê     :Implicit input of integer U & string V
z                     :Floor divide U by 2
 \n                   :Reassign result to U
   ò                  :Range [0,U]
    @                 :Map each X
     VÔ               :  Reverse V
       tX             :  Substring from index X to index ...
         Ua           :    Absolute difference between U and ...
           VÊ         :    Length of V
             )        :  End substring
              ê       :  Palindromise
               Ã      :End map
                ê     :Palindromise
                      :Implicit output, joined by newlines

Wolfram Language (Mathematica), 57 54 bytes
(g=Reverse@Rest@#~Join~#&)@BlockMap[g,#,⌈#2/2⌉,1]&

Try it online!
Takes the width as input.

@lirtosiast then the first g isn't evaluated the first time the function is called. Try it online!

Interesting, any idea why it appears to work when you use @@ or @@@?

@lirtosiast It think Print/@f[...] -> Print/@Transpose[g[...]] -> Transpose[Print@g[...]], by which time g is defined.

Japt -R, 10 bytes
Ôã°Vz)mê ê

Takes width instead of height.
Try it
Pseudocode (U is string, V is integer):
U.Reverse().AllSubstringsOfLength(++V / 2).Map(Palindromize).Palindromize

Nice! Never occurred to me to try to build it sideways.

Perl 6, 68 67 bytes
{say |$^a.comb[{$_...0...$_}($a.comb-$^b+>1-1)X+.abs]for ^$b-$b+>1}

Try it online!

Python 3, 104 bytes
I haven't golfed in so long... I'm sure this could be shorter.
Details
This code defines a function that takes two arguments (the string and the height) and gives the result on standard output.
The index into the string is the Manhattan distance from the centre of the grid. For a grid of width w and height h, the distance for the cell at (x, y) is abs(x - (w - 1) / 2) + abs(v - (h - 1) / 2).
The width of the grid must be such that the Manhattan distance of the corners (say, (0, 0)) is one less than the length of the string. Substituting (0, 0) into the above and simplifying, we find that the width is simply 2 * len(s) - h.
Code
def b(s,h):
 w=2*len(s)-h
 for y in range(h):print(''.join(s[abs(x-w//2)+abs(y-h//2)]for x in range(w)))

Try it online!

05AB1E, 10 bytes
RŒI>;ù€ûû»

Try it online!

Pyth, 19 bytes
L+_btbjyyM.:Q-lQ/E2

Try it online!
L+_btbjyyM.:Q-lQ/E2   Implicit: Q=string, E=height
L                     Define a function, y(b):
  _b                    Reverse b
 +  tb                  Append all be first element of b
                      y is now a palindromisation function
              lQ      Length of Q
             -  /E2   Subtract floored division of E by 2
          .:Q         All substrings of Q with the above length
        yM            Palindromise each substring
       y              Palindromise the set
      j               Join on newlines, implicit print

Stax, 11 9 bytes
é─C[┬«#t▒

Run and debug it
It takes the width, and the original string, in that order.

Python 2, 95 bytes
def f(s,n):
 y=len(s);n//=2
 for i in range(n+1)+range(n)[::-1]:print s[y+~i:n-i:-1]+s[n-i:y-i]

Try it online!

C# (.NET Core), 146 bytes
s=>n=>{int w=s.Length*2-n,i=0,j;var r=new char[n,w];for(;i<n;i++)for(j=0;j<w;)r[i,j]=s[System.Math.Abs(n/2-i)+System.Math.Abs(w/2-j++)];return r;}

Try it online!
Longest answer so long. :-) It uses the Manhattan distance to the center of the square. There must be a shorter way, though.

Ruby, 65 bytes
->s,h{(-(h/=2)..h).map{|y|(z=s[(w=y.abs)..w+~h]).reverse.chop+z}}

Try it online!

Tcl, 188 170 162 bytes
{{w s} {join [lmap C [lrepeat $w string] {join [$C reverse [set y [$C range $s [set x [expr abs($w/2+1-[incr i])]] end-[expr $w/2-$x]]]][$C range $y 1 end]}] \n}} bytes

Try it online!
There seem to be a million bad ways to golf this problem in TCL.  This is not the worst of them.
Saved 18 bytes minimum by converting to lambda (can save up to 13 more if return value of a list of lines is acceptable)
Saved an additional 8 since lmap iterator served as an extra constant

Canvas, 18 bytes
±Ｘ↕┌Ｌ╵┌－Ｙ｛ｘ；１ｙ１＠］┼

Try it here!
Canvas doesn't do substrings, so I need to treat it like an art object and get a subsection that way. I feel like this costs me 2 bytes, but hey, what can you do.
Looks like this actually doesn't work like I thought: Canvas's palindromize functions mirror certain characters (e.g. V mirrored vertically becomes ^), and I can't exactly disable that... oh well, i guess

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


text:
Print everything which a regular expression matches
Modern regular expressions (regexes) have many features (\d, {n,m}, \1, etc.), but to define a regular language (modern regexes can define broader classes of languages, in their defense), all you need are three operators: concatenation (+), union (|), and the Kleene star (*). Here are some examples:
a - Matches the string a
a+b - Matches the string ab
a|b - Matches either the string a and the string b
a* - Matches the empty string, a, aa, aaa, aaaa, etc.
(a|b)* - Matches any string of a's and b's (including the empty string).
(a+a)* - Matches the empty string, aa, aaaa, aaaaaa, etc.

(Note that the full string must match; a does not match aa)
Given a regex, r, output every single possible string which r matches. There are, of course (countably) infinitely many such strings, so your program will run forever on some inputs. But for any string s which r matches, after some finite amount of time, your program must output r. Even if r only matches a finite number of strings, your program can, if you want, run forever after printing them all (it doesn't need to halt when it has printed every possible s).
You may not use any built-in functions involving regexes. You may choose any input alphabet you like, so long as it has at least 2 characters (e.g. a and b; 0, 1, and 2; etc.).
You can accept infix, prefix, or postfix notation (and the |, +, and * characters need not be those characters specifically).
If (and only if) you are using infix notation:

You can, if you like, omit the +s in your regexes (so aa would be a+a, a(aa) would be a+(a+a)).
You can assume that all operations except for the outermost one will be in parentheses (so a|b|a+a does not need to be a valid input, but (a|b)|(a+a) must be--up to your choice of alphabet and symbols for | and +).
You can choose whether * goes before or after the thing you are applying it to.

See the test cases below if this is unclear.
You can assume that the regex is less than 999 characters, but the strings matched by it can be of any length.
I/O can be pretty much anything (stdin, stdout, a file, etc.), but remember that your program must output every string after some finite amount of time, so you can't, for example, use a function which in theory returns an array/list, but only after an infinite amount of time. You can, however, use a generator/stream/(lazy) infinite list/etc. if your language supports those constructs--put simply, you can use a function for I/O if and only if you can add some code (not included in the byte count) which uses that function to print every matching string to stdout. So, this function would be invalid, but this function would be valid.
Please clearly state your I/O format and which notation and alphabet you are using in your answer.
A Try It Online link would be appreciated.
Test cases
Each test case just shows one possible ordering of the output.
This shows prefix, infix, and postfix, but you only need to accept one.
-input
prefix | infix | postfix
a        a       a
-output
a
-input
prefix | infix | postfix
*a       a*      a*
-output

a
aa
aaa
aaaa
...
-input
prefix | infix | postfix
*|ab     (a|b)*  ab|*
-output
a
b

ab
ba
aa
bb
...
-input
prefix    | infix             | postfix
*|+a+aa+bb  ((a+(a+a))|(b+b))*  bb+aa+a+|*

aaa
bb
aaabb
bbaaa
aaabbaaa
bbaaabb
bbbbaaa
...

Make sure you output the empty string when it is matched!

Note that (a|b)* matches the empty string too.(you forgot it in the examples on top)

I would say that the empty string is a string of a's and b's, just with 0 a's and 0 b's :) but I'll add it.


text:
How many pages have issues?
At work I've been acting as quality control on our public documents, to make sure that they are WCAG 2.0 compliant. Given the length of some of these documents there tend to be issues, and so I record the issues and the pages they occur on.
The challenge: Given a string input, output a count of all distinct pages within the string.
Rules:

Input will consist of of a non-empty string containing the pages, page ranges, and the issue. Multiple pages and page ranges are guaranteed to be separated by commas ,.

pgs 810-812, 897, 1043, 1047, 1219, 1308, 1317, 1323 restructure reading boxes

pgs 810-812,897,1043, 1047,1219, 1308, 1317, 1323 restructure reading boxes

Both of the above are possible valid inputs.

This input can be multiple lines, with each line representing a different issue.

pgs 810-812, 897, 1043, 1047, 1219, 1308, 1317, 1323 restructure reading boxes
pgs 816, 819, 826, 827, 829, 853, 861, 866, 885, 1043, 1142, 1143, 1164 table needs to be read as table or figure

You can take a multiline input as a list of strings, with each item in the list being a line. The output is still based on the entirety of the list.

The input format is not necessarily pgs <page numbers> <issue>.
Both pg 1324 read all and Read all are valid inputs.
If the string consists of only <Issue>, this represents that the document is a single page, and thus the output would be 1 (no matter how many lines of input there are). If there is more than one page, you are guaranteed to not have this format as a line of the input.

Test Cases:
Input:
------
pgs 810-812, 897, 1043, 1047, 1219, 1308, 1317, 1323 restructure reading boxes

Output:
-------
10

Input:
------
pgs 587,897, 936, 939,946, 1308 single figure
pgs 810-812, 897, 1043, 1047, 1219,1308,1317, 1323 restructure reading boxes

Output:
-------
14

Input:
------
pgs 824, 873, 941-943, 1032, 1034, 1036-1040, 1055, 1071, 1153, 1154, 1228 figures as figures
pgs 1036-1040 Color Contrast for negative balance numbers does not meet WGAC 2.0 guidelines
pg 1324 read all

Output:
-------
18

Input:
------
Incorrect Reading Order

Output:
-------
1

Input:
------
Incorrect Reading Order
Pg 1 Read Table as Table
Pgs 1 Color Contrast for negative balance numbers does not meet WGAC 2.0 guidelines

Output:
-------
1

This is code-golf, so shortest answer in bytes wins.

Inverse of this?

@Veskah Not really an inverse. That one condenses pages into page ranges, the inverse would take page ranges, and output a list of pages. Mine is just a count of involved pages.

Possible duplicate

Definitely strongly related, but I'd say the difference in input and output make it not a duplicate.

@williamporter the core of the challenge is still parsing a format like a,b-c,d; adding a count unique and removing the other characters does not, in my estimation, make it different enough, but the community is welcome to override that.

I think there’s enough here to warrant a new question. It also requires handling of numbers within the issue text. In any case here’s my 45 byte Jelly Solution written before closure: https://tio.run/##PYzNSsNAFIX3fYr7AIlkJhObEhCkoghu3Oh6aqYhcZqU/AjdNW4CutNFXSgudCmCIMEQcZHQQh8j8yJxEtDNxznn3nM8xvmibdd3vPl6FmnelJ9NkYq0EOn3drXJRPozd5i4fqsfDixpFLV6Pb7c3MgEN@Wt@Hj3xPJJkRc1XDTFS2fODk9PqhK1llg@VjmoeyBTq84G63v5UWey621XslLlVd62cycCExMFzKGuwIggdUSkQJqOe5KeuyrSiNZJw@g4RJLI0Ht2LxibMHWdJGQR0OhPDrr1/zqMAx6Ekn4c0iiGqTQ@c2jsXjGYUE79CwZ@MpuwMAI7kEt@EMOMsRjOj/bHgHc0cBLXZtz1@21AOiYQMmoD5fwX

05AB1E, 51 38 bytes
-13 bytes thanks to Kevin Cruijssen!
',ð:#ʒ'-м€.ïß}D.ï≠ÅÏ'-¡¤LsнUʒX<›]˜Ùg1M

Try it online!
Explanation
                                      // Implicitly Read in multiline string
 ',ð:#                                //Swap commas with spaces and split on spaces
      ʒ'-м€.ïß}                       //Filter list to only those with - removed are numbers
               D                      //Duplicate
                .ï≠ÅÏ                 //For all the ones that aren't numbers (so the ranges)
                    '-¡               //Split on dashes
                       ¤L             //Generate list from 1 to the highest number
                         sнU          //Stick the lower number in the variable U
 ʒ®<›]                                //Filter out numbers less than the lower number
      ˜                               //deep flatten
        Ùg                            //Uniquify and count
          1M                          //Push 1 then output the largest number in the stack

39 bytes. Summary of changes: input as a multi-line string, so |» can be removed. '  has a builtin: ð. The {н can be ß (minimum). '-' :# can simply be a split: '-¡. The D is unnecessary by using ¤ instead of θ (both get the last item, but ¤ doesn't pop, and θ does pop). The ©, ® can be U/X (or alternatively V/Y) so the s can be removed before the filter; these pop and store, whereas © stores without popping. ï can be removed (I think); and D>i1 can be simplified to 1‚à (pair with 1, and then pop+push maximum).

Thanks @KevinCruijssen I'll update when I get a chance, some excellent ideas I can use in the future in there too!

Yep, that's why I tried to explain my changes instead of just giving the 39 byter, so you can learn from it for future challenges. :) Nice answer though. That initial ',' :# had me confused for a bit when I changed it to ',¡ like the split on - later on. It will leave leading spaces before the numbers, causing all kind of issues later on in the first filter.. And the € before the .ï is to also filter out the 2.0 I noticed. Nice work-around! :)

Too bad ʒ'-мDþQ} also leaves the empty items, which is how I usually only leave numbers. ;)

oh, one last byte to golf (for now ;p), so it becomes 38: my suggestion of 1‚à can be 1M (push 1, push largest number on the stack).

Perl 5 (-p), 63 bytes
s/-/../g;s/^pgs?|[^., \d].*//g;map$h{$_}=1,eval}{$\=(keys%h)||1

TIO


text:
Battle of the Jimmys
/o\ Jimmy has been receiving a lot of attention on this site recently and it has caused Jimmy to get a little stressed. The bodybuilder Jimmys /-o-\ started bad mouthing the OG / acrobat /o\ Jimmys saying they are way cooler because they are bigger. But of course the acrobat Jimmys thinks they are way cooler since after all they were the original.
This tension between Jimmys has resulted in somewhat of a Jimmy war, the acrobat Jimmys and the bodybuilder Jimmys are no longer at peace.

Objective
Given a string of acrobat and bodybuilder Jimmys, determine would would win the battle.

The input string will only contain bodybuilder Jimmys /-o-\, acrobat Jimmys /o\ and spaces
The bodybuilder Jimmys are stronger than acrobat Jimmys, so one bodybuilder Jimmy can take down 2 acrobat Jimmys BUT he will be taken down himself after the second Jimmy
/o\ /-o-\     ->  /-o-\
/o\ /o\ /-o-\ ->
The acrobat Jimmys are crafty and are good at surrounding the bodybuilder Jimmys, if 2 acrobat Jimmys surround a bodybuilder Jimmy, the bodybuilder Jimmy will be defeated with no damage to the acrobat Jimmys
/o\ /-o-\ /o\ -> /o\ /o\
The acrobat Jimmys are also faster than the bodybuilder Jimmys so their actions will occur before the bodybuilder Jimmys
/o\ /-o-\ /o\ /-o-\ -> /o\ /o\ /-o-\ ->

Notes

Whitespace between Jimmys will have no affect on the battle, but it can be expected in the input.
Whitespace in the output is acceptable and will be ignored as long as no Jimmys get cut in half
Whitespace will only be spaces, you can assume there will be no tabs or newlines
All Jimmys in the input will be whole, there will be no partial Jimmys /o
The battle will continue until only 1 type of Jimmy (or no Jimmys at all) remain
Both input and output should be in the form of a string
Jimmy actions will occur going left -> right across the field, but acrobat Jimmys have priority to bodybuilder Jimmy
Bodybuilder Jimmys will only go down to two Jimmys if it occurs on the same turn (see last example)

More Examples
/o\ /o\ /-o-\ /-o-\ /o\ /o\     // Input string

/-o-\ /o\ /o\                   // Leftmost bodybuilder took out left two acrobats

                                // Output will be whitespace

-----------------------------------

/o\ /o\ /-o-\ /o\ /-o-\ /o\ /o\  // Input string

/o\ /o\ /o\ /-o-\ /o\ /o\        // acrobat Jimmys got a surround

/o\ /o\ /o\ /o\ /o\              // acrobat Jimmys win

-----------------------------------

/o\ /o\ /-o-\ /o\ /-o-\ /-o-\ /o\ /o\   // Input string

/o\ /o\ /o\ /-o-\ /-o-\ /o\ /o\

/o\ /-o-\ /o\ /o\

/o\ /o\ /o\                             // acrobats win again

-----------------------------------

/o\ /o\ /-o-\ /o\ /-o-\ /-o-\ /o\ /-o-\  // Input string

/o\ /o\ /o\ /-o-\ /-o-\ /o\ /-o-\

/o\ /-o-\ /o\ /-o-\

/o\ /o\ /-o-\

                                        // Output is empty

-----------------------------------

/-o-\ /o\ /o\ /o\ /-o-\ /-o-\           // Input string

/o\ /-o-\ /-o-\

/-o-\ /-o-\                             // Bodybuilder Jimmys win

-----------------------------------

/o\ /-o-\ /-o-\ /o\ /o\ /o\            // Input string

/-o-\ /-o-\ /o\ /o\ /o\                // left most bb jimmy took out leftmost acrobat jimmy

/-o-\ /o\                              // right bb Jimmy took out left two acrobat Jimmys and himself

/-o-\                                  // leftmost jimmy took out a second jimmy but survives because it occurred on a different turn the the first jimmy he took out - bodybuilder Jimmys win

Standard rules apply,
This is code-golf so may the shortest answer win!

Comments are not for extended discussion; this conversation has been moved to chat.

Retina 0.8.2, 82 bytes

+1`/-o-./o./o.|(/-o-.)/o.|(/o.(/o.)?)/-o-.(/o.)|/o./o./-o-.|/o.(/-o-.)
$1$2$4$5

Try it online! Link includes test suite. Explanation: The first stage simply deletes whitespace. (The footer spaces the remaining Jimmies back out out.) The second stage then repeatedly replaces the first available match with the captures until no more replacements can be made. The matches are as follows:

/-o-./o./o. Matches a bodybuilder next to two acrobats. There is no capture because this takes out the bodybuilder as well.
(/-o-.)/o. Matches a bodybuilder next to an acrobat. There's no second acrobat here, because it would have matched above, so the lone acrobat is taken out, while the bodybuilder survives.
(/o.(/o.)?)/-o-.(/o.) Matches a bodybuilder between two acrobats, with up to two acrobats to his left. The bodybuilder is taken out.
/o./o./-o-. Matches a bodybuilder with two acrobats to his left (but no acrobats to his right, as that would have already matched). All three are taken out.
/o.(/-o-.) Matches a bodybuilder with one acrobat to his left (but no acrobats to his right, as that would have already matched). The acrobat is taken out.

Jelly, 54 bytes
ðœṣjW}Ẉiȯ.ɗ¦FðⱮ⁽^|DB¬Ðe¤B0¦ẈṀ$ÐṀF€Ṁḟ3Ḃ
Ḳ¹ƇµẈ<4ÇÐLịQṢṚƊ

A full program accepting a string which prints the result (as a monadic Link the result would be a list of lists of characters).
The input must have spaces(s) between Jimmys, and the output has no spaces (both allowed in the question).
Try it online! Or see the test-suite.
How?
Ḳ¹ƇµẈ<4ÇÐLịQṢṚƊ - Main Link: list of characters
Ḳ               - split at spaces
 ¹Ƈ             - keep those which are truthy (just the Jimmys, since empty lists aren't)
   µ            - start a new monadic link ...i.e f(Jimmys)
    Ẉ<4         - length of each less than four? ...i.e: strongman->0 acrobat->1
        ÐL      - loop until a fixed point is reached using:
       Ç        -   last Link (1, see below) as a monad ...i.e. f(these "Binnys")
              Ɗ - last three links as a monad ...i.e. g(Jimmys)
           Q    -   de-duplicate
            Ṣ   -   sort (["/-o-\", "/o\"], or if only one then just that one in a list)
             Ṛ  -   reverse
          ị     - index into (1-indexed and modular) ...i.e. get back any remaining Jimmys
                - implicit, smashing print

ðœṣjW}Ẉiȯ.ɗ¦FðⱮ⁽^|DB¬Ðe¤B0¦ẈṀ$ÐṀF€Ṁḟ3Ḃ - Link 1: list of 1s and 0s, let's say "Binnys"
                       ¤               - nilad followed by link(s) as a monad:
               ⁽^|                     -   literal = 24625
                  D                    -   to decimal = [2,4,6,2,5]
                   B                   -   to binary = [[1,0],[1,0,0],[1,1,0],[1,0],[1,0,1]]
                     Ðe                -   apply to even indices:
                    ¬                  -     NOT     = [[1,0],[0,1,1],[1,1,0],[0,1],[1,0,1]]
ð            ðⱮ                        - map with the dyad: ...i.e. [f(Binnys,X) for X in that]
 œṣ                                    -   split Binnys at sublists equal to X
     }                                 -   use the right argument (X) with:
    W                                  -     wrap in a list
   j                                   -   join (the split Binnys) with (wrapped Xs)
           ¦                           -   sparse application...
          ɗ                            -   ...to indices: last three links as a dyad:
       i                               -     first index of (X) or 0 if not found
         .                             -     literal 0.5
        ȯ                              -     OR (since an index of a half doesn't exist)
      Ẉ                                -   ...action: length of each
                                       -   ...i.e. replace the first, wrapped X with its length
            F                          -   flatten
                          ¦            - sparse application...
                         0             - ...to indices: [0] (the [1,0,1] result)
                        B              - ...action: to binary (3 -> [1,1])
                              ÐṀ       - keep a list of those which are maximal under:
                             $         -   last two links as a monad:
                           Ẉ           -     length of each
                            Ṁ          -     maximum
                                       - ...i.e. keep only the one with [1,1] in if its there
                                F€     - flatten each
                                  Ṁ    - maximum
                                   ḟ3  - filter out threes (strongmen annihilating)
                                     Ḃ - modulo 2 (2->0 to cater for remaining strongmen)

Jelly, 68 bytes
⁵R+⁴W;“|ẹẹrḟ“€Ƙ.q“¦ḍhƁ’b⁴¤ḃ2s2Z€ị“/o\“/-o-\”ḣẎẎF€⁸œṣjƭƒ@ƬṪ
ḟ⁶;ç1ɗ/ç2

Try it online!
A full program that takes a string as input and outputs the final state of the Jimmys as a string. Works well for all the test cases. It works through the input one character at a time at each stage replacing 4 Jimmy sets with the appropriate output until no change. At the end, it then also looks for trailing 3 and 2 Jimmy sets that need to be resolved. Jelly doesn’t have regex, so all the possible Jimmy sets that need replacement are built.

JavaScript, 223 202 bytes
Code
Non-recursive 206 bytes
x=>{x=x[u="replace"](/ /g,"");while(x[t='match'](/o...o/)){d=/(-..o|o..-)/,x=x[t](s=/o.{7}o/)?x[u](s,"o\\/o"):(a=x[t](c=/\/.{9}\\/))&&(b=x[t](d))&&(a.index<b.index)||(a&&!b)?x[u](c,""):x[u](d,"-")}return x}

Try it online!
Recursive 202 bytes
f=x=>{x=x[u="replace"](/ /g,"");d=/(-..o|o..-)/;return x[t='match'](/o...o/)?f(x[t](s=/o.{7}o/)?x[u](s,"o\\/o"):(a=x[t](c=/\/.{9}\\/))&&(b=x[t](d))&&(a.index<b.index)||(a&&!b)?x[u](c,""):x[u](d,"-")):x}

Try it online!
Explanation
x=x[u="replace"](/ /g,"");

Remove all spaces
while(x[t='match'](/o...o/))
return x[t='match'](/o...o/)?f(...)

While there is an acrobat next to a bodybuilder (o\/-o or o-\/o) Do one of the following
x=x[t](s=/o.{7}o/)?x[u](s,"o\\/o")

If there is a bodybuilder surrounded by acrobats remove the bodybuilder
:(a=x[t](c=/\/.{9}\\/))&&(b=x[t](d))&&(a.index<b.index)||(a&&!b)?x[u](c,"")

If the first acrobat next to a bodybuilder is also next to an acrobat remove both acrobats and the bodybuilder
:x[u](d,"-")

Otherwise remove only the acrobat.

seems to break on inputs with extra whitespace: Try it online!

This doesn't seem to halt on /-o-\ /o\ /-o-\ /o\ .

@Quinn It should be fixed now

@fəˈnɛtɪk nice!

Perl 5 -p, 111 bytes
s/\s//g;$A=qr'/o\\';$B=qr'/-o-\\';1while s,$A\K$B$A,/o\\,g;s,($A?)$A$B|$B$A($A?),'/-o-\\'x!$+,e;/$A/*/$B/&&redo

Try it online!

C# (Visual C# Interactive Compiler), 249 bytes
n=>{n=n.Replace(" ","");for(var s=@"o\/-o-\/o";n.Contains("/o")&n.Contains("-");n=new System.Text.RegularExpressions.Regex(@"/o.{4,7}-\\|/-.{4,7}o\\").Replace(n,m=>m.Value.Length>8?"":"/-o-\\",1))for(;n.Contains(s);)n=n.Replace(s,@"o\/o");return n;}

Try it online!

@fəˈnɛtɪk I think it's fixed?

Python 2, 216 214 bytes
A='/o\\';B='/-o-\\';a=input().replace(' ','')
while(A in a)*(B in a):j,k=min(enumerate([A+B+A,A+A+B,B+A+A,B+A,A+B]),key=lambda(i,k):([1,i>0][k in a],(a+'.'+k).find(k),i));a=a.replace(k,[A+A,'','',B,B][j],1)
print a

Try it online!


text:
Character Frequency in a String
Given a string of printable ASCII, output the frequency of each character in that string.
The Challenge

Input is given as a string of printable ASCII characters (decimal [32-126] inclusive).
Output the frequency of each character, in ASCII order.
The output must have a format similar to [character][separator][count]. Provided that there is a single, non-newline separating string between the character and its frequency, it is a valid output.
Output can be a single string, multiple strings, list of 2-tuples, array of tuples, etc.
Input and output can be given using any convenient method.
Standard loopholes are forbidden.
This is code-golf, so shortest in bytes wins.

Sample I/O
abcd
//outputs
a: 1
b: 1
c: 1
d: 1

Over 9001!
//outputs
  [ 1
! [ 1
0 [ 2
1 [ 1
9 [ 1
O [ 1
e [ 1
r [ 1
v [ 1

--<-<<+[+[<+>--->->->-<<<]>]<<--.<++++++.<<-..<<.<+.>>.>>.<<<.+++.>>.>>-.<<<+.
//outputs (as 2-tuples)
(+,14),(-,13),(.,13),(<,21),(>,13),([,2),(],2)

Su3OH39IguWH
//outputs (as 2d array)
[[3,2],[9,1],[H,2],[I,1],[O,1],[S,1],[W,1],[g,1],[u,2]]

Related and related.

Output the frequency of each character, in ASCII order. but e after v‽

May I output a,1b,2c,3?

Could I use PETSCII instead? -> https://www.c64-wiki.com/wiki/PETSCII
Also, do you mean true ASCII (7-bit), or simply ASCII-compatible, like extended ASCII or UTF-8?

I assume the output be for aAbBcCdD will it be A:1, B:1, C:1, D:1, a:1, b:1 c:1, d:1 - your examples of input/output has a type as Adam has mentioned above.

You say there is a single character separator yet your first two examples use 2 and 3 character separators.  Is the mistake in the spec or the examples?

@tsh No, but a,1 b,2 c,3 is a valid output

@ShaunBebbers ooo that's something. I'll allow it. ASCII-compatibles are also fine, provided you say what encoding it is.

May we assume nonempty input?

@Khuldraesethna'Barya Yes.

Can there be any leading/trailing characters on the output? before the first line or after the last line?

@KevinCruijssen Ah-ha, the very challenge I thought of but couldn't find when I saw this in the Sandbox so,   in a rare occurrence for me, I'm gonna swing my hammer as I don't think the requirement that the output be sorted makes this significantly different.

Python 3, 50, 43, 41 bytes
lambda s:{c:s.count(c)for c in sorted(s)}

Try it online!

You could save 7 bytes by switching to a list of 2-tuples (replace c+","+str(s.count(c)) with (c,s.count(c))), since python sorts tuples by their first elements. Try it online!

You can save 2 bytes using zip() and map() (can't access TIO where I am, sorry): lambda s:sorted({*zip(s,map(s.count,s))})

You can save two brackets (2 bytes) by using a dict and that more recent versions of Python 3 retain insertion order. lambda s:{c:s.count(c)for c in sorted(s)}

Ohm v2, 2 bytes
SÖ

Try it online!
      implicit input
S     sort string
 Ö    run-length encoding
      implicitly print

Python 3, 41 bytes
lambda s:sorted({*zip(s,map(s.count,s))})

Try it online!

J, 13 bytes
({.;#)/.~@/:~

Try it online!

@/:~ sort the input and...
/.~ partition it into groups of like items.  Apply the following to each group...
({.;#) take the first element {. and link it ; to the number of items in the group #

Nice! I forgot about /., my solution with = was significantly longer: (;/@~.,.1;/@:#.=)@/:~

Brachylog, 2 bytes
ọo

Try it online!
ọ     Occurrences,
 o    sorted.

It's essentially the same as using an RLE builtin with the sorting requirement, but if the output could be in any order it would just be ọ.

APL (Dyalog Extended), 5 bytesSBCS
Anonymous tacit prefix function, returning a two-column table, which by default prints with space as separator between character and count, and line break after each entry.
,∘≢⌸∧

Try it online!
, character followed
∘ by
≢ its tally
⌸ for each unique character
∧ in ascending order

Haskell, 52 49 bytes
-3 bytes thanks to cole!
import Data.List
map((,).nub<*>length).group.sort

Try it online!
I know this is too long (especially that import), but I'm new at Haskell golfing and hoping to get better! Outputs as a list of tuples of (character, count) (note the character is String, not a Char).

Beat me by a few minutes. 49 bytes

I forgot to mention that the output type is [(String, Int)], but I think that's acceptable (not [(Char, Int)] like in your first answer). I don't know edit-quette very well here, so I hope my edit to clarify this was not in bad taste

Perl 6, 15 bytes
*.comb.Bag.sort

Try it online!
Anonymous code block that takes a string and returns a list of pairs, where the key is the character and the value is the number of occurrences.
Explanation:
*.comb           # Decompose into characters
      .Bag       # Group into unordered bag of character => occurrences
          .sort  # Sort by character

CJam, 8 4 bytes
$e`p

Try it online!
-3 bytes thanks to Jonah, and -1 byte from rule interpretation.
A perfect challenge for CJam. I had hoped that the RLE encode operator would output [char, count], but the order was reversed. Otherwise it would have been a 5-byter. After Jonah's comment, I switched the order of the output. I'm not sure if the first read should be counted, since the standard rules permit input to be on the stack at the start of the program. If that's the case, this answer is one byte shorter. From this meta discussion, I concluded that the read could be placed in the header. Otherwise I could modify the script to be a function without changing the byte count.
Explanation
 $       sort string
  e`     RLE-encode (transforms "aabc" to [[2, "a"], [1, "b"], [1, "c"]]
    p    print

Open question: would something like this be allowed if transforming the answer to a function, or should the brackets be included in the byte count?

"Provided that there is a single, non-newline separating character between the character and its frequency, it is a valid output." -- combined with the adjective "similar to," I read this as saying that the order doesn't matter.  Which means you could drop the reversing.

Bash, 27 22 20 bytes
fold -1|sort|uniq -c

Try it online!
-5 bytes thanks to Neil
-2 bytes thanks to Digital Trauma

Why not take input on STDIN?

Thanks @Neil, updated.

fold -1 instead of grep -o . saves 2

@DigitalTrauma nice.  updated.

Jelly, 6 3 bytes
ṢŒr

Try it online!
A monadic link taking the string as its argument. Returns a list of lists, each one containing the character and count. The footer formats this as a grid.

Pyth, 3 bytes
r8S

Try it online!
Simply run-length encodes (r8) the sorted (S) input. Output is a list of tuples of [frequency, character].

T-SQL 2008 query, 130 bytes
DECLARE @ varchar(2000)='kabcdda'

SELECT w,sum(1)FROM(SELECT
substring(@,number+1,1)FROM
spt_values WHERE type='P'and
number<len(@))x(w)GROUP BY w
ORDER BY ascii(w)

Try it online

Your order by is alphabetical, but it should be in ascii order. it should be ORDER BY ascii(w)

@Einacio thanks, I had missed that part of the question. I corrected as you suggested

If your server is set to a binary collation like Latin1_General_BIN (which is not the default), sort order would be by ASCII code, without have to explicitly use the ASCII function. That does add an additional requirement to the answer (although you're already requiring this to be run in the master database, by your use of the master.dbo.spt_values system table). Good answer, though. SQL definitely needs a better built-in numbers table.

@BradC interesting idea, using that collation, that would be kind of a big assumption. Using master database seems more legitimate though, best practice for me is not assigning users a default database. Last time I tried that, I was unable to log in with that user after the default database had been removed - I am not aware whether this issue has been fixed. I agree we need a better build in number table, this could easily be a calendar table as well.

@t-clausen.dk I've had answers where I had to specify "this only works with a case sensitive collation" or something, so it does narrow the scope, like when you have to specify the SQL version; in your case adding the extra bytes for the ASCII function is probably a better approach. Similarly, I try to specify when my code needs to be run in a particular database, so that it doesn't fail if someone tries it in a different context.

PHP, 57 bytes
foreach(count_chars($argn,1)as$a=>$b)echo chr($a)," $b
";

Try it online!
Input via STDIN, run with php -F:
$ echo Su3OH39IguWH|php -F cc.php
3 2
9 1
H 2
I 1
O 1
S 1
W 1
g 1
u 2

Fun fact: this challenge is basically the Example 1 on the PHP docs for count_chars().

JavaScript, 58 bytes
s=>[...s].sort().flatMap(c=>c>p?[p=[c,1]]:p[1]++&&[],p=[])

Try it online!
Thanks Shaggy, -1 byte.

Retina, 18 bytes
O`.
(.)\1*
$1,$.&¶

Try it online!
I don't speak Retina. I just translated above JavaScript answer to Retina with some searching.
Thanks to Cows quack, -3 bytes.

$.($&) can become $.&

64 bytes

@Shaggy Nice idea. And I moved one more step based on that.

Are there special requirements for the JS solution?
Doesn't work on my latest Chrome (neither in TIO, nor dev tools) - I get an array of correct length, but filled with nulls.

@targumon Just fixed it. Seems posted wrong version... It should work on TIO and most recent Chrome now ...

PowerShell, 27 22 21 19 bytes
$args[0]|sort|group

Try it online!
Exactly what it says on the tin. Takes input $args[0] via splatting (manifests on TIO as a [char[]]), sorts it, then group-object it into a grouping.
-8 bytes thanks to mazzy

That output is perfectly fine.

is a splatted string 'any convenient method'? Try it online! another word, is a char array a representation of a string?

@mazzy Splatting works, but then you need to count the name of the script block, so we only save a byte. Still, a byte is a byte!

why? you can save $args|sort|group to a file with .ps1 extension and call this script file as usually. The splatting works with a script file too.

@mazzy I didn't know that. How would that work on TIO? You can't use @' because that's a here-string.

@AdmBorkBork I think TIO does not have splatting functionality. Powershell have. That's why we have to use a footer section on TIO instead an argument section. My question is whether the character array (args after splatting) can be treated as a string in this task?

@mazzy Yes, a [char[]] can be called a string per Meta consensus. Do you mean something like this?

yes. thanks. it would be nice if TIO could use splatting.

C (gcc), 94 91 bytes
Thanks to Ourous and ceilingcat for their suggestions.
To get the non-newline separator, I'm making use of the fact that negative numbers get a "-" for free! :-)
f(char*s){char c[255]={},i=31;for(;*s;)c[*s++]--;for(;++i>0;)c[i]&&printf("%c%d ",i,c[i]);}

Try it online!

93 bytes by moving i=31 into the declaration: Try it online!

That's clever using negative counting like that.

Wolfram Language (Mathematica), 34 bytes
KeySortBy[ToCharacterCode]@*Counts

Try it online!
Returns an association.

SortBy[ToCharacterCode@@#&]@*Tally

Try it online!
Returns a list.

Are you sure it's within the rules to put Characters into the footer instead of into the code? I think it would be better to use CharacterCounts instead of Counts.

C# (Visual C# Interactive Compiler), 63 61 bytes
s=>s.OrderBy(c=>c).GroupBy(c=>c).Select(g=>(g.Key,g.Count()))

Try it online!
Thanks to Expired Data for pointing me towards the C# Interactive Compiler and for showing me the power of dynamics.

61 bytes

by the way it's not the fact that it's dynamic that it saves 2 bytes, you could make the return type the correct tuple type, I'm just lazy and like to return dynamic when golfing in case I change my mind about what type I want to return!

K4, 9 bytes
Solution:
#:'=x@<x:

Example:
q)k)#:'=x@<x:"Over 9001!"
 | 1
!| 1
0| 2
1| 1
9| 1
O| 1
e| 1
r| 1
v| 1

Explanation:
#:'=x@<x: / the solution
       x: / store input as x
      <   / indices to sort ascending
    x@    / apply (@) to x
   =      / group same values
#:'       / count (#:) each (')

brainfuck, 128 114 bytes
->>,[[-[>>+<<-]>>]>+<+[-<<+]->>,]+[+>[<--.++<<+++++++[>++++++++<-]>++.[-]++++++[>>++++++++<<-]>>.[-].]<[>>+<<-]>>]

Try it online!
How it works:
-                                          sets cell 0 to 255, which is used to move back to cell 2 later on
>>                                         moves to cell 2
,[                                         we load our first input and loop until there are no more characters to load
[-[>>+<<-]>>]                              keeps moving forward skipping every other cell until it has moved forward the ASCII value of the most recently loaded character
>+<                                        adds one to the next cell for the purpose of later looking at to see how many of that character was entered
+[-<<+]->>                                 goes back to cell 2
,]                                         loads in next character and repeats process if there are remaining characters

+[+>[                                      checks IF the next cell has a value other than 0
<--.                                       then, if true, it prints the ASCII value of the previous cells contents
++<<+++++++[>++++++++<-]>++.               then print ":"
[-]++++++[>>++++++++<<-]>>.                then print the number value of the contents of the current cell
[-].]                                      then print a null character and leaves the if statement
<[>>+<<-]>>]                               continues the same process skipping every other cell, until it repeats 255 times

Thanks to Jo King, -14 bytes.
This is my second brainfuck program, first being hello world, and first time golfing, so please let me know what I can do to improve my program and answer!

You aren't printing a space, you're printing a nul byte. This also won't handle double digits, for example 10 of a character will print ; not 10. You can also shorten the : generation somewhat

Thanks!  I shortened the ":" generation, and will try to allow it to print double digits.  Are there any problems associated with printing a null byte?

APL(NARS), 26 chars, 52 bytes
{m,¨+/¨{w=⍵}¨m←k[⍋k←∪w←⍵]}

test:
  ⎕fmt{m,¨+/¨{w=⍵}¨m←k[⍋k←∪w←⍵]}'is, this good or not?'
┌12─────────────────────────────────────────────────────────────────────────────────┐
│┌2───┐ ┌2───┐ ┌2───┐ ┌2───┐ ┌2───┐ ┌2───┐ ┌2───┐ ┌2───┐ ┌2───┐ ┌2───┐ ┌2───┐ ┌2───┐│
││   4│ │ , 1│ │ ? 1│ │ d 1│ │ g 1│ │ h 1│ │ i 2│ │ n 1│ │ o 4│ │ r 1│ │ s 2│ │ t 2││
│└+───┘ └+───┘ └+───┘ └+───┘ └+───┘ └+───┘ └+───┘ └+───┘ └+───┘ └+───┘ └+───┘ └+───┘2
└∊──────────────────────────────────────────────────────────────────────────────────┘

  {m,¨+/¨{w=⍵}¨m←k[⍋k←∪w←⍵]}
                     k←∪w←⍵     copy the argument in w, k is the argument that has unique elements
               m←k[⍋       ]    copy k order, in m, (so m is argument unique ordered)
         {w=⍵}¨m                see each element of m in w, so each element of m generate a len(w) bit list
      +/¨                       sum each bit list above obtain the number of element of m in w
   m,¨                          make couples

What a programmer want is few primitive that combine well in resolve a problem, and a visual lay out and eventually comments, for explain better...so space and indentation should be good...

I agree, so use those tools that APL gives you: {k,¨+/⍵∘.=⍨k←∪⍵[⍋⍵]}

@Adám I prefer to order unique of the array on all the array...

If you prefer a longer solution, then your solution is not a serious contender, and it becomes eligible for deletion!

Why is this 52 bytes? Does APL/NARS not have SBCS?

@AdmBorkBork I do not know... They say Nars use 16bit character set

Clean, 60 bytes
import StdEnv
$s=sort[(c,sum[1\\k<-s|k==c])\\c<-removeDup s]

Try it online!
Defines the function $ :: [Char] -> [(Char, Int)] giving the result as a list of 2-Tuples.
Uses the element-wise behavior of < and thus sort on Tuples to ensure codepoint ordering.

sfk, 124 87 84 bytes
xed -i
+chars
+count -same -case
+xed "_?????*x*[white]?_[parts 6,3,1]_"
+sort -case

Try it online!
Gives output in the form [character]x[count] with count padded to 5 digits.

JavaScript, 57 bytes
Outputs a 2D-Array. Had to implement a quick & dirty fix for the sorting so I'll need to come back to try to golf that.
s=>[...s].map(o=x=>o[x]=-~o[x])&&Object.entries(o).sort()

Try It Online!

Charcoal, 13 bytes
ＥΦγ№θι⁺⁺ι №θι

Try it online! Link is to verbose version of code. Explanation:
  γ             Printable ASCII
 Φ              Filtered where non-zero
   №            Count of
     ι          Current character in
    θ           Input string
Ｅ               Map over filtered characters
        ι       Current character
       ⁺        Plus a space
      ⁺         Plus
          №     Count of
            ι   Current character in
           θ    Input string
                Implicitly output on separate lines

Japt, 10 8 bytes
ü
mÎíUmÊ

Try it
ü\nmÎíUmÊ     :Implicit input of string U
ü             :Split, sort and partition by value
 \n           :Reassign to U
   m          :Map
    Î         :  First element
     í        :Interleave with
      UmÊ     :  Map lengths of U

Kotlin, 75 bytes
fun String.c()=toCharArray().sorted().map{Pair(it,count{s->it==s})}.toSet()

Try it online!

Replace Pair(it,count{s->it==s}) with it to count{s->it==s}.

Java (JDK), 82 bytes
s->s.stream().sorted().distinct().map(c->c+" "+s.stream().filter(x->c==x).count())

Try it online!

Japt, 7 bytes
¬ü ®âZl

Test it online!

You can drop the ¬ now.

Haskell, 46 bytes
f x=[(c,sum[1|d<-x,d==c])|c<-[' '..],elem c x]

Try it online!

Ruby -n, 43 bytes
p$_.chars.uniq.sort.map{|c|[c,$_.count(c)]}

Try it online!

Kotlin, 53 bytes
Returns a Map<Char, Int> associating characters to frequencies. The map keys are sorted in ASCII order (it's a java.util.SortedMap underneath.)
{s->s.associateWith{c->s.count{it==c}}.toSortedMap()}

Try it online!

Is this legal? I once got called out for defining my function in the header like you did here... Is that a legal code golf move because I'm genuinely not sure -> I can drop quite a few bytes on my Kotlin answer if so

I'm not entirely sure what the consensus is but I recall it being legal for lambdas specifically. I've never been called out for it.

This meta post states that for lambdas/anonymous functions only the function body is required. Since Kotlin can use type inference and you can indicate the function signature in the declaration, it seems to me like that counts as part of the assignment as well.

05AB1E, 8 6 bytes
SêDŠ¢ø

Try it online!

6 bytes

R (in C locale), 32 bytes
function(s)table(strsplit(s,''))

Try it online!
strsplit the input character string by the empty string to separate its characters then table builds a contingency table of the unique character counts.

identical(names(f("Over 9001!")), sort(names(f("Over 9001!")))) returns TRUE.

@Giuseppe Right. Besides, my example is meaningless, if table sorts according to the locale in effect, so will sort.

@Giuseppe Yes, like this users will have a bad surprise.

Something like this should be fine, just put a note saying "R (in C locale), 32 bytes" as the title, or something similar

@Giuseppe Thanks, it's my first post and I really needed assistance.

No problem! There's a chatroom for R golfing; feel free to ping me (or any of the other R golfers) there and we'll be happy to answer.

JavaScript, 55  48  62 57 bytes
a=>[...a].sort().map(c=>o.set(c,-~o.get(c)),o=new Map)&&o

output is a Map
contrary to Objects, Map remember the order in which values where sets

let input = document.getElementById("input")
let run = document.getElementById("run")
let output = document.getElementById("output")

run.onclick = () => {
  output.innerHTML = ""
  func(input.value).forEach((val, key) => output.innerHTML += `'${key}' => ${val}<br>`)
}

let func = a=>[...a].sort().map(c=>o.set(c,-~o.get(c)),o=new Map)&&o
<input id="input"/>
<button id="run">run</button>
<p id="output"></p>

Thanks to Shaggy and Einacio for pointing my flaws
-5 bytes thanks to Shaggy

Unfortunately, this doesn't seem to sort the output correctly.

I didn't see that I was confident object kept entries in the same order as they were added to it, I'll try to correct it later

i'm not sure about the input. it's defined in the question that it's a string, so splitting it should be part of your function as well

seems like i misinterpreted the Input and output can be given using any convenient method. part :/

+1 for Map; don't think I've seen it used here before. But you have a lot more parentheses than you actually need and you can ditch the get: https://tio.run/##BcExDoMwDADAr1AGZEtg0bFD@AHiAYjBMqZqBXGURLDx9XD355OTxF/InbdVy@YKu2EmIl4oWcyAdHAAcYNR0gzSdrfNsmBrzutVjRywaayI@WS70m5f2KCeTo3Vp@/frxqxPA

@Shaggy actually I can't ditch the get look again your TIO, it doesn't count repeated characters. Still could remove some parentheses thank to you.

Forth (gforth), 134 bytes
: f here 128 allot dup 128 erase -rot 0 do 2dup i + c@ + 1 swap +! loop drop
128 0 do dup i + c@ ?dup if i emit ." : ". cr then loop ;

Try it online!
Limitation: won't work if any character occurs more than 256 times in a single string (to fix this requires an extra ~25 bytes)
Explanation

Allocate an area of memory 128 bytes (cells if needed) wide to use as an array/dictionary
Zero out all bytes/cells in that area
Loop through string, for each character

Add ascii value to array starting address, then increment value at that address by 1

When finished, loop through array/dictionary and output all chars/values that have a value other than 0

Code Explanation
: f                     \ start new word definition
  here 128 allot        \ allocate 128 bytes to use as an array
  dup 128 erase         \ fill array with zeros
  -rot                  \ stick array address behind string address
  0 do                  \ start counted loop from 0 to string-length - 1
    2dup                \ duplicate array and string address
    i + c@              \ get ascii value of next character in string
    + 1 swap +1         \ add to array address, then add 1 to the value in that array position
  loop                  \ end the loop
  drop                  \ drop the string address [no longer needed]
  128 0 do              \ start a counted loop from 0 to 127
    dup i + c@          \ get value at next array position
    ?dup                \ duplicate if >0
    if                  \ start an if block (if >0)
      i emit            \ output the character
      ." : ".           \ output ": " followed by the number of that char in the string
      cr                \ output a newline
    then                \ end the if block
  loop                  \ end the loop
;                       \ end the word definition

Red, 92 bytes
func[s][parse/case sort/case s[any[copy k[copy t skip thru any t](print[t length? to""k])]]]

Try it online!

Perl 5 (-nF -M5.01 -MList::Util=uniq), 49 41 bytes
41 bytes : for$a(uniq sort@F){say"$a ",eval"y/$a//"} doesn't work if input contains a slash.
Otherwise, 36 bytes : for$a(uniq sort@F){say"$a "./\Q$a/g} doesn't work because of //g in scalar context.
for$a(uniq sort@F){say"$a ".(()=/\Q$a/g)}

TIO
first answer

44 bytes (and fewer commandline options, even though we don't count those now)

41 bytes (with some extra cli options)

9 characters longer but without the List::Util requirement: @a{@F}=1;for$a(sort keys%a){say"$a ".(()=/\Q$a/g)}

@msh210, thanks for the trick @a{@F}=1 however first answer link is shorter also without List::Util, and options doesn't count now

Scala, 64 62 bytes
(x:String)=>x.groupBy(identity).mapValues(_.size).toSeq.sorted

C++ (gcc), 85 bytes
#include<map>
auto f(std::string s){std::map<char,int>m;for(int c:s)m[c]++;return m;}

Try it online!
This solution makes use of several nice features of std::map:

It has a sorted iterator, with default lexicographic ordering.
The []-operator default initializes members, in case of int it zeroes it.

Also, C++17 allows for golfing using auto and range-for loop.

SNOBOL4 (CSNOBOL4), 120 bytes
	A =&ALPHABET
	I =INPUT
S	O =0
	A LEN(1) . X REM . A	:F(END)
R	I X =	:F(O)
	O =O + 1	:(R)
O	OUTPUT =GT(O) X 0 O	:(S)
END

Try it online!
	A =&ALPHABET			;* alias for &ALPHABET (256 characters in ascending order)
	I =INPUT			;* read input
S	O =0				;* set counter to 0
	A LEN(1) . X REM . A	:F(END)	;* set X to first letter of A
					;* setting the REMainder to A
					;* and going to END if no letters remain
R	I X =	:F(O)			;* remove the first occurrence of X from I
					;* and output if none are left
	O =O + 1	:(R)		;* increment the counter, going to R
O	OUTPUT =GT(O) X 0 O	:(S)	;* if O > 0,
					;* output X 0 and O in that order
					;* then GOTO S
END

JavaScript (Node.js), 56 bytes
s=>[...s].sort().reduce((a,b)=>(a[b]=(a[b]||0)+1)&&a,{})

Try it online!

Your output is incorrect. It is not in ASCII order, as can be seen with the input Over 9001!, where v is before e and r, which is not the case in ASCII order. Adding a .sort() would make it correct, at 56 bytes: s=>[...s].sort().reduce((a,b)=>(a[b]=(a[b]||0)+1)&&a,{})

@bigyihsuan,  thanks, indeed missed the ordering


text:
Invert Some Switches on a Switchboard
Inspired by this challenge.
Goal:
Given a pre-configured switchboard and a list of indexes, invert the switches at the given indexes.
A switchboard is made up of some number of switches (v or ^) wrapped in -'s and arranged into rows of varying length. Here is an example switchboard:
-v-^-v-
-^-v-
-v-^-v-

To invert/flip a switch means changing it from v to ^, or from ^ to v.
The switches are indexed left-to-right, top-to-bottom. E.g., in the example above, the last v in the first row would be in position 3 and the ^ in the middle row would be at 4 (using 1-indexing).
Input:

A string (or list of strings) representing the switchboard. It is guaranteed to match the regex ((-[v^])+-)(\n(-[v^])+-)*.
A possibly empty list of numbers representing indexes, may be 0 or 1 (or some arbitrary number if you want) indexed. These are the switches that need to be flipped.

Output:

A switchboard in the same shape as the input with the specified switches inverted. Any unspecified switches should retain their initial state.

Rules:

Input will always be correctly formatted and no given indexes will be out of bounds.
The list of indexes will be sorted and will have no duplicates.
State in your answer what indexing you use, be it 0, 1, or some arbitrary one.
Trailing whitespace is fine as long as the output looks like the input.
This is code-golf so shortest code wins.

Examples:
#Using 1-indexing
input: #Empty Case
[],
-v-^-v-

output:
-v-^-v-

input: #Single switch
[1],
-v-

output:
-^-

input: #Skip a line
[3,5],
-^-v-v-
-v-
-^-^-

output:
-^-v-^-
-v-
-v-^-

input: #Flip one in each line + number wrap
[3,4,6],
-^-v-v-
-v-
-^-^-

output:
-^-v-^-
-^-
-^-v-

input: #Flip 'em all
[1,2,3,4,5,6],
-^-v-v-
-v-
-^-^-

output:
-v-^-^-
-^-
-v-v-

Can we output a rectangular char array, right-padding the shorter lines with spaces? Also, can we take input in that form?

@LuisMendo I'm going to say No on taking that as input. Trailing white space is fine as long as it looks like the input.

Hint to those checking if characters are >"-": As the input string is guaranteed to start with -, you can check against the parameter/argument/variable name you're using for that instead.

Vim, 60, 46, 38, 37 bytes/keystrokes
qq/\d
ggDJ@"/[v^]
sv^<esc>l?\V<C-r>"
x@qq4u@q

<esc> and <C-r> are both 1 byte/keystroke. Byte Counter
Test Case 1 (Verbose mode)
Test Case 2 (Verbose mode)
Thanks to Grimy for the ideas that led to a reduction of 22 bytes :)

@Veskah ughhhhhh vim is super finicky about "do something 0 times" edge cases. See edit

Couldn't :s/\%V./\='v^'[submatch(0)=='v'] be cl<C-R>='v^'['<C-R>"'=='v'] for -13 bytes? (each  is only one byte).

@Grimy Ooh, good idea. Also s == cl, so -14 overall.

Other ideas: s^v!<Esc>?\<C-R>"<CR>xhf!x or s<CR>^v<Esc>:s/\V<C-R>"<CR>kgJ.

@Grimy Or even better: sv^<esc>l?\V<C-r>"<cr>x

I thought about that, but it fails if the character to be inverted is at the end of a line… but then the input spec guarantees it’s followed by a -, so it actually works! Duh.

JavaScript, 63 59 bytes
a=>s=>s.replace(/v|\^/g,x=>"^v"[a.includes(n++)^x>"^"],n=0)

Try it online!
Saved 4 bytes thanks to Arnauld.

K (oK), 31 27 bytes
Solution:
`0:{@[x;(&x>93)y;"^v"94=]};

Try it online!
Explanation:
Quick answer, will try to golf it. 0-indexed.
`0:{@[x;(&x>93)y;"^v"94=]}; / the solution
`0:                       ; / print to stdout
   {                     }  / lambda taking 2 implicit args x & y
    @[ ;        ;       ]   / apply @[var;index;function]
                     94=    / 94 (ASCII "v") equal to? returns 0 or 1
                 "v^"       / index into "v^" (ie flip switch)
               y            / index into
        (     )             / do this together
          x>93              / x greater than 93 (ASCII "]")
         &                  / indices where true
      x                     / apply to x

Notes:

-4 bytes thanks to >93 trick

Python 3, 140 134 103 bytes
(-30 thanks to DJMcMayhem♦, -1 more thanks to Black Owl Kai)
def f(i,y,x=1):
 for c in y:q=c>'-';p=len(i)and x==i[0]*q;print([c,"v^"[c>'^']][p],end='');x+=q;i=i[p:]

Try it online!

Oof, second try at golfing anything at all. This just uses a rather unsophisticated loop over the string, using x to keep track of the current switch index. Uses 1-indexing.
Ungolfed:
def f(i,y):
     x = 1
     for c in y:
         nextchar = c # nextchar gets golfed out completely within the print
         if c in 'v^': # golfed as c>'-'
             if len(i) and x==i[0]:
                nextchar = 'v' if c=='^' else '^'
                i = i[1:]
             x += 1
         print(nextchar, end='')

107 bytes

106 bytes

Or 104 if python 3 is acceptable

@DJMcMayhem Ooh, thanks for that replace catch xd Would you want to post the Python 3 as a separate answer, or do you think it's similar enough to add as an edit to this?

Feel free to add it :) I might post a python 3 answer, but I'd probably try to come up with my own approach first.

Perl 6, 31 bytes
->$_,\s{S:nth(s){\^|v}=$/~^'('}

Try it online!
(-2 bytes thanks to Jo King)
Perl 6's substitution operator S conveniently takes an nth adverb that accepts not only a single index at which to make the replacement, but a list of them, exactly as needed here.
The replacement is $/ ~^ '(', where $/ is the matched text (either v or ^), ~^ is the stringwise exclusive-or operator, and ( is the character whose bits turn v into ^ and vice versa.

31 bytes

Jelly, 12 bytes
O^%5T⁴ịƲ¦40Ọ

A full program accepting a string and a list of integers which prints the result.
Try it online!
How?
O^%5T⁴ịƲ¦40Ọ - Main Link: list of characters, S; inversion indices, I
O            - to ordinals   ('\n':10, '-':45, '^':94, 'v':118)
        ¦    - sparse application...
       Ʋ     - ...to indices: last four links as a monad: f(O(S))
  %5         -   modulo 5   (10:0, 45:0, 94:4, 118:3)
    T        -   truthy indices (giving, X, indices of '^' and 'v' in S)
     ⁴       -   4th command line argument = I
      ị      -   index into X   (giving indices of '^' and 'v' to invert in S)
 ^       40  - ...action: XOR with 40   (94:118, 118:94)
           Ọ - from ordinals
             - implicit print

Python 3.8 (pre-release), 80, 78, 77, 71, 70 bytes
lambda x,s,i=0:''.join([c,'^v'[c<'v']][c>s and(i:=i+1)in x]for c in s)

-1 byte, thanks to @Shaggy
Try it online!

c>s  saves a byte.

MATL, 29 bytes
c!tt45>o2yfi)(2=XK)t106-E-K(!

Try it online! Or verify all text cases.
Input is a cell array of strings and a row vector of numbers, with 1-based indexing. Output is right-padded with spaces.

Python 2, 105 97 91 bytes
lambda a,s:reduce(lambda(t,i),c:(t+[c,'^v'[c<'v']][c>'-'and i in a],i+(c>'-')),s,('',0))[0]

Try it online!
6 bytes saved by stealing using Rin's Fourier transform's c>'-' instead of c in'^v'.
0-indexed.

JavaScript (Node.js), 101 98 93 91 77 67 bytes
a=>s=>[...s].map(c=>t+=c>s?"^v"[a.includes(i++)^c>"^"]:c,t=i=``)&&t

Try it online!
10 bytes, thx to suggestions by Shaggy.
Port of my Python answer. Not used to golfing javascript!

A few quick tweaks

Or 67 bytes by paying forward the saving Arnauld gave me.

@Shaggy: Tips appreciated! Reading now...

Jelly, 14 bytes
⁾^vḟ$€>”-T⁹ịƲ¦

Try it online!
Full program.
This feels too overlong...

I don't know Jelly so can't figure out how to try it myself but could you replace ”- with the name of the first argument (³?), which is guaranteed to start with a -, instead?

@Shaggy Nope, because > vectorizes. You can see that it doesn't work.

ah, that's exactly what I tried :) Didn't know if it was my lack of Jelly knowledge that was the cause or not, though. Don't suppose there's a single character built-in to get the first character of the first argument?

@Shaggy Erm... the only built-ins for command-line arguments are ³, ⁴, ⁵, ⁶ and ⁷, for the first to the fifth CLAs respectively. You can read the Atoms page to find out if a specific built-in function exists.

Ah, well, was worth a shot. One day, I will dive into Jelly properly.

Stax, 13 bytes
¿╫╦ÜΦ1▌X○!ΩTæ

Run and debug it
This uses 0-based indices.

Find all indices of the regex [v^].
Index into the index array using the input.
At each result, xor the input's ascii code with 40.  This is xor('v', '^').

Clean, 93 bytes
import StdEnv
$i=foldl(\s c=s++[if(any((==)(sum[1\\k<-s|k>'-']))i&&c>'-')if(c>'^')'^''v'c])[]

Try it online!
Defines the function $ :: [Int] -> [Char] -> [Char] taking a zero-indexed list of indices and returning a function that takes the string and returns the altered string.

V, 20 bytes
ÑñÀ/vüÞ
sv^l?Ö"
xH

Try it online!
Uses some new features, such as Ñ which is incredibly useful.

JavaScript, 111 bytes
Code
x=>y=>{x.map(i=>eval(`y=y.replace(/(((v|\\^)[^^v]*){${i}})(v|\\^)/,(a,b,c,d,e)=>b+(e<"v"?"v":"^"))`));return y}

Takes input in format f(x)(y) where x is the indices and y is the switchboard. Indices are 0 indexed
Try it online!
Explanation
For each index
x.map(i=>...

construct the regex that finds the index+1 th "^" or "v"
`.../(((v|\\^)[^^v]*){${i}})(v|\\^)/...`

insert it into a string to replace it with the opposite symbol "v"<->"^"
y=y.replace(...,(a,b,c,d,e)=>b+(e<"v"?"v":"^"))

then evaluate the string as a function
eval(...)

After iterating through the indices to switch, return the switchboard
return y

Retina 0.8.2, 66 62 bytes
\d+
$*
T`v^`^v`.(?<=\b(?(3)$)(?<-3>1)+(,1+)*(-|¶|(v|\^))+)
1A`

Try it online! Link includes test case. 1-indexed. Explanation:
\d+
$*

Convert the input numbers to unary.
T`v^`^v`.(?<=\b(?(3)$)(?<-3>1)+(,1+)*(-|¶|(v|\^))+)

Transliterate between v and ^ all characters with the property that the number of vs and ^s so far (inclusive) equals one of the input numbers.
1A`

Delete the input numbers.

Jelly, 17 bytes
⁾^vK;`©⁹e€ky@€⁸¦®

Try it online!
A full program taking the indices as first and string as second argument. Prints the output with the indicated switches flipped.

Charcoal, 23 bytes
⭆η⎇№θ⌕ΦＬη№v^§ηλκ§v^⁼vιι

Try it online! Link is to verbose version of code. 0-indexed. Explanation:
 η                      Input string
⭆                       Map over characters and join
  ⎇                     If
   №                    Count of (i.e. exists)
     ⌕                  Index of
               κ        Current index in
       Ｌ                Length of
        η               Input string
      Φ                 Implicit range filtered by
         №              Count of (i.e. exists)
             η          Input string
            §           Indexed by
              λ         Current value
          v^            In literal string `v^`
    θ                   In input list
                 v^     Then literal `v^`
                §       Indexed by
                     ι  Current character
                   ⁼    Equal to
                    v   Literal `v`
                      ι Else current character

Japt, 16 14 bytes
Ëc^#(*(D>V©øT°

Try it
Ë>V©øT° ?Dc^#(:D     :Implicit input of multi-line string U & integer array V
Ë                    :Map each D in U
 >V                  :  Greater than V? (Coerces V to a string and, conveniently, all digits are > "\n" & "-" and < "^" & "v")
   ©                 :  Logical AND with
    ø                :  Does V contain
     T°              :    T (initially 0) postfix incremented
        ?            :  If true
         Dc          :  Charcode of D
           ^#(       :  XOR with 40
              :D     :  Else D

Aw, your code is no longer happy (it lost the :D)

Ruby, 56 bytes
1-indexed.
->s,i{j=0;s.gsub(/[v^]/){i==i-[j+=1]?$&:"v^".tr($&,'')}}

Try it online!

Japt, 15 bytes
®c^(Z>V©øT° *#(

Try it
®c^(Z>V©ø°T *#(    U = Input String, V = Array of Indices
®                  Map each Z in U
 c^                   XOR Z's charcode by
   (Z>V                 Z is 'v' or '^'
      ©                 Short-circuiting Logical and
       øT°              The current Z's index is in V
             *#(        Multiply the boolean with 40 (false = 0, true = 1)

C# (Visual C# Interactive Compiler), 73 bytes
a=>b=>{int i=0;return a.Select(x=>x>45&&b.Contains(++i)?(char)(x^40):x);}

Try it online!

@Veskah Updated to include empty case


text:
Get delta of days by current hour and added delta of days
Inputs:

current hour: from 0 to 23 (inclusive)
delta of hours: [current hour] + [delta of hours] = withing the range of Integer

Output:

delta of days: the value which shows difference in days between day of current hour and day of sum [current hour] + [delta of hours]

Scoring

Answers will be scored in bytes with fewer bytes being better.

Examples:

[current hour] = 23; [delta of hours] = -23; delta of days = 0
[current hour] = 23; [delta of hours] = 1; delta of days = 1
[current hour] = 23; [delta of hours] = 24; delta of days = 1
[current hour] = 23; [delta of hours] = 25; delta of days = 2
[current hour] = 23; [delta of hours] = -24; delta of days = -1
[current hour] = 23; [delta of hours] = -47; delta of days = -1

Welcome to CGCC! The code-challenge tag is reserved for custom winning criteria. Did you mean code-golf?

@Arnauld , yeah, is it enough to specify tag?

Yes, that's fine.

Welcome to the site!  I am going to have to disagree with Arnauld and suggest that a description of the winning criterion is present in the body of the challenge. Here is a good summary of why I think this which seems to have the approval of our community. I've gone ahead and edited a winning criterion into your challenge based on my best guess feel free to change it.

@SriotchilismO'Zaic , nice! Thank you

is [current hour] required to be based on the local realtime clock of the platform, or supplied as an input parameter?

@gwaugh , actually does not matter, first of all, the task is about mathimatics

JavaScript (ES6),  26  25 bytes
Takes input as (current)(delta).
a=>b=>(a+b-(a<-b)*2)/3>>3

Try it online!
Commented
a =>                // a = current hour
b =>                // b = delta of hours
  (                 //
    a + b           // 1) we compute the sum
    - (a < -b) * 2  //    and we subtract 2 if this sum is negative
                    //    examples:
                    //      51 remains 51
                    //      23 remains 23
                    //      -1 is turned into -3
  ) / 3             // 2) float division by 3
                    //    examples:
                    //      51 is turned into 17
                    //      23 is turned into 7.666…
                    //      -3 is turned back into -1
  >> 3              // 3) right arithmetic shift by 3 on the integer part
                    //    examples:
                    //      17 becomes 2
                    //      7.666… becomes 0
                    //      -1 is unchanged

JavaScript (ES6), 26 bytes
More straightforward, but less fun and 1 byte longer anyway.
Takes input as (current)(delta).
a=>b=>Math.floor((a+b)/24)

Try it online!

Jelly, 4 bytes
+:24

Try it online!
+ add the arguments
:24 integer divide by 24

05AB1E (legacy), 4 bytes
+24÷

Try it online or verify all test cases.
05AB1E, 11 5 bytes
+24/ï

-6 bytes by porting @Adam's approach in his APL answer.
Try it online or verify all test cases.
Explanation:
+      # Sum the two (implicit) input-integers together
 24÷   # Integer-divide this sum by 24
       # (after which the result is output implicitly)

+      # Sum the two (implicit) input-integers together
 24/   # Divide this sum by 24
    ï  # Floor
       # (after which the result is output implicitly)

The legacy version of 05AB1E uses a Python compiler. When integer-dividing, it will always floor the integer, whether the integer it divides is positive or negative.
The new version of 05AB1E uses an Elixir compiler. When integer-dividing in the new version of 05AB1E, it will round towards 0 (so basically truncates the decimal digits after dividing). So this will floor for positive integers, but ceil for negative integers.

5 bytes?

@ExpiredData Ah, noticed your comment after Adam's answer. But you're indeed right this can be done much easier.. Maybe I should just delete my answer out of shame and let you get the 5-byter. ;)

nah I'm sure you'll pay me back in bytes saved given how terrible me 05AB1E is at the moment so don't worry!

@Adám That's what I initially had in mind when I saw the challenge, but it doesn't work for the [23,-24] and [23,-48] test cases. Which is why I had that weird 11 byter as my initial answer. Integer division will ceil for negative integers, instead of floor.

Ah, so it rounds towards 0. Fair enough.

@Adám I have the feeling it simply truncates the decimal digits after dividing. But I was able to use your suggested approach after all in the legacy version of 05AB1E, which uses a Python compiler like Jelly, which floors when integer dividing negative integers.

APL (Dyalog Unicode), 6 bytesSBCS
Anonymous tacit infix function, taking current and delta as arguments.
⌊24÷⍨+

Try it online!
+ add the arguments
24÷⍨ divide that by 24
⌊ floor

Python 3, 20 19 bytes
Simple lambda:
lambda*a:sum(a)//24

-1 byte thanx to Jonathan Allan
Try it online!
Full program for 38 bytes:
print((int(input())+int(input()))//24)

Save a byte with *args like so: lambda*a:sum(a)//24. Switch to Python 2 and save another with lambda*a:sum(a)/24.

Haskell, 18 16 bytes
((`div`24).).(+)

Try it online!
If taking input as a list is allowed, this can be done in 13 bytes (thanks cole):
(`div`24).sum

Try it online!

I've seen people leave off the function declaration in the byte count for pointfree style, so I'm doing the same here.
Explanation:
(`div`24)

div is the shorter integer division operator. Haskell has this nice syntactic sugar where you can curry infixes by putting the argument on its respective side of the infix (thanks mimi), so this is a function that does integer division by 24.
The double composition is a little weird to explain, so I'll follow the template of this great SO answer:
f a b = (`div`24) (a + b)       -- what we want
f a b = (`div`24) ((+) a b)     -- un-infixing (+)
f a b = ((`div`24) . ((+) a)) b -- definition of function composition (partially applying (+) onto a)
f a = ((`div`24) . ((+) a)       -- pointfree reduction
f a = ((`div`24) .) ((+) a)     -- associative property
f a = (((`div`24) .) . (+)) a   -- definition of function composition
f = ((`div`24).) . (+)            -- pointfree reduction

When this takes a list as input, the sum function only has one argument, so the extra composition isn't needed (since we don't have to do that extra curry).

You can use backquotes instead of flip: ((`div`24).).(+).

if you can take input as an array, then (\div`24).sum` is shorter

R, 28 16 bytes
Just a port of most of the other answers...
-12 bytes thanks Giuseppe

sum(scan())%/%24

Try it online!

Use x%/%y instead of floor(x/y)

Or better yet, take input from stdin and do sum(scan())%/%24

Nice one. Will have to remember that trick.

Ohm v2, 4 bytes
+24v

Try it online!

Lua, 70 50 bytes
c,d=io.read():match("(%S+) (%S+)")print((c+d)//24)

-20 bytes thanks to val
Try it online!

Second line can be made shorter by specifying valid input format. Third line is just print((c+d)//24) in Lua 5.3. There are also some other ways to golf this.

Mind if I'll edit and improve your answer later today? Mine is shorter, but your is full program.

@val, Just go ahead and post your solution with your own TIO. Or if you don't want to do that, just comment here your suggested improvement and I'll edit it giving credit. These options seem to be the way things work around here.

50 bytes: Try it online!. Use space separated input. I'll also add another solution which take arguments from command line to my answer.

C# (Visual C# Interactive Compiler), 26 bytes
a=>b=>Math.Floor((a+b)/24)

Try it online!

Lua, 32 26 bytes
print((arg[1]+arg[2])//24)

Try it online!
Rather boring solution. Take input as arguments, print to stdout. Require Lua 5.3 or greater.
Old solution: Lua, 32 bytes
function(a,b)return(a+b)//24 end

Try it online!
Same idea, but implemented as function instead of full program.

Nice. Thought briefly about a function, but didn't take the time.

@ouflak New solution is full program taking input as command like arguments tho.

Perl 6, 11 bytes
(*+*)div 24

Try it online!
Anonymous Whatever lambda that takes two arguments and returns the sum of the two integer divided by 24

Husk, 4 bytes
÷24+

Try it online! Nothing very original here.

I, 6 bytes
Anonymous tacit infix function, taking current and delta as arguments.
+/24.m

Try it online!
Beginning with:
 + the sum of the arguments
/ divide by:
 24 twentyfour
. apply:
 m floor (minimum)

Retina 0.8.2, 41 bytes
\d+,?
$*
(1+)-\1
-
^((-)1|1{24})*.*
$2$#1

Try it online! Link includes test suite. Explanation:
\d+,?
$*

Convert both inputs to unary and take the sum if the second input is positive.
(1+)-\1
-

But if the second input is negative then take the difference.
^((-)1|1{24})*.*
$2$#1

Floor divide the input by 24 and convert to decimal. For positive numbers the first alternation never matches so this just counts the number of whole multiples of 24 in the number. For negative numbers the leading -1 counts as an extra negative multiple of 24 in addition to any remaining multiples of 24, thus achieving the desired floor division.

Python 2, 18 bytes
lambda*a:sum(a)/24

Try it online!

Perl 5 (-MPOSIX=floor -MList::Util=sum -alp), 19 bytes
$_=floor+(sum@F)/24

TIO

Whitespace, 49 bytes
[S S S N
_Push_0][S N
S _Duplicate_0][T   N
T   T   _Read_STDIN_as_integer][T   T   T   _Retrieve_input][S S S N
_Push_0][S N
S _Duplicate_0][T   N
T   T   _Read_STDIN_as_integer][T   T   T   _Retrieve_input][T  S S S _Add][S S S T T   S S S N
_Push_24][T S T S _integer_division][T  N
S T _Print_as_integer]

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.
Try it online (with raw spaces, tabs, and new-lines only).
Explanation in pseudo-code:
Integer a = STDIN as integer
Integer b = STDIN as integer
a = a + b
a = a integer-divided by 24
Print a as integer to STDOUT

Forth (gforth), 12 bytes
: f + 24 / ;

Try it online!
Code Explanation
: f           \ start a new word definition
  +           \ add current hour and delta
  24 /        \ (integer) divide result by 24, round towards negative infinity
;             \ end word definition

PHP, 29 bytes
<?=floor((date(G)+$argn)/24);

Try it online!
Full program, with current hour being the current hour on the platform host, and delta of hours input via STDIN.
Or
PHP, 30 bytes
<?=floor(array_sum($argv)/24);

Try it online!
Input of current hour and delta of hours via command line.