text:
Find the longest snake on a grid
Background
A snake is a path over the cells of a square grid, such that it doesn't touch itself on a side of a unit square. Touching at a corner is allowed.
An example snake:
##.#.
.#.##
##..#
#.###
###..

Some example non-snakes:
###.#
#.#.#
#####
.#...
.####

###
.#.

##
##

Challenge
Given an empty grid with the two endpoints of a snake marked on it, find the longest possible snake that fits on the grid. If there are multiple answers having the same length, you may choose to output one or all of them.
The input can be given as a character matrix (or equivalent) with two endpoints marked on it, or the dimensions (width, height) and the coordinates of the endpoints. You may choose to output the grid containing the snake or a list of coordinates of cells occupied by the snake (or equivalent).
Standard code-golf rules apply. The shortest code in bytes wins.
Example I/O
Each I/O example is given as a character matrix, # being the part of the snake.
Input:
..#...#...
Output:
..#####...

Input: (corner case)
......
......
..##..
......
......
......
Output: same as input (no way to get longer without violating no-touch condition)

Input:
..#.#
.....
.....
.....
Output:
###.#
#...#
#...#
#####

Input:
#....
.....
.....
.....
....#
Output:
#####
....#
#####
#....
#####

I feel like shortest code here would be to generate all the possible solutions and then just pick one with longest snake

Can we input the endpoint positions as x+w*y (that is, their positions in row-major order)?

@mypronounismonicareinstate No.

Can the input endpoints be marked in different characters?

Python 3.8 (pre-release), 207 194 181 bytes
-7 bytes thanks to @ovs
Input
The width \$ w \$, the height \$ h \$, the starting point \$ s \$, and the ending point \$ e \$. \$ s \$ and \$ e \$ are complex numbers which represent the coordinates of the endpoints.
Output
A list of points, in the form of complex numbers.

C={1,-1,1j,-1j}
def f(w,h,s,e):P=[[s]];exec("P=[j+[t+(t==e==(A:=j+[t]))]for j in P for k in C if w>(t:=j[-1]+k).real>-1<t.imag<h>0<all({t+l}-{*j}for l in{0}|C-{-k})];"*w*h);return A

Try it online!
Explanation
We use a breadth-first search to search for all possible snakes, starting at \$ s \$, making sure that the next tile is not adjacent to any previous tile, and that we do not go past the boundary. After each iteration, we check for all paths whose last element is \$ e \$, meaning that we have found a complete path from \$ s \$ to \$ e \$. Instead of storing all complete paths and returning the one with maximum length, we can simply return the last path found, since breadth-first search already searches for paths by length.

-7 by replacing the inner for-loop with [j[-1]==e!=(A:=j)for j in P].

@ovs Thanks for the improvement :)

R, 275 272 251 229 206 197 bytes
f=function(p,m){a=p+cbind(-1:0,1:0,0:-1,0:1)
v=m[a<-t(a[,!colSums(!a|a>dim(m))])]
t=sum(!!v)
m[t(p)]=2
`if`(t<3&any(v==1),m,if(t<2)(s<-lapply(split(a,seq(v))[!v],f,m))[[which.max(sapply(s,sum))]])}

Try it online!
Edits 1-4: -69 bytes by using increasingly-arcane golfing obfuscations
Edit 5: -9 more bytes by removing useless explicit return of NULL for 'touching' cases, and instead just falling-off the end of the function
Recursive function:

find adjacent squares
count touching squares
mark position (differently to finish point)
if touching < 3 and we're touching the finish: return the matrix
else if touching > 1 (it's either a loop or an illegal position): return NULL
otherwise (there should always be at least one adjacent empty square left)

call self recursively with each adjacent empty square
to get snakes from this position
return the longest snake

Code before golfing:
longest_snake=function(pos,matrix){

    # find adjacent squares
    d=dim(matrix)
    adjacent_squares=lapply(list(-1:0,1:0,0:-1,0:1),function(p){n=pos+p;if(all(n>0 & n<=d)){n}})
    adjacent_squares=do.call(rbind,adjacent_squares)

    # count touching squares
    adjacent_vals=matrix[adjacent_squares]
    touching=sum(!!adjacent_vals)

    # mark current position (differently to end, which is 1)
    matrix[pos]=2

    # if touching<3 & pos is touching finish => return matrix
    if((touching<3)&&any(adjacent_vals==1)){ return( matrix ) }

    # else if touching>1 then its either an illegal position or a loop
    else if(touching>1){ return( NULL ) }

    else { # there should always be at least one adjacent empty square

        # now consider each of the adjacent empty squares
        new_pos=lapply(which(adjacent_vals==0),function(i) adjacent_squares[i,,drop=F])

        # get the longest snake from each of them
        snakes_from_here=lapply(new_pos,longest_snake,matrix)

        # and return the longest of these
        longest=which.max(sapply(snakes_from_here,sum))
        return(snakes_from_here[[longest]])
    }
}

R, 178 169 164 161 bytes
f=function(s,e,w,h,l=length,`/`=c,`*`=`%in%`,k=s[1]-1/-1i/-1/1i)if(!any(s[-2]*k))`if`(e*k,s/e,{for(j in k[Re(k)*1:w&Im(k)*1:h])if(l(F)<l(n<-f(j/s,e,w,h)))F=n;F})

Try it online!
This works with complex numbers, similarly to @dingledooper's answer. Inputs are 1-indexed coordinates of start and end points, as well as width and height of the grid. Output is a vector of points which form the snake.
Explanation
f = function(s, e, w, h) # start, end, width, height
{ # Select points to try at next iteration as neighbors of the snake head cell:
  k = s[1] + c(-1,1i,1,-1i)
  # To avoid touches, only proceed if none of k points are already in snake:
  if(!any(s[-2] %in% k)) #s[2] is an exception - this is where we came from
    `if`(e %in% k, # If the neighbors include the endpoint, then...
      c(s,e)       # The loop is closed, add the endpoint to snake and return
      {# Loop through k, filtered so that all points fit in 1:w by 1:h grid:
        for(j in k[Re(k) %in% 1:w & Im(k) %in% 1:h])
        { # Prepend j to snake, and construct it further by recursive call:
          n <- f(c(j, s), e, w, h)
          if(length(F) < length(n))
            F = n # Select the longest snake that we encountered
        }
        F # Return the longest snake
      }
    )
}

You need to check for touches before checking you've reached the endpoint: otherwise, if they both happen at once, you'll accidentally register an 'illegal' snake like this

...but, otherwise, the complex number-based indexing is very nice and I'm jealous I didn't think of it myself!

Well, technically the Python answer posted the same technique before me! Anyway, thanks for pointing the mistake, it looks like a direct swap of the order of conditions fixes it.

Wow - /=c is a super sneaky-trick!

(I tried to write that in a formatted way, but finding a valid combination of triple-backticks, escaped-backtick and escaped / character together got the better of me...)

Python 3.8 (pre-release), 214 bytes
Takes a 1D boolean array g where the endpoints are marked True, and returns a 1D boolean array where snake tiles are marked True.
Try it online!
lambda w,h,g:max((list(map(v,range(w*h)))for x in range(2<<(w*h))if all((v:=lambda i:0<=i<w*h and(g[i]or x>>i&1))(i)==0 or(i%w>0 and v(i-1))+(i%w<w-1 and v(i+1))+v(i-w)+v(i+w)+g[i]==2 for i in range(w*h))),key=sum)

Explanation:
def f(w, h, g):
    return max(
        (
            # Brute force all possible grid configurations by counting in binary.
            # For each iteration, let the ith binary digit of x signify
            # whether the ith tile is considered part of the snake.
            [v(i) for i in range(w*h)] # <- Return a boolean array.
            for x in range(2<<(w*h))

            # Check if there is a valid snake path.
            if all(
                # The ith tile is part of the path if it's a given endpoint (g[i])
                # or the ith binary digit of x is 1 (x>>i&1).
                ( v:=lambda i:0<=i<w*h and (g[i] or x>>i&1) )(i) == 0
                # For a grid to have a valid snake path,
                # every tile must either not be part of the snake (v(i) == 0)...
                or
                # ...or the tile must have exactly 2 neighbors in the snake path.
                # (If the tile is an endpoint (g[i]), count itself as a neighbor.)
                (i%w>0 and v(i-1)) + (i%w<w-1 and v(i+1)) + v(i-w) + v(i+w) + g[i]
                == 2

                # Repeat this check for every tile.
                for i in range(w*h)
            )
        ),

        # Use max() to find the grid configuration with the most snake tiles;
        # that is, the most times that v(i) == True.
        key=sum
    )

Your conditions aren't sufficient. Certain illegal combination still satisfy the condition that each square is either 1) an endpoint, 2) isn't occupied or 3) has exactly two neighours. Disconnected loops for instance. A tiny modification of your test input shows that. I don't think you can solve this by looking locally, you need at least one global condition.

JavaScript (Node.js), 199 bytes
s=>(o=g=(t,k,h=c=>t.replace(/2/,c),a=h(0),b=h(1),m=2*~s[0].length)=>a==b?[...a].some((_,i)=>_&1&~1<<B[i]>>a[i-m]>>a[i+m]>>a[i-2]>>a[i+2]|k<o)||(o=k,r=a):g(a,k)|g(b,-~k))(B=JSON.stringify(s))&&eval(r)

Try it online!
Seems this way is not that good one

Charcoal, 76 bytes
ＷＳ⊞υι≔⪫υ¶θ≔⟦ω⟧ηＦηＦＥ⁴⁺ικ«Ｊ⁰¦⁰Ｐθ…θ⌕θ@Ｆκ✳⊗λ#¿∧›ＫＫ#‹№ＫＶ#²¿⁼ＫＫ@«#≔ＫＡζ»⊞ηκ»ＵＭＫＡ§ζκ

Try it online! Link is to verbose version of code. Takes input as two @ endpoints in a field of ASCII characters greater than # (e.g. .). Explanation:
ＷＳ⊞υι≔⪫υ¶θ

Input the field.
≔⟦ω⟧ηＦη

Start a breadth-first search with an empty path, and for each path...
ＦＥ⁴⁺ικ«

... search over the four possible paths formed by concatenating each direction.
Ｊ⁰¦⁰Ｐθ…θ⌕θ@

Print the field and move to the position of the first endpoint.
Ｆκ✳⊗λ#

Print the path.
¿∧›ＫＫ#‹№ＫＶ#²

Test whether the current position is legal (not off the edge, doubled back, or touching itself).
¿⁼ＫＫ@«

If we reached the other endpoint,
#≔ＫＡζ

then overwrite it with a # and save the canvas.
»⊞ηκ

Otherwise add this path to the search candidates.
»ＵＭＫＡ§ζκ

Restore the canvas from the saved last (i.e. longest) path that reached the other endpoint.


text:
Shift the letters, soldier?
Context
We're at war! You need to transfer an important message to your general to inform them from an imminent assault. The thing is, your enemy knows a lot about cryptography : you will need to be more creative in order to encode your message...
Task
Create a program that accepts an ascii message as input, and outputs the encoded message. The message should be encoded this way : each character should get its ascii value shifted by its position in the message.
For example, let's encode the message "Hello, world!"
H   e   l   l   o   ,       w   o   r   l   d   !     Original message

72  101 108 108 111 44  32  119 111 114 108 100 33    ASCII value

0   1   2   3   4   5   6   7   8   9   10  11  12    Place in the message

72  102 110 111 115 49  38  126 119 123 118 111 45    Encoded ascii (line 1 + line 2)

