text:
Is it an Ordered Word?
(inspired by this post over on Puzzling. CAUTION: SPOILERS FOR THAT PUZZLE ARE BELOW.)
The standard telephone keypad correlates letters to numbers as follows:
1 ->
2 -> ABC
3 -> DEF
4 -> GHI
5 -> JKL
6 -> MNO
7 -> PQRS
8 -> TUV
9 -> WXYZ
0 ->

A given input word is defined to be an Ordered Word if, when translated to keypad presses using the above, the resulting number is either non-decreasing or non-increasing. In other words, the resultant number cannot both increase and decrease.
For example, the word CAT translates to 228, which is non-decreasing, and thus an Ordered Word. However, the word DOG is 364, which both increases and decreases, and thus is not an Ordered Word.
The challenge
Given a word, output whether or not it's Ordered.
Input

A word (not necessarily a dictionary word) consisting of ASCII alphabet ([A-Z] or [a-z]) letters only, in any suitable format.
Your choice if the input is all uppercase or all lowercase, but it must be consistent.
The word will be at least 3 characters in length.

Output
A consistent truthy/falsey value for whether the input word is Ordered (truthy) or not Ordered (falsey).
Rules

Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
If possible, please include a link to an online testing environment so other people can try out your code!
Standard loopholes are forbidden.
This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.

Examples
Here are some Ordered Words (i.e., truthy), and there are more on the linked Puzzling puzzle.
CAT
TAC
AAA
DEMONS
SKID
LKJONMSRQP
ABCDEFGHIJKLMNOPQRSTUVWXYZ

Here are some non-Ordered Words (i.e., falsey)
DOG
GOD
ROSE
COFFEE
JKLMNOGHI

Related and Related  I'm not sure this isn't a dupe, the only change between abc->t9 and this challenge is checking monotonicity?

@nmjcman101 Yes, those are related, but there could be other (better?) ways than strictly abc->t9.

That makes sense, I do hope to see something beat that method

Also slightly related.

Test case request: AAA

Do the output values matter, as long as they're consistent? For example, can we output 0 for true and 1 for false?

@Shaggy As long as those are truthy/falsey in your language of choice.

Python 2, 164 148 132 77 bytes
-16 bytes thanks to Rod's suggestion elsewhere. A frickin' -55 bytes thanks to Arnold Palmer.
n=[min(int((ord(i)-58)/3.13),9)for i in input()]
print sorted(n)in[n,n[::-1]]

Try it online!
Input must be uppercase. Outputs True or False based on its orderedness.

Explanation
The first line maps each letter to a number.
                               for i in input()   # iterate over the input string
            ord(i)                                # take the ASCII ordinal
                  -58                             # subtract 58
           (         )/3.13                       # divide by 3.13
       int(                )                      # chop off the fractional part
   min(                     ,9)                   # choose the minimum between the number and 9
n=[                                            ]  # assign the resulting list to n

This works based on:
          | A   B   C  | D   E   F  | G   H   I  | J   K   L  | M   N   O  | P   Q   R   S  | T   U   V  | W   X   Y   Z
----------+------------+------------+------------+------------+------------+----------------+------------+-----------------
ord(x)    | 65  66  67 | 68  69  70 | 71  72  73 | 74  75  76 | 77  78  79 | 80  81  82  83 | 84  85  86 | 87  88  89  90
----------+------------+------------+------------+------------+------------+----------------+------------+-----------------
x - 58    | 7   8   9  | 10  11  12 | 13  14  15 | 16  17  18 | 19  20  21 | 22  23  24  25 | 26  27  28 | 29  30  31  32
----------+------------+------------+------------+------------+------------+----------------+------------+-----------------
x ÷ 3.13* | 2.2 2.6 2.9| 3.2 3.5 3.8| 4.2 4.5 4.8| 5.1 5.4 5.8| 6.1 6.4 6.7| 7.0 7.3 7.7 7.9| 8.3 8.6 8.9| 9.3 9.6 9.9 10.2
----------+------------+------------+------------+------------+------------+----------------+------------+-----------------
int(x)    | 2   2   2  | 3   3   3  | 4   4   4  | 5   5   5  | 6   6   6  | 7   7   7   7  | 8   8   8  | 9   9   9   10
----------+------------+------------+------------+------------+------------+----------------+------------+-----------------
min(x, 9) | 2   2   2  | 3   3   3  | 4   4   4  | 5   5   5  | 6   6   6  | 7   7   7   7  | 8   8   8  | 9   9   9   9

*Values are rounded. :P
The second line outputs if the list of numbers is in ascending or descending order.
print                                             # print whether...
      sorted(n)                                   # n sorted...
               in[n,n[::-1]]                      # is equivalent to n or n reversed

84 bytes

Holy cow, that's awesome. Thanks!

I was going to post it as an answer cause I wrote it before everyone flooded in with answers, but you sniped me :)

JavaScript (ES6),  83 ... 71  70 bytes
Returns a boolean.
x=>[...x].every(c=>v&=~(k=x,x=parseInt(c,35)*.32|0||10,x<k?2:x>k),v=3)

Test cases

let f =

x=>[...x].every(c=>v&=~(k=x,x=parseInt(c,35)*.32|0||10,x<k?2:x>k),v=3)

test = a => a.forEach(s => console.log(f(s) + " for '" + s + "'"))

console.log('[Truthy]')
test(["AAA", "CAT", "TAC", "DEMONS", "SKID", "LKJONMSRQP", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"])

console.log('[Falsy]')
test(["DOG", "GOD", "ROSE", "COFFEE", "JKLMNOGHI"])

How?
Letter conversion
We use parseInt(c, 35) to convert each letter of the input string to some number in [10 .. 34]. Because it's base-35, "Z" is converted to NaN instead.
The expression * .32 | 0 maps this number into the interval [3 .. 10], leading to 8 correct groups of letters for "A" to "Y". We need || 10 to get the correct value for "Z".
           | A  B  C| D  E  F| G  H  I| J  K  L| M  N  O| P  Q  R  S| T  U  V| W  X  Y   Z
-----------+--------+--------+--------+--------+--------+-----------+--------+------------
parseInt   |10 11 12|13 14 15|16 17 18|19 20 21|22 23 24|25 26 27 28|29 30 31|32 33 34 NaN
-----------+--------+--------+--------+--------+--------+-----------+--------+------------
*.32|0||10 | 3  3  3| 4  4  4| 5  5  5| 6  6  6| 7  7  7| 8  8  8  8| 9  9  9|10 10 10  10

Order test
We keep track of the signs of differences between consecutive numbers into the bitmask v, initially set to 3 (0b11):

bit #0: cleared when new_value > previous_value
bit #1: cleared when new_value < previous_value

The previous value is stored in the same variable x as the input. This ensures that the first iteration -- where no previous value actually exists -- will not clear any bit, because a string containing only letters is neither greater nor less than any number:
('CAT' > 5) === false
('CAT' < 5) === false

A word is ordered unless both signs are encountered, which leads to v = 0 and makes every() fail.

Oh, nice trick to get the number of each letter :) I'm torn as to whether I should borrow it or not, as it would mean I'd tie with you, which doesn't seem right.

Jelly, 28, 27, 25, 23, 22, 21, 19, 18 bytes
_>
O‘ç82ç88:3IṠḟ0E

Try it online!
This was a lot of fun to write!
Explanation:
                # Define a helper link, decrement a if a > b
_               # Subtract
 >              # Boolean greater than
                # Main link:
O               # The ordinals (ASCII points) of the input
 ‘              # Minus one
  ç82           # Decrement if greater than 82
     ç88        # Decrement if greater than 88
        :3      # Divide each number by 3
          I     # Consecutive differences
           Ṡ    # Sign (-1 if < 0, 0 if == 0, and 1 if > 0)
            ḟ0  # Remove all 0's
              E # All elements are equal?

Thanks to @ErikTheOutgolfer, @leakynun and @BusinessCat for all saving bytes. :)

05AB1E, 36 bytes
v.•1нJ©½è`ÇHø¹á₂N¸°…ÈáÀ•#Dʒyå}k}¥0‹Ë

Try it online!

You can replace .•1нJ©½è`ÇHø¹á₂N¸°…ÈáÀ•# by A•22ā₂•S£.

@Adnan rip formatting

@LeakyNun rip indeed fixed

@Adnan rip formatting

@LeakyNun rip indeed

@Adnan you sure? Try it online!