H   f   n   o   s   1   &   ~   w   {   v   o   -     Encoded message

The message Hello, world! should be encoded as Hfnos1&~w{vo-.
Sometimes the encoded ascii can go beyond printable character. In that case, the value loop back to 32 (read the rules for additionnal informations)
T   h   e       r   a   n   d   o   m       g   u   y      Original message

84  104 101 32  114 97  110 100 111 109 32  103 117 121    ASCII value

0   1   2   3   4   5   6   7   8   9   10  11  12  13     Place in the message

84  105 103 35  118 102 116 107 119 118 42  114 129 134    Encoded ascii (line 1 + line 2)

84  105 103 35  118 102 116 107 119 118 42  114 34  39    Corrected encoded ascii (looped back to 32)

T   i   g   #   v   f   t   k   w   v   *   r   "   '

The random guy is then converted into Tig#vftkwv*r"'
Using the same strat, zzzzzzzzz will be converted into z{|}~ !"# (ascii values converted into 122 - 123 - 124 - 125 - 126 - 32 - 33 - 34 - 35)
Rules

The input message will be composed of printable ascii character (between 32 and 126)
The message should be encoded as described before.
The ascii values of the encoded message should be set between 32 and 126.
The first character of the message should be at position 0.
If the new ascii value goes beyond the limit, it should loop back to 32.
Every character should be encoded. This includes punctuation, spaces etc.
No standard loopholes allowed.
This is codegolf, so the shortest code wins.

Meta

Suggested test case: 'zzzzzzzzz', to catch the correct wrapping point

@Adám yes, every character in the input message will be set between 32 and 126

You may want to spell out that your positions are 0-based.

@Dingus well spotted, i'm currently modifying the example

May we use the "position" (1-based index) rather than the "offset address" (0-based index)?

Nope, the first character has to be at position 0.

"Your enemy knows a lot about cryptography" Evidently not if this simple code is enough to confound them. ;-p

Python 3.8, 55 54 bytes
Output is a list of characters.
lambda s,d=33:[chr((ord(c)-(d:=d-1))%95+32)for c in s]

Try it online!

Charcoal, 9 bytes
⭆Ｓ§γ⁺κ⌕γι

Try it online! Link is to verbose version of code. Explanation:
 Ｓ          Input string
⭆           Map over characters and join
        ι   Current character
      ⌕     Find position in
       γ    Printable ASCII
    ⁺       Plus
     κ      Current index
  §         Cyclically indexed into
   γ        Printable ASCII
            Implicitly print

J, 22 bytes
(95|<:+#\)&.(_32+3&u:)

Try it online!
Almost word-to-word translation of my dzaima/APL solution.
How it works
(95|<:+#\)&.(_32+3&u:)  NB. Input: string S
(   X    )&.(   Y    )  NB. The "Under" operator; do Y, do X and undo Y
             _32+3&u:   NB. Convert chars to codepoints and subtract 32
       #\               NB. One-based index
    <:+                 NB. Add to the codepoints minus 1
 95|                    NB. Modulo 95
             _32+3&u:   NB. Undo this: add 32 and convert to chars

R, 56 57 bytes
function(s)intToUtf8((utf8ToInt(s)-33+1:nchar(s))%%95+32)

Try it online!
Edit: thanks to Giuseppe for bug-spotting!
I am beginning to despise string manipulations in R, and the intToUtf8() / utf8ToInt() function names in particular...

this will fail for a single character input "a" for instance. You can save it at a cost of 2 bytes -- wasn't sure if that would actually work until I tried it!

and yes, R's string manipulation is abysmal.

There's also a 57 byte solution if you get rid of seq

Aargh!  Well-spotted for the single-character-input bug, and thanks for the suggestion (that's a nice 4-byte shortcut for seq_along that I didn't know about!).

The 57-byte solution is what I originally had...  I was smugly thinking how cleverly I'd saved a byte until you pointed-out that it didn't actually work!

APL (Dyalog Unicode), 28 24 22 bytes SBCS
-4 bytes thanks to @Adám; -2 bytes thanks to @ngn;
Monadic function expecting a string:
⎕ucs 32+95|⎕ucs-32-⍳∘≢

Try it online! Assumes ⎕IO←0. How the 24-byter works:
32(⎕ucs⊣+95|⊢--∘⍳∘≢)⎕ucs  ⍝ monadic function taking a character vector on the right
                     ⎕ucs  ⍝ convert to unicode code points
32(                 )      ⍝ and then evaluate the expression with 32 as left argument and the code points as right arg
               -∘⍳∘≢        ⍝ do 32 minus (-) the range 0 1 ... [length of input string] (⍳∘≢)
            ⊢-            ⍝ take the right argument (⊢) [the codepoints] and subtract the previous calculation from those [effectively adding the positions and subtracting 32]
         95|               ⍝ and take those numbers modulu 95.
      ⊣+                  ⍝ Take the left (⊣) argument [32] and add it to the numbers we just did mod 95
  ⎕ucs                     ⍝ and convert the new code points to characters.

@Bubbler has a similar answer but making use of an operator that hasn't been implemented in Dyalog APL yet, check it out.

Yours actually consumes 42 bytes (UTF-8)

@JohnBrookfields I know, I'm on my mobile so I took a bit longer to link the appropriate encoding. C.f. my edited answer

24: 32(⎕ucs⊣+95|⊢--∘⍳∘≢)⎕ucs

05AB1E, 16 10 9 bytes
žQDIkā<+è

-1 byte by porting @Neil's Charcoal answer, so make sure to upvote him!
I/O as a list of characters.
Try it online or verify all test cases.
Explanation:
žQ          # Push the printible ASCII string builtin
  D         # Duplicate it
   I        # Push the input-list of characters
    k       # Get each index in the ASCII string
     ā      # Push the list [1, length] (without popping)
      <     # Decrease it by 1 to make it a 0-based range [0, length)
       +    # Add the values at the same positions in the lists together
        è   # Index each into the ASCII string (0-based and with automatic wraparound)
            # (after which the resulting list of characters is output implicitly)

Perl 5 (-p), 32 bytes
-1 byte thanks to @Abigail

s/./chr 32+($x++-32+ord$&)%95/ge

Try it online!

from the test case it seems it's 94

you're correct the post was updated 41 min ago

Save a byte by using ($x++-32+ord$&) instead of (-32+$x+++ord$&).

@Abigail +++ looks cooler though!

APL (dzaima/APL), 21 bytes
{95|⍵+⍳≢⍵}⍢(¯32+⎕UCS)

Try it online!
Just trying out the experimental Under operator ⍢ because the task is screaming for it.
How it works
{95|⍵+⍳≢⍵}⍢(¯32+⎕UCS)  ⍝ Input: string S
          ⍢(¯32+⎕UCS)  ⍝ Convert S to Unicode codepoints and subtract 32
{   ⍵+⍳≢⍵}             ⍝ Add the index to each char
 95|                   ⍝ Modulo 95
          ⍢(¯32+⎕UCS)  ⍝ Undo the operation:
                       ⍝ Add 32 and convert back to Unicode chars

That operator looks like it is really happy to be used

C (gcc), 48 47 46 bytes
Saved a byte thanks to 640KB!!!
Saved a byte thanks to dingledooper!!!
i;f(char*s){for(i=32;*s;)*s++=(*s-i--)%95+32;}

Try it online!

Haskell, 55 bytes
g '~'=' '
g c=succ c
i!c=iterate g c!!i
zipWith(!)[0..]

Try it online!
The TIO link has f=, but that doesn't contribute to the byte count because I defined it point-free. It's mostly there so that the code compiles.
I didn't play around much with using a point-free definition instead of !, so that might be a place where some bytes can be shaved off. I just figured that the parens and dots would add up. I also want to get rid of the call to iterate, but I'm not sure how. I want something like mtimes...
Haskell + -XParallelListComp, 55 bytes
g '~'=' '
g c=succ c
f s=[iterate g c!!i|c<-s|i<-[0..]]

Try it online!
Unfortunately this isn't any shorter, but I thought it was a cool usage of a pragma. It seems most of the time that pragmas aren't too helpful in golfing.
Explanation
-- g gives the successor of each character according to the specification
g :: Char -> Char
-- the successor of '~' is ' ' (wrap around)
g '~'=' '
-- all other characters have their normal successor
g c=succ c

-- (!) is an infix function that enciphers a character, given an int
(!) :: Int -> Char -> Char
-- iterate produces an infinite list of 'g' applied to 'c' repeatedly,
-- and '!!' indexes into that list at index 'i'. This has the effect
-- of applying 'g' to 'c' 'i' times.
i!c=iterate g c!!i

-- Point-free definition that applies '!' to each character of the input along with its index
zipWith(!)[0..]

Nice idea to try a pragma to substitute zipWith. I did find two shorter approaches, though using ParallelListComp results in the same byte count for those as well.

Retina 0.8.2, 19 bytes
{*\M!`^.
^.

T`~p`p

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

Repeat until the input is empty.
*\M!`^.

Output the first character.
^.

Remove the first character.
T`~p`p

Cyclically increment the remaining characters.
12 bytes in Retina 1:
1,Tv`~p`p`.+

Try it online! Link includes test cases. Explanation:
v`.+

Create overlapping matches that start at each character and end at the end of the string.
1,

Ignore the match of the whole input.
T`~p`p`

Cyclically shift each character according to the number of times it was matched.

K (oK), 19 bytes
{`c$32+95!x-32-!#x}

Try it online!

x86-16 machine code, IBM PC DOS, 17 16 bytes
Binary:
Build STL.COM using xxd -r:
00000000: b120 b408 cd21 2ac1 d45f 0420 cd29 e0f2  . ...!*.._. .)..

Listing:
B1 20       MOV  CL, 32         ; set up offset / position counter
        CLOOP:
B4 08       MOV  AH, 8          ; use DOS API get char from STDIN function
CD 21       INT  21H            ; read input char into AL
2A C1       SUB  AL, CL         ; subtract offset
D4 5F       AAM  95             ; AL = AL % 95
04 20       ADD  AL, 32         ; restore ASCII offset
CD 29       INT  29H            ; output AL to console
E0 F2       LOOPNZ CLOOP        ; keep looping until break, decrement CL

Standalone IBM PC DOS executable program.  Input via STDIN, output to console.
Runtime:

Java (OpenJDK 8), 80 60 bytes
s->{int i=0;for(char n:s)s[i]+=i-(n+i++>126?95:0);return s;}

Try it online!
Thanks for help from Kevin Cruijssen

Looks like this gives the wrong output for "The random guy" (should be Tig#vftkwv*r"') -- I think your 94 should be 95, that seems to fix it

Oops, I fixed it, thanks.

-1 by combining the s[i]+= with the s[i]-= like this: s[i]+=i-(i+s[i++]>126?95:0). Also, you can use a lambda in Java 8+, so the char[]a(char[]s) can be s->: try it online - 64 bytes

If you've never used lambdas before in Java, here are some brief examples of different lambdas and how to use it in codegolf. In general, you almost always want to use lambdas in Java codegolfing, unless you need a recursive function, which would still be a regular method.

48 bytes

@Olivier Grégoire So, does it still count as a working solution if it doesn't actually output an answer (as the question states)? Because this just changes it.

The input object is the output object. It happens all the time in programming. Not every function is pure. And yes, we accept it as is here on Code Golf.

Haskell, 52 51 bytes
zipWith(%)[-32..]
n%c=toEnum$32+mod(fromEnum c+n)95

Try it online!

Haskell, 52 bytes
zipWith(%)[0..]
n%c=snd(span(<c)$cycle[' '..'~'])!!n

Try it online!
Explanation

zipWith(%)[0..] calls the infix function % on each character of the input string along with its index.
cycle[' '..'~'] builds a list where the ASCII chars are repeated infinitely.
span(<c) partitions this list into a prefix of chars smaller than the current character c and a remainder.
snd drops the prefix, so only the list of ASCII chars starting with c remains.
!!n returns the nth element from that list.

Ruby, 42 bytes
->s{i=33;s.map{((_1.ord-i-=1)%95+32).chr}}

Takes input and returns output as an array of characters.
44 byte version because TIO doesn't support ruby 2.7's _1 syntax
->s{i=33;s.map{|c|((c.ord-i-=1)%95+32).chr}}

Try it online!

APL (Dyalog Extended), 22 bytes (SBCS)
Full program. Requires ⎕IO←0
⍞(⊢⊇⍨95|⍳⍨+~⍋⊣)' '…'~'

Try it online!
' '…'~' the printable ASCII range
⍞(…) with the input as left argument, apply the following tacit function to that:
 ⊣ the left argument (the input)
 ⍋ the sorting permutation to sort according to the following order:
  ~ the input without any printable ASCII, i.e. an empty string (this means leave all in current positions)
 ⍳⍨ the indices of the input characters in the printable ASCII
 95| division remainder when divided by 95
 ⊇⍨ use those indices to select from:
  ⊢ the printable ASCII

T-SQL, 100 bytes
Added some line changes to make it readable
DECLARE @x INT=0
WHILE @x<len(@)
SELECT
@=substring(@,2,999)+char((ascii(@)+@x-32)%95+32),
@x+=1
PRINT @

Try it online

Befunge-93, 25 bytes
:~:1+!#@_" "-+"_"%" "+,1+

Try it online!
Keeps the character count on the bottom of the stack. Then in a loop, reads a character at the time, subtracts 32 to the character, adds the character count, mods it with 95, adds 32 again, then prints the character. Finally, it adds 1 to the character count.

Ly, 25 bytes
ir84*sp[l-l,sp(95)%84*+o]

Try it online!

Stax, 9 bytes
éñÇöo♣j0♦

Run and debug it

Wolfram Language, 68 bytes
FromCharacterCode@Mod[#&~Array~Length@#+#-1,95,32]&@*ToCharacterCode

Uses a little function composition to make it shorter, but other than that, does pretty much what it says on the tin. Converts the string to character codes, adds the proper offset to each, wraps around if needed using Mod (there's an optional argument for offset that I use here), then converts back to a string.

I believe #&~Array~Length@# can be replaced with Range@Length@# for a 3-byte improvement.

JavaScript, 77 bytes
Iterative!
s=>[...s].map((c,i)=>String.fromCharCode((c.charCodeAt()+i-32)%95+32)).join``

Try it online!

JavaScript, 77 bytes
Outer recursive!
f=(s,i=0)=>s[i]?String.fromCharCode((s.charCodeAt(i)+i-32)%95+32)+f(s,i+1):''

Try it online!

JavaScript, 77 bytes
Inner recursive!
s=>(F=i=>s[i]?String.fromCharCode((s.charCodeAt(i)+i-32)%95+32)+F(i+1):'')(0)

Try it online!

C (gcc), 46 50 48 bytes
x;f(char*s){*s?*s=(*s+x++-32)%95+32,x=f(s+1):0;}

Try it online!

This isn't legal, you can't depend on a variable being externally set outside of the function.

I don't depend on it for the 1st iteration, only subsequent ones... (proof), is that also illegal?

No, it is not legal. It has to work independently for any run, not just the first. In C this means, for instance, a function can't depend on global variables being set to 0 at the start of a program run.

Can I say the function takes an extra argument that must always be 0 or is that illegal too?

@Noodle9 Do you have a link to the rules thread? I can't seem to find it.

@Noodle9 lol, stop resisting. Anyway, I fixed the answer, relax.

JavaScript (Node.js), 42 bytes
s=>Buffer(s).map((c,i)=>(c+i-32)%95+32)+''

Try it online!

Jelly, 9 bytes
O+J_32ịØṖ

Try it online!
How?
O+J_32ịØṖ - Link: list of characters, S  - e.g. "zzzzzzzzz"
O         - cast (S) to ordinal values          [122,122,122,122,122,122,122,122,122]
  J       - range of length (S)                 [  1,  2,  3,  4,  5,  6,  7,  8,  9]
 +        - add (vectorises)                    [123,124,125,126,127,128,129,130,131]
    32    - thirty-two                          32
   _      - subtract                            [ 91, 92, 93, 94, 95, 96, 97, 98, 99]
       ØṖ - printable ASCII characters          " !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
      ị   - index into (1-based & modular)      "z{|}~ !"#"

Erlang (escript), 68 bytes
f(I,[H|T])->[(H+I-32)rem 95+32]++f(I+1,T);f(_,[])->[].
f(I)->f(0,I).

Try it online!

Keg, 19 bytes
0&(⑻+:\~>[\~% +;],⑹

Try it online!
Woooo! I managed to beat APL somehow! This is a very literal interpretation of the challenge, except for the part where overflow values are decremented after modulusing.

Befunge-98 (FBBI), 20 bytes
'!v
-1<,+ '%_'-\~@#:

Try it online!
Initially pushes d=33 on the stack. On every iteration, d is reduced by one and (input-d)%95+32 is printed.

Pyth, 29 bytes
VlQ=+Y-C@QN32;s.eC+%+bk95 32Y

Try it online!

source: Stack Exchange

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

sort: votes


text:
Checking a Windows 95 OEM Key for validity
Introduction
Windows 95 used a very simple algorithm for verifying license keys. The scheme of an OEM license key always looked like this:
xxxyy-OEM-NNNNNNN-zzzzz

The day can be anything within 001-366, and the year cannot be lower than 95 or above 03.
xxx represents the day of the year the key was printed on (for example 192 = 10th of July) and is a number between 001-366.
yy represents the year the key was printed on and cannot be lower than 95 or above 03.
This means for example, a key with 19296 as the first segment was printed on 10th of July 1996.
The second segment is always OEM.
The third segment (NN..) is always starts with 00 and the sum of the digits has to be divisible by 7
The fourth segment is irrelevant, provided the field is the appropriate length, but has to be filled out with digits.
Challange
Given a string, output a truthy or falsy value whether this oem key is valid or not.
Rules

You may provide a function or a program
This is code-golf, so the submission with the least amount of bytes wins!

Test cases
Valid keys
12899-OEM-0042134-31009
15795-OEM-0001355-07757
35201-OEM-0009165-64718

Invalid keys
12804-OEM-0033143-31009
16595-OEM-0001695-9
12899-OEM-0022134-31009
27497-OEM-0525347-80387

Is 36695 a valid day/year combo? (knowing that 1995 is not a leap year)

Is the input ASCII only?

You probably should add some invalid keys where everything goes wrong, e.g. FOO$23-ABC. (Or, if this is an invalid test case, specify what exactly may go wrong.)

Why is the title "Generate a valid key", but the challenge asks to check whether a key is valid?

Suggested falsey test cases: one where NNNNNNN is shorter (i.e. 00123); one where the first two of NNNNNNN aren't 00 (i.e. 1233143); one where yy is above 03 (i.e. 12804-OEM-0042134-31009); one where xxx is below 000/negative (i.e. -1099-OEM-0042134-31009); one with something different than OEM (i.e. 12899-EMO-0042134-31009); one where zzzzz doesn't consist of just digits (i.e. 12899-OEM-0042134-3e009); etc. etc. There is a lot to validate in your challenges, so there are a lot of falsey cases needed to cover all those cases.

Windows 95 installer, 0 bytes

Suggested invalid test cases: 12899-OEM-0042134-310099 and 012899-OEM-0042134-31009

VTC because it's unclear what kind of string can be given as input. Will the input always have the given OEM format, or can the input be something like hello?

@SurculoseSputum Doesn't the "16595-OEM-0001695-9" example already answer that? It passes all tests, except being in the right format.

@Abigail seems unclear to me. Is the input is always separated into 4 parts with -, and the second part is always OEM? Or do I have to check that in my answer? The test case you mentioned is not really helpful to me, since it's one of the invalid case that is explicitly stated.

perl -pl -MList::Util=sum, 106 113 bytes
$_=/^(?!000)(([012]\d\d|3([0-5]\d|6[0-5]))(9[5-9]|0[0-3])|366(00|96))-OEM-00(\d{5})-\d{5}$/&&!(sum(split//,$6)%7)

Try it online!
This assumes an ASCII only input. If the input can be outside of ASCII, we'd have to add a single extra byte (a trailing a modifier on the main regexp). It also assumes a leading 366 can only occur in the years 96 and 00, them being leap years. The bulk of the matching is done by a regexp; testing of divisibility by 7 is done outside of it.
Reads keys from STDIN; writes 1 to STDOUT for valid keys, empty lines for invalid keys.
Edit: fixed the issue mentioned by @Dingus.

@Dingus Fixed now.

Nice! I was trying to find a way to abuse -F again, but the Reged won't match in -F for some reason so I've given up! You can save some bytes using $6=~/./g instead of the split though!

Ruby -n, 110 bytes
p~/^(\d{3})(9[5-9]|0[0-3])-OEM-(00\d{5})-\d{5}$/&&$3.to_i.digits.sum%7<1&&$1>?0*3&&$1<"36#{$2=~/6|0$/?7:6}"||p

Try it online!
Takes input on STDIN. Outputs true to STDOUT for valid keys and nil for invalid keys.
Uses three regex capture groups: $1 is xxx, $2 is yy, and $3 is NNNNNNN. First tests whether the key has the correct general format. If so, then tests whether the sum of digits in $3 is divisible by 7. Then tests whether $1 is lexicographically greater than '000' and less than either '366' (non-leap years) or '367' (leap years); this works because we know at this point that $1 is a string of three digits. Leap years occur when $2 contains 6 or ends with 0.

05AB1E, 73 85 78 bytes
•J" L•S£ε"©366L ₃Ƶ2Ÿт%y4Ö≠i®366Ê* '- …OEM '- 0мõ ÐþQ×SO7Ö1 '- ÐþQ×g5"#Nè.VQà}P

+12 bytes to account for leap years.
Will try to golf it down from here. If only 05AB1E had regex.. :/
Try it online or verify a lot more test cases.
Explanation:
•J" L•      "# Push compressed integer 321312516
      S      # Convert it to a list of digits: [3,2,1,3,1,2,5,1,6]
       £     # Split the (implicit) input-string into parts of that size
ε            # Map each part to:
 "©366L ₃Ƶ2Ÿт%y4Ö≠i®366Ê* '- …OEM '- 0мõ ÐþQ×SO7Ö1 '- ÐþQ×g5"
             #  Push this string
  #          #  Split the string on spaces
   Nè        #  Use the map-index to index into this string
     .V      #  Evaluate/execute it as 05AB1E code
       Q     #  Check that the top two values on the stack are equal
        à    #  Pop and take its maximum (no op if it's already a single 0/1 boolean)
}P           # After the map: check if all were truthy by taking the product
             # (after which the result is output implicitly)

As for each individual part:
             # xxx:
©            #  Store the string in variable `®` (without popping)
 366L        #  Push a list in the range [1,366]
             #  After the eval:
     Q       #   Check for each value whether it's equal to the current `xxx` part
      à      #   Check if any are truthy in this list by taking the maximum

             # yy:
₃            #  Push builtin 95
 Ƶ2          #  Push compressed integer 103
   Ÿ         #  Pop both an push a list in the range [95,103]
    т%       #  Take modulo-100 on each value
y            #  Push the current `yy` part again
 4Ö≠i        #  If it's NOT divisible by 4 (so neither 96 nor 00):
     ®       #   Push the `xxx` part from variable `®`
      366Ê   #   Check that it's NOT equal to 366
          *  #   And check if both are truthy by multiplying them together
    }        #  (implicit due to the eval: close the if-statement)
             #  After the eval:
     Q       #  Check for each value whether it's equal to the current `yy` part
      à      #  Check if any are truthy in this list by taking the maximum

             # OEM:
…OEM         #  Push string "OEM"
             #  After the eval:
    Q        #   Check if it's equal to the current `OEM` part
     à       #   No-op maximum, since the max digit of 0/1 is 0/1 respectively

             # 00:
0м           #  Remove all 0s from the current `00` part
  õ          #  Push an empty string ""
             #  After the eval:
   Q         #   Check if the `00` part with zeroes is equal to the empty string
    à        #   No-op maximum, since the max digit of 0/1 is 0/1 respectively

             # NNNNN:
Ð            #  Triplicate the current `NNNNN` part
 þ           #  Pop and only leave its digits
  Q          #  Check that it's equal to the `NNNNN` part (1 if truthy; 0 if falsey)
   ×         #  Repeat the part that many times (`NNNNN` if truthy; "" if falsey)
    S        #  Convert it to a list of characters
     O       #  Sum those digits together
      7Ö     #  Check that it's divisible by 7
        1    #  Push a 1
             #  After the eval:
         Q   #   Check whether the divisibility check is equal to the 1
          à  #   No-op maximum, since the max digit of 0/1 is 0/1 respectively

             # zzzzz:
ÐþQ×         #  Similar as above for NNNNN
    g        #  Pop and push its length
     5       #  Push a 5
             #  After the eval:
      Q      #   Check if the length is equal to the 5
       à     #   No-op maximum, since the max digit of 0/1 is 0/1  respectively

             # -:
'-          '#  Push a "-"
             #  After the eval:
  Q          #   Check if the `-` part is equal to the "-"
   à         #   No-op maximum, since the max digit of 0/1 is 0/1  respectively

See this 05AB1E tip of mine (section How to compress large integers?) to understand why •J" L• is 321312516 and Ƶ2 is 103.

2000 was also a leap year

@JonathanAllan Fixed at no change in bytes. Thanks for noticing.

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


text:
Extract words with clue numbers in a Crossword puzzle
Related: Read a crossword
Task
Given a completed Crossword puzzle, extract the words in it with their respective clue numbers, with "across" (horizontal) and "down" (vertical) words grouped and ordered like a real crossword puzzle.
The words are numbered in the row-major order of their first letters. If an "across" word and a "down" word share the first letter, the two words share one number. (As in regular Crossword, single-letter words don't count; they should not be numbered or included in the output.)
The input is given as a character matrix (or equivalent), with letters being uppercase (or lowercase if you want) and non-letter cells being blank. You can assume that single-letter islands won't appear in the input. If you want, you can assume the grid is rectangular (shorter rows are padded with spaces).
The output must be clearly grouped into "across" and "down" (you don't need to return or print these strings though), and the words must be ordered in the increasing order of the clue number (see test cases).
Standard code-golf rules apply. The shortest code in bytes wins.
Test cases
Input:
MESS
YAWN
 SAID
 TYPO
Output:
Across: 1. MESS 5. YAWN 6. SAID 8. TYPO
Down: 1. MY 2. EAST 3. SWAY 4. SNIP 7. DO

Input:
   RECURS
  PARAPET
 TRIANGLE
COOLS RAW
HUTS MATE
ORE CODED
INCLUDES
RETIRES
SYSTEM
Output:
Across: 1. RECURS 7. PARAPET 8. TRIANGLE 9. COOLS 10. RAW 11. HUTS
        12. MATE 13. ORE 14. CODED 15. INCLUDES 17. RETIRES 18. SYSTEM
Down: 1. RAILS 2. ERAS 3. CAN 4. UPGRADES 5. RELATES 6. STEWED
      7. PROTECTS 8. TOURNEY 9. CHOIRS 12. MODEM 14. CURE 16. LIT

Input:
MICROWAVE
U       S
M OCEAN C
M  OWL  A
I SWELL P
E       E
SCHEDULES
Output:
Across: 1. MICROWAVE 3. OCEAN 7. OWL 8. SWELL 9. SCHEDULES
Down: 1. MUMMIES 2. ESCAPES 4. COW 5. EWE 6. ALL

Input:
TAB
A U
BUBBLE
  B O
  LOVED
  E E
Output:
Across: 1. TAB 3. BUBBLE 5. LOVED
Down: 1. TAB 2. BUBBLE 4. LOVE

Can a crossword contain multiple of the same words - i.e. bob\no a\nbar (2x bob and 2x bar)?

^ And if not: can a word be a substring of another word - i.e. the words all and ally are both present in the outputs?

@KevinCruijssen Yes to the first question. I'll add a test case.

Can we assume that the input is space-padded?

@Neil For some extra spaces on shorter rows to make the grid rectangular, yes. If you mean more than needed to fit the crossword, no.

Does the output have to include the numbers like 1., 2., etc or is it enough if the words are ordered correctly?

@Jonah I can't imagine that excluding the clue numbers would be allowed. That would almost trivialize the challenge

ah, read too fast and i missed that they were a global numbering system.  i thought the across and down were numbered independently.

When Jelly is 49 bytes and Perl is 348 bytes, you know this is more complicated than it seems!

Charcoal, 118 bytes
ＷＳ⊞υιＰ⪫υ¶≔⟦⟧θＦυ«Ｆι«Ｆ‹ κ«≔✂ιⅈＬι¹η≔⪫ＫＤ⁻Ｌυⅉ↓ωζ≡÷⌕2374ce6⍘↨ＥＫＶ‹ μ²φ³¦²⊞θ⟦ηζ⟧¹⊞θ⟦ηω⟧⁰⊞θ⟦ωζ⟧»→»⸿»⎚Ｅ²⪫ＥΦＥθ⟦⊕μ§⪪§λι ⁰⟧§λ¹⪫λ ¦

Try it online! Link is to verbose version of code. Takes input as a rectangular string of newline-terminated lines. Explanation:
ＷＳ⊞υιＰ⪫υ¶

Input the rectangle and print it to the canvas.
≔⟦⟧θ

Start off with no clues.
Ｆυ«Ｆι«

Loop over the rows and columns.
Ｆ‹ κ«

If the current character is not a space, then...
≔✂ιⅈＬι¹η

Get the substring of the current line starting at this character.
≔⪫ＫＤ⁻Ｌυⅉ↓ωζ

Get the substring of the current column starting at this character by reading it from the canvas.
≡÷⌕2374ce6⍘↨ＥＫＶ‹ μ²φ³

Check which orthogonally adjacent characters are spaces.
²⊞θ⟦ηζ⟧

If only the characters to the left and above are spaces, then a word starts both across and down.
¹⊞θ⟦ηω⟧

Otherwise if the character to the left is a space but the character to the right is not, then a word starts across but not down.
⁰⊞θ⟦ωζ⟧

Otherwise if the character above is a space but the character below is not, then a word starts down but not across.
»→»⸿»

Move on to consider the next character on each iteration.
⎚

Clear the canvas.
Ｅ²⪫ＥΦＥθ⟦⊕μ§⪪§λι ⁰⟧§λ¹⪫λ ¦

Map over the across and down clues, numbering them all, but keeping only those clues with words in the respective direction.
(Out of interest I tried using just string manipulation instead of canvas operations but that cost 29 bytes.)

Impressively short!

Python 2, 284 283 281 272 267 263 bytes
-2 bytes thanks to @Noodle9 for suggesting a different output format
x=input()
A=[];D=[]
d=1;b='!'
i=j=0
L=len
while i<L(x):r=x[i];h=(r[j:].split()or b)[0];c=L(h)*(j<1or-~-q)>1;g=(''.join(r[j]for r in x[i:]).split()or b)[0];q=r[j]>b;a=L(g)*q*(i<1or x[i-1][j]<b)>1;D+=a*[d,g];A+=c*q*[d,h];d+=a+c*q>0;j=(j<L(r)-1)*-~j;i+=j<1
print A,D

Try it online!
Takes input as a list of strings representing the rows.
The basic approach involves iterating over every square of the grid in left-to-right and top-to-bottom order. The counter d is incremented when a word can be made either across or down starting from the current square.
Some other notes

A and D keep track of the lists of "across" words and "down" words respectively
To determine whether a square contains a space or a letter, the character gets compared to the ! character (smaller means a space, larger means it's a letter)
When a word gets added to one of the lists, .split()[0] is called on the remaining portion of the row/column to get the entire word, which ends at the next space character

perl -M5.010, 348 bytes
@a=map{[s/ /0/gr=~/./g,0]}<>;push@a,[(0)x@{$a[0]}];for$y(0..$#a-1){for$x(0..$#{$a[0]}-1){if($a[$y][$x]){$h=$a[$y][$x+1]&&!$a[$y][$x-1];$v=$a[$y+1][$x]&&!$a[$y-1][$x];$c++if$h||$v;if($h){print" $c. ";$i=$x;print$a[$y][$i-1]while$a[$y][$i++]}push@v,[$c,$y,$x]if$v}}}say;for(@v){($c,$y,$x)=@$_;print" $c. ";$i=$y;print$a[$i-1][$x]while$a[$i++][$x]}say

Try it online!
Requires the input to be a proper rectangle, that is, shorter lines should be padded with spaces.

JavaScript (ES6), 179 bytes
Takes input as a matrix of characters. Returns a pair of objects.
m=>m.map(F=(r,y)=>r.map((c,x)=>i+=1/c?0:(g=(d,s=c,Y=y)=>!(C=m[Y+=d]&&m[Y][x+=!d])|C<F?s[1]&&!!(o[d][i]=s):g(d,s+C,Y),!y||m[y-1][x]<F?g(1):0)|(!x|r[x-1]<F&&g(0))),i=1,o=[{},{}])&&o

Try it online!

Jelly, 49 bytes
Ȧ€Œg⁸ṁȦƇḊƇZ€ḢḢ,Ɗ€)ẎṢ
n⁶a⁸ŒĖṁ⁸Ç,ZÇ$ƊµẎZḢQṢiⱮⱮⱮȯ"""

A monadic Link which accepts a (rectangular) list of lists of characters which yields a list of lists of pairs of numbers and lists of characters
...i.e. [across, down] where each of across and down are lists of [clueNumber, answerWord].
Try it online! (The footer splits at newlines, calls the Link and formats the result like the question examples.)
How?
We find all the 2+ letter horizontally written words along with the (2d) index of their first letter in the input matrix for each of the input matrix and its transpose, then sort these (by those indices), and look up each of these starting-indices in a list of the unique starting-indices for the combined results to find the clue-numbers.
Ȧ€Œg⁸ṁȦƇḊƇZ€ḢḢ,Ɗ€)ẎṢ - helper Link: list of lists of pairs of 2-d indices and their
                                    characters (or 0s where spaces were)
                 )   - for each row:
Ȧ€                   -   for each pair: any and all? (0 if it contains a 0 (i.e. character was a space))
  Œg                 -   group runs of equal elements
    ⁸ṁ               -   mould like the input
       Ƈ             -   filter keep those for which:
      Ȧ              -     any and all? - i.e. throw away "words" of 0s
         Ƈ           -   filter keep those for which:
        Ḋ            -     dequeue - i.e. throw away words of length 1
          Z€         -   transpose each
                €    -   for each:
               Ɗ     -     last three links as a monad - f(X=that):
            Ḣ        -       head (modifies X too)
             Ḣ       -       head (modifies X too)
              ,      -       pair with (the modified X)
                  Ẏ  - tighten
                   Ṣ - sort

n⁶a⁸ŒĖṁ⁸Ç,ZÇ$ƊµẎZḢQṢiⱮⱮⱮȯ""" - Link: list of lists of characters (C)
 ⁶                           - space character
n                            - (C) not equal (space)? (vectorises)
  a⁸                         - logical AND (C) (vectorises) -> C but with 0s not spaces
    ŒĖ                       - multi-dimensional enumerate -> [[[1,1],'A'],...,[[n,m],'Z']]
      ṁ⁸                     - mould like C
             Ɗ               - last three links as a monad - f(X=that):
        Ç                    -   call the helper Link with X
            $                -   last two links as a monad:
          Z                  -     transpose X
           Ç                 -     call the helper Link with that
         ,                   -   pair these together
              µ              - start a new monadic chain - f(V=that):
               Ẏ             - tighten V
                Z            - transpose
                 Ḣ           - head -> all word-start indices
                  Q          - deduplicate
                   Ṣ         - sort
                     ⱮⱮⱮ     - 3-deep map across v in V with:
                    i        -   first 1-based index of v or 0 if not found
                         """ - zip across, 3-deep with:
                        ȯ    -   logical OR (V) -> replace the 0s with the words from V


text:
Zero the byte (eventually)
Given an infinite arithmetically-progressive¹ sequence, compute the minimum length of a prefix with a product divisible by 2^8.
Sample cases & reference implementation
Here is a reference implementation that I wrote in Io.
  1, 1 -> 10
  2, 4 -> 8
  3, 5 -> 10
  2, 6 -> 5
  7, 5 -> 6
  4, 1 -> 9
 10, 9 -> 7
256, 9 -> 1

Spec

The input will always be provided in a way such that it won't take forever to zero the accumulator.
¹ An arithmetically progressive infinite list can be generated by a constant step each time starting from an initial number.

For the infinite list input, you're are allowed to simply take the initial number and the step of the infinite list.

There are only going to be integers in this sequence.
Examples
1*2*3*4*5*6*7*8*9*10 = 3,628,800
= 14,175*256
2*6*10*14*18*22*26*30 = 518,918,400 = 2,027,025 * 256

Could you add a full explanation / solution process for one of the examples?

Husk, 9 bytes
V¦256G*¡+

Try it online!
Takes first the step, then the initial value.
Explanation
V¦256G*¡+  Implicit arguments: step and start
        +  Function that adds step.
       ¡   Iterate on start to form infinite list [start, start+step, start+2*step..]
     G     Cumulative reduce by
      *    multiplication.
V          1-based index of first value that
 ¦256      is divisible by 256.

Python 2, 39 bytes
f=lambda a,d,p=1:p%256and-~f(a+d,d,p*a)

Try it online!
Tracks the product p of the arithmetic progression until it's divisible by 256.

I'm not sure, but i think the rules say that you can drop the f= part in front of a lambda

like this

@Dion Not if the function is recursive, since it needs to be assigned to refer to itself

@JoKing not dropped entierly, but just out of the byte count, see my tio

@Dion It needs to work whatever name the header uses to refer to the lambda, so because it relies on a particular name then that needs to be included in the byte count.

@Neil aaaaah, ok, now I understand xD thanks!

APL (Dyalog), 24 bytes
{0=256|×/⍵:≢⍵⋄⍺∇⍵,⍨⊃⍺+⍵}

Try it online!
⍵ is the the sequence (starting with the first item), ⍺ the step.

0=256|×/⍵ - if the product is divisible by 256, ≢⍵ return the length.
⍺∇⍵ - else, recurse, ,⍨⊃⍺+⍵ - and append a new term to the sequence.

23 bytes by using × instead of 0= (and swapping the two guards)

INTERCAL, 471 445 443 bytes
I could have done anything else but I've always wanted to try this language out...
DOWRITEIN:5DOWRITEIN:6DO:8<-:5DO:7<-#1PLEASECOMEFROM(9)DO:1<-:6DO:2<-:7DO(1549)NEXTDO:1<-:3DO:2<-:5DO(1509)NEXTDO:1<-:3DO:2<-:8PLEASEDO(1549)NEXTDO:8<-:3DO:1<-:8DO:2<-#256PLEASEDO(1550)NEXTDO:4<-:1DO:1<-:3PLEASEDO(1540)NEXTDO:1<-:4DO:2<-:3PLEASEDO(1510)NEXTDO:1<-:3DO:2<-:3PLEASEDO(1550)NEXTDO:1<-#1DO:2<-:3DO(1509)NEXTDO(1)NEXTDO:1<-:7DO:2<-#1DO(1509)NEXT(9)DO:7<-:3(1)DO(2)NEXTPLEASEFORGET#1DO:1<-:7DO:2<-#1DO(1509)NEXTDO:7<-:3PLEASEREADOUT:7PLEASEGIVEUP(2)DORESUME:3

Inspired by Noodle9's C answer.
Formatted version:
Try it online!
Explaination based on blocks, blocks seperated by double line breaks.
(if magic) marks code for an If-structure I've found in the manual.
Setup vars and input
 - :5 = start value
 - :6 = step size
 - :7 = step count
 - :8 = current cumultative product

Label (99)

:8 *= (:7 * :6) + :5

Calculate :8 % 256

Divide result by itself and add one.
If the result is 0, the division subroutine returns 0, else it returns 1.
We need to add one becase label (0) is invalid.

Store result in :10

Increment :7, store result in :3

(if magic)
If :10 is 2, put :3 in :7 and jump to (99)
(if magic)
If :10 is 1, print :3 and terminate
(if magic)

If someone can get rid of that double addition, I'd be very grateful.
EDIT
Found out a way to get rid of it. Also updated the explaination and fixed some formatting.
-2 by using a shorter label

Raku, 38 31 bytes
{+($^a,*+$^b...{[*](@_)%%256})}

Try it online!
Does pretty much exactly what the description asks for. Generates the arithmetic sequence until the product of elements is divisible by 256 and returns the length of the list.

JavaScript (ES6), 33 bytes
Takes input as (step)(init).
s=>g=(i,p=1)=>p&&g(i+s,p*i%256)+1

Try it online!

Wouldn't p%256 work better for products above 2**31?

@Neil True. I seems also more sensible to put the modulo in the call so that the function doesn't return a false result when it really should loop forever -- such as for f(2)(1) -- even if it's guaranteed not to happen.

J, 30 29 bytes
[:#(],(+{:))^:(0<256|*/@])^:_

Try it online!
-1 byte thanks to Traws
Straightforward conversion of the algorithm into J.

-1 byte with a: -> _

MATL, 17 bytes
ha`&G@q*+*8W\t}x@

Try it online! Or verify all test cases.
Explanation
This uses the fact that mod(a*b, N) equals mod(mod(a, N)*b, N).
h       % Take the two inputs (implicitly): a (initial term), s (step).
        % Concatenate them into a row vector
a       % Any: true (or 1) if there is any nonzero entry. Gives true
`       % Do...while
  &G    %   Push the two inputs again: a, s
  @q    %   Push n-1, where n is the 1-based iteration index
  *     %   Multiply: gives s*(n-1)
  +     %   Add: gives a+s(n-1), which is the n-th term of the sequence
  *     %   Multiply this by the previous result (which was initialized to 1)
  8W    %   Push 8, exponential with base 2: gives 256
  \     %   Modulus
  t     %   Duplicate. This will be used as loop exit condition
}       % Finally (execute this on loop exit)
  x     %   Delete latest result (which is necessarily 0)
  @     %   Push current n. This is the solution
        % End (implicitly). A new iteration is executed if the top of the
        % stack is nonzero
        % Display (implicitly)

brainfuck, 80 71 bytes
,>>,->+[<[-<+>>[->+>+<<]>[-<+>]<<]<[->+<]<[->+>+<<]>[-<+>]>>>>[-<<+>>]>+<<<]>>>.

Try it online!
Takes two byte values as input (step, initial), output a byte value.
Commented code (Memory layout: count step init init' prod prod' prod'')
This language has a slight advantage for this challenge because its cell size value (in the TIO implementation) is 8-bit.
This program has to use ~5 variables, so some other rearrangement might produce a shorter program.
Use a scrolling tape to reduce back-and-forth copying. (after each iteration of the outermost loop the pointer is moved 1 unit to the right)

K (ngn/k), 27 25  19 18 bytes
-2 bytes thanks to Traws!
-6 bytes thanks to ngn and Traws!
-1 more byte thanks to ngn!
{#(`c$*/)(x,y+)/x}

Try it online!

-2 bytes with {#(256!*/){y,x+*|y}[y]/x}

@Traws Thanks! I need some time to digest it.

@Traws I'm not sure how this work. / needs a monadic function - how does [y] solves it - is it currying?

Yes, it uses projection/currying to avoid having to set a global. For example, +[2;3] can be computed as the projection +[2]3.

@Traws Thank you, I learned something new today :)

@GalenIvanov @Traws you can also make projections/compositions by omitting the rightmost argument:  {y,x+*|y}[y] -> (y,(*|y)+)

@ngn Nice! I guess in this case it can all be further simplified to {#(256!*/)(x,y+)/x}.

@Traws Thanks, very nice indeed!

@ngn Thanks, as always! My knowledge of K is pretty random (mostly from the oK manual)  -  I need to put some order in it (I suppose I'll start with the K2 reference manual)

@Traws i wish i had thought of that! @GalenIvanov incidentally, mod 256 here happens to be the same as cast to char: 256! -> \c$`

@ngn Great observation, thanks!

Factor, 105 bytes
: f ( n n -- n ) swap 1array
[ dup product 256 mod 0 = ]
[ 2dup last + 1array append ] until
length nip ;

Try it online!

APL (Dyalog), 19 bytes
{0⍳⍨256|×\⍵+⍺×0,⍳9}

Try it online!
Uses ⎕IO←1 and the fact that the highest possible output is 10.

Retina 0.8.2, 70 bytes
\d+
$*
^
1,
{`^1.*
$&#
\G1(?=1*,(1+))
$1
1{256}

}`1,(1+(,1+))
1$2$1
#

Try it online! Link includes test cases. Explanation:
\d+
$*

Convert to unary.
^
1,

Insert an accumulator.
^1.*
$&#

Increment the result if the accumulator is not zero.
\G1(?=1*,(1+))
$1

Multiply the accumulator by the current term.
1{256}

Reduce modulo 256.
1,(1+(,1+))
1$2$1

If the accumulator is not zero then calculate the next term. (The conditional is necessary in order for the loop to terminate once the accumulator reaches zero.)
{`
}`

Repeat the loop until the buffer stops changing. This will happen when the accumulator becomes zero, i.e. the product is a multiple of 256.
#

Convert the result to decimal.

Charcoal, 24 bytes
⊞υＮＮηＷ﹪ΠＥυΣ…υ⊕λ²⁵⁶⊞υηＩＬυ

Try it online! Link is to verbose version of code. Explanation:
⊞υＮ

Input the initial number and push it to the predefined empty list.
Ｎη

Input the step.
Ｗ﹪ΠＥυΣ…υ⊕λ²⁵⁶

Repeat while the product of the sums of all the nontrivial prefixes of the list is not a multiple of 256...
⊞υη

... push the step to the list.
ＩＬυ

Output the length of the list.

C (gcc), 46 44 bytes
Saved 2 bytes thanks to Arnauld!!!
c;f(a,d){c=0;for(char p=1;p*=a+d*c++;);d=c;}

Try it online!
Commented code
c;f(a,d){
 c=0;           /* initialise counter */
 for(char p=1   /* initialise 8-bit product */
   p            /* loop until last 8-bits of product are 0 */
    *=a+d*      /* and multiply product by next element in series */
       c++;);   /* and bump counter */
 d=c;           /* return counter */
}

44 bytes

@Arnauld Nice one - thanks! :D

To be pedantic, this only works with -fwrapv or -O0. -O3 breaks the program (char overflow is undefined behavior)

Alternative 44: https://tio.run/##fZDbaoQwEIbv9ykGQYg6Ug/VVtL0pvQp1qVIoluhdcUIlYqvXjseu@xFA8lkwv/9MxPpnqUcR8kLlqGyeik8XlwaJt@zBmrh89oWmaNsidJxsOYWH8bPrKyYBf0BaJVVC22uW/2WHU8goPcRIEAIl/CAcI/gewhBFA/8BlF/CKkiCvEc6CGhJLkC8q7OZUv6GSC/x8WW1PGspkrgr8DUvQ3N4m6k3WuQdskL7chAuM5Dg4gZoaGBTYXKSuUdcR5fr0@gy@/8UrB1TOtuzUltcXCcWbb9x9avJosdOc6SE@5jL7nFd6RuCCqYYYYKwVTgPk@nqdPKwP9NEDTSqOv/LG8gBOjNfjgchvFHFh/ZWY/u1y8 (related )

Brachylog, 23 bytes
≜;.{|⟨+≡t⟩ⁱ}ᶠ⁽hᵐ×%₂₅₆0∧

Try it online!
This took embarrassingly long to write, but at least I was able to shave two bytes off ∧.≜&{|⟨+≡t⟩ⁱ}ᶠ↖.hᵐ×%₂₅₆0∧ once I got that far. Takes [first term, step] through the output variable and outputs the prefix length through the input variable.

I'm interested in knowing why this was downvoted.

Seems like someone went and downvoted all answers in golfing languages.

Jelly, 16 bytes
1µ⁴ẋ³1¦ÄP256ḍµ1#

A full program accepting the initial value and the delta which prints the result.
Try it online!
How?
1µ⁴ẋ³1¦ÄP256ḍµ1# - Main Link: initial, delta
1                - set the left value (say n) to 1
              1# - increment n finding the first 1 such n which is truthy under:
 µ           µ   -   the monadic chain - i.e. f(n):
  ⁴              -     program argument 4 (delta)
   ẋ             -     repeated (n) times
      ¦          -     sparse application...
     1           -     ...to indices: 1
    ³            -     ...what: program argument 3 (initial)
       Ä         -     cumulative sums
        P        -     product
         256     -     literal 256
            ḍ    -     divides (the product)?
                 - implicit print (a list with a single element prints that element)

Wolfram Language (Mathematica), 59 bytes
(t=0;s=#;k=#2;While[Mod[s##&@@Array[s+k#&,t++],256]!=0];t)&

Try it online!

R, 43 bytes
function(i,s)match(0,cumprod(i+0:9*s)%%256)

Try it online!
Outputs 'NA' if sequence goes to infinity without ever being a multiple of 256.
Calculates products of sequences up to length 10.  Why is this enough?
If step is an odd number, then the successive factors that make up each element of the sequence will alternate between odd and even, so 10 would be enough to ensure that there are 5 even numbers multiplied together (so the product is a multiple of 2^5).  But, the first 5 even numbers are also certain to include at least one multiple-of-4 (every second even number) and one multiple-of-8 (every fourth even number), so in fact their product is certain to be a multiple of 2^8 = 256.
If the step is even and the initial number is even, then (for similar reasons) only a maximum of 4 steps are needed.
If the step is even and the initial number is odd, then all the factors will be odd, so the product will always be odd and the sequence will go to infinity without ever being a multiple of 256.
So, if we didn't find a multiple-of-256 by the 10th element of the sequence, there won't be one, and we can just output the 'infinity' response.
I think.

05AB1E, 12 bytes
∞<*+ηPÅΔ₁Ö}>

Takes the inputs in reversed order, so step before start.
Try it online or verify all test cases.
Explanation:
∞             # Push an infinite positive list: [1,2,3,...]
 <            # Decrease each by 1 to let it start at 0: [0,1,2,...]
  *           # Multiply each by the first (implicit) input (step)
   +          # Add the second (implicit) input (start)
    η         # Get all prefixes of this infinite list
     P        # Take the product of each inner prefix-list
      ÅΔ      # Find the first (0-based) index which is truthy for:
        ₁Ö    #  Where the value is divisible by 256
          }>  # After we've found this index: increase it by 1 to make it 1-based
              # (after which the result is output implicitly)

Rust, 58 bytes
|s,m|(|mut i,mut a|{while 0<a%256{a*=i;i+=m}(i-s)/m})(s,1)

Try it online!
A closure whose first argument is the first element of the sequence and whose second argument is the step.
Ungolfed with comments
//Initial element, step
|s,m|
  //i is initial value of s, a is accumulator
  (|mut i,mut a| {
    while 0 < a % 256 {   //while a is not divisible by 2^8
      a *= s;             //Multiply a by the current element of the sequence
      s += m              //Get the next element of the sequence by adding the step
    }
    //Subtract the initial value s to only keep increases of m, divide by m to get how many times it was increased
    (i - s) / m
  )
   (s, 1) //Call with i as s and initial value of accumulator as 1

Scala, 54 bytes
LazyList.from(_,_).scanLeft(1)(_*_)indexWhere(_%256<1)

Try it in Scastie!
Explanation:
LazyList.from(_,_) //Creates a LazyList starting at the first parameter with a step given by the second parameter.
  .scanLeft(1)(_*_) //scanLeft is like foldLeft, but keeps each result in a list
  indexWhere(_%256<1) //Find the index where it's divisible by 256

Haskell, 51 49 bytes
b#s=findIndex((<1).(`mod`256))$scanl(*)1[b,b+s..]

Try it online!
Port of my Scala answer


text:
Compute xkcd's Wrong Times Table
The 2020-05-29 xkcd comic showed us the numbers that Randall Munroe feels would be most likely to result from multiplication, other than the correct answers. The table does seem to have some sort of twisted logic to it.
For your convenience, the Wrong Times Table is reproduced here in selectable format:
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|     | 1   | 2   | 3   | 4   | 5   | 6   | 7   | 8   | 9   | 10  |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| 1   | 0   | ½   | 4   | 5   | 6   | 7   | 8   | 9   | 10  | 9   |
| 2   | ½   | 8   | 5   | 6   | 12  | 14  | 12  | 18  | 19  | 22  |
| 3   | 4   | 5   | 10  | 16  | 13  | 12  | 24  | 32  | 21  | 33  |
| 4   | 5   | 6   | 16  | 32  | 25  | 25  | 29  | 36  | 28  | 48  |
| 5   | 6   | 12  | 13  | 25  | 50  | 24  | 40  | 45  | 40  | 60  |
| 6   | 7   | 14  | 12  | 25  | 24  | 32  | 48  | 50  | 72  | 72  |
| 7   | 8   | 12  | 24  | 29  | 40  | 48  | 42  | 54  | 60  | 84  |
| 8   | 9   | 18  | 32  | 36  | 45  | 50  | 54  | 48  | 74  | 56  |
| 9   | 10  | 19  | 21  | 28  | 40  | 72  | 60  | 74  | 72  | 81  |
| 10  | 9   | 22  | 33  | 48  | 60  | 72  | 84  | 56  | 81  | 110 |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+

Flattened text version without headers:
0 ½ 4 5 6 7 8 9 10 9 ½ 8 5 6 12 14 12 18 19 22 4 5 10 16 13 12 24 32 21 33 5 6 16 32 25 25 29 36 28 48 6 12 13 25 50 24 40 45 40 60 7 14 12 25 24 32 48 50 72 72 8 12 24 29 40 48 42 54 60 84 9 18 32 36 45 50 54 48 74 56 10 19 21 28 40 72 60 74 72 81 9 22 33 48 60 72 84 56 81 110

Challenge
Your goal is to write a program or function that accepts two numbers as input and returns the corresponding value of the Wrong Times Table as output.

The inputs and output can be in any format and data type, as long as it is self-evidently clear which number a given value represents. So representing ½ as the floating point number 0.5 or the string "1/2" is fine, but representing it as -1 is not.
The inputs can be assumed to be integers in the range 1 to 10 inclusive.
Standard code-golf rules and loophole restrictions apply. The shortest code in bytes wins.

Example Input and Output
Input:

5
  3

Output:

13

Some possible avenues for golfing

The table is symmetric across the diagonal.
There are some patterns in the numbers, e.g. f(1, n) = n + 1 for 3 ≤ n ≤ 9.
The values in the table are usually numerically close to the actual multiplication table, so you could store the differences instead.
The explain xkcd wiki page for this comic has a table showing how each number might have been derived. It may take fewer bits to store these offsets than to store the output numbers directly.

He's providing it for the convenience of people writing solutions, for verification and for easy compression purposes.

I'm confused by your "flattened ASCII version without headers:" as ½ isn't an ASCII character. Did you mean "1/2" instead?

@Abigail Fixed. It wasn't supposed to be ASCII, just plain text in general. I was matching the formatting from a now-deleted comment.

@Arnauld Yeah, I don't know what's going on there.... The wiki page for this comic had a table showing, for each entry, a formula in terms of the row and column index that evaluates to the output value. For example, almost half the entries are of the form i*(j+1) or i*(j-1) with i ≤ j. I was thinking you could just store a marker for these entries to make the table compress better, if you could make the corresponding evaluation code small enough in a golfing language.

When I grow up, I'm going to send my children to the primary school Randall Munroe has been in.

@Arnauld Explain XKCD seems to be back up now. I don't know if there are few enough distinct formulas to make it worthwhile though.

Python 3, 119 ... 110 105 bytes
-14 bytes thanks to @xnor
Takes as input an array \$ a\$ consisting of the two integers. Outputs the product of the two numbers based on the Wrong Times Table. For the case [1, 2] or [2, 1], it outputs .5.
lambda a:b' \0\n \r2 (0*	 $-260\n(H<JH	!0<HT8Qn'[max(a)*~-max(a)//2+min(a)]%126.5

Try it online!
Explanation
We use a compressed string which stores the answers as ASCII values. And since multiplication is commutative, it doesn't matter in which order the two numbers appear, effectively reducing the compression size by a half.
For the .5 edge case, we assign the character with the ASCII value 127 to it. Then we apply modulo 126.5 to it. This results in 127 % 126.5 returning .5, but all the other values stay the same.

Looks like you can just do a!=[1,2] in place of sum(a)!=3 since a is sorted at that point. There might be a still shorter way.

Actually maybe a shorter way to handle 0.5 would be to assign some large byte like 127 to [1,2], then take the final result modulo 126.5. Also tempting is or.5 but there's a zero output already that might take too long to deal with.

@xnor That's a really nice idea, thanks!

Turns out shorter to do the min and max explicitly: TIO

Hmm, (2*max(a)-1)**2//8 is the same length: TIO

Charcoal, 86 bytes
§⪪§⪪”#｜D⟦ⅈＱ\Ｓ4,▷-³◨⟦v≔[Q!ξ№﹪⪪wQＣ.≡r¿I↗⎇B⁸⟧“¿*⪫Y<h\/Ｅ¿M‴$ε¬{a⸿Ｒ⁷⊙ZＮU{Ｕⅈ⪪mδp^｜⎇υＯ”¶⌈θ ⌊θ

Try it online! Takes input as a tuple. Explanation:
    ”...”       Compressed string of rotated lower left half of table
   ⪪     ¶      Split on newlines
  §       ⌈θ    Cyclically indexed by maximum of both inputs
 ⪪              Split on spaces
§            ⌊θ Cyclically indexed by minimum of both inputs
                Implicitly print

Because Charcoal is 0-indexed and the input is 1-indexed I've rotated the diagonal of the lower left half of the table to the left of the first column and then rotated the last row to above the first row so that the cyclic indexing picks up the desired result.

Jelly,  75  71 bytes
“µẎḂƬḌƑ®ṢṄḶ+/ḤƇ’BT3+.;Żṃ@“¦¦SȤSḢ⁺ḥȧ⁹ .rOƘ,ṃȯJƓṄƭ3ƝṁṫY-ŻḂƇS|~Ƭø’
ṀḶS+Ṃị¢

A monadic Link accepting a pair of integers in \$[1..10]\$ which yields a number.
Try it online!
How?
“...’BT3+.;Żṃ@“...’ - Link 1, get lower left of table as a flat list: no arguments
“...’               - a large number in base 250
     B              - convert to binary
      T             - truthy indices
       3+           - add three to them all -> all distinct values except 0 and 0.5)
         .;         - prepend a 0.5
           Ż        - prepend a zero -> all 37 distinct values
              “...’ - a large number in base 250
            ṃ@      - convert the large number to base 37 using the values as the digits
                      -> [0, 0.5, 8, 4, 5, 10, 5, 6, 16, 32, 6, 12, 13, 25, 50, 7, 14, 12, 25, 24, 32, 8, 12, 24, 29, 40, 48, 42, 9, 18, 32, 36, 45, 50, 54, 48, 10, 19, 21, 28, 40, 72, 60, 74, 72, 9, 22, 33, 48, 60, 72, 84, 56, 81, 110]

ṀḶS+Ṃị¢ - Link, get answer: list of two integers in [1..10], [a,b]
Ṁ       - maximum ([a,b])
 Ḷ      - lowered range -> [0,1,...,max(a,b)-1]
  S     - sum these up
    Ṃ   - minimum ([a,b])
   +    - add
      ¢ - call last Link (2) as a nilad -> lower left of table as a flat list
     ị  - index into

05AB1E, 100 bytes
-2 thanks to Kevin Cruijssen.
•k?-…ÚêQïBJÿ}Å0ß7E'ûcŒa’н
[α¡¥jεĆ3fΣòZεgǝ/ζân[Qx¯#g)zòš¤¥Ägq)†c³±!Ãæwª“‹í«“ε®™â©₂ÿQ`•ƵAв1;š¬9ǝ0šs<Jè

Try it online!
05AB1E, 102 bytes
The number 2 never appears in the multiplication table, so I used it to compress the list of the numbers.
•AjĆмÁмyÌÁÅÿ‰™ªŸ∞mÇ,—.¿b!:ý₆¥p¶ço₃w`2å,3‚ĆžáààÄd±íŠH¢Xζ±-ε₁ÎZ₆ºλΓm.Óc9˜}‘UÔœ`Ÿā£ƒn¨£T•111в2¸1;¸‡0šs<Jè

Try it online!
Explanation
•AjĆмÁмyÌÁÅÿ‰™ªŸ∞mÇ,—.¿b!:ý₆¥p¶ço₃w`2å,3‚ĆžáààÄd±íŠH¢Xζ±-ε₁ÎZ₆ºλΓm.Óc9˜}‘UÔœ`Ÿā£ƒn¨£T•111в

The huge compressed table

2¸1;¸‡ Translate all 2's into 0.5's
0š     Prepend a 0 (which is removed during base conversion)
s      Swap up the list of indices.
<      Decrement both indices.
J      Join these indices into a single number.
è      Index into the table.
```

... why did you answer three times instead of editing your single answer until it was correct?

111 can be ƵA (or 7b) for -1. Also, if you can use 1;š¬9ǝ instead of 2¸1;¸‡ (same byte-count), the compressed integer can be 1 byte smaller by removing the leading 2 of the initially compressed list: 100 bytes.

JavaScript, 114 113 bytes
Input as f(1)(2). Port of @dingledooper's Python 3 answer.
a=>b=>` \0
 \r2 (0*	 $-260\n(H<JH	!0<HT8Qn`.charCodeAt((M=a>b?a:b)*~-M/2+(a<b?a:b))%126.5

Try it online!

109 bytes

or 106 in Node


text:
Your code has an uncanny mirror twin…
Write two programs, each taking a string s and a number n ≥ 0, such that:

The first program prints s n times, separated by newlines.
The second program prints each character of s n times, with repeated characters separated by newlines.
Every character at column x, line y in one program equals the character at column y, line x in the other program.

Both programs must contain at least two lines. You may take input in any reasonable order or format that works for both programs.
This is code-golf; the less bytes, the better. Count bytes from your longer program (that is, the one with more lines than columns).

Here's an example in a hypothetical programming language, with s = "Hello, world!" and n = 3:
Program A
a(b*c
defg
h.ij)

Output
Hello, world!
Hello, world!
Hello, world!

Program B
adh
(e.
bfi
*gj
c )

Output
HHH
eee
lll
lll
ooo
,,,

www
ooo
rrr
lll
ddd
!!!

Related, related, and related.

Can one program take s first then n, and the other take n then s?

@Khuldraesethna'Barya The input should be the same format for both programs.

Can I write a function instead of a program?

Do both programs need to be in the same language?

@DomHastings Yes, but using two languages would make for another great challenge!

@SurculoseSputum Yes, functions are fine.

Scoring could be based on the number of source code rows or columns, whichever is larger. That might result in interesting, ideally more square-shaped programs.

C, 196 bytes

Regular version: 190 bytes
p;f(char *s,n) {
; while( p++<  n)
puts(s);p; }   /*
f*******u*0**;* /
(///////t/)//}+*
c*)dfppnc(;p(w+/
hs{oo=+;h* u"hs}
a, {r0+)a /t"i)/
rn  (;< r *s l;*
/////// /  / e/
******* *  * (*/

Mirrored version: 196 bytes
p;pf(char/*
; u*/*s,n/*
fwt*/){  /*
(hs*/do{ /*
ci(*/for(/*
hls*/p=0;/*
ae)*/p++</*
r(;*/n;)
  putchar/*
*p;+*/(*
s+ 0); /*
,+}*/puts/*
n< */(""
)  ;}while(
   *++s);/*
{n/ */}/* /
 )*/

Readable regular version:
p; f(char* s, n) {
  ;
  while (p++ < n)
    puts(s);
  p;
}

Readable mirrored version:
p; pf(char* s, n) {
  do {
    for (p = 0; p++ < n; )
      putchar (*s + 0);
    puts("");
  } while (*++s);
}

Make sure you mirror your spaces, too!

Oh, you got it, sorry! That's what happens when you do the reversing manually...

MATL, 11 bytes
Inputs are s,  then n.
Normal version (10 bytes):
1!X"
XDD
"

Try it online!
Mirrored version (11 bytes):
1X"
!D
XD
"

Try it online!
Explanation
The normal version is parsed as
1    % Push 1
!    % Transpose: does nothing to the 1
X"   % Implicit inputs: n, s. Repeat s n times vertcally and 1 time horizontally
XD   % Display the full stack contents. This prints the output
D    % Display. Triggers implicit input, which is not present, and so errors
"    % For each. This statement is not reached

The mirrored version is parsed as
1    % Push 1
X"   % Implicit inputs: n, s. Repeat s n times vertcally and 1 time horizontally
!    % Transpose. This transforms the above into the desired output
D    % Display. This prints the output
XD   % Display all stack contents. The stack is empty, so this does nothing
"    % For each. Triggers implicit input, which is not present, and so errors

@Downvoter Any suggestion to improve my annswer?

perl, 102 bytes
$_=<>;$n=<>;print$_ x$n
__END__
=E
<N
>D
;_
$_
;
=
<
>
;
s
/
.
/
$
&
x
$
;
.
"
\
n
"
/
g
e
;
p
r
i
n
t

Try it online!
$_=<>;$;=<>;s/./$&x$;."\n"/ge;print
__END__
=E
<N
>D
;_
$_
n
=
<
>
;
p
r
i
n
t
$
_

x
$
n

Try it online!
The programs are fairly trivial, they just do what is required without any trickery. The only trickery is the __END__; this tells perl to ignore anything what is following. That way, hardly anything is shared between the two programs, only the first two bytes are: $_, where the _ is either the name of the variable, or the first character of the __END__ token.

Charcoal, 20 bytes
ＥＮη¿⁰«
Ｎ
η
‖
↙
¿
⁰
«

Try it online! Explanation:
ＥＮη

Convert the input number to an implicit range, map each entry to the input string, and print the result.
¿⁰

Execute the rest of the program only if 0 is true (which it isn't).
«

Wrap the rest of the program in a block, so it doesn't matter what its meaning is, since it never gets executed.
Reflected:
ＥＮη‖↙¿⁰«
Ｎ
η
¿
⁰
«

Try it online! Explanation: Much like the other program, except that the ‖↙ reflects the output as desired.

@Jonah You may be confused as I was. The challenge doesn't ask for a single program to be symmetric. So the double bar may appear at only one place in each program

05AB1E (legacy), 6 bytes
-1 byte thanks to @dingledooper.
иø
»
q

Try it online!
Explanation (Horizontal)
и   Sequence product.
 ø  Transpose this product.
»   Join the product by newlines.
q   Exit the program.

Explanation (transposed)
и   Sequence product.
 »  Join the product by newlines.
  q Exit the program.

A garbage dump the interpreter ignores:
ø
```

Python 2, 95 bytes
First program: 94 bytes

sfp,n=input();"\
,or";s=sfp+"\n"
print s*n;  """
= n
ict
n
pic
un*
t p
(s;
):"
#""
"""
1;
#\

Try it online!
Second program: 95 bytes
s,p=input()#"1#
for c in s:"";\
print c*p;"""
,"n
n;t
=s
i=s
ns*
pfn
up;
t+
("
)\"
;n"
"""
\

Try it online!

Perl 5 + -pF, 51 bytes
I feel I can condense this more so I'll likely tinker with it to try and make it more square...
$_=$_ x<>;'
; f
=xo
<$r
>;@
;.F
$$;
\/}
.|{
=|
$$'

Try it online!
Explanation
Basically this just runs $_=$_ x <> which, since -p flag is used, will just print out the string triplicated. The rest of the string is avoid by being inside a single quote.
$;=<>;$\.=$
_ x$;.$/||$
=for@F;}{'
$
_

x
<
>
;
'

Try it online!
Explanation
This takes n from STDIN (<>) and stores in $;, next the magic variable $\ (which is automatically output as the final argument to any call to print) is appended to with $; copies of $_. $_ is set to each letter of the input during the for@F. We need to also close the implicit while (<STDIN>) loop (that is added via -p) with }{ so that the global $_ is empty and when print is called, only $\ is output.

Mathematica, 114 bytes
Mathematica, with it's long, unsplittable names means that no matter how short I make this, it'll still have obtuse names, the alternative of using <> and #&/@ would be shorter for either individual program, but dealing with them in the transposition makes the program longer overall.
StringRiffle[
t;Table[##],1*
rT;"\n"]&(*  )
ia
nb
gl
Re
i[
f#
f#
l]
e]
[
C,
h"
a\
rn
a"
c,
t"
e"
r]
s&
[(
1*
*)

Normal
StringRiffle[Characters[1*
t;Table[##]],"\n",""]&(*)
rT;
ia"
nb\
gln
Re"
i[]
f#&
f#(
l]*
e,
[1
 *)

Transposed
Base programs:
Normal:
StringRiffle[Table[##],"\n"]&
Transposed:
StringRiffle[Characters[Table[##]],"\n",""]&

Jelly, 10 bytes
Unfortunately, for this challenge, the execution of a Jelly program starts with the bottom line of code, so there's quite a bit of work required to get a solution under about 25 bytes!
W ñ
ẋY
Z
ñ

Try it online!
WẋZñ
 Y
ñ

Transposed
How?
Normal:
W ñ - Link 1: s, n
W   - wrap (s) in a list
  ñ - call the next Link (2) as a dyad - f(that, n)

ẋY - Link 2: wrapped s, n
ẋ  - repeat (s) (n) times
 Y - join with newlines

Z - Link 3 (unused)

ñ - Main Link: s, n
ñ - call the next Link (1) as a dyad - f(s, n)
  - implicit (smashing) print

Transposed:
WẋZñ - Link 1: s, n
W    - wrap (s) in a list
 ẋ   - repeat (that) (n) times
  Z  - transpose
   ñ - call the next Link (2) as a dyad - f(that, n)

 Y - Link 2: transposed, repeated [s]
 Y - join with newlines

ñ - Main Link: s, n
ñ - call the next Link (1) as a dyad - f(s, n)
  - implicit (smashing) print

Stax, 6 bytes
]
*M
m

Run and debug it
Mirrored:
]*m
 M

Run and debug it


text:
Make true and false global!
We all know true and false, but what do speakers around the globe say?
+----------------------+------------+------------+
| Language             | True       | False      |
+----------------------+------------+------------+
| Arabic               | sahih      | zaif       |
| Armenian             | irakan     | kelc       |
| Assamese             | asol       | misa       |
| Breton               | gwir       | gaou       |
| Bulgarian            | veren      | neveren    |
| Catalan              | veritable  | fals       |
| Cornish              | gwir       | gaw        |
| Czech                | pravdivy   | nepravdivy |
| Danish               | sand       | falsk      |
| Dutch                | waar       | onwaar     |
| English              | true       | false      |
| Esperanto            | vera       | malvera    |
| Finnish              | tosi       | epatosi    |
| French               | vrai       | faux       |
| Galician, Portuguese | verdadeiro | falso      |
| Georgian             | namdvili   | cru        |
| German               | wahr       | falsch     |
| Greek                | alithis    | psevdis    |
| Hebrew               | hiyuvi     | shikri     |
| Hindi, Urdu          | thik       | jhutha     |
| Hungarian            | igaz       | hamis      |
| Icelandic            | sannur     | rangur     |
| Indonesian, Malay    | benar      | salah      |
| Irish                | fior       | breagach   |
| Italian              | vero       | falso      |
| Japanese             | shin       | nise       |
| Korean               | cham       | geojit     |
| Latin                | verus      | falsus     |
| Latvian              | patiess    | nepareizs  |
| Mandarin Chinese     | zhen       | jia        |
| Maori                | pono       | pate       |
| Persian              | dorost     | galat      |
| Polish               | prawdziwy  | falszywy   |
| Romanian             | adevarat   | fals       |
| Russian              | vernyj     | falsivyj   |
| Sardinian            | beru       | falsu      |
| Scottish Gaelic      | fior       | breugach   |
| Spanish              | verdadero  | falso      |
| Swedish              | sann       | falskt     |
| Sylheti              | hasa       | misa       |
| Turkish              | dogru      | yanlis     |
| Volapuk              | veratik    | dobik      |
| Welsh                | gwir       | anwir      |
+----------------------+------------+------------+

All words ASCIIfied from Wiktionary: true, false. Preference given to first entry under 'A state in Boolean logic that indicates an affirmative or positive result'/'state in Boolean logic that indicates a negative result', then first entry under 'concurring with a given set of facts'/'untrue, not factual, wrong'. I apologise if your favourite language is not included or the word choice for your language is not optimal - go edit Wiktionary!
Write a program or function that takes one word from the table above as input and outputs a consistent truthy value if the word means 'true' and a consistent falsy value otherwise. Your code must produce the correct output for all 79 possible inputs. Shortest code (in bytes) in each language wins.
Sorted list of unique words meaning 'true':
adevarat,alithis,asol,benar,beru,cham,dogru,dorost,fior,gwir,hasa,hiyuvi,igaz,irakan,namdvili,patiess,pono,pravdivy,prawdziwy,sahih,sand,sann,sannur,shin,thik,tosi,true,vera,veratik,verdadeiro,verdadero,veren,veritable,vernyj,vero,verus,vrai,waar,wahr,zhen

Sorted list of unique words meaning 'false':
anwir,breagach,breugach,cru,dobik,epatosi,fals,falsch,false,falsivyj,falsk,falskt,falso,falsu,falsus,falszywy,faux,galat,gaou,gaw,geojit,hamis,jhutha,jia,kelc,malvera,misa,nepareizs,nepravdivy,neveren,nise,onwaar,pate,psevdis,rangur,salah,shikri,yanlis,zaif

Is there any particular reason the output format is so strict?

@UnrelatedString What do you mean? You're only required to output truthy or falsy.

Two specific strings is a lot more than the typical "your language's truthy or falsy"/"two consistent values"/"one consistent and one non-consistent value".

@UnrelatedString That's what I mean by truthy and falsy. You're not required to output the literal strings 'truthy' and 'falsy'. I'll clarify in the question.

Using Anders Kaseorg's method on a related question I can get a 61-byte lambda function in Python 3 that takes a bytes object and returns 0 or 1. Since the author might want to post it I'll only leave this comment and keep the program hidden. // The same approach (but with details modified a little) fits in 21 bytes in Jelly.

@user202729 Sounds like an interesting approach. I think you should post your Jelly answer, at least.

Notice that, for Portuguese, there's "verdadeiro" and "verdadeira". And when we say that something is "true", we say "verdadeiro", "verdadeira" or "verdade". For example: "what (s)he said was true" can be translated to "o que ele/a disse é verdade" or "o que ele/a disse é verdadeiro" (less common). An example with "verdadeira" could be: "ela é uma pessoa verdadeira à sua palavra" ("she's a person true to her word"). Another example is "essa observação é verdadeira" ("that observation is true"). Tl;dr: Portuguese maybe should be "verdadeiro", "verdadeira", "falso", "falsa" and "verdade".

The Swedish row is not correct, because different forms of the adjectives are used: "sann" is common singular while "falskt" is neuter singular. You should use the same form, either common ("sann", "falsk") or neuter ("sant, falskt"). Neuter is the best choice in this case, and the one used by Microsoft Excel, for instance.

A nice property that some languages might find useful: the products of the bytes don't overlap modulo 257, so you could make a lookup table of the 36 different falsey values using 1 byte per value.

The Czech row says "pravdivy/nepravdivy", but those are the adjective forms. A programmer desiring to code in Czech would more likely use "pravda/nepravda" instead.

Curious how you determined the ASCII transliterations. Some look unusual to me. But it's probably not worth changing the requirements, the problem just becomes "act as required on these exact inputs, accurate/meaningful or not".

@JohnDvorak "true" and "false" are also adjectives. The English noun forms are "truth" and "falsehood".

@aschepler The transliterations come straight out of Wiktionary - I just dropped accents. It's unfortunate that there may be errors in Wiktionary, as pointed out by other commenters, but making changes now would be quite unfair to those who have already answered. You are correct - the challenge is indeed intended to be 'act as required on these exact inputs'.

Python 2, 56 48 bytes
thanks to dingledooper for -8 bytes!
lambda s:0x420AF14A5F8266>>hash(s)%3317%890%57&1

Try it online!
All these answers do the same thing:

Convert the string into an unique integer.
Makes these integers smaller by repeated modulo operations.
These operations are bruteforced to make the numbers as small as possible while not mixing up the two classes.
Index into a binary lookup table.

Python 3, 59 58 bytes
lambda s:0x48A2D06199310566F06>>int(s[:4],36)%542%400%78&1

Try it online!
lambda s:0x453CCA1066840810431C1>>int(s,36)%2387%1770%86&1

Try it online!
lambda s:0x42744262AEA01A914800A12C>>int(s,36)%155687%95&1

Try it online!

05AB1E, 30 29 28 bytes
4öŽ3¹%Ƶ™%84%o•1±87÷Ðˆù³Í:•&Ā

Try it online!
6öŽ9{%521%76%o•B&¦¿³ʒв F6•&Ā

Try it online!

How did you find the equation?

@PkmnQ bruteforcing, a lot of it. And I need to try a lot of different thing, like multiplying the integer by some constant, different ranges for the modulo, different numbers of modulo operations, ...

Can't you remove the [:4]? (and change the modulus values)

@user202729 this might be possible, but the modulo chain needs to be entirely recomputed. And the shortest modulo chain I found for int(s,36) is the initial 59-byte version.

I managed to get 48 bytes.

@dingledooper Your bruteforcer must be faster :). Is it written in Python or a different language?

@ovs I used C++ (which is many times faster). Actually, I was extremely lucky to encounter such a small modulo that worked; most of them were %80 or greater.

@dingledooper I have now written a more specific bruteforcing program with Cython, which can at least reproduce in about 10 minutes. I also checked up to 20000 for the largest modulo operation and couldn't find anything better.

@ovs Feel free to update your current Python answer with the 48-byte one :).

Ruby -n, 54 49 47 bytes
p !/^[fgmryz]a|[ncks][erw]|[bjm][hir]|ep|la|te/

Try it online! - truthy
Try it online! - falsy
Thanks to Dingus for a byte saved and Value Ink for inspiring another -2.

@Dingus $_!~/^ reads more like Perl than Ruby to me :)

Currently the shortest regex. Nice!

You should list the language as "Ruby -n" or something like that. https://codegolf.meta.stackexchange.com/a/14339 Also, I'm personally a fan of p ! ~/... even though the bytecount doesn't change.

@ValueInk, thanks for reminding, I wish TIO template would include flags automatically, as I keep forgetting them.

BTW, this juggling with output methods actually yielded another -2 bytes

This use of ! seems to behave like a converse of Regexp#~, but as far as I can work out it's not documented.

@Dingus yes it is ;)

@AsoneTuhid Turns out I've previously upvoted that answer of yours. Clearly wasn't paying enough attention :)

Retina, 68 67 60 58 bytes
^(n?a[^n]|be|ch|gw|p[or]|sa[hn]|h?[itvw]|zh)|as|ss|in|og?r

Try it online!
Regex that matches all truthy values and none of the falsey ones.
Verify all truthy inputs
Verify all falsey inputs

Would it be shorter to match falsy inputs instead? (they seem to have a very common substring fa) (I'm not sure whether you can output inverted, probably not)

@mypronounismonicareinstate Yes it should. Porting my regex to Retina would be 49 bytes + whatever is required to invert the result.

If so, this works for 54 bytes (I won't be surprised if there's a shorter way to invert the regex, though) (assuming Arnauld is okay with their regex being stolen)

@mypronounismonicareinstate Sure. Now 51 bytes, btw.

@Arnauld Thanks, but I feel that updating my answer now would  make it too similar to the other answers that use regex (currently yours and the Ruby answer)

C (gcc), 55 52 bytes
-3 bytes thanks to @G. Sliepen
f(s){s=0x4240165C085F34>>a64l(s)%19537U%11702%56&1;}

Try it online!
The strategy used is the same as in @ovs's answer. We brute-force values corresponding to each string, making sure that no two truthy and falsey words share the same value. The answer is then extracted from a binary lookup table.
Here, the a64l() function converts a given string into a 32-bit signed integer.

"32-bit unsigned integer" should that be "signed"? (so you have to use a byte (U) to convert it to unsigned?

@user202729 I double-checked, and you are correct. Fixed now.

52 bytes by converting it to a function: f(s){s=0x4240165C085F34>>a64l(s)%19537U%11702%56&1;}

@G.Sliepen That is interesting. Can you explain why the s parameter doesn't need to be declared with char*?

If you don't declare it, it becomes an int. Since you didn't #include <stdlib.h>, the compiler doesn't know that a64l() expects a string, so it just passes on the "integer" s. a64l() in turn interprets it as a pointer again. The trick with assigning the result to s causes the result to also become the return value due to the calling conventions. Of course these techniques should only ever used for Code Golf :)

x86-64 machine code, 27 bytes
Hexdump:
6b 01 35 c1 e8 06 6b c8 d3 d1 c1 48 ba 4e 88 00
02 c3 45 88 8b 48 d3 e2 1a c0 c3

A function which receives a pointer to the string in rcx, and returns the result in al.
−1 means true, and 0 means false.
Assembly source code, using ml64 (MASM) syntax:
.CODE
my PROC
    imul eax, dword ptr[rcx], 53
    shr eax, 6
    imul ecx, eax, -45
    rol ecx, 1;
    mov rdx, 8b8845c30200884eh;
    shl rdx, cl;
    sbb al, al;
    ret;
my ENDP
end

Disassembly, while stopped on a breakpoint at the start of the function:
00007FF73978F4A0 6B 01 35             imul        eax,dword ptr [rcx],35h
00007FF73978F4A3 C1 E8 06             shr         eax,6
00007FF73978F4A6 6B C8 D3             imul        ecx,eax,0FFFFFFD3h
00007FF73978F4A9 D1 C1                rol         ecx,1
00007FF73978F4AB 48 BA 4E 88 00 02 C3 45 88 8B mov         rdx,8B8845C30200884Eh
00007FF73978F4B5 48 D3 E2             shl         rdx,cl
00007FF73978F4B8 1A C0                sbb         al,al
00007FF73978F4BA C3                   ret

It uses hashing, like many other answers. The hash function uses the first 4 bytes of the string - by luck, all strings are at least 4 bytes long (including terminating zero byte). It does the following:

Multiply by 53, ignoring overflow
Shift right by 6 bits
Multiply by -45, ignoring overflow
Rotate left by 1 bit
Access the 64-bit hash table, using 6 LSB of the result

Found by brute-force search. The search space was 8 + 5 + 8 + 5 = 26 bits. The "rotate left" bit count is 1 by luck, which reduces code size by 1 byte, compared to the general "rotate left" case.

Could your MASM code possibly be made to work with JWasm? (I don't know how to initialise rcx.)

See here. Not sure about how it's best to format it. Also, in assembly language its length is too big; I prefer machine code.

I'm impressed that x86 is able to beat all of the golfing languages. Clearly our encodings are not good enough yet!

I suspect all the golfers just didn't try hard enough. user202729 suggests that there is a short answer in Jelly.

Brachylog, 70 bytes
¬{~ṇ"pate
shik
dob
sal
ham"∧"nezabrcrpsangagenifa"ġ₂;?,"yeojrkm"∋∋~a₀}

Try it online!
Takes input through the output variable and outputs through success or failure.

Charcoal, 41 bytes
¬∨⁼θgaw⊙⪪”&⌈→⊖Ｌ↓＆s⦃R⁹ＣV÷⊕O⸿↔Vf‴λ⌕9↶7”²№θι

Try it online! Link is to verbose version of code. Output is a Charcoal boolean, i.e. - for true, nothing for false. Explanation:
   θ                Input string
  ⁼                 Equals
    gaw             Literal string `gaw`
 ∨                  Boolean Or
         ”...”      Compressed string `bibrcrepfagujhjikekrlamaminenwouseteyaza`
        ⪪     ²     Split into substrings of length 2
       ⊙            Where any is nonzero
               №    Count of
                 ι  Current substring in
                θ   Input string
¬                   Boolean Not
                    Implicitly print

JavaScript (ES6),  63 62  60 bytes
Saved 2 bytes thanks to @Neil
A regular expression that matches all falsy words and none of the truthy ones.
s=>!/ao|mi|ob|w$|[gnst]e|[bck]r|[flz]a|^[ejkmry]|nw/.test(s)

Try it online!

Try matching rangur using ^r instead of ng?

@Neil Nice one :)

05AB1E, 41 39 bytes
.•6ðó_ ï²£Ëý¾Sð7§Ê³®6´¡Žmã•2ôåàI…gawQ~≠

-2 bytes by using a shorter compressed string from @Neil's Charcoal answer, who apparently uses the exact same approach.
Try it online or verify all test cases.
Explanation:
.•6ðó_ ï²£Ëý¾Sð7§Ê³®6´¡Žmã•
         # Push compressed string "bibrcrepfagujhjikekrlamaminenwouseteyaza"
  2ô     # Split it into parts of size 2
    å    # Check for each whether it's a substring of the (implicit) input-string
     à   # And check if any is truthy
I        # Push the input again
 …gawQ   # Check that it's equal to string "gaw"
~        # Check if either of the two is truthy by using a bitwise-OR
 ≠       # And invert the boolean (!= 1)
         # (after which the result is output implicitly)

See this 05AB1E tip of mine (section How to compress strings not part of the dictionary?) to understand why .•6ðó_ ï²£Ëý¾Sð7§Ê³®6´¡Žmã• is "bibrcrepfagujhjikekrlamaminenwouseteyaza".

What was your previous compressed string? The edit history is unenlightening...

@Neil Oh, I edited a few seconds too soon apparently before the grace period of 5 minutes was over.. -_-' It was "aobrcreleoepfahuiaifkrlamaminengninlnwobpste" (.•bÙвfƒôSÐ4Ólα$šη€mªδP‚Á¥PnÀ•)

So the uncompressed string was the same, but you just found a better way of compressing it? Or have I missed something?

@Neil Now it probably makes more sense.. Not sure how I ended up copying the wrong strings to my answer (the TIOs were correct..) It went from .•bÙвfƒôSÐ4Ólα$šη€mªδP‚Á¥PnÀ•/"aobrcreleoepfahuiaifkrlamaminengninlnwobpste" to .•6ðó_ ï²£Ëý¾Sð7§Ê³®6´¡Žmã•/"bibrcrepfagujhjikekrlamaminenwouseteyaza"

Ah, thanks, it's good to know that my list of falsy letter pairs is pretty short!

Io, 109 bytes
-10 bytes thanks to Neil.
method(x,"bi br cr ep fa gu jh ji ke kr la ma mi ne nw ou se te ya za gaw"split select(i,x findSeq(i))size<1)

Try it online!
Io, 119 bytes
Searches for prefixes of existing values.
method(x,"dob fa ga ham an br cr e pate ge j k ma mi ne ni on ps sal shik ra ya za"split select(i,x findSeq(i)==0)size)

Try it online!

method(x,"bi br cr ep fa gu jh ji ke kr la ma mi ne nw ou se te ya za gaw"split select(i,x findSeq(i))size<1) is 109 bytes, and also gives the correct truthiness.

C (gcc), 125 \$\cdots\$ 101 95 bytes
Saved a byte thanks to ceilingcat!!!
#define f(s)!index(" %&(-.049;ADHJQRSYZis",*s**s*s[l=strlen(s)-1]*s[l-1]%3519%163%108%92+32)
l;

Try it online!
Inputs a string and returns \$1\$ for words meaning 'true' and \$0\$ for words meaning 'false'.
How?
The first, second to last, and last characters of all the word strings form a unique triplet of characters across all words. Multiplying the ASCII values of first character squared and the other two together yields unique 32-bit integers across all words. These numbers modulus values found by a Python script yield a distinct set of integers for all 'false' words in the range \$(0,96)\$. These numbers can then be transformed back to printable ASCII characters by adding \$32\$ to them. Then it's simply a test if a string put through these calculations yields a character that can be found in a given string (also generated by the Python script).