MATL, 26 25 bytes
1Y21K250B-Y{c&m8\dZSu|s2<

Input is in upper-case letters. Output is 1 or 0.
Try it online!
Explanation
1Y2      % Push 'ABC...XYZ'
1        % Push 1
K        % Push 4
250B     % Push 250 in binary, that is, [1 1 1 1 1 0 1 0]
-        % Subtract (from 4, element-wise): gives [3 3 3 3 3 4 1 4]
Y{       % Convert to cell array, splitting into chunks of those lengths
c        % Convert to char matrix. Gives a 4-column matrix. Chunks of length 3
         % are right-padded with a space
&m       % Implicit input. Push (linear) index of membership in char matrix
8\       % Modulo 8. Converts linear index into 0-based row index
d        % Consecutive differences
ZS       % Sign
u        % Unique
|        % Absolute value
s        % Sum
2<       % Less than 2? Implicit display

Appropriate score for an alphabetic challenge :P

@DJMcMayhem Not anymore :-D

Husk, 22 21 19 18 bytes
±S€Ẋ▲`Ṫo±≤"DGJMPTW

Returns 1 for truthy inputs, 0 for falsy ones.
Inputs must be in uppercase.
Passes all test cases.
Try it online!
Explanation
±S€Ẋ▲`Ṫo±≤"DGJMPTW  Implicit input x, e.g. "CAT"
     `Ṫo±≤"DGJMPTW  This part transforms x into a "canonical form" corresponding to the numpad digits
     `Ṫ             Table with flipped arguments
       o±≤          on sign of less-than-or-equal
                    (In Husk, ≤ returns extra information we don't want, so we take sign of the result to get 0 or 1.)
          "DGJMPTW  of this string and x.
                    This gives, for each char in x, a bit array of comparisons with the chars in the string:
                    y = [[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[1,1,1,1,1,1,0]]
   Ẋ▲               Maxima of adjacent pairs: [[0,0,0,0,0,0,0],[1,1,1,1,1,1,0]]
 S€                 1-based index in y as sublist: 2
±                   Sign: 1

Python 2, 60 bytes
a=[3681/ord(c)for c in input()]
print sorted(a)in[a,a[::-1]]

Try it online!
Accepts input in lowercase.
How it works
⌊3681/x⌋ decreases from

38 to 37 at x ≈ 96.8684210526, before a;
37 to 36 at x ≈ 99.4864864865, between c and d;
36 to 35 at x ≈ 102.25, between f and g;
35 to 34 at x ≈ 105.171428571, between i and j;
34 to 33 at x ≈ 108.264705882, between l and m;
33 to 32 at x ≈ 111.545454545, between o and p;
32 to 31 at x ≈ 115.03125, between s and t;
31 to 30 at x ≈ 118.741935484, between v and w;
30 to 29 at x ≈ 122.7, after z.

JavaScript (ES6), 107 97 95 92 88 85 bytes
Works with mixed-case strings. Returns 1 for truthy or 0 for falsey.
s=>(s=(a=[...s].map(c=>(parseInt(c,36)-3)/3.13%10|0||9))+"")==a.sort()|s==a.reverse()

10 bytes saved thanks to Rod.

Try It

o.innerText=(f=
s=>(s=(a=[...s].map(c=>(parseInt(c,36)-3)/3.13%10|0||9))+"")==a.sort()|s==a.reverse()
)(i.value="Cat")
oninput=_=>o.innerText=f(i.value)
<input id=i><pre id=o>

Math.min((parseInt(c,36)-3)/3.13|0,9) instead "2..9"[parseInt(c,36)-10] to save some bytes

Thanks, @Rod; very nice. I'll have to file that away for future use.

86 bytes.

Thanks, @ThePirateBay, but,sadly, that fails for input AAA.

C++, 375 199 195 194 bytes
Thanks to Shaggy's JavaScript answer :
-5 bytes thanks to Zacharý
#include<string>
int o(std::string a){std::string m="22233344455566677778889999";for(auto&b:a)b=m[b-65];int j=1,i=0,d=0;for(;j<a.size();++j){if(a[j]>a[j-1])++i;if(a[j]<a[j-1])++d;}return!(i*d);}

Can you move the int j=1,i=0,d=0 to the for loop?

@Zacharý Since i and d are used outside of the loop block, i can't

i==0||d==0 ==> i*d==0.

Would !(i*d) work? (removing the space after return)

@Zacharý Yes, it works

@Zacharý miscalculations

05AB1E, 21 17 bytes
Code
A•22ā₂•Sās×J‡Ô¥dË

Uses the 05AB1E encoding.
Try it online! or Verify all test cases!
Explanation
A                   # Push the lowercase alphabet
 •22ā₂•             # Push the number 33333434
       S            # Split into an array
        ā           # Get the range of indices [1 .. length]
         s×         # Swap and string multiply
           J        # Join that array
            ‡       # Transliterate

This now essentially maps the following letters to the following numbers:
abcdefghijklmnopqrstuvwxyz
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
11122233344455566667778888

             Ô      # Remove consecutive duplicates
              ¥     # Compute the delta's of the list
               d    # Check if the number is greater or equal to 0
                Ë   # Check if all elements are the same

Pyth, 23 bytes
One of my first non-trivial Pyth answer! Saved 6 bytes thanks to @LeakyNun. The initial solution is below.
/{_BKmhS,9/a58Cd3.13zSK

Test Suite.
Pyth, 29 bytes
KmhS+9]/-Cd58 3.13w|qKSKqK_SK

Test Suite.

Explanation

/{_BKmhS,9/a58Cd3.13zSKQ - The Q means evaluated input and is implicit at the end

 {                      - Deduplicate
  _                     - Reverse
   B                    - Bifurcate, Create a two-element list, [B, A(B)]
    K                   - Variable with auto-assignement to:
     m              z    - Map over the input:
      hS                  - Minimum (first element of sorted list)
        ,                 - Create a two-element list, [A, B] with these elements:
         9                  - The numeric literal 9
          /                 - The integer division of:
           a58Cd              - The absolute difference between 58 and ord(current_element)
                3.13          - The numeric literal 3.13
                    SK   - K sorted
/                     Q  - Count the occurrences of the input in [K, K[::-1]]

23 bytes

Retina, 65 bytes
T`_ADGJMPTW`d
}T`L`_L
(.)\1*
$1$*1<
(1+)<(?!\1)
$1>
1

^(<*|>*)>$

Try it online! Link includes test cases. Explanation:
T`_ADGJMPTW`d

Change the first letter on each key to a digit. (This is off by 1 but that doesn't matter for an ascending/descending check. On the other hand, zeros would make my life more difficult, so I left one filler character in.)
}T`L`_L

Shuffle all the remaining letters up 1 and repeat until they've all been converted to digits.
(.)\1*
$1$*1<

Convert the digits into unary, but only once per run of identical digits. The unary values are seprated with a <...
(1+)<(?!\1)
$1>

... but if the LHS turns out to be greater than the RHS, correct the < to >.
1

Delete the 1s which are no longer necessary.
^(<*|>*)>$

Check that the word is ordered. (The trailing > comes from the last digit which always compares greater than the empty space following it.)

That's pretty cool. Thanks for the thorough explanation.

05AB1E, 30 bytes
A3 8×Ƶ0+S£¹δåā>‚øε`*}.«+¥0K0‹Ë

Try it online!
-1 thanks to Magic Octopus Urn.

Did you use ¥0K0.SË because ¥0‹Ë isn't correct? I can't tell if the 0.S is needed.

@MagicOctopusUrn In fact ¥0K0‹Ë seems to work.

Yeah, if you're removing the 0's it should; in my answer I'm not sure it works.

@MagicOctopusUrn I'm removing the 0s since otherwise there will be false negatives. Your answer might behave differently though.

Gaia, 29 27 25 17 bytes
ċ⟨):“QX’>¦Σ⁻3/⟩¦o

Try it online!
Explanation
ċ                  Turn the input into a list of code points
 ⟨            ⟩¦   Map this block to each code point:
  )                 Increment it
   :                Copy it
    “QX’            Push [81 88]
        >¦          Check if the code point is greater than each of [81 88]
          Σ         Sum the results
           ⁻        Subtract from the code point
            3/      Integer divide the result by 3
                o  Check if the resulting list is in sorted order (increasing or decreasing)

05AB1E, 13 bytes
ÇÍžq÷8
7:Ô¥dË

Whenever I see a numpad question, I have to make a pi-based answer.
Try it online or verify all test cases
Ç                    # ASCII code of each letter in the input
 Í                   # add 2
  žq÷                # divide by pi
     8 7:            # replace 8 with 7
         Ô           # remove duplicates
          ¥          # deltas
           d         # each >= 0 ?
            Ë        # are all elements equal?

C# (.NET Core), 133 bytes
using System.Linq;q=>{var u=q.Select(c=>(int)((c-58)/3.13));var z=u.Zip(u.Skip(1),(a,b)=>a-b);return!(z.Any(d=>d<0)&z.Any(d=>d>0));};

Try it online!
I feel like there's some room to save, but C# is not a concise language so maybe not. Ungolfed:
bool Ordered(string word){

    IEnumerable<int> keys = word.Select(character => (int)((character - 58)/3.13));
    // convert characters to keypad number

    IEnumerable<int> differences = keys.Zip(keys.Skip(1), (a, b)=> a-b);
    // difference between consecutive elements

    return !(differences.Any(diff => diff<0) & differences.Any(diff => diff>0));
    // false if both positive and negative differences exist
}

In particular I think there's a shorter way to express the final check for validity, possibly a way to inline it with the Zip. Finding a way to express the Zip without needing temporary storage for the Skip would also save something, but I doubt there's something more concise for that.

CJam, 37 31 30 27 bytes
q{_"SVZY"#g-i3/}%_$_W%](e=g

Try it Online
Of course the ugly version ends up being shorter...
q{        e# For each character in string...
_"SVZY"#g e# Get index of that character in "SVZY". Signum that. (returns 1 or 0 if inside string, -1 if not.)
-i3/      e# Subtract value from character (i.e 'Z' becomes 'Y', 'F' becomes 'G'). Convert to int. Integer divide by 3. (this is just how the math works out for proper mapping of characters to phone digits.)
}%
_$_W%]    e# Put mapped string, sorted version, and reverse sorted version in array.
(         e# Pop mapped string from array onto stack.
e=        e# Count occurences of mapped string in array.
g         e# Signum.

TI-Basic, 92 66 bytes
ΔList(int(seq(inString("BC DEF GHI JKL MNO PQRSTUV WXYZ",sub(Ans,I,1))/4,I,1,length(Ans
0≤min(Ansmax(Ans

Converts each character in the string to an integer from 0 to 7, and takes the difference between each consecutive element; then checks whether the minimum and maximum differences have the same sign (or either is 0).

I think ΔList(int(4^-1seq(inString("DEF GHI JKL MNO PQRSTUV WXYZ",sub(Ans,I,1))+3,I,1,length(Ans saves one byte.

Jelly, 32 bytes
“¢Ç⁺H’D0ẋj1œṗØA⁸=€×"€9Ḋ¤Fḟ0Iḟ0ṠE

Try it online!

RIP compression

@LeakyNun The compressed number is actually 32222323 so it saves just 2 bytes.

Python 3, 143 147 148 149 130 bytes
def g(s,f=lambda c:min(int((ord(c)-58)/3.13),9)):x=[f(a)-f(b)for a,b in zip(s,s[1:])];return any(t<0for t in x)*any(t>0for t in x)

Best I can do for now. Crude function turns the letter into the number based off of ascii code. There are definitely some improvements to be made. 0 is truthy, 1 is falsey (sorry). Saved 10 bytes thanks to Rod, another 3 thanks to Mr. Xcoder.
Try it online!

you can use x=[f(a)-f(b)for a,b in zip(s,s[1:])] to save some bytes

also, min(int((ord(c)-58)/3.13),9) is a shorter way to convert the char

140 bytes

@Rod Thanks! Very helpful.

You'll need to swap your outputs around in order for this to be valid.

Python 2, 111 103 bytes
-8 bytes thanks to @Arnold Palmer:no lower() needed

Takes uppercase letters as input.

lambda x:sorted(f(x))in[f(x),f(x)[::-1]]
f=lambda x:['22233344455566677778889999'[ord(i)-65]for i in x]

Try it online!

You can remove the .lower() since the input can be in whatever case you specify.

PHP 7, 98+1 95+1 84+1 bytes
a golfed port of Arnauld´s answer.
for(;$c=ord($argn[$i]);$v|=$i++?$p>$k?2:$p<$k:0,$p=$k)$k=($c-58)*.32%10?:9;echo$v<3;

accepts uppercase; empty output for falsy, 1 for truthy.
Run as pipe with -nR or try it online.
original post:
for(;$c=$argn[$i++];$p?$a[]=$p<=>$k:0,$p=$k)$k=(ord($c)-58)/3.13-($c>Y)|0;echo min($a)*max($a)>=0;

C (gcc), 183 169 153 117 bytes
#define a(b)(int)fmin(*(b c)/3.2,27)
d(char*c){int r=1,p=1;for(;1<strlen(c);)r&=a()<=a(1+),p&=a()>=a(++);return r|p;}

Try it online!
Old solution:

#define a(b)(int)((int)(b*.32-17.6)*.9)
d(char*c){int l=~-strlen(c),i=0,r=1,p=1;for(;i<l;++i)r&=a(c[i])<=a(c[i+1]),p&=a(c[l-i])<=a(c[l-i-1]);return r+p;}

Saved 8 bytes thanks to ThePirateBay.
Old old solution:
d(char*c){char*a="22233344455566677778889999";int l=strlen(c)-1,i=0,r=1,p=1;for(;i<l;++i){if(a[c[i]-65]>a[c[i+1]-65])r=0;if(a[c[l-i]-65]>a[c[l-i-1]-65])p=0;}return r+p;}

Old old old solution:
d(char*c){char*a="22233344455566677778889999";int l=strlen(c);int i,r=1,p=1;for(;i<l-1;++i)if(a[c[i]-65]>a[c[i+1]-65])r=0;for(i=l-1;i>0;--i)if(a[c[i]-65]>a[c[i-1]-65])p=0;return r+p;}

Zsh, 73 69  57 bytes
-12 bytes by using @anders-kaseorg's 3681/code conversion.
for c (${(s::)1})((y=3681/#c,A|=y<p,D|=p&&p<y,p=y,!D|!A))

Try it online!
Try it online!
Try it online!
A few things we abuse:

((statement,statement,...)) is a sequence of arithmetic expressions which returns truthy if the last statement is non-zero.
The return value of a loop is the return value of the last statement in a loop.
Arithmetic operator precedences were pretty nice to us, as only one pair of no parentheses were used. One byte could be saved if ! bound less tightly than &.
Unset parameters expand to 0 in arithmetic expansions.
The function we use to map to the keypad number is CODE / 3.2 - 18 (with a special case for Z), but since we only need the change between codes, we don't do the linear adjustment.

for c (${(s::)1})           # split into characters
    (( y = #c-90 ? 0^(#c/3.2) : 27,   # this sets y to the keypad number + 18
       A |= y < p,          # set the A flag if we detect it is not ascending
       D |= p && p < y,     # ditto descending, don't compare on first iteration
       p = y,               # save the current character
       !D | !A              # return false if D and A are both set
    ))

2 bytes can be saved if the truthy/falsey values can be swapped.


text:
The Counting Gate Keeper

Related as it requires you to measure the time between the first and last input. But here you're required to count how many inputs in a period of time.

I was assigned a task to stand by a gate and count how many students enter it. The problem is that my memory is not as good as it was when I first started this job. I need some kind of program to help me count how many students enter the gate until my shift is over.
Task
Given an integer t that represents the number of seconds until my shift is over. Tell me how many times I pressed the button during that time.
Rules

The button press can be any convenient user input, such as pressing the Return key;
You can assume that t will allways be in range [1; 60];
You can assume that the number of students will be less than 231;
When the time is up, you must output within 1 second;
Your program does not need to end, as long as the only output to stdout is at the end of the shift;
If your input method (such as Enter-key) repeats if held, you can choose to count it just once, or several times. Either way, you must still be able to handle separate inputs.

Hey, when you say output, is returning a value OK?

@Timtech sure, you can

I highly doubt you can press 2^31 times in 60 seconds!

Why are people closing this question? It's defined well enough.

Do we have to output to stdout or are other acceptable methods OK for this challenge?

@EngineerToast you can output via any standard output method in your language

TI-Basic, 22 bytes
Fairly simple. Sets a time Ans seconds in the future which we call T which is when the loop stops. While the loop is going, we check for if a key is pressed. It's been a while since I had the fgitw :)
startTmr+Ans->T
0
While T≠startTmr
Ans+not(not(getKey
End

Pro tip: None of the inputs repeat when you hold them down, except for Del and the arrow keys. So, you can try it both ways if you want.

Note that startTmr is only available on TI-84+/SE.

is there a way to test it without the calculator?

@FelipeNardiBatista If you have any TI84 series ROM you can use it with cemetech.net/projects/jstified

Are we allowed to just return in Ans now, without displaying?

@lirtosiast It's been that way for a while now - https://codegolf.meta.stackexchange.com/a/8580/10740

Ruby, 38 42 bytes
Uses the global variable $., which counts how many times the standard input function gets has successfully been completed. As such, it will only give accurate results the first time it is called per program run.
Input via command-line argument, such as ruby gatekeeper.rb 40
Thread.new{loop{gets}}
sleep eval$*[0]
p$.

As per meta, function submissions have to be reusable.

@LyricLy fair enough. Fixed.

AHK, 110 bytes
1*=-1000
c=0
Loop,255
Hotkey,% Format("vk{:x}",A_Index),s,On
SetTimer,q,%1%
Return
s:
c++
Return
q:
MsgBox,%c%

This is not as short as other submissions, but it distinguishes itself by allowing you to use practically any key as a counter. This includes mouse clicks and control keys like Ctrl, Shift, etc. unless you use special keys that can never be blocked such Ctrl+Alt+Del on Windows.
Two important notes:

The key presses and mouse clicks are blocked from other software
The program does not terminate

If you actually run this program, it will count for 1 seconds (where the variable 1 is the first passed parameter), all the while counting how many key presses you made and blocking each one. When that time expires, it pops up a message box with the total. However, seeing as how all keyboard and mouse inputs are still blocked, it's rather difficult to dismiss that message. That sounds like a job for the next gatekeeper.

C++ 11, MSVC, 255 254 246 244 bytes, MSVC without /Za flag : 204 202 bytes
-1 byte thanks to Zacharý
-8 bytes thanks to Tas
-42 bytes for the second version thanks to Tas
Can be compiled with /Za flag ( disabled extensions ) :
#include<thread>
#include<conio.h>
#define S(t)std::this_thread::sleep_for(std::chrono::milliseconds(t))
int r=1;void k(int*a){while(r){if(_kbhit()&&_getch())++*a;S(1);}}int c(int n){int a=0;std::thread t(k,&a);S(n*1000);r=0;t.join();return a;}

Can't be compiled with /Za flag ( require enabled extensions ). For more details, see this answer
#include<thread>
#include<conio.h>
#include<Windows.h>
int r=1;void k(int*a){while(r){if(_kbhit()&&_getch())++*a;Sleep(1);}}int c(int n){int a=0;std::thread t(k,&a);Sleep(n*1000);r=0;t.join();return a;}

Ungolfed and explanations :
#include<thread> // For the thread standard library
// Console IO, C header used mostly by MS-DOS compilers. Not ISO C nor POSIX standard
#include<conio.h> // Used for _getch and _kbhit

//Macro that takes the number of milliseconds to make the current thread go to bed and sleep
#define S(t) std::this_thread::sleep_for(std::chrono::milliseconds(t))

//Global bool that will indicate the input thread if it continues to run or not
bool r=true;

/**
 * @brief: Function that increment a variable every time a key is pressed
 * @param a : a pointer to the memory location where to increment the counter
 * References are unfortunately forbidden
 */
void k(int* a) {
    while(r) {
        if(_kbhit() && _getch())
            ++*a;
        S(1);
    }
}

/** Function to call
 * @brief : Counts the number of time a key is pressed
 * @param : The number of seconds it have to capture the key presses
 * @return : the number of times a key was pressed
 */
int c(int n) {
    int a=0;
    std::thread t(k,&a);
    S(n*1000);
    r=false;
    t.join();
    return a;
}

Conio.h Wikipedia page

You don't need the space after S(t). 1000 => 1e3.

@Zacharý i can't replace 1000 by 1e3, i will get an error if i do

@Tas Updated. It works

Sweet. I removed my other comments. You might also be able to save bytes by using Windows Sleep function: you'd have to #include<Windows.h> but std::this_thread::sleep_for(std::chrono::millseconds would simply be Sleep(t);

@Tas I added a version with your solution, but as separate, since you can't compile Windows header files with /Za flag

aren't function submissions suposed to work indefinitely?

there is no need to stop the thread, is there?

142 bytes

@FelipeNardiBatista CPP Reference on Threads So yes, it need to be stopped, or it crashes. BTW, i get 2 "CountingGateKeeper.exe" in the task manager due, i ran your code twice

it crashing does not make your answer wrong

the code i sent here (142 bytes) works just fine, it won't terminate as soon as the time is over, but that is not required

i know it is right to stop the thread, but that's not required in this challange

Are the newlines included in your bytecount? If they are, then you can remove them (the last two specifically)

JavaScript (ES6), 50 bytes
t=>setTimeout("alert(i)",1e3*t,i=0,onclick=_=>i++)

Test Snippet

f=
t=>setTimeout("alert(i)",1e3*t,i=0,onclick=_=>i++)

;f(10)
document.write("click to count...")
*{user-select:none}

Bash + coreutils, 39 bytes
This is an ugly way that creates a file t in the current directory because I couldn't get process substitution to work.. You count by pressing the return key and it continues counting if it's held down.
Use it like this: $ f DURATION

f(){ timeout -s3 $1 cat>t;cat t|wc -l;}

Try it online!

C#, 132 122 bytes
namespace System.Threading.Tasks{n=>{int c=0;Task.Run(()=>{for(;;++c)Console.ReadKey();});Thread.Sleep(n*1000);return c;}}

Saved 10 bytes thanks to @DaveParsons.
Full/Formatted version:
namespace System.Threading.Tasks
{
    class P
    {
        static void Main()
        {
            Func<int, int> f = n =>
            {
                int c = 0;

                Task.Run(() =>
                {
                    for (; ; ++c)
                        Console.ReadKey();
                });

                Thread.Sleep(n * 1000);

                return c;
            };

            Console.WriteLine(f(10));

            Console.ReadLine();
        }
    }
}

@Bob I don't have it to check but it would be good if you can. Either way that's not part of the code for the submission anyway.

Yea, sorry - I just realised your golfed version is significantly different from the full one.

@Bob Well it's not the golfed code is all the code from async to return c;} and including the namespace.

I thought it was almost-runnable code at first... "since when did C# let you define functions outside of classes?" :P

@Bob Haha! Just the way I show the code, instead of adding a "The byte count also includes namespace System.Threading.Tasks{}. I prefer it this way.

I think you might be able to remove async, change await Task.Delay to Thread.Sleep and return a plain int rather than Task<int>?

also +1 for the namespace trick.

@DaveParsons I could, I got too wrapped up in using async code!

Python 3, 116 110 Bytes
import time
def f(t):
 s,l=time.time(),[]
 while True:
  l.append(input())
  if time.time()-s>t:return len(l)

This is my first post, so not sure if this follows the format correctly.
Thanks for another few bytes Step

Welcome to PPCG! You can use while 1: instead of while True:. You can also move the import outside of the function to save a space, and do from time import* to get rid of time. twice.

I wasn't sure if it was legal to have global state if I was going to turn in a function rather than a program. Thanks. I'll make those improvements.

No problem! I believe the rule on functions is that they have to be reusable, but you can use global state as long as it works if the function is called multiple times.

And I have once again demonstrated that I have no idea how to format things on SE.

<s> instead of [s] and four spaces in front of each line of code

Thanks. I didn't realize that the 4 spaces would be formatted out rather than being part of the byte-count.

Welcome to PPCG! Unfortunately your answer is not quite right, as it does not finish within 1 second (in the case of me not giving any more inputs)

C + gcc + Linux x86_64, 89 bytes
d[999];f(n){for(*d=0,d[1]=n;d[5]=1;*d+=read(0,d+5,4))if(!select(1,d+5,0,0,d+1))return*d;}

Pass the number of seconds in as the argument n.  Press Enter to count a student (and don't press other keys before or during the function).  Returns the number of students counted when time is up.
Extremely unportable, and easily the most evil code I've ever written.  It makes assumptions about the size and layout of fd_set and struct timeval, and about the behavior of select.
Anyway, d[0] is the student counter, d[1] through d[4] is the struct timeval, and d[5] through d[260] is the fd_set.  d[5] is also the unused scratch space passed to read, and then gets immediately reset to 1 for the next select call.

GameMaker Language, 49 45 bytes
Make sure you have default that uninitialized variables are treated as 0. Also, default fps is 30. We're looking for any key to be pressed and this does repeat if held down.
In step:
while s<argument0*30{a+=keyboard_check(1)++s}

Alternatively,
while(get_timer()<argument0*1000000)a+=keyboard_check(1)

What version of GameMaker are you using? In my 8.0 version it reports a syntax error for your first script, but changing s++ to ++s works properly. Also, you can save 3 bytes by replacing vk_up with literal number 38 because it is just a constant.

@ThePirateBay Strange, I usually use studio but I have 8.0 somewhere. Probably ++s would work with both and it's the same bytecount. Also, thanks for pointing that out, I didn't realize you could substitute the number. Looks like vk_anykey is 1. Thanks for the tips!

I tested it in studio and it doesn't report a syntax error. It is either GameMaker issue or maybe I don't know to use it properly. This is how it looks in 8.0 and this is how it looks in studio.

@ThePirateBay Thanks for checking it out, I suppose it's some kind of bug in 8.0. Either way, changing it to ++s should make it compatible with both.

JavaScript (Node.js), 112 111 bytes
t=>require('readline').createInterface(process.stdin).on('line',_=>k++,k=0,setTimeout(_=>console.log(k),t*1e3))

I don't think it can be golfed more because Node.js function names are pretty verbose.

Python 3, 88 bytes
Takes Enter as input and doesn't terminate.
from threading import*
l=[0]
Timer(int(input()),print,l).start()
while 1:input();l[0]+=1

source: Stack Exchange

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

sort: votes


text:
Fold a List in Half
We are going to fold a list of integers.  The procedure to do so is as follows,  If the list is of even length, make a list of half of its length where the nth item of the new list is the sum of the nth item of the old list and the nth-to-last item of the old list.  For example if we had the list
[1 2 3 4 5 6 7 8]

We would fold it like so
 [8 7 6 5]
+[1 2 3 4]
__________
 [9 9 9 9]

If the list is of odd length, to fold it we first remove the middle item, fold it as if it were even and the append the middle item to the result.
For example if we had the list
[1 2 3 4 5 6 7]

We would fold it like so
 [7 6 5]
+[1 2 3]
__________
 [8 8 8]
++     [4]
__________
 [8 8 8 4]

Task
Write a program or function that takes a list of integers as input and outputs that list folded.
This is a code-golf question so answers will be scored in bytes, with fewer bytes being better.
Sample implementation
Here's an implementation in Haskell that defines a function f that performs a fold.
f(a:b@(_:_))=a+last b:f(init b)
f x=x

Try it online!

When you say integers, does this include zero or negative integers?

@Neil Yes it does.

Are we supposed to sort the list, or just take what we're given? Also is any type of collection allowed, or just a list (for languages with multiple types of collections)?

@GrzegorzPuławski You should not sort the list.  Any ordered collection is allowed, e.g. vector or array.

Now make it recursive and see how many times you can fold a list in half before you overflow.

@DavidStarkey Most reasonable lists will not overflow with a reasonable amount of memory.  Folding doesn't actually increase the sum so lists will converge to a singleton of the sum of the original list.

@WheatWizard That's what I meant, keep folding until one of the items in the list overflows.  Sure it needs larger lists than your examples, but that's kinda the point.

@WheatWizard I don't know about that, I've heard it's impossible to fold any list in half more than 7 times.

I would find it easier to visualize and follow if the odd length example just kept the [4] as a fourth column, in between the two rows.

Python, 46 bytes
f=lambda l:l[1:]and[l[0]+l[-1]]+f(l[1:-1])or l

Try it online!
Same length:
f=lambda l:l[1:]and[l.pop(0)+l.pop()]+f(l)or l

A much shorter solution works for even-length lists (30 bytes)
lambda l:[x+l.pop()for x in l]

Try it online!
I'm still trying to find a short way to  correct it for odd length.

Oh, I got terribly outgolfed ÷_÷

The "middle ground" solution f=lambda l:l[1:]and[l[0]+l.pop()]+f(l[1:])or l is also the same length...

Emojicode, 203 bytes
i⏩0➗2➕i➖➕1i1012➗210

This was the most painful Emojicode answer to code for me. The unnecessary length :/
Try it online!

05AB1E, 5 bytes
Code
2ä`R+

Uses the 05AB1E encoding. Try it online!
Explanation
2ä        # Split the list into two pieces
  `       # Flatten the stack
   R      # Reverse the second element from the list
    +     # Vectorized addition

Japt, 21 18 16 bytes

l
íUj°V/2V w)mx

Test it online!
Completely awful Slightly less awful thanks to @Oliver. BRB after I implement more built-ins and fix some bugs...

Jelly, 7 bytes
œs2U2¦S

Try it online!
-2 thanks to ETHproductions...and me realizing before.

ETH was right, 7 bytes

@ETHproductions Thanks, although I had already figured out after I shut my computer down.

Gaia, 7 bytes
e2÷ev+†

Explanation
e        Eval the input (push the list).
 2÷      Split it in half. The first half will be longer for an odd length.
   e     Dump the two halves on the stack.
    v    Reverse the second.
     +†  Element-wise addition. If the first half has an extra element, it is simply appended.

C (gcc), 55 41 bytes
f(_,l)int*_;{for(;l--;*_+++=l?_[l--]:0);}

Try it online!
Overwrites the first \$\left\lfloor\frac{l}{2}\right\rfloor\$ entries of the input array.
C (gcc), 46 bytes
f(_,l)int*_;{_=l>1?*_+=_[l-1],1+f(_+1,l-2):l;}

Try it online!
Additionally returns the length \$\left\lceil\frac{l}{2}\right\rceil\$ of the output.

Vyxal, 4 bytes
I÷Ṙ+

Try it Online!
I    # Halve the list
 ÷   # Push each half
  Ṙ  # Reverse the second half
   + # Add them together (vectorising)

5 bytes by taking the input as a string of characters with corresponding ascii values

4 bytes because @lyxal's being a sussy baka and not using flags

Pip, 14 12 bytes
YCHa;@y+Ry@1

-2 Thanks to DLosc!
How?
YCHa;@y+Ry@1  : One arg; list
   a          : First input
 CH           : Chop iterable into 2 pieces of roughly equal length
Y             : Yank value
         y    : The two halves
          @1  : Get item/slice at index 1; The second half
        R     : Reverse
       +      : Add with
      y       : The two halves
     @        : Get item at index 0; The first half

Try It Online!

@DLosc that was so obvious I don't know how I missed it lol, thanks for the spot!

@DLosc I see what you mean, it made sense when I wrote it, should be fixed now! :)

Fig, \$23\log_{256}(96)\approx\$ 18.932 bytes
J+t_HLxxt_HLx$xs_HLxtHL

Try it online!
\$-26\log_{256}(96)\approx21.401\$ thanks to Seggan
First time using Fig. Any golfing tips are welcome.
Explanation (outdated):
fw+[yfy$fy$fyx[yfy$fy$fy$x?h%1HLx[]yfy$fy$fyx]yW1
   [yfy$fy$fyx                                    First Mid
  +                                               Add
              [yfy$fy$fy$x                        Second Mid
fw                                                Concat
                          ?                       If
                           h%1HLx                 List length is odd,
                                 []yfy$fy$fyx     Mid
                                             ]yW1 Else Empty list

the entire if (?h%1HLx[]yfy$fy$fyx]yW1) can be replaced with s_HLxtHL (take half, drop half; will return empty list if even, middle item if odd). fw can be J

J+t_HLxxt_HLx$xs_HLxtHL works

Thunno 2, 7 5 bytes
2ẆẸr+

Attempt This Online!
2ẆẸr+ # implicit input
2Ẇ    # split list in half
  Ẹ   # push both halves to the stack
   r  # reverse top one
    + # vectorized addition
      # implicit output

R, 81 70 68 57 bytes
function(l)c((l+rev(l))[1:(w=sum(l|1)/2)],l[w+1][!!w%%1])

Try it online!
anonymous function; returns the result.

Mathematica, 88 bytes
(d=Array[s[[#]]+s[[-#]]&,x=⌊t=Length[s=#]/2⌋];If[IntegerQ@t,d,d~AppendTo~s[[x+1]]])&

Mathematica 57 Bytes
(#+Reverse@#)[[;;d-1]]&@Insert[#,0,d=⌈Length@#/2⌉+1]&

Inserts a zero at the midpoint, adds the list to its reverse and takes the appropriate length.

JavaScript (Node.js), 53 bytes
x=>x.splice(0,x.length/2).map(y=>y+x.pop()).concat(x)

Try it online!
Another suggestion:
JavaScript (Node.js), 43 bytes
f=x=>x+x?[x.pop()+(0|x.shift()),...f(x)]:[]

Try it online!

(0|x.shift()) => ~~x.shift()

JavaScript (ES6), 41 bytes
f=a=>1/a[1]?[a.shift()+a.pop(),...f(a)]:a

f=a=>1/a[1]?[a.shift()+a.pop(),...f(a)]:a

console.log(JSON.stringify(f([1,2,3,4,5,6,7,8])));
console.log(JSON.stringify(f([1,2,3,4,5,6,7])));

Japt, 12 bytes
å@o +Y*(Z<Ul

Try it online! with the -Q flag to view the formatted array.
Alternate solution, 14 bytes
o(½*Ul)c)íU mx

Try it online!

Zsh, 55 bytes
If the answer must be put to stdout, but output whitespace is flexible, 55 bytes:
for ((;++i<=#/2;))<<<$[$@[i]+$@[-i]]
<<<$@[#%2*(1+#/2)]

Try it online!

If the output must be stored in an array, 53 bytes: (We can't use this method in place of the above because of <<<...[--i].... The here-string forces a subshell, so the decremented value of i never makes it out.)
for n ($@[1,#/2])y+=($[$@[--i]+n])
y+=$@[#%2*(1+#/2)]

Try it online!
If the answer must be output in one line separated by spaces, then append <<<$y for a 6 byte penalty.

Zsh arrays are indexed from the start starting at 1, or from the end starting at -1. So what happens if you attempt to index at 0? Well, nothing! We take advantage of that here to only output the middle number based on a parity check:
$@[#%2*(1+#/2)]
   #      #       # parameter count
       (1+#/2)    # index of the middle element when count is odd
   #%2*(1+#/2)    # multiply by 0 if even, or 1 if odd
$@[           ]   # Index the parameter array

Factor, 35 bytes
[ halves reverse 0 pad-longest v+ ]

Try it online!
Explanation
It's a quotation (anonymous function) that takes a sequence from the data stack and leaves a sequence on the data stack. Assuming { 1 2 3 4 5 6 7 } is on the data stack when this quotation is called...

Snippet
Comment
Data stack (top on right)

halves
Split a sequence in half
{ 1 2 3 } { 4 5 6 7 }

reverse
Reverse a sequence
{ 1 2 3 } { 7 6 5 4 }

0 pad-longest
Pad the shorter of two sequences with 0s until it's the same length as the longer sequence
{ 1 2 3 0 } { 7 6 5 4 }

v+
Vector addition; element-wise addition between two sequences
{ 8 8 8 4 }

Go, 115 bytes
func(x[]int)(o[]int){s:=len(x)
for i:=range x[:s/2]{o=append(o,x[i]+x[s-i-1])}
if s%2>0{o=append(o,x[s/2])}
return}

Attempt This Online!
Generic with custom operator, 136 bytes
func f[T any](x[]T,O func(T,T)T)(o[]T){s:=len(x)
for i:=range x[:s/2]{o=append(o,O(x[i],x[s-i-1]))}
if s%2>0{o=append(o,x[s/2])}
return}

Attempt This Online!

C (gcc), 62 bytes 60 bytes
-2 bytes thanks to @ceilingcat
i;f(v,l)int*v;{for(i=0;i<l/2;++i)v[i]+=v[l+~i];return~l/-2;}

f is a function taking vector (v) and length (l) as arguments. It modifies the vector and returns the new length.
Try It Online!
How it works:
i;
f(v,l) int*v; // v is an integer pointer (or array), l is an integer
{
    for (i = 0; i < l / 2; ++i) // iterate through half the indices using i (if l is odd, the middle element won't be included)
        v[i] += v[l + ~i]; // add the value at the i'th index from the back to the i'th index from the front. ~i == -i - 1, so l + ~i == l + -i -1 = l - i - 1 (l - 1 is the first index from the back, and we subtract i for each index beyond the first)
    return ~l / -2; // return half the length rounded up (~l == -l - 1 => ~l / -2 == (-l - 1) / -2 => (l + 1) / 2
}

Welcome to Code Golf! Nice first answer.

Curry (PAKCS), 34 bytes
f(a:b++[c])=a+c:f b
f x@([]?[_])=x

Attempt This Online!
Based on the sample implementation in Haskell.

Julia 1.0, 69 68 bytes
!s=(~=length;~s%2>0&&insert!(s,(1+~s)÷2,0);(s+reverse(s))[1:~s÷2])

Try it online!
-1 byte thanks to MarcMush: replace ==1 with >0

-1 byte: >0 instead of ==1

BQN, 15 12 bytes
(⌊≠÷2˙)⊸↑⊢+⌽

Try it online!
-3 thanks to Marshall Lochbaum
Sum the list and its reverse, then take the first ⌊≠÷2˙ digits. ⌊≠÷2˙ the floor of the length divide 2. Floor is necessary because there is no integer division in BQN. ⊸ is used to bind the output of ⌊≠÷2˙ to the take operator ↑ on the left and also puts the output of (⊢+⌽) on the right. Better explanation here.

Welcome to Code Golf, and nice answer!

Thank you! I only wish my explanation was as concise...

I don't think this gives the correct output for lists with an odd number of elements.  The output of "1 2 3 4 5 6 7" should be "8 8 8 4", not just "8 8 8"...

Nibbles, 6.5 bytes
/`\~_!:\@0@+

Attempt This Online!
/   Fold
`\~  split into two parts
_     input (row from STDIN as a list of integers)
!    zip
:     join
\      reverse
@       the second part
0      0
@     the first part
+     with addition

Nekomata, 6 bytes
;ᶜç↔ᶻ+

Attempt This Online!
;ᶜç↔ᶻ+
;       Nondeterministically split the input into two parts
 ᶜç     Optionally prepend a zero to the second part
   ↔    Reverse the second part
    ᶻ+  Zip with addition

The + operator is automatically vectorized, but it does not check if the two operands have the same length. So here I use ᶻ (\zip) to make sure that the two parts are of equal length.

Wolfram Language (Mathematica), 35 bytes
Set[f[a_,b___,c_],a+c,f@b]
f@a___=a

Try it online!
Input [list...]. Returns a sequence.

Wolfram Language (Mathematica), 39 bytes
f@{a_,b___,c_}:={a+c,##&@@f@{b}}
f@a_=a

Try it online!
Input and output a list instead of a sequence.

Perl 5 -aE, 36 bytes
map{$F[$_]+=pop@F}0..$#F/2-1;say"@F"

Takes advantage of the autosplit flag and iterates through the first half (rounded down) of the resulting list, modifying it in-place.
Slightly ungolfed:
for (0 .. ($#F / 2) - 1) {
    $F[$_] += pop(@F);
}
say "@F";

Try it online!

sed -E, 60 bytes
s/^/</
:a
s/<(!*);(.*;)?(!*);$/\1\3,<\2/
ta
s/[<;]//g
s/,$//

Only works with zero and positive numbers.
Input is repeated exclamation marks separated by semicolons.
Output is repeated exclamation marks separated by commas.
Try it online!

Uiua, 12 bytes
⬚0+⇌⊃↘↙⌊÷2⧻.

Try it online!
⬚0+⇌⊃↘↙⌊÷2⧻.   input: a numeric vector
           ⌊÷2⧻     half of length, rounded down (let's call it k)
     ⊃↘↙     .   fork(drop, take): first k elements removed, first k elements
   ⇌               reverse the top
⬚0+                elementwise add, filling with zeros when lengths don't match

Python 3, 101 bytes
lambda l:[sum(x)for x in zip(l[:len(l)//2],l[int(len(l)/2+.5):][::-1])]+[[],[l[len(l)//2]]][len(l)%2]

Try it online!

Pyth, 18 17 13 bytes
V.Tc2Q aYsN;Y

My original approach was
WtQ aY+.)Q.(Q0;+Y

-1 byte thanks to Mr. Xcoder
-4 bytes thanks to FryAmTheEggman

Try using c2<list> to split a list in half. Another command that might be useful is .T.

17 bytes: WtQ aY+.)Q.(Q0;+Y

JavaScript, 75 71 bytes
a=>a.slice(0,n=a.length/2).map(b=>b+a[--z],z=n*2).concat(n%1?a[n|0]:[])

Try it online
Saved 2 bytes thanks to ETHproductions

Python 3, 70 bytes
lambda l:[l[i]+l[~i]for i in range(len(l)//2)]+len(l)%2*[l[len(l)//2]]

Try it online!

C# (.NET Core), 118 111 bytes
a=>a.Reverse().Zip(a,(c,d)=>c+d).Take(a.Length/2).Concat(a.Skip(a.Length/2).Take(a.Length%2))

Byte count also includes
using System.Linq;

Try it online!
As input please use numbers separated either with commas (,) or space.
Explanation:
a =>                                  // Take one input parameter (array)
a.Reverse()                           // Reverse it
.Zip(a, (c, d) => c + d)              // Take every corresponding member of reversed
                                      //    and original, and add them together
.Take(a.Length / 2)                   // Get first half of the collection
.Concat(                              // Add another collection
    a.Skip(a.Length / 2)              // Take input and leave out first half of it
    .Take(a.Length % 2)               // If length is odd, take first element (so the middle)
                                      //    otherwise create an empty collection
);

Can you save bytes by setting the length to a variable and switching to an explicit return?

@TheLethalCoder unfortunately it's longer

JavaScript (ES6), 46 43 bytes
f=(a,[b,...c]=a)=>c+c?[b+c.pop(),...f(c)]:a

f=(a,[b,...c]=a)=>c+c?[b+c.pop(),...f(c)]:a

console.log(f([1,2,3,4,5,6,7,8]).join(', ')) // 9, 9, 9, 9  ✓
console.log(f([1,2,3,4,5,6,7]).join(', '))   // 8, 8, 8, 4  ✓
.as-console-wrapper{max-height:100%!important}

Saved 3 bytes with inspiration from Asaf.

Nice. You could change '1/c[0]' to '[]+c' to save 2 bytes.

@Asaf Actually I think c+c works for the third byte.

MATL, 9 bytes
`6L&)swtn

Try it online!
How it works
Given an array [a b c ... x y z], let [a z] be called the "crust" subarray and [b c ... y z] the "core" subarray.
The code consists in a loop that removes the crust, computes its sum, and moves the core to the top of the stack, ready for the next iteration. The loop condition is the number of elements in the core subarray
`       % Do...while
  6L    %   Push [2 -1+1j]. As an index, this is interpreted as 2:end-1
  &)    %   2-output reference indexing: pushes a subarray with the indexed
        %   elements (core) and another with the ramaining elements (crust)
  s     %   Sum of (crust) subarray
  w     %   Swap. Moves the core subarray to the top
  t     %   Duplicate
  n     %   Number of elements.
        % End (implicit). Procced with next iteration if top of the stack is
        % nonzero; else exit
        % Display stack (implicit)

Perl, 42 38 chars

    sub f{@a=map{$+pop}splice@,0,@/2;@a,@}

sub f{(map{$_+pop}splice@_,0,@_/2),@_}

Try for example like so:
perl -e 'my @input=(1..9); sub f{(map{$_+pop}splice@_,0,@_/2),@_}  print join(",",f(@input));

Fixed an error that crept in due to my emotional and professional attachment to variables. Refuse to be outgolfed by JS :P

WendyScript, 72 bytes
<<f=>(l){<<r=[]<<b=l.size#i:0->b/2r+=l[i]+l[b-i-1]?b%2!=0r+=l[(b/2)]/>r}

f([1,2,3,4,5,6,7,8]) // => [9,9,9,9]
f([1,2,3,4,5,6,7]) // => [8,8,8,4]

Try it online!

C++17, 75 73 71 bytes
As unnamed lambda, accepting a container like vector or list, returns via modifying the input:
[](auto&L){for(auto a=L.begin(),b=L.end();a<--b;L.pop_back())*a+++=*b;}

Using the well known 'goes-to' operator <-- and the triple plus +++
Ungolfed and example:
#include<iostream>
#include<vector>

using namespace std;

auto f=
[](auto&L){
 for(
  auto a=L.begin(),b=L.end();
  a<--b;
  L.pop_back()
 )
 *a+++=*b;
}
;

void test(auto L) {
 for(auto x:L)cout << x << ", ";
 cout << endl;
 f(L);
 for(auto x:L)cout << x << ", ";
 cout << endl << endl;
}

int main() {
 vector<int> A = {1,2,3,4,5,6,7,8}, B = {1,2,3,4,5,6,7};
 test(A);
 test(B);
}

Java 8, 93 bytes
Double digits! This is a lambda that takes an int[] and returns an int[].
l->{int n=l.length,i=0;for(;i<n/2;)l[i]+=l[n-++i];return java.util.Arrays.copyOf(l,n/2+n%2);}

Ungolfed lambda
l -> {
    int n = l.length, i = 0;
    for (; i < n / 2; )
        l[i] += l[n - ++i];
    return java.util.Arrays.copyOf(l, n / 2 + n % 2);
}

Quite straightforward. It folds the second half in place onto the first half of the input and returns a copy of just the first half.
Surprisingly, the array copy in the return statement seems to be the cheapest way to handle the final element quirk for odd-length inputs.

Scala, 91 bytes
(s:Seq[Int])=>(s.take(s.size/2),s.reverse).zipped.map(_+_)++s.drop(s.size/2).take(s.size%2)

Mathematica, 52
(a=#;i=0;(i++;a[[i;;-i]]*=x)&/@a;(Tr@a+O@x^i)[[3]])&

PHP, 67 bytes
function($l){while($l)$o[]=array_shift($l)+array_pop($l);return$o;}

Try it online!

Perl 6, 28 bytes
{.[^*/2]Z+.[$_-1...$_/2,$_]}

Try it online!
Explanation:
{                          }   # Anonymous code block
 .[^*/2]                       # The first half of the list
        Z+                     # Zip added to
          .[$_-1...$_/2        # The other half of the list
                       ,$_]    # And zero for the middle element

APL (Dyalog Unicode), 21 bytesSBCS
-3 bytes thanks to @Adám.
(⌊2÷⍨≢)(↑{+⌿↑⍺⍵}∘⌽↓)⊢

Try it online!
Explanation:
(⌊2÷⍨≢)(↑{+⌿↑⍺⍵}∘⌽↓)⊢  ⍝ Monadic function train
(⌊2÷⍨≢)                  ⍝ Left portion:
     ≢                   ⍝ Take the length of the input...
  2÷⍨                    ⍝ Divide it by two...
 ⌊                       ⍝ And floor it. This gives our midpoint index. Call it "X"
                      ⊢  ⍝ Right portion: return the original input. Call it "Y"
       (↑{+⌿↑⍺⍵}∘⌽↓)   ⍝ Midddle portion: takes X and Y as arguments
        ↑           ↓    ⍝ Take and drop Y by X. Essentially splits Y in half
                         ⍝ Presents the two halves to the next function
                 ∘⌽     ⍝ Reverse the second half
         {+⌿↑⍺⍵}       ⍝ Final function, takes first half and reversed second half
              ⍺⍵        ⍝ Construct a nested list of first and second halves...
             ↑          ⍝ ...and "mix" them into a matrix. Has the nice property that
                        ⍝ it will pad the first half with a zero if needed.
          +⌿           ⍝ Sum the matrix along the columns, return resulting vector

Dyalog Extended, 18 bytes: +⌿(⌊2÷⍨≢)(↑↑⍮⌽⍤↓)⊢

Training, 21 bytes: (⌊2÷⍨≢)(↑{+⌿↑⍺⍵}∘⌽↓)⊢`

C# (Visual C# Interactive Compiler), 71 bytes
x=>{int i=0,l=x.Length;for(;i<l/2;)x[i]+=x[l-++i];return x[..(l-l/2)];}

Try it online!
-2 bytes thanks to @ceilingcat!

J, 22 bytes
({.+/@,:|.@}.)~>.@-:@#

Try it online!

Ruby, 34 bytes
f=->l{l[1]?[l.shift+l.pop]+f[l]:l}

Try it online!

Common Lisp, 106 bytes
(lambda(l)(setf(values a b)(floor(length l)2))`(,@(#1=subseq(mapcar'+ l(reverse l))0 a),@(#1#l a(+ a b))))

Try it online!

Java (JDK), 102 95 bytes
i->{int l=i.length,o=l/2+l%2,r[]=new int[o];for(;o-->0;)r[o]=i[o]+(o<l+~o?i[l+~o]:0);return r;}

Try it online!
-7 Thanks to Kevin Cruijssen

l-j-1 can be simplified to l+~j. Also, you don't need the j if you loop in reverse order and reuse the o: 95 bytes.

There we go! Credited without alt-tabbing :PP

Suggest l-l/2 instead of l/2+l%2

Scala, 65 bytes
l=>l take(l.size+1)/2 zipAll(l.reverse take l.size/2,0,0)map(_+_)

Try it in Scastie!

k9, 12 bytes
+/++(;|)@'2^

Version 2021.09.20.
Cut in two, reverse second list, pad with zeroes, add.

jq, 58 bytes
[reverse[:length/2],.[:length/2|floor]]|transpose|map(add)

Try it online!

Thunno, \$ 10 \log_{256}(96) \approx \$ 8.23 bytes
2APAur0Tz+

Attempt This Online!
Sort-of port of Adnan's 05AB1E answer
Explanation:
2APAur0Tz+  # Implicit input
2AP         # Split in half
   Au       # Dump onto stack
     r      # Reverse top item
      0T    # Append a 0
        z+  # Zipped addition

Thunno's normal addition (+) will provide a nested list of each element of the first list plus each element of the second list.
Thunno's zipped addition (z+) zips the two lists together, discarding items if they are not of equal length.
So, we must append a 0 to the top list (since it will be the shorter one if the input contained an odd number of items) and then use zipped addition.

Japt, 10 bytes
There's gotta be a 9 here, somewhere.
òUÊ/2 oÔyx

Try it
òUÊ/2 oÔyx     :Implicit input of array U
ò              :Partitions of length
 UÊ            :  Length of U
   /2          :  Divided by 2
      o        :Modify last element
       Ô       :  Reverse
        y      :Transpose
         x     :Reduce each by addition

Also 10 bytes
íUÔoUÊz¹mx

Try it
íUÔoUÊz¹mx     :Implicit input of array U
í              :Interleave with
 UÔ            :  Reverse U (mutates the original)
   o           :  Pop this many items (also mutates the original)
    UÊ         :    Length of U
      z        :    Floor divided by 2
       ¹       :End interleave
        m      :Map
         x     :  Reduce by addition

JavaScript (Node.js), 41 bytes
f=([b,...c])=>1/b?[b+~~c.pop(),...f(c)]:c

Try it online!
So many ways to reach 41

JavaScript (Node.js), 62 bytes
a=>a.map((e,i)=>e+a[c=(b=a.length)-i-1]*(c!=i)).slice(0,++b/2)

Try it online!

Replace -i-1 with +~i to save a byte.

And also c!=i with c>i for a byte.

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

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


text:
Hello, World! with semi-common characters
As some of you may know, to get a language onto Dennis's wonderful Try It Online!, a Hello, World! program is required. Recently, Dennis pushed up a way to load these programs from the website. Here is a JSON pastebin of the characters used in those programs, by frequency, as of July 27, 2017.
Some of those characters need some love, so your challenge is to output Hello, World! (preferably in a language involved in this process), using only the characters specified below. These characters are all of the characters used between 10 and 99 (inclusive) times, along with the two most common characters, 0 and , because I'm feeling nice.
0 $&*?ABCDEFGIJKLNPQRSTUXYZ\`gjkqwxyz{}÷≤≥=║_

Your usage of the character should be based on its appearance in a normal program, not based on its code point or byte value.
You must use at least one character from that set, so 0-length programs are invalid.
This is code-golf, so shortest answer in bytes wins.
JSFiddle to check if your answer is valid

may I output a space in the next line?

@dzaima If you cannot output it without the space, do it. If getting rid of the space just uses more bytes, get rid of the space

Is there a community consensus (or specific dis/allowance here) on non-printing characters making their way into output (STDOUT)? Not sure I've seen it come up before (and it would be easily overlooked) but it changes my strategy dramatically here...

@brhfl not that I know of - the only norm is that trailing newlines are usually allowed, you could ask in chat

SOGL V0.12, 89 75 68 bytes
z{}xxxx≥x≥x≥xXUqXxq≤qq≤q *R_IIRq  q *R_I0II*IRqxXq≤qxqxq CR_0II÷Rq0*

Try it Here!
Note: whenever q or output is referred to here, it doesn't pop as popping output (any of oOpP) are unavailable or output a prepending newline.
Explanation (outdated, what's changed is that the "H" is printed using the alphabets letters):
 $             push "$"
  R_           convert to an array of ordinals, then push all the contents to the stack
    0II        push 0+1+1 = 2
       *       multiply by that
        R      convert to character
         q     output
          z    push the lowercase alphabet
           {}  iterate over it, pushing each char, and do nothing. Stack: ["H","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
stack manipulation:
 xxxx ["H","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r"]
 ≥    ["r","H","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q"]
 x    ["r","H","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o"]
 ≥    ["o","r","H","a","b","c","d","e","f","g","h","i","j","k","l","m","n"]
 x    ["o","r","H","a","b","c","d","e","f","g","h","i","j","k","l"]
 ≥    ["l","o","r","H","a","b","c","d","e","f","g","h","i","j","k"]
 xxx  ["l","o","r","H","a","b","c","d","e"]
 q    output the "e"
 ≤    ["o","r","H","a","b","c","d","e","l"]
 qq   output the "l" twice
 ≤    ["r","H","a","b","c","d","e","l","o"]
 q    output the "o"

*                       push "*",
 R_                     convert to an array of ordinals, then push all to stack
   II                   increase by 2
     R                  convert back to character
      q                 output
         q              push a space, then output
           *            push "*"
            R_          convert to an array of ordinals, then push all to stack
              I         increase that
               0II      push 0+1+1 = 2
                  *     multiply
                   I    increase
                    Rq  output as character
stack manipulation: (starting stack: ["r","H","a","b","c","d","e","l","o",","," ","W"])
 x  ["r","H","a","b","c","d","e","l","o",","]
 X  ["r","H","a","b","c","d","e","l","o"]
 q  output the "o"
 ≤  ["H","a","b","c","d","e","l","o","r"]
 q  output the "r"
 x  ["H","a","b","c","d","e","l"]
 q  output the "l"
 x  ["H","a","b","c","d"]
 q  output the "d"

C            push "C"
 R_          convert to ordinal as before
   0II÷      floor divide by 2
       Rq    output as character
         0*  multiply by 0 so nothing extra would be outputted

Fun fact: all of the characters from the allowed characters are in SOGLs codepage :D

So... You have a good stable job as a professional developer right? Because dang, this is a cool language... Also nice JS interpreter, you finished it last night :)? Can you start posting documentation for some of the language? Or private-chat message me the location of such documentation? SOGL kills it.

@MagicOctopusUrn 1) no lol I'm 15 2) I personally don't like it as the way it's made is the most bodgy thing I've made 3) The JS interpreter has been there for a while 4) the latest docs on SOGL (if you can call them that) are here, trough some stuff (like the palenChars.txt) are more updated here

Congrats on reducing byte count again! I honestly don't think I can get mine any lower!!

Perl 5, 76 bytes
}{${$_=$`x?B?}{?\w$?}{$_=qq{Lg\LLL$&= w$&RLD=}&qq=y}\LLL$&L _$&RLDA=}=$_=\*G

This uses a feature that has been deprecated, but works locally in my terminal (which is version 5.18.2 as noted). In older versions of Perl ?\w? is a synonym for /\w/ which gives me access to regexp matching and I have enough chars for $& (last match) and $` (text preceding last match). I need these to be able to get the O. I generate this be creating a glob reference ($_=\*G which, cast to a scalar, is something like GLOB(0x7ffb728028d0)). Once that's in $_, ?B? will match the B and $` will contain GLO, I can then match against \w$ which would store O in $& which is inserted into the strings that I'm running stringwise-AND to create the rest of the text, the body of the string is lowercased using \L.
Try it online! - uses /\w/ in place of ?\w? as the version of Perl on TIO is too new.

Perl 5, 65 bytes
This is a bit more cheaty as it relies on the filename on TIO (which is .code.tio), so I don't really think this is competing, but I was happy with the result!
}{${$_=$0}{?\w$?}{$_=qq{Lg\LLL$&= w$&RLD=}&qq=y}\LLL$&L _$&RLDA=}

Try it online!

I didn't say anything about the content of flags, so -p is fine. Good job, this is what I was hoping for when I asked this :)

how... what... the...

@StepHen I'm glad to have obliged! I did honestly really enjoy this. I'm glad you aren't penalising the flag too, I'll update my post. Thanks!

@Okx I'm glad to have had that effect!

You sure you don't need to add 15 bytes <3?

@MagicOctopusUrn I'm afraid not... but looks like you've managed to get very close anyway! Good going!

Unary, 7*10182 bytes
Unary is Brainfuck converted to binary converted to unary using 0 as the counter. Essentially, it condenses a Brainfuck program into a number and the output is that number of 0s. They are usually very large programs.
I won't paste the program here because I don't know how much text SE allows but I bet it's less than this. Instead, I'll paste the precise number of zeroes in this answer:
708184005756841022918598670049178934705323143517361395031673227349803938380119378597780037353721967636097362645175347036417214959141923667629285233360306016978751166690464736541968556

As this is a fairly cheap answer, guaranteed to not be the shortest, and I simply copied it, I'm making this a wiki post.

"I don't know how much text SE allows" at least it's not 7*10¹⁸² which is waaaaaay larger than 65536.

05AB1E, 137 106 95 bytes
X00X00DXX00DXX00XX0X0X00D0XXXX0X00X00XXX00XXX0XXXXXX00XXXXX0XXXX00D0X000DD00XXJC000gDD0000g***B

Try it online!
-31 thanks to @Adnan for pointing out I could use base 108.
-?? thanks to @Riley for pointing out some things wrong.

Old version (different method):
05AB1E, 211 186 166 bytes
0g00g000000000gUX000000gXX00000g000g00g000gD0000g0 000g00000gX00000gX00000g0 00000g00000000g0000000g00g00000000gD000000gX0000000g0g00000gUXJX00000000000000000g000g**B

Try it online!

Haha! AND HERE I THOUGHT ESOLANGS STOOD NO PLAUSIBLE CHANCE!

First we get 255 stored in X:
00g               # Push 2 (length of 00).
   00000g         # Push 5 (length of 00000).
         00000g   # Push 5.
               JU # Join to 255 and store in X.

Then, using the same length trick we push: 1296995323340359595058728869715
0g00g000000000g000000g000000000g000000000g00000g000g00g000g000g0000g0 000g00000g000000000g00000g000000000g00000g0 00000g00000000g0000000g00g00000000g00000000g000000g000000000g0000000g0g00000gJ

Where we just use 0<space> instead of the length trick for the zeros.
Then, finally, we push the 255 we stored and convert from 255 to base 10:
X  # Push stored 255.
 B # Convert to base 255.

Still golfing using the other allowed chars, and duplication, it will be a minute.

77 bytes

Moorhens (v2.0), 3423 983 923 866 749 716 bytes
I think this can be golfed a bit, Moorhens is not an easy language to work with.
xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU KA xU xU xU xU xU xU xU xU xU xU xU xU KA AA xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU KA xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU KA xU xU xU xU xU xU xU KA KA xU xU xU AA AA AA AA AA KA xU AA KA xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU KA xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU xU KA xU xU xU KA XI XI XI XI XI XI KA XI XI XI XI XI XI XI XI AA AA AA AA AA AA AA AA AA AA AA AA

Explanation
Moorhens is a language based of of dictionary words.  Each word corresponds to an operation based on its hash.  The five operations used here are xU, ER, XI, KA, and AA

xU increments the TOS
ER puts a new zero on the stack.
XI decrements the TOS
KA duplicates the TOS
AA rolls the TOS to the bottom

We push each letter with sucessive applications of these operations.

'The two operations' - I'm not well versed in esolangs but surely those are five operations?

@boboquack fixed

link to language?

I think this is it.  https://github.com/Wheatwizard/Moorhen

Beatnik, 148 bytes
K QQQQQQQG ZD XA K QQJA KD ZD XA K KG KD ZD ZD ZD XA XA K B KD ZD XA K QQQQF ZD ZD XA K QQQD XA K A Z KD XA ZD XA K B KD XA ZD XA K J Z XA K QQQB XA

Try it online!
Explanation
Beatnik bases the instruction executed based on the scrabble score of the word. Here's a shortened explanation:
Code         Scrabble Score   Explanation

K            5                push the scrabble score of the next word
QQQQQQQG     72               72 ['H']
ZD           12               pop a value; push it back twice
XA           9                pop a value; print its ASCII character
KD           7                pop two values; push their sum
Z            10               pop two values; push their difference

Glypho, 480 bytes
AABCABABABBAABABAABCABBAABABABBCABBAABABABABABABABBAABBAABABABABABABABBAABBAAABCABBAABABAABCAABCABBAABABABBCABABABBAABBAABABAABCAABCABBAAABCABBAABABABBAABBAABABAABCABCAABABABABABBAABBAABBAABABAABCABAAABABAABAABBAABCAABABABBAABBAAABCAABCABBAABABABBCABABABBCABABABBAABAAABABAABAABABABBAABABABBAABABABAAABABAABAABBAABABABBAAABCABBAABABAABCABCAABABABABABBAABBAABBAABABAABCABCAABAAABABAABAABBAABABABBCAABCABBAAABCAABCABBAAABCABBAABABABBAABABABBCABABABBAABAAABABABCAABBAAABAABACABBBABCB

Try it online!

Double JavaScript, 318 bytes
I'm not sure if that's allowed, I couldn't do it using the JavaScript interpreter once. It's similar to use eval() but instead I'm using the interpreter twice: (Try it in the console to get the result printed back)
`\`\\x${0xA*0xA&0xC}${0xA&0xC}\\x${0xA*0xF&0xF}${0xB*0xF&0xF}\\x${0xA*0xF&0xF}C\\x${0xA*0xF&0xF}C\\x${0xA*0xF&0xF}F\\x${0xE*0xF&0xF}C\\x${0xE*0xF&0xF}${0}\\x${0xB*0xF&0xF}${0xB*0xB*0xF&0xF}\\x${0xA*0xF&0xF}F\\x${0xB*0xB*0xF&0xF}${0xE*0xF&0xF}\\x${0xA*0xF&0xF}C\\x${0xA*0xF&0xF}${0xA*0xA&0xC}\\x${0xE*0xF&0xF}${0**0}\``

Try it online!
Evaluates to:
`\x48\x65\x6C\x6C\x6F\x2C\x20\x57\x6F\x72\x6C\x64\x21`

Try it online!
Which evaluates to Hello, World!

Headsecks, 78 bytes
yyzyzzxNxNzx{yyy{y{y{yzzz_{_zzyy\zxxxxxx\zzy\\zz\zx\{{\{{\zzz\xxx\{{\{{y\zzzx\

Smallf**k, 266 bytes:
zJ$NJ`ZZx*gQYQQ{zqyKKUkUR?AS`zB`JB&UCKCIxQ_G0*000FzzJ&?YwkC\qqgZ`xYQyC}DgY_&_S}KPZ\&?SGAE&{Gw_w} GAgA{qT{gC&`qI?xwCNQwgR}?{*QEwQUj&BT&jR__IJJIqUqAPF0yICXESL?AYR QIAFU& yYwE&$\Njj B0T*F j$?kCzQk*}U}UgI$}Ew_yDL`qYI*E_G}SCjXDFNJKGNIGyIwA\BzLP`*zCILGCNqyYZyq? GwN{q{gKSj

Actually, the characters are kinda irrelevant. It's just a matter of whether or not each character has an even codepoint or an odd codepoint. Thus, I've made an effort to use every character available (except the multibyte characters) (though since it was randomised, I didn't make an effort to guarantee that).

@totallyhuman You're right; I will change that. I'll just remove the multibyte characters. It doesn't have a codepage really; it just needs to be stored as 1s and 0s (1 for odd ord and 0 for even ord) so you could say this is 33.25 bytes xD

Your usage of the character should be based on its appearance in a normal program, not based on its code point or byte value.

@KSmarts I will ask the OP about that.

@KSmarts What that means is that if a language has a different codepage and for example '5' occupies the codepoint of regular 'A', you're not allowed to use '5'.

@KSmarts that just means that if you have a non-standard codepage, these characters move around on that codepage. You can still use their codepoint as part of your program.

Pyke, 133 144 bytes
? BXKKKKRKRKRK\CkJ00q}}}XEjTX}G_E\E\L\LkJjRT}}XRGREkJjR 00q}R? B_RE\ \wkJjRT}}XRGRE\R\L\DkJjRZ0q}}R? B_RER? JR? KREZjZ0q}AREkJjRT}}RG_RE00q}}RAA

Try it online!
A horrible mess of code that can almost certainly be shortened... Constructs it one character at a time.
? BXKKKKRKRKRK\CkJ - ".C" - A string that when evaled, gets the character at the point
00q}}}XEj - Construct 64 by doing `((0==0)*2*2*2)**2` and then eval, getting the "@" character and store it in `j`
TX}G_E - Get "h" using `@` by looking it up in the alphabet
\E\L\LkJ - "hELL"
jRT}}XRGREkJ - "hELLo"
jR 00q}R? B_RE  - ","
\ \wkJ - "hELLo, w"
jRT}}XRGRE\R\L\DkJ - "hELLo, woRLD"
jRZ0q}}R? B_RER? JR? KREZjZ0q}AREkJ - "hELLo, woRLD!"
jRT}}RG_RE00q}}RAA - "Hello, World!"

Vyxal, 33 bytes
`gDKKN`\*kP*JkP*` w`J`NQKCZ`kP*JN

Try it Online!
As I've golfed this, it's become a lot more straightforward. For reference, the original looked something like this.
For convenience, the string is constructed swapcase'd, then fixed at the end.
This program makes heavy use of kP* - * in this context is ring translate, and kP printable ASCII, which is arranged a bit weirdly.
       \*kP*                      # The character `+`, made by ring translating `*`
`gDKKN`     J                     # Append that to `gDKKN`
             kP*                  # Ring translate again, producing `hELLO,`
                ` w`J             # Append ` w`
                     `NQKCZ`kP*   # The string `NQKCD` ring translated to `ORLD!`
                                  # Don't ask why Z wraps to `!`
                               JN # Append that and swap the case.

dc, 164 162 bytes
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzS zzS?zzzzzzzzzzzzS$zzzzzzzzzzzzzzzzzzzzzzzzzzzzzPzzzzzzzzzzzzzzzzSwzzzzzzzzzzzzzzzPzzzzzzzzSLzPzPzzzzPL$PL PLwPzPzzzzPLLPAI*PL?P

Try it online!
There's likely a better/more interesting approach. I tried using the ASCII+256 trick that dc has, but that outputs additional characters as well (even if they're non-printing), and once I got to 'o', the wonderfully prime 111, I ran into trouble even getting a value of 111+(multiple of 256) that factored cleanly. So here's a fairly straightforward (albeit golfed where possible) solution:
In dc, z is a command that pushes the stack depth onto the stack. That means we can use it as an increment. This is how I create most of my ASCII values for this challenge (printed with P), which I push onto named stacks with S and pop back onto the main stack with L.
dc lets you use the hex values A-F even when the input radix is decimal (default). Luckily, our first letter, 72, is a multiple of 12, so I save a byte or two here by multiplying 6*12 and printing immediately (zzzzzzzC*P). My 164-byte version used multiplication early on to get 72 ('H'), which was mildly clever but a holdover from an earlier attempt, and a waste of bytes. Now, I start by incrementing and saving the space, the exclamation point, and the comma, which are out of order, and therefore can't be printed yet. Next, I come to the 'H', which I print immediately, before I get to 'W', which I must save for later.
I simply print when I hit the 'e', then I increment up to 'l'. I print two of those and save one. When I make it to 'o', I first thought I'd have to save one of those for later, but everything is kind of in order at this point. I print an 'o', retrieve my comma, space, and 'W' from earlier, and now I'm right back to 'o'. I print this, and increment a few up to the highest necessary value, 'r' (114), which I print before loading and printing the 'l' I tucked away earlier.
Almost done! 'd' is ASCII value 100, which is easily made by multiplying 10*10 (fewer bytes than having stored it earlier and loading it now). Hex value A is 10, as is our input radix which we can retrieve with the command I. Multiply those, print, and then load and print our exclamation point from earlier. Hello, World!

Deadfish~
w

Honestly, the other answers are way more impressive.


text:
How many words are there?
English is such an inefficient language. We've got enormous words when
there are plenty of two or three letter words we never used! As
computer scientists, every keystroke matters. We need to be more
efficient. Just think of how many words we could have had! In fact,
don't think about it, tell me.
Given a string (or list) of letters, I want you to output how many
words we could make using those letters. You must use every letter in the string exactly one time.
Words can't just be any old string of letters though, how would you
say "yffghtjrufhr"? To be a word, it has to satisfy the following
conditions:

It must contain at least one vowel ('y' is always a vowel).
There must be no more than 2 vowels in a row.
There must be no more than 3 consonants in row.
The combinations "ch", "sh", and "th" count as one consonant.
"s" counts as neither a consonant nor vowel ("length" is just as
valid as "lengths").

For example:
Input    -> Output
a        -> 1       (a)
b        -> 0
ab       -> 2       (ab, ba)
abbbb    -> 3       (babbb, bbabb, bbbab)
abbbbbbb -> 0
essss    -> 5       (essss, sesss, ssess, ssses, sssse)
abbbth   -> 46      (thabbb, thbabb, thbbab, bathbb, ...)

Obviously, since this challenge is all about character efficiency, I
think a code-golf challenge is in order. Standard rules apply!
(For clarification, an 's' breaks any streaks of vowels or consonants. The word "abbbsbbb" is ok, since there are no more than 3 consonants in a row".)

A bit late now that it's submitted, but would this question have been better as a "is it a word"-style question instead of "count all words"?

You could probably post each one separately (as long as they aren't dupes)

3 consonants in a row surely you mean 2...? :P Nice challenge.

I actually found 46 words for the last test case. Maybe I misunderstand some of the rules, so please tell me which of these words are not allowed.

@ThePirateBay You are right, thanks for bringing that up. When writing that test it completely slipped my mind that the 't' and 'h' could be separated. I just used combinatorics to calculate, and forgot that 'th' wasn't just one letter...

Augh this would be so elegant in Perl if only it had a permutation function built in. :(

Python 3, 166 Bytes
import itertools as i,re;print(len([w for w in[re.sub('[cst]h','b',''.join(x))for x in set(i.permutations(input()))]if not re.search('[aeiouy]{3}|[^aeiouys]{4}',w)]))

Takes a string from input(). The string is passed to itertool's (built-in library) permutations function, in this case taking a string and returning tuples of unique combinations when wrapped in set(). ''.join() turns the tuples into strings again. Combinations 'th', 'ch', and 'sh' are replaced with an arbitrary consonant, 'b' using re's (regular expression, built-in library) sub function. Words (variable 'w' in the list comprehension) are are then filtered based on if they contain 4 or more consonants, or 3 or more vowels using re's search.

JavaScript, 275 bytes
a=>(a.match(/[^aeiouys]/g)||[])[L='length']<a[L]*.85|0&&[...Array(1<<(n=(a=[...a])[L])*--n/2)].map((_,b)=>a.slice().sort(_=>(b/=2)*2&1?1:-1).join``).filter((a,b,c)=>c.indexOf(a)==b&&/[aeiouy]/[t='test'](d=a.replace(/[cst]h/,1))&!/[aeiouy]{3}/[t](d)&!/[^aeiouys]{4}/[t](d))[L]

Try it online


text:
Write a semi-compact FizzBuzz that can scale handle to "unlimited" if cases
I saw Tom Scott's video on FizzBuzz https://www.youtube.com/watch?v=QPZ0pIK_wsc
so I felt to write my own more "complex" version,this is what I came up with, its very flexibly and easy to scale, and its easy to add more if cases that can trigger functions.
"The challenge": Write a semi-compact "complex FizzBuzz" that can scale handle to "unlimited" if cases, ex. if multiple of 3 do A if multiple of 5 do B of multiple of 3 and 5 do C, if multiple of 3,5,7 and 11 do D  etc.
Code(C# console application):
// FizzBuzz
// Patrik Fröher
// 2017-07-31
using System;
using System.Collections.Generic;

namespace fizzBuzz
{
    class Program
    {
        static string isM(int i, int m)
        {
            if (i % m == 0) { return ("1"); }
            return "0";
        }

        static void Main(string[] args)
        {
            List<string> tmp = new List<string>();
            bool loop = true;
            int i = 1;
            string m3;
            string s3 = "Fizz";
            string m5;
            string s5 = "Buzz";
            string m7;
            string s7 = "Fuzz";
            string m11;
            string s11 = "Biff";
            string m13;
            string s13 = "Buff";
            string mm;

            while (loop)
            {
                m3 = isM(i, 3);
                m5 = isM(i, 5);
                m7 = isM(i, 7);
                m11 = isM(i, 11);
                m13 = isM(i, 13);
                mm = (m3 + m5 + m7 + m11 + m13);

                switch (mm)
                {
                    case "00000": tmp.Add(i.ToString()); break;
                    case "10000": tmp.Add(s3); break;
                    case "01000": tmp.Add(s5); break;
                    case "11000": tmp.Add(s3 + s5); break;
                    case "00100": tmp.Add(s7); break;
                    case "00010": tmp.Add(s11); break;
                    case "00110": tmp.Add(s7 + s11); break;
                    case "00001": tmp.Add(s13); break;
                    case "11111": tmp.Add("Patan77.com"); loop = false; break;
                }
                i++;
            }
            Console.SetBufferSize(Console.BufferWidth, (tmp.Count + 1));
            tmp.ForEach(Console.WriteLine);
        }
    }
}

Hiya! Questions on this site are usually a challenge - this reads like an answer. If you would like someone to look over your code, you might try CodeReview.

well I just posted my solution to the "complex FizzBuzz" challenge,  with the hope that others might post theirs solutions to "complex FizzBuzz"

Try specifying a win condition and clarifying that the posted code is a sample. I'm assuming you want shortest code to win? Also, what do you mean by "handling unlimited if cases"? Is there a specific set of cases for us to test, or should we specify where to expand on conditions in our answer, and can we just have no cases but say it can be expanded on?

@PatrikFröhler In your example you only ever append a string, is your hope for this to be able to do other tasks?  Like if it's divisible by 10, print its value mod 4, or something in this same vein?

Here is one way: #include<map> #include<iostream> using namespace std;using rmap=map<int,string,greater<int>>;int main(int c,char*v[]){rmap r;string y;int i,f,x,n=c<2?100:atoi(v[1]);while(cin>>x>>y)r.insert(make_pair(x,y));for(i=1;f=0,i<n;i++){for(rmap::value_type&z:r)if(0==i%z.first){f=1;cout<<z.second<<endl;break;}!f&&cout<<i<<endl;}}
When you run it you supply the rules in order of importance on stdin so for fizzbuzz you would give it 3 fizz 5 buzz 15 fizzbuzz.  It isn't particularly golfed well but I can't make an answer anyway so it doesn't matter.