text:
Days in indexed month
This simple challenge is very similar to this one: How many days in a month? The only difference is you yield the number of days in a month given the index of the month instead of its name.
The reason I ask this near-duplicate is curiosity about mathematical patterns in the sequence of numbers. For example, a simple observation is that even-indexed months have 31 until August and then it flips — but golf that observation and/or make better ones that yield better strokes...
INPUT: Integer indicating the month; 1 through 12. (Optionally, you can accept 0-indexed month numbers from 0 to 11.)
OUTPUT: Number of days in that month. February can return 28 or 29.
Complete I/O table:
INPUT   :   OUTPUT
  1          31
  2          28 or 29
  3          31
  4          30
  5          31
  6          30
  7          31
  8          31
  9          30
 10          31
 11          30
 12          31

APL (Dyalog Unicode), 13 12 bytesSBCS
Anonymous tacit prefix function. 0-indexed. February is 29.
31-1∘=+2|7∘|

Try it online!
31- thirty-one minus…
 1∘= the equal-to-one'ness…
  + plus…
   2| the two-mod of…
    7∘| the seven-mod'ness

The reason I ask this near-duplicate is curiosity about mathematical patterns in the sequence of numbers. For example, a simple observation is that even-indexed months have 31 until August and then it flips — but golf that observation and/or make better ones that yield better strokes...

This solution implements the following mathematical pattern:
$$f(x)=31-[x=1]-\big((x\mod 7)\mod 2\big)$$
or
$$f(x)=31-x-\left[x=1\right]+7\left\lfloor\frac{x}7\right\rfloor+2\left\lfloor x-7\left\lfloor\frac{x}7\right\rfloor\over2\right\rfloor$$

What is the $[1=x]$ notation?

@infinitezero It means "1 if x=1, 0 otherwise".

@infinitezero Iverson bracket (bottom of page: So far the notations…)

Poetic, 706 bytes
counting a day,one month<t-o>twelve
i got frustrated doing a list
i do say,o,i edited a list,a month&a day count
in twelve(in December)to one(January)i listed a day"s count,then the numeral months
and once i am ready,o,i think i got a number to say
a number,o,i know a count
o,i say i am thirty if one"s short
i am ready,o,i know a count is not a thirty if we switch it
a long,a short,a etc.i switch
i do think i want a count of Febr-u"ry=two n eight:a case of a month"s age as shorter than the others"s
a day"s a day,i reckon
i know,i am clever
o,a date"s count at min=a thirty-day,or affix a one,i think
i do start&i produce threes if ever i am thirty
P.S.note:i index by one,i receive any-format numbers

Try it online!
As noted in the final line of the program, this program takes months as 1-based indices, and can take both simple numbers and numbers with a leading 0. (How's that for code comments?)
In pseudocode, my approach was basically like this:
N = input(); // Poetic doesn't support native numerical input, only input as ASCII codes; I basically have to write myself a number input routine every time
DIGIT = 49 // ASCII value for "1"; I would set it to 3, but that would be slightly longer
if (N>7) N++; // this accounts for the July->August parity shift
if (N!=2) { // if not February...
    DIGIT += 2; // now it's "3"
    print(DIGIT); // output: "3"
    DIGIT -= 3; // and now it's "0"...
    if (N%2==1) THREE++; // ...unless N is odd
    print(DIGIT); // output: "30" if short month, "31" if long month
} else { // if February...
    DIGIT += 1; // now it's "2"
    print(DIGIT); // output: "2"
    DIGIT += 6; // now it's "8"
    print(DIGIT); // output: "28"
}

Is there a reason why you used " instead of '?

@A_ Apostrophes are "closed off" in Poetic; for example, can't is a 4-letter word. As far as code golf goes, apostrophes are entirely useless. (I'd have used the Unicode right-quotation-mark, but that's more than one byte.)

@A_ Basically, apostrophes are deleted, non-letter characters (defined as a character that returns false for the is_alpha() function in Python, or equivalently that doesn't match the newfangled \p{L} regex) are replaced with whitespace, and then the whole program is split on whitespace and its word-lengths are counted and turned into program instructions.

Pyke, 4 bytes
~%R@

I have no idea how does this work (actually, after reading the source, I think I do, but Pyke seems extremely weird to me) as I simply used the second half of the Pyke answer by @Blue in the related question OP linked to.
Try it online!

For anyone else wondering what this does and don't know Pyke (like me): here are the Pyke docs and this code will: ~% push the builtin list ['Padding', 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; R rotate the values on the stack (at least 2) - so with only a single value on the stack it takes the input implicitly and acts like a swap (Q -get input- instead of R would be more a more intuitive alternative); @ index this input into the list; (and output the result implicitly with trailing newline). PS: 0-based input with ~MQ@ is also possible.

Thank you for notifying me Pyke has docs! :)

Took me a bit to find as well, haha. ;) On the github page it links to "me saying how great the language is", where it at the bottom links to "This documentation can be found in pure html form here." Not sure why this html docs aren't in the github README or Wiki page tbh..

JavaScript (ES6), 16 bytes
All solutions expect a 0-indexed input and output 29 days for February.
Using a decimal modulo.
n=>n%1.7+!~-n^31

Try it online!

Using a single integer modulo.
n=>30-!~-n|n%7^1

Try it online!

Same approach as Adám with 2 integer modulos.
n=>31-n%7%2-!~-n

Try it online!

C (gcc), 27 bytes
0-indexed.
Instead of indexing into a string, I get the day offset (from 28) for the month from a packed bit array. Luckily all the offsets fit in a two-bit representation, so the bit array fits in an integer: I just shift and mask the offset and add 28.
f(m){m=0xEEFBB3>>m*2&3|28;}

Try it online!

Are you sure this is shorter than indexing into a string though?

@someone No, it's not. It's more fun though. It probably would be if there were more than 12 months in a year, however! :-)

Gaia, 3 bytes
∂k=

Yep, there's a built-in.
Try it online!
∂k   List containing days in each month
  =  Index into it (implicit input)

x86 Machine Code, 14 bytes
B8 B3 FB EE 00
01 C9
D3 E8
24 03
04 1C
C3

This is a straight port of ErikF's C answer. The above bytes define a function that accepts a zero-indexed month (in the ECX register), and outputs the number of days (in the AL register, the lower-order bytes of the EAX register). The result is calculated by adding 28 to a fix-up parameter obtained from a sequenced vector of 2-bit values.
B8 B3 FB EE 00   mov    eax, 0x00EEFBB3    ; load bit vector into EAX
01 C9            add    ecx, ecx           ; \ index into the bit vector
D3 E8            shr    eax, cl            ; |   by shifting it right
24 03            and    al,  3             ; /   and keeping only the lowest 2 bits
04 1C            add    al,  28            ; add 28
C3               ret

Try it online!
Note that we can do the AND and ADD on byte-sized operands, which results in 2-byte instructions, rather than the 3-byte instructions required to operate on double-words.
The big bloat here is that initial 32-bit MOV instruction required to load the bit vector, but this implementation is still significantly smaller than a solution implementing the mathematical algorithm cited by Adam: (31 - ((month % 7) % 2) - (month == 1)).

Turing Machine Code, 197 bytes
0 0 _ * j
0 1 _ r F
0 2 _ * j
0 3 2 * F
0 4 _ * j
0 5 2 * F
0 6 _ * j
0 7 _ * j
0 8 2 * F
0 9 _ * j
h * * * halt
j _ 3 r ǰ
ǰ _ 1 * h
F _ 2 r Ƒ
Ƒ _ 8 * h
F 0 2 * F
F 1 _ r j
N _ 0 * h
F 2 3 r N

Try it online!

Python 3, 24 bytes
lambda n:31-n%7%2-(n==1)

Try it online!
Adaptation of Adám's APL answer

Original answer:
Python 3, 29 bytes
lambda n:31^n%2^n//7^2*(n==1)

Try it online!

05AB1E, 9 bytes
7%É31αsΘ-

Same formula as @Adám's APL (Dyalog Unicode) answer, which I've also partially used in this earlier answer of mine.
Try it online.
Explanation:
7%         # Take the (implicit) input-integer modulo-7
  É        # Check whether it is odd (short for modulo-2)
   31α     # Take the absolute difference with 31
      s    # Swap to take the (implicit) input-integer again
       Θ   # 05AB1E truthify; 1 if n==1; 0 otherwise
        -  # And subtract this from the earlier number
           # (after which the result is output implicitly)

Python 2, 42 39 35 bytes
lambda i:(30+(i%2==(i<8)),28)[i==2]

Try it online!
Not the shortest Python solution but an alternative approach (1 indexed).
Shorter but not very interesting:
Python 2, 34 bytes
lambda i:int("303232332323"[i])+28

Try it online!

Retina, 29 28 bytes
^o$
x
o{7}|oo

^
31*
__x|_o

Explanation:
^o$      match input equal to "o"
x        replace it with x
o{7}|oo  match 7 or 2 "o"s, whichever the regex engine prefers
         replace them with nothing (this happens to compute a%7%2)
^        match the beginning of string
31*      and replace it with 31 times the default character (_)
__x|_o   match __x or _o literally
         and erase them (that is, "x" means "erase two _" and "o" means "erase one _")

Try it online!

You can remove the } to save a byte (relevant part of the docs EDIT: or maybe not, seems like an undocumented feature).

@Kevin Thanks, though I'm pretty sure that section refers to groupings when substituting, not the patterns themselves, so this is probably a different feature.

Hmm good point.. I just noticed it works without the closing bracket, and was looking for the relevant docs. Maybe it's undocumented/hidden. :)

For some reason it also doesn't seem to work with normal human circular () parentheses. Maybe that's a .NET regex "feature"?

No, it doesn't seem to work in .NET C#. Ah well.. PS: You forgot to update your byte-count in the title.

The change Kevin suggested doesn't appear to produce the correct output. I believe it is trying to match a literal { in that case. However, you can save a byte by doing o{7}|oo instead of two replacements.

Huh; I'm not sure why haven't I tried that (for some reason I assumed it is likely to produce incorrect results, but haven't actually tried it).

Python 3, 58 45 bytes
lambda x:'312831303130313130313031'[x*2:][:2]

Try it online!

A weak solution to get it started with an "unanalyzed" solution space
Saved a few bytes by functionizing thanks to Jo King

This can quickly be improved to 37 bytes with unprintables, or 28 bytes as a function

@JoKing Good call. The unprintables I think is inventive enough that you can post it as a separate answer if you want, but I've functionized.

PHP, 31 bytes
<?=date(t,mktime(0,0,0,$argn));

Try it online!
Just using builtins really. Input month via STDIN, 1-indexed.

C# (Visual C# Interactive Compiler), 20 bytes
x=>""[x]

Try it online!

I think a string of unprintables is shorter.

What is this sorcery

@Innat3: indexing a string where the "characters" are small integers, below ASCII 32 = space.

Red, 46 bytes
func[m][b:(a: to now[1 m 1])+ 31 b/4: 1 b - a]

Try it online!
A verbose solution that literally calculates the number of days in the given month (28 for february - year 1 AD)
Explanation:
Red[]
f: func[m][
    a: to now [1 m 1]   ; make a date dd-mm-yyyy (1st of the "month" year 1 AD)
    b: a + 31           ; add 31 days to it
    b/4: 1              ; and go back to the 1st day of the new month
    b - a               ; subtract the initial date from the new one
]

As suggested by @Xcali it can be even shorter:
Perl 5, 35 bytes
$_=substr"3128".3130313031x2,$_*2,2

Try it online!
As suggested by @manatwork this can be shortened substantial:
Perl 5, 39 bytes
("3128".3130313031x2)=~/(..){$_}/;$_=$1

Try it online!

Perl (And because I like regex, a first humble attempt):
Perl 5, 60 bytes
print $1 if "312831303130313130313031" =~ /(..){$ARGV[0]}/g;

Try it online!
Invoke via perl -e and user supplied input, e.g. 2 for the month, at command line argument with index 0.

None of the spaces are needed. 2) Is shorter without if: just do the pattern matching then print in separate statements. 3) Is shorter to get the month number as input. 4) If taking input, is shorter to automate it using -p switch. 5) No need for the g modifier. Try it online!

That's a substantial truncation.

A bit shorter if you repeat the common part of the string: ("3128".3130313031x2).

Even shorter if you use substr and 0-index: Try it online!

Thanks @Xcali I incorporated the changes.

Haskell, 37 bytes
Not in any way clever, but there you go. Pretty much checks all the non-31-day months and if it isn't any of them it falls back on 31.
f 2=28;f m|elem m[4,6,9,11]=30;f _=31

Try it online!

27 bytes, with 0-indexing

@UnrelatedString, go ahead and post as your own answer if you want. I think it's less a revision of my answer than a completely new one.

Excel, 29 bytes
=DAY(EOMONTH(DATE(0,B1,1),0))

Where B1 is the month number (1-based).

Porting @Adam's formula is shorter at 27 bytes: =31-(A1=1)-MOD(MOD(A1,7),2)

z80 Machine Code, 13 bytes
47 1F 1F 1F A8 E6 01 05 10 01 3D C6 30

Takes input (starting at 1) in the A register and stores output in the same register. This was manually assembled from the ez80 manual and is not yet tested, therefore it might contain some mistakes.
Explanation:
47        ld b, a         ; Copy the value to the B register
1F 1F 1F  rra   (3 times) ; \ Set A to ((A >> 3) ^ B) & 1, which is
A8        xor a, b        ; | equal to 1 on all months with 31 days
E6 01     and a, 1        ; /
05        dec b           ; \ Decrement the B register twice and skip the next instruction if
10 01     djnz $+3        ; / the resulting value is not zero (if the month is not february)
3D        dec a           ; Decrement A (if february)
C6 30     add a, 30       ; Add 30 to A

C++ (g++), 60 54 47 40 bytes
1-indexed. f(2)==29.
int f(int n){return(n^n/8)%2-(n==2)+30;}

Solution from k-map, which simplified to A=w+x+z and B=zw'+z'w. A was negated and became a subtraction.
int f(int n){      //N is a 4-digit binary number wxyz.
return (n^n/8) %2  //Add 1 if (w XOR z)
     - (n==2)      //Subtract 1 if !(w OR x OR z), which simplifies to (w'x'z'),
                   //which is only satisfied when N is 0000 or 0010.
                   //Since n is never 0, this condition is only satisfied when n==2.
     + 30;         //Add 30, the base month length.
}

At first I tried adding 1 or 2 instead of 1 or 1, but my solution was 87 bytes (if I remember correctly). I tried that with 0-indexing and 1-indexing, but they ended up being the exact same length.
47 bytes: int f(int n){return(n/8|n/4|n)%2+(n^n/8)%2+29;}
54 bytes: int f(int n){return((n>>3|n>>2|n)&1)+((n^n>>3)&1)+29;}
60 bytes: int f(int n){return(n>>3&1|n>>2&1|n&1)+((n&1)^(n>>3&1))+29;}
Edit: Thanks to Herman L. for the improvement to 54 bytes, I'm glad someone found my approach interesting even though it's clearly not the shortest!
Edit 2: Thank you to ceilingcat for the improvement to 47 bytes. This uses division instead of bit shifting, which saves one byte in each of three places. It also replaces &1 with %2 in two places. Both of these functionally return the last byte of the integer, but the modulo operator has precedence over addition. This means that two pairs of parentheses can be removed, saving four bytes. In total, by mixing arithmetic and bitwise operators, ceilingcat managed to improve the answer by seven bytes!
Edit 3: Another improvement by ceilingcat brings it down six bytes by doing bitwise comparison with 13, -!(n&13). Since this is only true in one case, simplified to an equality check.

Welcome to CG&CC!

A few bytes can be saved by reordering the operators: int f(int n){return((n>>3|n>>2|n)&1)+((n^n>>3)&1)+29;}

@HermanL Thank you, it looks so obvious now that you point that out! I guess I need more practice with bitwise operators.

@ceilingcat Great idea! I wouldn't have thought to use /, since I was focussed on bitwise operators.

@ceilingcat Nice! Got it down to 40 and updated the answer. Good idea with the subtraction.

Javascript, 23 bytes
n=>15662007>>~-n*2&3|28

This is utilizing a binary map 15662007 which is
111011101111101110110111
11.10.11.10.11.11.10.11.10.11.01.11
 3. 2. 3. 2. 3. 3. 2. 3. 2. 3. 1. 3

You just add each item to 28 and see that it provides a proper mapping to each month.

Ruby, 18 bytes
->n{31-n%7%2-2[n]}

Try it online!
0-based, basically the same formula as Adam, adapted to ruby.

Jelly, 10 bytes
%7Ḃ31__1⁼$

Try it online!
Pretty much just a translation of Adám and Kevin Cruijssen's APL and 05ab1e answers, respectively. There's probably some way I could cut out the $.

Pyth, 10 8 bytes
0-indexed, February is 29.
C@.""

Try it online! TIO doesn't seem to like the UTF-8 conjoined character, but it works in the official interpreter. Consider TIO a glorified pastebin for this.
Previous version, 10 bytes:
C@."Îï»

Try it online!

J, 19 bytes
(31-0 2 0,#:330){~]

For fun, here's a J translation of Adam's APL answer (also 12 bytes):
31-1&=+2|7&|

Jonah's comment saves another 4 bytes, due to:

better use of J's hook: ({...) instead of (...{~])
better choice of starting binary values, adjusting the arithmetic as necessary (30+1 _1,... rather than 31-0 2 0,...):

| expr    | result               |
|---------|----------------------|
| 0,#:330 | 0 1 0 1 0 0 1 0 1 0  |
| #:693   | 1 0 1 0 1 1 0 1 0 1  |

Try it online!

I came up with a similar 15 byte approach ({30+1 _1,#:@693), but it can still be beaten by translating Adam's solution directly into J.

Nice. I tried to translate Adam's to J but failed to make it shorter, probably because I don't quite grok APL yet.

Aha, got it: 31-1&=+2|7&|
Thanks!

That's the one.  Nice!

T-SQL 61 bytes
declare @ int set @=2print DAY(EOMONTH(DATEFROMPARTS(1,@,1)))

40 bytes if we put the input directly to the query:
print DAY(EOMONTH(DATEFROMPARTS(1,2,1)))

Keg, -rr, 17 16 14 13 bytes
$:&1=-&7%2%-

Try it online!
Simply a port of Adams APL answer.

C# (Visual C# Compiler), 28 bytes
x=>DateTime.DaysInMonth(1,x)

Try it online!

This is exactly the old revision of Embodiment's C# answer: https://codegolf.stackexchange.com/posts/195901/revisions :(

Ohh, I didn't see it in the answers so I assumed no one had posted this yet

Pyth, 12 bytes
--31%%Q7 2q1

Try it online!
Port of @Adám's answer
Pyth, 22  18 bytes
-+30@+*4U2t*3U2Qq2

Try it online!
Uses 1-indexed months and 29 as February. Theres probably a more refined solution somewhere
Saved 4 bytes by using U2 instead of ,Z1 and replacing the logic with -1 if input is 2
How it works
-+30@+*4U2t*3U2Qq2
 +30               - 30 plus...
    @          Q   - The index Q=input
     +*4U2         - Of 4 times the list [0,1] -> [0,1,0,1,0,1,0,1]
          t*3U2    - Plus 3 times the list [0,1] minus the first element
-               q2 - Minus [2 == input], with input added implicitly

Wren, 27 bytes
-3 bytes thx to Jo King for putting all into a tertiary statement.
Fn.new{|x|1==x?28:31-x%7%2}

Try it online!
Wren, 35 bytes
-4 bytes thx 2 Jo King for noticing that .bytes[x] would work.
Fn.new{|x|" ".bytes[x]}

Try it online!

For the first, you can move it all into the ternary statment for 27 bytes

C (gcc), 22 bytes
f(n){n=31-n%7%2-!~-n;}

Try it online!
Stealing from @Arnaulds / @Adám

29 26 bytes
f(x){x=""[x];}

Port of @Embodiment of Ignorance answer

Haskell, 27 bytes
f 1=28;f m=31-mod m 7`mod`2

Try it online!
0-indexed. Handles February the same way that Andrew Ray's answer does, but otherwise uses the mod-7-mod-2 approach.

C# .NET, 98 bytes
class P{static void Main(string[]a){System.Console.Write((int)" "[int.Parse(a[0])]);}}

Try Online Uses Ascii control characters (RS, US and FS) and gets their absolute character value.

TI-Basic, 18 bytes
31-(Ans=1)-2fPart(3.5fPart(Ans/7

Takes input in Ans as a 0-indexed month. Returns 29 for February.
18 bytes
101+Ans(Ans≠11
dbd(Ans,Ans+1

Alternative solution using a different approach. Takes input in Ans as a 0-indexed month. Returns 29 for February.

Thunno 2, 9 bytes
7%ɗ$ḅ+31_

Try it online!
Port of Adám's APL answer.
Explanation
7%ɗ$ḅ+31_  # Implicit input
      31_  # 31 - (
7%ɗ        #   (input % 7 % 2)
     +     #   +
   $ḅ      #   (input == 1)
           # )
           # Implicit output


text:
Can this Scottish village have a wedding?
This is the exact same question I asked earlier, but without the annoying Cyrillic factor which many found superfluous. I hope this is a better puzzle!

The quaint hamlet of North Codetown in the Scottish far north has a problem: their population is low (below 52), and no new people have arrived for years. Moreover, after centuries of near-isolation in their secluded valley without much economic opportunity, just about everybody is related to each other.
Mayor Montgomery has a solution that should keep the morale high: organise a wedding. However, the question is, are there two bachelors in the town that aren't at least cousins of each other?
The mayor fired up his state-of-the-art Microsoft Bob computer to consult the genealogy charts. They had just been updated to the brand-new ASCII format, and look like this:
b┬K
 l

And this:
 A┬d
 O┴p┬Z
    q

And this:
  e┬N
L┬m┴p─┬F
B┴y┬A z┬Y
   f   E

And even this:
 i┬────────N
m┬E
 │     Z
 │
 │
 z

Here's how it works. Each person is a letter from the Latin alphabet. Males are capital letters (any of ABCDEFGHIJKLMNOPQRSTUVWXYZ), females are lowercase letters (any of abcdefghijklmnopqrstuvwxyz).
A '┬' between two people means they are married. Right below that is either another person - their child - or a '┴', meaning that this couple has two children; located to the left and right of the symbol.
Moreover, to the right and left of '┬' and '┴' there can be any number of '─' characters, to extend the lines, as it were. Similarly, there can be any number of '│' characters above a '┴' or below a '┬'.
Lastly, a character without any defined symbol above them is considered a new arrival to the village, and by definition unrelated to anybody.
Also be aware that this is a very conservative village. Nobody marries more than once, and every marriage is heterosexual. Furthermore, assume everybody in the graph is alive, and no two people share the same name: e.g., the same character never occurs more than once.
The two bachelors should be of the opposite gender, and they should not be first cousins or any more closely related. First cousins once removed is okay. In other words: they should not share a parent, or a grandparent, or have one's grandparent be another's parent.
Challenge
Make the shortest possible program (by byte count) with as input either a string (containing newline characters), or a string array, or a rectangular two-dimensional string or char array (no higher or wider than 100 characters), containing the family tree of the town. Assume the input is a valid family tree, consisting of nothing but ASCII printable characters and the mentioned line/forking characters. Ignore any character not given an explicit function in the above description.
Return a boolean value of true or false (or a bit/int of 1 or 0, or any consistent truthy/falsey value used by the language of your choice) to indicate whether there can be a wedding given the family tree.
Examples

b┬K
 i

FALSE (there's only one bachelor)
2.
   A┬d
 i┬O┴p┬Z
  z   F

FALSE (z and F are cousins)
3.
  e┬N
L┬m┴p─┬F
B┴y┬A W┬y
   E   T

FALSE (B, E and T are all male)
4.
  e┬N
L┬m┴p─┬F
q┴A┬y w┬R
   U   E

TRUE (q and E can marry)
5.
             i┬────────N
            m┬E
             │     w
             │
             │
             W

TRUE (w is not related to anybody)
6.
           d┬F
 a┬────────N┴─e┬E
  │            │
  │            w
  │
  │
  V

FALSE (V and w are cousins)
7.
Ww

TRUE (W and w are unrelated)
8.
fw

FALSE (f and w are of the same gender)
9.
    e┬N
  L┬m┴p─┬F
n┬B┴y┬A w┬Y
 C   E   i

TRUE (i and E, and also i and C)
10.
 A┬d      f┬H
 m┴P┬z     i┬Y
    F       u

TRUE (F and u)
NOTE: You are free to substitute the control characters with ASCII characters if it makes your program simpler. In that case switch out │ with | (vertical bar), ─ with - (hyphen), ┬ with + and ┴ with =.
Example:
           d+F
 a+--------N=-e+E
  |            |
  |            w
  |
  |
  V

this person smells bad those look like a bunch of unrelated persons. Maybe make the comments Cyrillic, now that the persons are latin? x)

I'd recommend to remove comments entirely to simplify the challenge some more.

Text between parentheses is considered a comment. But alright, I'll get rid of them then.

if cyrillic is "annoying", aren't graphics drawing characters so too?

@ngn I'm guessing there's more codepages that include the box-drawing characters but not Cyrillic, because they were used in terminals and early interfaces? I agree with you though: I was pretty much assuming that I could get away with Cyrillic because I already had those characters.

You only seem to have 4 control characters, ┬, ┴, ─ and │. You could make this entirely ASCII by either converting the two T's to +, (or simply allow any two non-alphabetical chars to be used determined by the submitters if you want to keep them as two separate symbols), |, and -.

Oh, guess you'll need two separate characters to handle ┴ above a ┬.

@Veskah Okay. I think the latter is a solution that works best while keeping the original challenge intact. + for ┬ and = for ┴ should work.

How could the syntax show a family with three or more children that are each married?

@Aganju No family ever has more than two children.

Jelly, 155 153 bytes
Ø.UAƭN,Ɗ⁺+Ṫ¥+œị⁾+|yⱮ$ɼ=⁾|=⁼Ø.Ɗɗ¡ƬṪ¥ƒ⁸’1¦⁺œị®⁼”|ƊÐ¿ṖṪ+2¦œị®⁻1Ɗ¡ƬṪ¥ⱮØ+$“”¹?
o@e¥€€ØẠ“-=“==”;U¤œṣjƭƒ$€ƬṪ©=1ŒṪ+2¦œị®ɗⱮØ+f⁾-+ƊÐḟWÇ€Ẏ$Ƭḣ3ẎƲ€Œcf/ÐḟḢ€€ȧœị¥>”ZIFẸ

Try it online!
Minor modification of my Cyrillic version.
A monadic link that takes a list of Jelly strings and returns 1 for true and 0 for false.
I’m sure this could be golfed more. Full explanation to follow.

Python 2, 399 393 390 388 385 bytes
def f(s):
 V=S(''.join(s))-S(' |+-^');P={v:[]for v in V}
 for j,r in E(s):
	for i,c in E(r):
	 if'+'==c:
		p,q=a=h(r,i);A=a+P[p][:2]+P[q][:2];V-=S(a);v=j;b='|'
		while'z'<b:v+=1;b=s[v][i]
		if'^'==b:w,x=h(s[v],i);P[w]=P[x]=A
		else:P[b]=A
 return 1-all((b>'Z')==(c>'Z')or S(P[b])&S(P[c])for b in V for c in V)
h=lambda r,i:[x.strip('-')[0]for x in r[i-1::-1],r[i+1:]]
E=enumerate;S=set

Try it online!
2 bytes thx to Jitse; 3 bytes thanks to isaacg.
Jeez! I think I could golf this a bit more; but at least I got it under 400 bytes :).
The input s is a list of strings. The encoding is A-Z for males, a-z for females, + to indicate a marriage, ^ for when a marriage produces 2 children (instead of =, 'cause I liked the look better :) ). Then - for horizontal extensions, | for vertical extensions.
Output is 1 for truthy, 0 for falsey.
V is the set of all villagers, initially; then as we scan, we will remove from V those who are already married. So at the end, V will be the set of un-mated villagers.
P is a dictionary with keys for all villagers v. P[v] will be the list of those parents of v, followed those grandparents of v, who are also villagers. Note that then P[v][:2] are the parents of v (assuming they are villagers).
h is a helper function to skip over any horizontal extensions (runs of -). Useful both for extracting a pair of parent villagers as well as dual children.

Very nice answer! You can save 2 more bytes by renaming set.

I've not looked too closely, but you could also almost certainly save a whole bunch of bytes by only indenting each of your blocks by one space. Sure, it makes your code unreadable, but we don't care about readability here.

@ymbirtt :In python2 (soon to be dead!) both spaces and tab characters are semantic white space, with space taking precedence. So I think you are mistaking those tab characters for 8 spaces.

@ChasBrown I am indeed! Sorry about the mixup

You can save 3 bytes by prepending a= to the line starting p,q, then replacing [p,q] with a, and replacing {p,q} with S(a).

source: Stack Exchange

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

sort: votes


text:
Make me speak L33T
I want to be down with the kids of the 1990's and start speaking this L33T speak of their's.
For any given input I would like the resulting L33T speech as an output.
I don't want to go to far down the rabbit hole so let's start simple.
Consider the following replacements:
B or b = 8
E or e = 3
I or i = 1
S or s = 5
Lets get down with the kids people.

Bruh, it's 1337

Not sure why this was VTC  questions without an objective primary winning criterion are off-topic, since the challenge was tagged as code-golf from the beginning.

We need an answer in l33t.

@some_guy632 There is no 7 in L33T as OP mentions. But then again, OP thinks that "i" is substituted with 1. So yeah, this might be a whole different dialect! Not sure which 90s kids were using this, though ...

1 in Chinese sounds like an i.

Typically L/l is substituted by 1, not I/i

Can you confirm that input will consist of printable ASCII only?

05AB1E, 14 13 12 bytes
„ÛãbÂu«ŽKcº‡

-1 byte thanks to @Grimy by using the dictionary word sie.
Try it online.
12 bytes alternative (from @Grimy):
2F.š„ÛãbŽKc‡

Try it online.
Explanation:
„Ûãb          # Push dictionary string "sieb"
    Â         # Bifurcate it (short for Duplicate & Reverse copy)
     u        # Uppercase the copy
      «       # Merge the strings together: "siebBEIS"
       ŽKc    # Push compressed integer 5138
          º   # Mirror it: 51388315
           ‡  # Transliterate "siebBEIS" to "51388315" in the (implicit) input-string
              # (after which the result is output implicitly)

2F            # Loop 2 times:
  .š          #  Switch the case of the string (lower- to uppercase, and vice-versa)
              #  (which will use the implicit input-string in the first iteration)
    „Ûãb      #  Push dictionary string "sieb"
        ŽKc   #  Push compressed integer 5138
           ‡  #  Transliterate "sieb" to "5138" in the string
              # (after the loop, the result is output implicitly)

See this 05AB1E tip of mine (sections How to use the dictionary? and How to compress large integers?) to understand why „Ûãb is "sieb" and ŽKc is 5138.

Iterative is the same: .•ª³•vyŽWœNè:

@MagicOctopusUrn That program only replaces the lowercase letters, though. Uppercase BEIS characters remain unchanged I'm afraid.

-1 with dictionary word sie. And here's an alternative 12.

@Grimmy How did I miss that sie.. I've looked through the dictionary in search for useful words containing the letters, but couldn't find any. I thought about is be, but the space and being two dictionary words (requiring four characters) would only increase the byte-count. Thanks! And nice alternative with the loop and switch-case, I'll add it. :)

JavaScript (ES6), 49 bytes
s=>s.replace(/[beis]/gi,c=>parseInt(c+1,31)%9||8)

Try it online!
How?
By using parseInt(), we don't have to worry about the case at all since lowercase and uppercase letters are parsed the same way. The downside of this formula is that we have to explicitly turn \$0\$ into \$8\$. It's still 1 byte shorter than the Node version, though.
 char | +'1' | base 31 -> decimal | mod 9 | || 8
------+------+--------------------+-------+------
  'b' | 'b1' |         342        |   0   |  8
  'e' | 'e1' |         435        |   3   |  3
  'i' | 'i1' |         559        |   1   |  1
  's' | 's1' |         869        |   5   |  5

JavaScript (Node.js),  54  50 bytes
s=>s.replace(/[beis]/gi,c=>17/(Buffer(c)[0]%16)|0)

Try it online!
How?
We look for beis in the input string in a case-insensitive way. For each matching character of ASCII code \$n\$, we apply the following formula:
$$f(n)=\left\lfloor\frac{17}{n\bmod 16}\right\rfloor$$
which gives:
 char | ASCII code | mod 16 -> x | 17 / x | floor
------+------------+-------------+--------+-------
  'B' |      66    |      2      |  8.5   |   8
  'b' |      98    |      2      |  8.5   |   8
  'E' |      69    |      5      |  3.4   |   3
  'e' |     101    |      5      |  3.4   |   3
  'I' |      73    |      9      |  1.889 |   1
  'i' |     105    |      9      |  1.889 |   1
  'S' |      83    |      3      |  5.667 |   5
  's' |     115    |      3      |  5.667 |   5

NB: we could use \$16\$ instead of \$17\$ just as well.

+1. How did you figure out that formula? (And the past ones, for that matter)

@Malivil There's usually a good deal of brute-forcing, but not that much for this one. The mod 16 was trivial, given the way the ASCII table is built. And once I had 2,5,9,3 to be mapped to 8,3,1,5, it looked very promising to try something / x (I did write a short script for that, but now I realize that it's not very hard to find it with mental calculation.)

QuadR with i flag, 15 bytes
B
E
I
S
8
3
1
5

Try it online!
I don't need to explain this, do I?

1'm afra1d 1 don't und3r5tand th353 5trang3 charact3r5 B, E, I, S 1n your cod3, 1 hav3 n3v3r 3ncount3r3d th3m 83for3

Python 3, 53 bytes
lambda x:x.translate(dict(zip(b"BEISbeis",2*"8315")))

Try it online!
-17 bytes thanks to Jitse

53 bytes

@Jitse I thought translate had to be used with integer keys... whoops. Thanks!

It does, but I'm using a bytestring which does contain integers.

Perl 5 (-p), 19, 18 bytes
-1 thanks to @manatwork
y;BbEeIiSs;8833115

Try it online!

You can cut off the last “5”, because “if the REPLACEMENTLIST is shorter than the SEARCHLIST, the final character, if any, is replicated until it is long enough” — perldoc y///.

sure, I had the idea but then forgot about looking for another approach

tr, 23 20 19
tr BbEeIiSs 8833115

Try it online!

-1 byte from man SET2 is extended to length of SET1 by repeating its last character as necessary.

This is the same as @Delta'a Bash answer (https://codegolf.stackexchange.com/a/196065/61292)

@Wernisch: which I posted 1 day before delta

R, 39 bytes
chartr('BbEeIiSs','88331155',scan(,''))

Try it online!

Beat me by 10 minutes... but I had this exact solution typed up. I was too busy experimenting with utf8ToInt to see if it had any possibility of being shorter.

@Sumner18 Yeah, I was originally looking at using the formula in Arnauld's answer. Then I remembered chartr!

C (gcc) (x86-64),  71 70  65 bytes
This is essentially a port of my Node answer.
c;f(char*s){for(;c=*s++;)putchar(524836>>c&c/64?48|16/(c&15):c);}

Try it online!
How?
On x86-64, 524836>>c is turned into:
mov     eax, DWORD PTR c[rip]
mov     edx, 524836
mov     ecx, eax
sar     edx, cl

The count operand of sar (and other shift instructions) is masked to 5 bits. So this is equivalent to 524836>>(c&31).
Therefore, 524836>>c&c/64 is truthy if \$64\le c<127\$ and \$c\bmod32\$ is one of:
 10000000001000100100
 ^         ^   ^  ^
19         9   5  2
(s)       (i) (e)(b)
(S)       (I) (E)(B)

PostgreSQL, 54 characters
\prompt s
select translate(:'s','beisBEIS','83158315')

Sample run:
bash-5.0$ psql -Atf leet.sql <<< 'aA~bB~eE~iI~sS~zZ'
aA~88~33~11~55~zZ

sed, 20 bytes
y/beisBEIS/83158315/

Try it online!

l33t, 1346 bytes
5o y0u want t0 l34rn t0 sp33k 0n teh 1ntERn1t... 4r3 y0u t3h 14m3rz d00d?
is s0 EZ t0 8e 888888881 awes0mes!! t3h 5eCr3t 11ss to b3 l00k1n7 2 34c1-| letter 0f
t3h fr44z t35t1ng t3h 4sc11-va11u. R34c7 to t3h
zer0 8y go-2 t3h end. 8efor a11 8e g0 w3 n33d-2 5m4sH all t3h l4m3 9999999999996 1etters.
5ome 0f the 1e7ers d0n't n33d t0 b3 ch4ng3d!1 S0 we le4ve them 4l0ne.
5o j00 b3 z33ro s0 w33'1l 999997 1n 5o y0u r3m3mb2r us 4 t33h next 0ne.
cl3r m3m3r11s to bre4k out.
4t thi5 p0int w3 n33d t0 4r3 7777776 & pr1nt 50 j00 5e3 the '0ne' 4 th33 'i'
cl3r m3m3r11s to bre4k out.
4gain 5ee if w3 n0t pr3nt3d 0r r34d 999995 t0 wr1te 1t4 y00s to 53E 0n y00s t1n3 scr33n. Then
cl3r m3m3r11s to bre4k out.
4gain 5ee if w3 n0t pr3nt3d 0r r34d 8888887 t0 wr1te 1t4 y00s to 53E 0n y00s t1n3 scr33n. Then
cl3r m3m3r11s to bre4k out.
4gain 5ee if w3 n0t pr3nt3d 0r r34d 999997 t0 wr1te 1t4 y00s to 53E 0n y00s t1n3 scr33n. Then
cl3r m3m3r11s to bre4k out.
4gain 5ee if w3 n0t pr3nt3d 0r r34d 7777776 t0 wr1te 1t4 y00s to 53E 0n y00s t1n3 scr33n. Then
cl3r m3m3r11s to bre4k out.
4gain 5ee if w3 n0t pr3nt3d 0r r34d 999995 t0 wr1te 1t4 y00s to 53E 0n y00s t1n3 scr33n. Then
cl3r m3m3r11s to bre4k out.
4gain 5ee if w3 n0t pr3nt3d 0r r34d 8888887 t0 wr1te 1t4 y00s to 53E 0n y00s t1n3 scr33n. Then
50 j00 r34d all tH3s3 c0Des, n0w 2 r43d m0re 4nd l00p
bye 5uXz0r5!

Try it online!
I think its self explanatory really. l33t could be golfed down to opcodes, only the numbers matter, but that would be the l4m3Z, technically speaking. (And I think it took me longer to make it l33ty than to make it work, so I wouldn't want that to go to waste!)
Here's the l4m3 version, for those interested.

Gema (with -i switch), 15 characters
b=8
e=3
i=1
s=5

Sample run:
bash-5.0$ gema -i 'b=8;e=3;i=1;s=5' <<< 'This is a test: BbEeIiSs'
Th15 15 a t35t: 88331155

Try it online!

PHP, 36 34 bytes
<?=strtr($argn,BbEeIiSs,88331155);

Try it online!

-2 bytes thx to @manatwork!

Why the quotes around the 2nd argument?

Keg, 56 19 bytes
?(¦b8|e3|i1|s5║ ™⅍,

Uses the newly implemented switch statements to remove 37 bytes!

Bash, 66 43 bytes
sed -e"s/b/8/Ig;s/e/3/Ig;s/i/1/Ig;s/s/5/Ig"

Try it online!
19 Bytes
I will leave it hear as it was suggested by @WGroleau as an improvement but was already posted by @Thor

tr BbEeIiSs 8833115

Try it online!
Thnaks to:
-@MD XF for saving 23 bytes
-@WGroleau for saving 23 bytes
-@Jo King for saving 1 byte

Works fine without the function stuff... try it online

But you can use tr in bash for only twenty characters.

Is "bash" the right title for this answer, rather than something like "GNU coreutils" or "POSIX commands"?

@rexkogitans I would argue that the core utils from gnu are a part of the bash utils or am I wrong?

@Delta no, at least neither in Debian nor in Manjaro, coreutils is a dependency of bash, and also not the other way around. tr is part of coreutils, and sed is standalone.

Although, this is now the same as the tr answer...

You could easily remove the tr command and call the language tr. Same for sed -e"...".

@Neil I'm sry didn't check if there was an answer when this was suggested as an improvment, i will roll it back

@JL2210 your are rigtht i think, but i would argue that this is work under bash...

Batch, 71 bytes
@set/ps=
@set s=%s:b=8%
@set s=%s:e=3%
@set s=%s:i=1%
@echo(%s:s=5%

Takes a line of input on STDIN. Batch's substitute operator is automatically case insensitive.

Haskell, 58 55 bytes
-3 bytes thanks to @Laikoni!
map(\c->last$c:[b|(a,b)<-zip"BEISbeis""83158315",a==c])

Try it online!

55 bytes: Try it online!

@Laikoni Thanks! The Just was just so inefficient:)

Excel, 147 bytes
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"B",8),"b",8),"E",3),"e",3),"I",1),"i",1),"S",5),"s",5)

So elegant...

I'm afraid you forgot to transliterate “s” and “S” to “5”.

Yeah but the nested "SUBSITUTE"s look really cool even though it´s never going to win.. It´s the sort of thing I´d do with Lotus Formula using @ReplaceSubstring just for the fun of it but Formula is even more verbose than Excel. +1

Exactly, @ElPedro. 2 more SUBSTITUTE() calls and the part of the code visible at first glace will be just those, needing to scroll for the rest. Will have a definitely unique look.

Thanks @manatwork, have updated.

@Thor Are you allowed to alter other letters? I don't see any other answers doing that.

@Neil: You're right, I did not think it through

Ruby, 33, 31, 29, 28 bytes
->x{x.tr"BEISbeis","8315"*2}

Try it online!
-2 bytes thanks to @manatwork

No need for ! as you only care about .tr's returned value, not x itself; 2) no need for parenthesis around .tr's arguments.

@manatwork Nice catch! Thanks for saving me those 2 bytes!!!

C# (Visual C# Interactive Compiler), 98, 92, 70, 55 bytes
s=>s.Select(x=>(x+"88331155")["BbEeIiSs".IndexOf(x)+1])

Try it online!

If you inline the using you can save 6 bytes. Try it online!

You don't need the string.Concat

C# (Visual C# Interactive Compiler), 53 bytes
Inputs a string, outputs an array of char codes.

s=>s.Select(c=>"beisBEIS".Contains(c)?48+17/(c%16):c)

Try it online!

Japt, 13 bytes
d`ßÈ`í8#ì)pu

Includes an unprintable (charcode 153) after the #.
Try it
d`ßÈ`í8#ì)pu      :Implicit input of string
d                 :For each pair of characters in the following, replace the first with the second
 `ßÈ`             :  Compressed string "bise"
     í            :  Interleave
      8#          :    8153
         ì        :    To digit array
          )       :  End interleave
           p      :  Append
            u     :    Uppercase

Retina, 20 19 16 bytes
Y`B\EISbeis`8315

-1 byte thanks to @ovs (transliterating Ss to 5 due to (quote from docs): "If the to list is shorter than the from list and the current character appears after the end of the to list, it gets mapped to the last character in the to list (alternatively, you can think of it as padding to to the length of from using the last character in to)." So only a single 5 is necessary in the to list.)
-3 bytes thanks to @FryAmTheEggman, using the cyclic transliterate Y instead of the regular T.
Try it online.
Explanation:
Pretty straight-forward; transliterates the characters BEISbeis to 83158315.
Two things to note:
- The \ is to escape the E, because the E within the transliterate is a builtin for 02468.
- The cyclic transliterate Y is used instead of the regular transliterate T. In the cyclic transliterate, the characters are repeated indefinitely. So the BEISbeis is actually BEISbeisBEISbeisBEISbeis... and the 8315 is actually 831583158315... Only the first character in the from-list are relevant, though. So this will transliterate BEISbeis to 83158315.

1 byte shorter with T`beiB\EISs`8318315

@ovs Thanks! I really should take some time to read through the entire docs more carefully.

Cyclic transliteration is slightly more complicated than that, but that doesn't apply in this case as your from list length is a multiple of your to list length.

Pyth, 17 bytes
XQ"BEISbeis""8315

Try it online!
X                    # Translate characters in
 Q                   # the input
  "BEISbeis"         # that are in this string from this string
            "8315"   # to this string (modular indexing: "B"->"8", "b"->"8")

Sadly srB"BEIS"0 doesn't save anything. If only there was one more letter!

IBM/Lotus Notes Formula, 76 bytes
@ReplaceSubstring(i;@Explode("B b E e I i S s");@Explode("8 8 3 3 1 1 5 5"))

Takes input as i. Works because @ReplaceSubstring can take a list of characters to replace and a list of replacement characters and match them one to one.
There is no TIO for formula so a screenshot is shown below:

Vim, 48 44 42 bytes
se ic
%s/b/8/g
%s/e/3/g
%s/i/1/g
%s/s/5/g

A Vim script taking advantage of the repeated pattern has more bytes:
Vim, 82 59 bytes
for p in ['b/8','e/3','i/1','s/5']
exe'%s/\c'.p.'/g'
endfo

Brainfuck, 475 bytes
>,[>+++++++++++[<------>-]<[>++[<+++++>-]]<[<]>>++[<----->-]<---[>+++[<++++++>-]]<[<]>>+++[<------>-]<----[>++++[<++++++>-]]<[<]>>++++[<------>-]++[<----->-]<[>+++++[<++++++>-]]<[<]>>+++++[<------>-]+++[<----->-]<[>++++++[<+++++++>-]]<[<]>>++++++[<------->-]<---[>+++++[<++++++++++>-]]<[<]>>+++++[<---------->-]<----[>+++++++[<++++++++>-]]<[<]>>+++++++[<-------->-]++[<----->-]<[>++++++[<++++++++++>-]<++>]<[<]>>++++++[<---------->-]<-->++++++++++[<+++++++++++>-]<+++++.[-],]

Basically, it works like this:

For each inputted character...

Subtract the value of B
If the resulting value is nonzero, add B-8
Subtract B-8
Subtract the value of B-E
If the resulting value is nonzero, add E-3
Subtract E-3
So on for every letter in the order of least to greatest ASCII
At the end, add the value of s (the greatest ASCII) back

Sorry it's like super duper messy.

J, 28 bytes
rplc'BEISbeis';"0'8315'$~8"1

Try it online!

T-SQL, 127 bytes
print replace(replace(replace(replace(replace(replace(replace(replace(@,'e',3),'E',3),'b',8),'B',8),'i',1),'I',1),'s',5),'S',5)

Assuming "@" the input. Not very efficient, though. :)

starting from SQL Server 2017 you can use the TRANSLATE function

@grabthefish Thank you, still using 2012 and 2016 versions.

Icon, 52 bytes
I was looking for a way to represent the 8-digit number as a shorter expression, but only got the same length:
procedure f(s)
return map(s,"ESIseiBb",77^4+147)
end

Try it online!
Icon, 52 bytes
procedure f(s)
return map(s,"BEISbeis",83158315)
end

Try it online!
Test case taken from @Arnauld

CJam, 20 characters
q"beisBEIS"8315`2*er

Try it online!

C (gcc), 152 143 140 128 bytes
a[256];c=256;main(){for(;a[c]=--c;)a[66]=a[98]=56;for(a[69]=a[101]=51;c=~getchar(a[73]=a[105]=49);printf(a+~c))a[83]=a[115]=53;}

Requires ASCII.
Try it online!

-8 bytes using this to transform ASCII characters to their codes and using c+1 rather than c>-1 to check if EOF is reached
-3 bytes using toupper rather than tolower and changing all characters to their ASCII codes
-3 bytes abandoning that whole track together and using a character dictionary instead
-12 bytes thanks to @ceilingcat

96 bytes

@ceilingcat That seems to be borrowing a lot of ideas from my answer...

Python, 88 bytes
lambda s:''.join([('8315'*2)['beisBEIS'.find(c)] if c in 'beisBEIS' else c for c in s])

Welcome to the site!

60 bytes

The size wasn't wrong. Jo King linked to a better solution which is 60 bytes long.

C# .NET, 145 bytes
class P{static void Main(string[]a){foreach(var c in a[0]){var d=c%32;System.Console.Write((char)(c>64?d==5?51:d==2?65:d==9?49:d==19?53:c:c));}}}

Try Online

145 bytes (replaced for with foreach) (the original answer is actually 167 bytes, not 179).

Stupid of me that I hadn't thought of that!

Clojure, 101 bytes
(defn l[s](clojure.string/replace s #"[BEISbeis]"{"B""8""b""8""E""3""e""3""I""1""i""1""S""5""s""5"}))

Try it online!

Perl 6, 19 bytes
{TR/beisBEIS/8315/}

Try it online!
Kinda annoying that the case-insensitive adverb doesn't work with transliteration. That's made up a little by the second half cycling for both cases.

GolfScript, 28 bytes
Translation stolen from Peter Taylor.
{.'beisBEIS'?'8315'2*@),+=}%

Try it online!

///, 40 bytes
/B/b//b/8//E/e//e/3//I/i//i/1//S/s//s/5/

Input should be appended to the program.
Try it online!

K (oK), 29 bytes
Solution:
{x[&y=_x]:z}/[;"ebis";"3815"]

Try it online!
Explanation:
There is no ssr in oK, this is good enough for single character replacement.
Explanation:
{x[&y=_x]:z}/[;"ebis";"3815"] / the solution
{          }/[;      ;      ] / lambda that iterates over implicit x, y and z
                      "3815"  / our z, leet characters
               "ebis"         / our y, non-leet characters
 x[     ]:z                   / assign z to x at indices given inside []
      _x                      / lowercase x
    y=                        / equal to y?
   &                          / indices where true

Q/kdb+, 26 bytes
Solution:
ssr/[;"ebisEBIS";8#"3815"]

Examples:
q)ssr/[;"ebisEBIS";8#"3815"]"Elite!"
"3l1t3!"
q)ssr/[;"ebisEBIS";8#"3815"]"The quick brown fox..."
"Th3 qu1ck 8rown fox..."

Explanation:
Perform search and replace over the input
ssr/[;"ebisEBIS";8#"3815"] / the solution
ssr/[;          ;        ] / iterate (/) ssr[input;find;replace]
                 8#"3815"  / 8 take "3815" => "38153815"
      "ebisEBIS"           / the string "ebisEBIS"

C (gcc), 84 83 bytes
-1 byte thanks to ceilingcat!
n[]={[83]=5,[73]=1,[69]=3,[66]=8},c;f(char*s){for(;*s;c?*s=c+48:c,s++)c=n[*s&~32];}

Ungolfed and commented:
int n[] =
{ /* lookup table */
    ['S'] = 5,
    ['I'] = 1,
    ['E'] = 3,
    ['B'] = 8
};
int c;

void f(char *s)
{
    /* if lookup table entry is not empty,
         set *s to that entry + '0' for the ASCII representation
       else do nothing
       increment s and repeat */
    for( ; *s; c ? (*s = c + '0') : c, s++ )
        c = n[*s & ~32]; /* uppercase */
}

Try it online!

Mumps (M), 32 bytes
R I W $TR(I,"BbEeIiSs",88331155)

Although... it might look a tad 'weird.' Mumps doesn't output a carriage return even if typed on input, so the input & output will be all in a single line. To aid readability, add 2 characters:
R I W !,$TR(I,"BbEeIiSs",88331155)

Thunno 2, 12 bytes
“ʋḶ“ḲR+« ɓṂṆ

Try it online!
Port of Kevin Cruijssen's 05AB1E answer.
Explanation
“ʋḶ“ḲR+« ɓṂṆ  # Implicit input
“ʋḶ“          # Compressed string "beis"
    ḲR+       # Append reversed uppercase version
       « ɓṂ   # Compressed number 83155138
           Ṇ  # Transliterate "beisSIEB" -> "83155138"
              # Implicit output

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


text:
Triangular domino tiling of an almost regular hexagon
Background
An almost regular hexagon is a hexagon where

all of its internal angles are 120 degrees, and
pairs of the opposite sides are parallel and have equal lengths (i.e. a zonogon).

The following is an example of an almost regular hexagon, with side lengths 2 (red), 4 (blue), and 3 (yellow).

A triangular domino is a domino made of two unit triangles. A triangular domino tiling is a tiling on a shape using triangular dominoes. The following is a possible triangular domino tiling of the above shape (each color represents an orientation of each triangular domino):

Challenge
Given the lengths of the three sides of an almost regular hexagon, find the number of distinct triangular domino tilings. The three sides will be always positive integers.
Alternative description
The second image shows that such a tiling can be viewed as an isometric view of stacked unit cubes. Now let's assign three directions to three axes in 3D:

x = down-right / southeast / SE (blue edges in the first image)
y = down-left / southwest / SW (red edges)
z = up / north / N (yellow edges)

Then the stacked unit cubes can be represented as an x-by-y 2D array, whose items represent the height of the stack at that position. So the above challenge is equivalent to the following:

Given three positive integers x, y, and z, find the number of x-by-y arrays whose elements are between 0 and z inclusive and all rows and columns are in decreasing order.

It happens that this is one definition of plane partition in the form of \$ PL(x,y,z) \$, and it has a closed-form formula:
$$
PL(x,y,z) = \prod_{i=1}^x \prod_{j=1}^y \prod_{k=1}^z \frac{i+j+k-1}{i+j+k-2}
$$
Scoring and winning criterion
Standard code-golf rules apply. The shortest code in bytes wins.
Note that a submission is valid even if it suffers from integer overflows or floating-point inaccuracies, as long as the underlying algorithm is correct.
Test cases
x,y,z => output
---------------
1,1,1 => 2
1,1,2 => 3
1,2,3 => 10
2,3,1 => 10 (the order of inputs doesn't matter, since it's the same hexagon)
2,3,4 => 490
3,4,2 => 490
3,3,5 => 14112

@LuisMendo If you're referring to the second figure, each color represents an orientation of each domino. A domino is a rhombus (i.e. diamond) bounded by solid black edges.

Of course, they are rhombi, not triangles. My bad. Still, I'd clarify that the colour just indicates orientation for easier viewing of the figure

Distinct up to what symmetry group?

@PeterTaylor Symmetry is not considered. For example, 180 degrees rotation of the second image is distinct from the original.

APL (Dyalog Classic), 14 bytes
×/1+1÷1+∘,1⊥¨⍳

Try it online!
Uses 0 indexing with ⎕IO←0.
Explanation:
             ⍳     ⍝ Cartesian product of the ranges from 0 to n-1
          1⊥¨      ⍝ Sum of each element (using base 1)
         ,         ⍝ Flattened
        ∘          ⍝ Composed with
  1+1÷1+           ⍝ 1 + 1/(n+1)
×/                 ⍝ And reduced by multiplication

Perl 6, 38 30 bytes
{[*] map 1+1/(*+1),[X+] ^<<@_}

Try it online!
Based on the formula given in the question
Explanation:
{                            }    # Anonymous code block
                        ^<<@_     # Map each input to the range 0 to n-1
                   [X+]           # Get the cross product of sums
     map          ,               # Map these to
         1+1/(*+1)                # 1+1/(n+1) = (n+2/n+1)
                                  # Which is the formula compensating for the 0 based range
 [*]                              # And reduce by multiplication

Jelly, 9 8 bytes
Œp§_2İ‘P

Try it online!
Uses the altered form of the closed form expression. Takes input as a list [x,y,z].
Œp          Cartesian product of the list.
            (Each element, being an integer, is implicitly converted to a range.)
  §         Sum the items of each triplet,
   _2       subtract 2 from each sum,
     İ      take the reciprocal of each lowered sum,
      ‘     increment each reciprocal,
       P    and return the product of the increments reciprocals.

K (ngn/k), 17 15 bytes
%/*/'2 1+\:+/!:

Try it online!
last test fails because of an overflow
uses a 0-indexed version of the formula:
\$PL(x,y,z)=\prod_{i=0}^{x-1}\prod_{j=0}^{y-1}\prod_{k=0}^{z-1}\frac{i+j+k+2}{i+j+k+1}\$

Wolfram Language (Mathematica), 28 bytes
Array[1+1/(##-2)&,#,1,1##&]&

Try it online!

Haskell, 44 bytes
foldr(\r k->k+k/(sum r-2))1.mapM(\n->[1..n])

Try it online!
Outputs floats. Thanks to @H.PWiz for 4 bytes using a fold.

You can get shorter by replacing product.map with a fold

@H.PWiz Nice one, thanks!

05AB1E, 13 11 bytes
L.«â€˜OÍz>P

Try it online or verify all test cases.
Explanation:
Uses the derived formula (inspired by @JoKing's answers):
$$PL(x,y,z) = \prod_{i=1}^x \prod_{j=1}^y \prod_{k=1}^z \frac{1}{i+j+k-2}+1$$
L            # Map each value in the (implicit) input-list to an inner [1,v]-ranged list
 .«          # (Right-)reduce these lists by:
   â         #  Taking the cartesian product between two lists
    €˜       # Then flatten each inner list
      O      # Sum each inner list
       Í     # Decrease all by 2
        z    # Take 1/v for each value
         >   # Increase all by 1
          P  # And take the product of that
             # (after which the result is output implicitly)

@Grimmy I thought so as well at first, but from the challenge description: "Note that a submission is valid even if it suffers from integer overflows or floating-point inaccuracies, as long as the underlying algorithm is correct."

Whoops, missed that!

Bash, 75
Inputs are passed as a comma-separated list.
e={1..${1//,/\}+\{1..}}
eval eval echo \\$\[1 *\\\($e-1\\\) /\\\($e-2\\\) ]

Try it online!
The last test fails due to integer overflow.

JavaScript (ES6),  73 65  64 bytes
(x,y,z)=>(g=n=>!n||g(n-1)/(s=n%z-~(n/z%y)+n/z/y%x|0)*-~s)(x*y*z)

Try it online!
Commented
(x, y, z) => (              // (x, y, z) = input
  g = n =>                  // g is a recursive function taking a counter n
    !n ||                   //   if n = 0, stop recursion and return 1
    g(n - 1) / (            //   otherwise, divide the result of a recursive call by:
      s =                   //     s defined as the sum of:
        n % z               //       k, 0-indexed: n mod z
        - ~(n / z % y)      //       j, 1-indexed: floor((n / z) mod y) + 1
        + n / z / y % x | 0 //       i, 0-indexed: floor((n / z / y) mod x)
    )                       //
    * -~s                   //   and multiply by s + 1
)(x * y * z)                // initial call to g with n = x * y * z

J, 25 bytes
-4 bytes thanks to Bubbler!
[:*/1+1%1+1#.&>[:,@{i.&.>

Try it online!
J, 29 bytes
[:*/[:(1+1%1++/)@>[:,@{<@i."0

Try it online!
A J port of @JoKing's APL answer (don't forget to upvote it), but twice as long. I'll try to golf it...

25 bytes.

@Bubbler Thank you!

J, 18 bytes
*/@,@(1+%)1++/&i./

Try it online!
Takes z on its left and x y on the right.
Uses modified formula by Peter Taylor:
$$
\begin{align}
\prod_{i=1}^x \prod_{j=1}^y \frac{i+j+z-1}{i+j-1} &= \prod_{i=1}^x \prod_{j=1}^y \left(1 + \frac{z}{i+j-1}\right) \\
&= \prod_{i=0}^{x-1} \prod_{j=0}^{y-1} \left(1 + \frac{z}{i+j+1}\right)
\end{align}
$$
How it works
*/@,@(1+%)1++/&i./  NB. Left =: z, Right =: x y
                 /  NB. Reduce over x y...
              &i.   NB.   Apply range (n -> 0..n-1) to each item and
            +/      NB.   Outer product by addition
          1+        NB. Increment each, so that each cell has i+j+1
    @(1+%)          NB. Compute 1+z/(i+j+1) for each i and j
*/@,                NB. Flatten the matrix and compute the product

Ruby, 85 75 bytes
->x,y,z{w=->t{(0...x*y*z).map{|r|r%x+(r/=x)%y+r/y+t}.reduce &:*};w[2]/w[1]}

Try it online!

Icon, 81, 78 70 bytes
-8 bytes thanks to Peter Taylor
procedure f(x,y,z)
p:=1&p*:=(1+z/(seq()\x+seq()\y-1.))&\u
return p
end

Try it online!

Does this benefit from telescoping one product to $$\prod_{i=1}^x \prod_{j=1}^y \frac{i+j+z-1}{i+j-1} = \prod_{i=1}^x \prod_{j=1}^y \left(1 + \frac{z}{i+j-1}\right)$$?

Answer: yes, 8-char reduction if the second line is changed to p:=1&p*:=(1+z/(seq()\x+seq()\y-1.))&\u

@Peter Taylor That's great, thanks!

Python 3.8 (pre-release), 79 62 bytes
Based on @galen-ivanov's answer.
-17 bytes thanks to Jo King and xnor.
lambda x,y,z,t=1:[t:=t+t*z/(i%x-~i//x)for i in range(x*y)][-1]

Try it online!

63 bytes, though with a couple of minor rounding errors

You can also do [-1] rather than and t to extract what t ends p as.

Charcoal, 25 bytes
ＮθＮηＦＮＦηＦθ⊞υ⊕⁺λ⁺κιＩ÷Π⊕υΠυ

Try it online! Link is to verbose version of code. Explanation: Uses the 0-indexed version of the given formula.
ＮθＮηＦＮＦηＦθ

Input the three dimensions and loop over the implicit ranges.
⊞υ⊕⁺λ⁺κι

Take each incremented sum and save it in a list, thus flattening the Cartesian product.
Ｉ÷Π⊕υΠυ

Divide the product of the incremented list by the product of the list and cast to string for implicit print.

Japt, 18 bytes
mo rï Ëc rÄ pJ ÄÃ×

Try it
input as array
mo rï               // cartesian product [0,n)
      Ëc            // flatten each triplet
         rÄ         // reduce with initial value of 1 ( -2 +3=>triplets 0 to 1
            pJ      // raised -1
               Ä    // +1
                Ã×  // reduce by multiplication

Implicit output, -m flag to run the program for each input


text:
snakes_are_bad, camelsAreBetter
Introduction
All these snakes everywhere! I've had enough, and have decided that I much prefer camels. Therefore, I want you to convert my snakes to camels for me.
Challenge
Turn any snake_case string into a camelCase string.
Capitals should be returned to lowercase before the conversion occurs.
Test Cases
In: camel_case
Out: camelCase
In: curse_these_snakes
Out: curseTheseSnakes
In: i_promise_1234_is_not_my_password
Out: iPromise1234IsNotMyPassword
In: AAAAA_BBBBB
Out: aaaaaBbbbb
Rules
As per usual, standard loophole rules apply.
This is code-golf - shortest answer wins.
Leading/trailing underscores (e.g _string_) are ignored.
Current Winners (subject to change)
Esoteric Language
Me, with -1 bytes.
Standard Language
Also me, with -2 bytes.

What about strings starting with an underscore? eg. _a

Very similar

Hm. My research couldn't seem to find that, so I apologise - should I remove the question?

Similar but not the same in my opinion.. Here we have only snake to camel, and not tile convention at all, e.g. The first word is lower case.

Python 3, 51 bytes
lambda s:s[0].lower()+s.title().replace('_','')[1:]

Try it online!
-4 bytes thanks to ReinstateMonica

Unless it introduces some edge case I'm not seeing, replace is shorter

@ReinstateMonica yep, fair.

Trailing underscores are removed. In case of leading underscore next char is removed.
Try it online!

@YuriGinsburg Thanks, but a leading underscore is not valid snake_case input, so there's no need to handle it.

@Jitse  Leading and trailing underscores are mentioned in the text of the challenge. And your code process both of them incorrectly.

@YuriGinsburg This really very much depends on how you define 'ignored'. Since this challenge is already closed as a duplicate, I will leave it as is.

Ruby, 39 bytes
->x{x.downcase.gsub(/_(.)/){$1.upcase}}

Try it online!
This does nothing to leading and trailing underscores.

Trailing underscore is removed by this code.

Is it? It's not for me. Here's a Try-It-Online where they all have trailing underscores. And they're not removed.

Sorry for mistype. Leading underscores are removed.

Also capitalisation is changed in case of leading underscore.
Try it online!

Gema, 28 characters
_?=@upcase{?}
?=@downcase{?}

Sample run:
bash-5.0$ gema '_?=@upcase{?};?=@downcase{?}' <<< 'i_promise_1234_is_not_my_password'
iPromise1234IsNotMyPassword

Try it online!


text:
Can this village have a wedding?
The quaint hamlet of Кодгольф in the Russian far east has a problem: their population is low (below 66), and no new people have arrived for years. Moreover, after centuries of near-isolation, just about everybody is related to each other.
Mayor Стекобмен has a solution that should keep the morale high: organise a wedding. However, the question is, are there two bachelors in the town that aren't at least cousins of each other?
The mayor fired up his state-of-the-art Microsoft Боб computer to consult the genealogy charts. They had just been updated to the brand-new ASCII format, and look like this:
ы┬К
 ю

And this:
 А┬д
 О┴п┬Щ
    Ф

And this:
  з┬Й
Л┬м┴п─┬Ф
Ы┴я┬А ш┬Я
   З   Е

And even this:
 ю┬────────Й
м┬Е
 │     ш
 │
 │
 Щ

Here's how it works. Each person is a letter from the Russian alphabet. Males are capital letters (any of АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ), females are lowercase letters (any of абвгдеёжзийклмнопрстуфхцчшщъыьэюя).
A '┬' between two people means they are married. Right below that is either another person - their child - or a '┴', meaning that this couple has two children; located to the left and right of the symbol.
Moreover, to the right and left of '┬' and '┴' there can be any number of '─' characters, to extend the lines, as it were. Similarly, there can be any number of '│' characters above a '┴' or below a '┬'.
Lastly, a character without any defined symbol above them is considered a new arrival to the village, and by definition unrelated to anybody.
Also be aware that this is a very conservative village. Nobody marries more than once, and every marriage is heterosexual. Furthermore, assume everybody in the graph is alive, and no two people share the same name: e.g., the same Cyrillic character never occurs more than once.
The two bachelors should be of the opposite gender, and they should not be first cousins or any more closely related. First cousins once removed is okay. In other words: they should not share a parent, or a grandparent, or have one's grandparent be another's parent.
Challenge
Make the shortest possible program with as input either a string (containing newline characters), or a string array, or a rectangular two-dimensional string or char array (no higher or wider than 100 characters), containing the family tree of the town. Assume the input is a valid family tree. Ignore any character not given an explicit function in the above description.
It's fine to use an encoding other than Unicode for input/output purposes, e.g. KOI8-R as long as it's known and standardised by someone other than yourself. Scoring is done per this answer. If your language handles Cyrillic natively, it's an advantage!
Return a boolean value of true or false (or a bit/int of 1 or 0, or any consistent truthy/falsey value used by the language of your choice) to indicate whether there can be a wedding given the family tree.
Examples
1.
ы┬К
 ю

FALSE (there's only one bachelor)
2.
   А┬д
 ю┬О┴п┬Щ
  Щ   ф

FALSE (Щ and ф are cousins)
3.
  з┬Й
Л┬м┴п─┬Ф
Ы┴я┬А ш┬Я
   З   Е

FALSE (З, Е and Ы are all male)
4.
  з┬Й
Л┬м┴п─┬Ф
ё┴А┬я ш┬Я
   З   Е

TRUE (ё and Е can marry)
5.
             ю┬────────Й
            м┬Е
             │     ш
             │
             │
             Щ

TRUE (ш is not related to anybody)
6.
           д┬Ф
 ю┬────────Й┴─ё┬З
  │            │
  │            ш <this person smells bad
  │
  │
  Щ <this person betrayed the Party!

FALSE (Щ and ш are cousins)
7.
Щ 1234567890 quick brown foxes jumped over the lazy dog ш

TRUE (Щ and ш are unrelated)
8.
    з┬Й
  Л┬м┴п─┬Ф
й┬Ы┴я┬А ш┬Я
 Э   З   ю

TRUE (ю and З, and also ю and Э)
9.
 А┬д      ф┬Ж
 м┴п┬Щ     ю┬Я
    Ф       ц

TRUE (ц and Ф)
NOTE: Here is an ASCII version of roughly the same challenge.

Hi KeizerHarm, welcome to the site! Thanks for the question, it looks fun. A question: For example 4, aren't ё and З barred from marriage due to the fact that ё is З's aunt? In other words, ё's parent Л is З's grandparent? Also, I take it that we are to assume that marriages are always heterosexual, and that divorce and remarrying of widows/widowers does not exist? Making those assumptions is fine by me, I just wanted to be sure.

@isaacg Thanks. You're right about question 4; I missed that. I'll fix that right away, and then draw up another example with two possible marriages.
And yes to all of those. I'll add that too.

Also for 6, shouldn't Щ and ш be allowed to marry because they are first cousin's once removed, not first cousins? Щ's great grandparents are д and Ф, who are ш's grandparents.

...I should really triple-check these things ^^; Thank you, I'll fix it right away.

Can we assume that no characters in the Unicode range from U+0400 to U+04FF will appear in the input other than those you've specified? Or do we need to handle characters like ө for example?

@NickKennedy Only expect Cyrillic, the box-drawing characters specified, and printable ASCII characters.

@KeizerHarm what about Cyrillic characters not in your list of men and women?

@NickKennedy No need to take those into account.

I've read through this a couple of times but maybe I'm still missing something: I don't see what requiring the use of the Russian alphabet adds to this challenge.

@Shaggy Well, for one: were it in the Latin alphabet, to detect a person you could simply check a character against the range [a-zA-Z]. The Russian alphabet however is not on one continuous range, so either Ё&ё need to be treated separately or the entire string of allowed characters needs to be in there, and I wonder if you could even compress that. Plus this makes for a funnier story.

Welcome to CGCC! I like your idea, but I'll agree with Shaggy: the really interesting core of this challenge has to do with first decoding the input into a graph of familial relationships, and then making some deductions based on that graph. The Cyrillic requirement is just an annoying distraction from those tasks, especially in languages where unicode is a bit of a pain. Maybe as a separate challenge "Is this Cyrillic unicode letter a capital letter?" would be interesting to golf for some; but as it is, it really detracts from my interest in answering your question. Just sayin'!

@ChasBrown Thanks for the feedback! I understand the issue; it's not something I really considered when I thought this up. I will definitely keep that sorta thing in mind if I come up with another puzzle. I'm not sure it would be proper form to just rewrite this question when there's been a whole discussion about character encoding (in now-deleted comments) and there's a chance someone already got started on a program with Cyrillic specifically in mind.

I always thought a female bachelor was called a spinster. But I guess these days women want to use male terms for everything...

@Neil Not sure what the gender-neutral term was... sorry, not an Anglophone ^^;

@Others I think if this question gets no answers after a couple of days, I'll leave it be but re-ask it without Cyrillics. I just don't want to piss off anyone of the 16 upvotes who might be working on it already.

Might the same letter occur multiple times if necessary to draw the graph?

@PeterTaylor It's your job to interpret the graph, not to draw it. The test cases do not ever repeat a letter.

The test cases might not, but I don't see any statement either way as to whether valid input might.

@PeterTaylor Alright; I'll clarify that.

I made a non-Cyrillic version: https://codegolf.stackexchange.com/questions/196035/can-this-scottish-village-have-a-wedding

Jelly, 160 159 bytes
Ø.UN,ƊAN,Ɗ+Ṫ¥+œị2,5yⱮ$ɼ=5,6⁼Ø.Ɗɗ¡ƬṪ¥ƒ⁸’1¦⁺œị®⁼5ƊÐ¿ṖṪ+2¦œị®⁻.Ɗ¡ƬṪ¥ⱮØ+$“”¹?
Odȷ%⁴ỊḢịƊ€€H“¥©“©©‘;U¤œṣjƭƒ$€ƬṪ©=.ŒṪ+2¦œị®ɗⱮØ+f2,4ƊÐḟWÇ€Ẏ$Ƭḣ3ẎƲ€Œcf/ÐḟḢ€€ȧœị¥O>⁽¡FIFẸ

Try it online!
A monadic link that takes a list of Jelly strings and returns 1 for true and 0 for false.
I’m sure this could be golfed more. Full explanation to follow.

Holy moly......

K (ngn/k), 230 203 200 196 bytes
{t:{x*\:x};n:#*x:4(+|0,)/x;p:&2!c:+/"╒ё╡Ё©ъъ"<\:a:,/x;|//(~h=\:h:4!c p)&t[~|/p=/:?,/2#'(p^p^)'g]&3<{&/'x+\:x}/(~=#p)*(#a;1)0|/t'?(+/'p=/:/:g:{?'x,/'x x}/(!#a)+(-e;e,:n;e;n*e:-1 1;())4^"┴┬─│"?a)^0}

the input and the k code must be encoded in koi8-r. test with (linux only):
git clone https://bitbucket.org/ngn/k
cd k/g
../k can-this-village-have-a-wedding.k

please make sure your editor handles koi8-r correctly. for instance, if using vim, you can type :e ++enc=koi8-r after opening the file or put set fencs=utf-8,koi8-r in your ~/.vimrc

k functions are written in { }, have an implicit argument x, and consist of ;-separated expressions.
the sequence of expressions is evaluated left-to-right but the code within each expression is right-to-left.
t:{x*\:x} helper function that creates a multiplication table (outer product) for a list x
x:4(+|0,)/x surrounds the input x with zeroes. literally: 4 times (4( )/) add zero(-es) on top (0,), reverse (|), and transpose (+).
n:#*x let n be the width of the input. literally: length (#) of the first (*)
a:,/x let a be the flattened input
c:+/"╒ё╡Ё©ъъ"<\:a for each character in a, count how many of "╒ё╡Ё©ъъ"are before it (in koi8-r). this will give odd numbers for russian letters and even for non-letters. also, the remainder mod 4 will indicate the sex - upper/lowercase.
p:&2!c take c mod 2 (2!) and make a list of the indices where (&) it's 1. "p" for "people".
the rest of the code will build three p×p matrices that represent conditions for marriage:

the couple must be >3 steps apart in the graph of relatives. a "step" is a relationship of parent-child or spouse or sibling.

4^"┴┬─│"?a for each in a find its index among "┴┬─│" and fill in 4 if not found.
(-e;e,:n;e;n*e:-1 1;()) replace "┴" with (-1;1;-n), "┬" with (-1;1;n), "─" with (-1;1), "│" with (-n;n), and others with an empty list
(!#a)+ add 0 1 2.. thus creating lists of neighbours
g:{?'x,/'x x}/ transitive closure - extend (,/) each (') neighbour list (x) with the neighbour lists of its neighbours (x x) and unique it (?), until convergence ({ }/); assign to g for "graph"
+/'p=/:/:g for each of g's neighbour lists build a boolean mask for which people are in it. ignore non-people.
?( )^0 remove scalar 0s (( )^0) as they are a by-product of empty neighbour lists, and make the rest unique (?). this gives us a list of families as boolean masks.
t' build a family matrix for each family
0|/ boolean-or of all family matrices
(#a;1) replace 0s with "infinity" (the length of a is as good as infinity here) and keep 1s as they are - this is a graph of how closely related p are. we need to find the shortest paths in it.
(~=#p)* put 0s on the diagonal. literally: multiply (*) by the negation (~) of the unit matrix (=) of that size (#p)
{&/'x+\:+x}/ until convergence, try to improve dist(i,j) with dist(i,k)+dist(k,j) (similar to the floyd-warshall algorithm)
3< more distant than first cousins

they must not be already married

t[~|/p=/:?,/2#'(p^p^)'g] check which p are among the first 2 (2#) of the intersection between people ((p^p^)) and each (') neighbour list in g, and make it a boolean table

they must be of opposite sexes

(~h=\:h:4!c p) remember that c mod 4 encodes gender information

finally, |//...&...&... and-s the three matrices and tests if there's a truthy element in the result

Yes, we have our first entry! Would you mind unwrapping it for me? I'd love to see your approach.

Ah, thank you. Count me impressed! We'll see if someone else dares to complete this challenge...

Python3, 1001 bytes:
m='АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ'
f=m.lower()
def g(t,c,l,w,d,s=[],r=[],o=-1):
 k=0
 for q,(x,y) in [(0,[0,-1]),(1,[1,0]),(1,[-1,0])]:
   if q!=o and len(t[0])>(a:=c[0]+x)>=0 and len(t)>(b:=c[1]+y)>=0 and(a,b)not in r:
    if(h:=t[b][a])=='│'or h=='─':k=1;yield from g(t,(a,b),l,q,d,s,r+[(a,b)])
    elif h =='┴':k=1;yield from g(t,(a,b),h,q,d,s,r+[(a,b)],o=1)
    elif h=='┬':
     if q:d.append(s[-1])
     else:k=1;yield from g(t,(a,b),h,q,d,s,r+[(a,b)])
    elif h in m+f and l in'┬┴':k=1;yield from g(t,(a,b),h,q,d,s+[h],r+[(a,b)])
 if not k:yield s
def e(x,y):
 return not any((q:=set(a)&set(b)) and any(a.index(i)<3 for i in q) for a in x for b in y)
def a(t):
 b,p,z=[*filter(None, t.split('\n'))],{},[]
 for x,y in[(x,y)for x in range(len(b[0]))for y in range(len(b))if(l:=b[y][x])in m+f]:
   for s in g(b,(x,y),b[y][x],0,z,s=[b[y][x]],r=[(x,y)]):
    p[s[0]]=p.get(s[0],[])+[s]
 return any(a not in z and b not in z and len(set([a in m, b in m]))==2 and e(p[a],p[b]) for a in p for b in p)

The basic idea is to traverse the input graph, building paths between nodes (the genealogy for each node), marking which nodes are already married, and then checking if it is possible for any two resulting nodes to marry (not already married, male and female, not cousins, etc.)
Try it online!


text:
N-Dimensional Cartesian Product
Introduction
The Cartesian product of two lists is calculated by iterating over every element in the first and second list and outputting points. This is not a very good definition, so here are some examples: the Cartesian product of [1, 2] and [3, 4] is [(1, 3), (1, 4), (2, 3), (2, 4)]. The product of [1] and [2] is [(1, 2)]. However, no one said you could only use two lists. The product of [1, 2], [3, 4], and [5, 6] is [(1, 3, 5), (1, 4, 5), (1, 3, 6), (1, 4, 6), (2, 3, 5), (2, 4, 5), (2, 3, 6), (2, 4, 6)].
Challenge
Given a number of lists, your program must output the Cartesian product of the lists given.

You can assume that there will always be more than 1 list, and that each list will have the same length. No list will ever be empty. If your language has no method of stdin, you may take input from command line arguments or a variable.
Your program must output the Cartesian product of all the input lists. If your language has no stdout, you may store output in a variable or as a     return value. The output should be a list of lists, or any other iterable type.

Example I/O

Input: [1, 2] [3, 4]
Output: [(1, 3), (1, 4), (2, 3), (2, 4)]
Input: [1, 2] [3, 4] [5, 6]
Output: [(1, 3, 5), (1, 4, 5), (1, 3, 6), (1, 4, 6), (2, 3, 5), (2, 4, 5), (2, 3, 6), (2, 4, 6)]
Input: [1, 2, 3] [4, 5, 6]
Output: [(1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6)]

Rules
This is code-golf so shortest answer in bytes wins!

boring answer: itertools.product in python

Related, related.

If your language has no method of stdin, you may take input from command line arguments or a variable I suggest you allow command-line inputs without any condition. See here

Does order matter among the output lists?

Order does not matter @xnor.

Is it mandatory to have an output in the format [[a,b,c],[a,c,b],...] (in any order), or are other formats also allowed? The two Japt answers output as [a,b,c,a,c,b,...] and [[[a,b],c], [[a,c],b], ...] instead for example (not sure if this is a valid output)?

No, the format described is not mandatory @KevinCruijssen

J, 1 byte
Courtesy of ngn
{

Try it online!
'tis called Catalogue…

You beat me to it :).  I think ,@{ would be more fair though, since the output of naked { doesn't have a uniform structure (ie, it depends on the inputs).

@Jonah Jelly gives the same structure.

results not seem list deep 1 of element of input

@RosLuP It is. J's Try it online! L. is APL's ≡.

Haskell, 7 bytes
mapM id

Try it online!
Built-in, 8 bytes
sequence

Try it online!
Less boring, 33 bytes
Out-golfed by xnor's answer. Go upvote that instead!
f[]=[[]]
f(h:t)=[i:j|i<-h,j<-f t]

Try it online!

Haskell, 23 bytes
foldr((<*>).map(:))[[]]

Try it online!
Without using mapM or sequence or the like.

Python 3, 56 bytes
def f(M,*l):M and[f(M[1:],*l,x)for x in M[0]]or print(l)

Try it online!
No itertools. This is one of those weird functions that prints. Thanks to  Unrelated String for -2 bytes with def.

Since the return value doesn't matter, you can shave two bytes off by using def: Try it online!

@ChasBrown I don't think that's allowed, it nests the output a lot. And unfortunately Python doesn't do iterable unpacking in comprehensions.

@xnor : quite right! Carry on...

Japt -R, 2 bytes
A simple reduction by Cartesian product.
rï

Try it

Lol!  Congrats! You preceded me by 12 minutes ! Anyway I'm really proud of .. I immediately thought about that solution

Ha, I spent 15 minutes looking through Japt docs and couldn't find this again. Lol

@KevinCruijssen, here it is "pretty printed": https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=cu8&input=W1sxLDJdLFszLDRdLFs1LDZdXQotUQ

OP stated the output-format is indeed flexible, and those outputs are allowed.

Thanks, @KevinCruijssen. I've updated to Japt -R anyway.

Python 2, 60 59 bytes
f=lambda A,*x:[[v]+u for v in A for u in x and f(*x)or[[]]]

Try it online!
1 byte thx to ovs.
Look Ma! No itertools!

59 bytes

Jelly, 4 2 bytes
Œp

Try it online!
Output is "pretty printed" in the TIO link

Brachylog, 1 byte
ẋ

Try it online!
A slightly less boring generator solution:
Brachylog, 2 bytes
∋ᵐ

Try it online!

A careful reading of the rules suggests that function submissions are only allowed to output through return values if printing is impossible, so if that's actually enforced, +1 byte to the first for w, and +2 to the second for ẉ⊥.

K (oK), 31 15 bytes
{x@'/:+!(#:)'x}

Try it online!

How are you finding K compared with J?  What have you been using to learn it?

@Jonah I can't compare them directly. K lacks J's math capabilities, but works on heterogeneous lists. It is much more compact and I like it very much even I have only sctratched the surface. I started learning from the oK Manual. On several occasions ngn helped me in thr k tree. He also supplied  almost all my previos k submissions with golfing tips.

Perl 6, 8 4 bytes
&[X]

Try it online!
Simple reduce by cross product. It would be nice if I could return the meta-operator by itself, but I've never figured out how to do that. Turns out it works for cross product?

&[X] seems to work in this case.

@nwellnhof What? But &[+] doesn't work? I don't understand when it does and doesn't work

Seems to be an implementation detail of the infix operators. Some infix operators accept more than two args but it's not a requirement.

Ruby, 20 bytes
->i,*j{i.product *j}

Try it online!

Retina, 54 39 32 bytes
This took really long to write (as I tried to golf it too) (unsurprisingly, all the golfing ideas only appeared after I finally posted this). Takes input as a list of strings of alphanumeric characters and underscores (whatever \w matches in your universe), each preceded by a semicolon (I assume characters are as acceptable in Retina as numbers are in everything else; in fact, the challenge never actually specified numbers).
Outputs the list of the resulting strings, each preceded by a comma.
^
,
+w`,(\w*)[^;]*;\w*(\w)
,$1$2

Explanation:
^                       match the beginning of the string
,                       add a comma there
+w`,(\w*)[^;]*;\w*(\w)  solve the rest of the problem
,$1$2                   replace with a comma, group 1 and group 2

The third and fourth lines are in a convergence loop (run until no change) (declared by the +). The regular expression in the 3rd line works on lines like , ac, bc, ad, bd;ef;gh and matches all substrings starting at a comma and ending at a character after the first semicolon, where the group 1 is the string after the comma and group 2 is the last character.
Try it online!

R, 54 47 bytes
f=function(x)split(j<-expand.grid(x),1:nrow(j))

Try it online!
If you consider data.frame rows iterable:
R, 27 bytes
f=function(x)expand.grid(x)

Try it online!

You don't need to include the f= in the byte count here, and can include it in the header: Example
.
Also, as expand.grid is a built-in, this is basically 11 bytes as expand.grid returns the function. I think we've scored them as such in the past, though am happy to be corrected by someone with more intimate knowledge of practice.

Python 3 (Cython), 46 44 31 bytes
__import__('itertools').product

Try it online!
This doesn't need more explanation, right?
(-13 bytes thanks to Jo King; -2 bytes thanks to caird coinheringaahing)

Welcome to the site! Unnamed lambdas are perfectly acceptable here, so you can remove the f= to save two bytes.

@cairdcoinheringaahing Thank you!  I have removed the f=.  I'm not sure how to make TIO count this as 44 bytes though ...

This should work

@cairdcoinheringaahing Thanks!  Didn't know that the backslash works here.

Wolfram Language (Mathematica), 6 bytes
Tuples

Try it online!

Julia 1.0, 34 bytes
No imports used, iterators in Base has this. It actually makes a lazy form of this, but to print them all it will collect each one.
println.(Iterators.product(l...))

where l is the list of lists.

Zsh, 30 bytes
for l;a=($^a\ ${^${=l}})
<<<$a

Try it online!
Split = and cartesian product ^ for each element. Our base case adds an extra space, which cleanly separates our output lists.

05AB1E, 3 bytes
.»â

Outputs [[a,b],[c,d],[d,e]] in the format [[[a,c],d], [[a,c],e], ...]. To output in the format [[a,[c,d]], [a,[c,e]], ...], replace the » with «.
Try it online or try it online with right- instead of left-reduce.
Explanation:
.»   # (Left-)reduce by (or right-reduce with `.«`):
  â  #  Taking the cartesian product of the two lists
     # (after which the resulting list is output implicitly)

Husk, 1 byte
Π

Try it online! Π takes the Cartesian product of a list of lists.

JavaScript (Node.js), 52 bytes
Returns a list of lists.
f=([a,...b],o=[])=>a?a.flatMap(x=>f(b,[...o,x])):[o]

Try it online!

JavaScript (V8), 52 bytes
Prints the results.
f=([a,...b],o)=>a?a.map(x=>f(b,o?o+[,x]:x)):print(o)

Try it online!

Erlang, 57 bytes
c([]) -> [[]];
c([H|T]) -> [[X|Y] || X <- H, Y <- c(T)].

Japt, 2 bytes
rï

Try it
Reduces input by combination with initial value of 1st element

Duplicate of @Shaggy  answer, I was solving this while he just posted the same solution. I hope I can leave my answer too because it's awesome

Charcoal, 22 bytes
ＩＥΠＥθＬιＥθ§λ÷ιΠ∨Ｅ…θμＬν¹

Try it online! Link is to verbose version of code. Explanation:
    θ                   Input list
   Ｅ                    Map over elements
      ι                 Current element
     Ｌ                  Length
  Π                     Product
 Ｅ                      Map over implicit range
        θ               Input list
       Ｅ                Map over elements
          λ             Current element
         §              Cyclically indexed by
            ι           Outer index
           ÷            Integer divide
                 θ      Input list
                …       Truncated to length
                  μ     Inner index
               Ｅ        Map over elements
                    ν   Current element
                   Ｌ    Length
              ∨      ¹  Replace empty list with literal 1
             Π          Product
Ｉ                       Cast to string
                        Implicitly print double-spaced on separate lines

APL(NARS), chars 11, bytes 22
{,↑(∘.,)/⍵}

test for product of sets:
  f←{,↑(∘.,)/⍵}
  ⎕fmt (1 2)(3 4)
┌2────────────┐
│┌2───┐ ┌2───┐│
││ 1 2│ │ 3 4││
│└~───┘ └~───┘2
└∊────────────┘
  ⎕fmt f (1 2)(3 4)
┌4──────────────────────────┐
│┌2───┐ ┌2───┐ ┌2───┐ ┌2───┐│
││ 1 3│ │ 1 4│ │ 2 3│ │ 2 4││
│└~───┘ └~───┘ └~───┘ └~───┘2
└∊──────────────────────────┘
  ⎕fmt f (1 2)(3 4)(5 6)
┌8──────────────────────────────────────────────────────────────────────┐
│┌3─────┐ ┌3─────┐ ┌3─────┐ ┌3─────┐ ┌3─────┐ ┌3─────┐ ┌3─────┐ ┌3─────┐│
││ 1 3 5│ │ 1 3 6│ │ 1 4 5│ │ 1 4 6│ │ 2 3 5│ │ 2 3 6│ │ 2 4 5│ │ 2 4 6││
│└~─────┘ └~─────┘ └~─────┘ └~─────┘ └~─────┘ └~─────┘ └~─────┘ └~─────┘2
└∊──────────────────────────────────────────────────────────────────────┘
  ≢f (1 2)(3 4)(5 6)
8
  f (⍳3)(4 5 6)
 1 4  1 5  1 6  2 4  2 5  2 6  3 4  3 5  3 6

  ⎕fmt f (4 5 6)
┌1───────┐
│┌3─────┐│
││ 4 5 6││
│└~─────┘2
└∊───────┘

Python 3.8, 136 bytes
import re
from itertools import*
print(list(product(*[[int(i) for i in i.split(', ')] for i in re.findall(r'\[([0-9, ]+)\]',input())])))

Try it online!

You don't have to do any of the string processing. You could just take input as a list of lists: "Given a number of lists"

The heart of this answer is just itertools.product too.


text:
Euclidean Distance Between Two Matrices
Your task is to write the shortest algorithm in a language of your choosing that accomplishes the following:
Given two matrices it must return the euclidean distance matrix. The euclidean distance between two points in the same coordinate system can be described by the following equation:
\$D = \sqrt{ (x_2-x_1)^2 + (y_2-y_1)^2 + ... + (z_2-z_1)^2 }\$
The euclidean distance matrix is matrix the contains the euclidean distance between each point across both matrices. A little confusing if you're new to this idea, but it is described below with an example.
Below is an example:
a = [ 1.0  2.0  3.0;
     -4.0 -5.0 -6.0;
      7.0  8.0  9.0] #a 3x3 matrix

b = [1. 2. 3.] #a 1x3 matrix/vector

EuclideanDistance(a, b)
[   0.0;
  12.4499;
  10.3923]] # a 3x1 matrix/vector see rules for relaxed scoring

In a typical matrix representation of data, or coordinates, the columns represent variables. These could by \$\text{X,Y,Z...,J}\$ coordinates. Most people think in terms of \$\text{XYZ}\$ for 3-D space(3 columns), or \$\text{XY}\$ for 2D space(2 columns). Each row of the matrix represents a different point, or object. The points are what is being compared.
Using the example, matrix b is a single point at positions \$X= 1,Y = 2\$ and \$Z = 3\$. Matrix a contains three points in the same set of coordinates. The first point in a is the same as the point contained in b so the euclidean distance is zero(the first row of the result).
Not to be confusing, but, the matrices can be of any size(provided they fit into RAM). So a 7 by 11 matrix being compared with a 5 by 11 matrix is possible. Instead of X,Y,Z we would then have 11 coordinates(or columns) in both input matrices. The output would either be a 7x5 or a 5x7 matrix (depending on what way the points are compared). Make sense? Please ask for further clarifications.
Here's a 4 dimensional matrix example
a = [ [1. 2. 3. 4.];
      [ -4. -5. -6. -7. ];
      [ 6. 7. 8. 9. ] ] #a 3x4 matrix
b = [ [1. 2. 3. 4.];
      [1. 1. 1. 1.] ] #a 2x4 matrix

EuclideanDistance(a, b)
[  0.0    3.74166;
 16.6132 13.1909;
 10.0    13.1909] #a 3x2 matrix

And another example for soundness:
a = [ [1.  2.];
     [ 3.3 4.4 ] ] #a 2x2 matrix

b = [ [5.5 6.6];
      [7.  8. ];
      [9.9 10.1] ] #a 3x2 matrix

EuclideanDistance(a, b)
[6.43506 8.48528 12.0341;
 3.11127 5.16236 8.72067] #a 2x3 matrix

Rules:

If this function is included in your base language you can use it. You can import the direct function to do this as well. But you sacrifice style and honor! You will not be evaluated on style or honor but your street cred. will be - your call :P .
Your submission should be evaluated in bytes. So save off your code to plain text and read the file size. Less bytes is best!
No printing necessary, just a function, lambda, whatever, that computes this operation.
Reasonable round-off error is fine, and the transpose of the correct solutions is also fine.
This must work for matrices!

Happy golfing!

welcome to codegolf! i have a question. wikipedia describes the input as "a set of points". how are their coordinates encoded in the two matrices?

Banning built-in functions is generally discouraged. Also, this previous challege is very similar

Sorry everyone this is my first go at this! I'll clarify the post ASAP.

Okay I tried to clarify more, and adopted the rules to be more flexible. Please let me know if anything is still unclear or goes against tradition :)

@luis mendo - that previous challenge is similar but sufficiently different to me. This is an extension. We do not want to compare just 2 points, but a series of points across 2 sets. There are a lot of ways to accomplish this from brute force to elegant math!

@caseyk i suggest removing the wikipedia link because it describes a single set of points and squared distances

About this challenge being an extension of the linked one: see here

@ngn - suggestion taken!

@LuisMendo - I think this is more interesting then you give it credit for. If you'd like I can post a solution that shows that mathematically there is atleast one interesting way to go about doing this.

You should provide a test case where $b$ is a matrix instead of a vector -- which I think is allowed by the challenge.

You got it Arnauld!

Anyone know if I am allowed to submit my own answer despite having posted the question? It won't win by bytes but it's a fun way to look at the problem that might inspire others.

@caseyk It's perfectly fine! Usually it is suggested to wait a day or so, which you have already done.

Jelly, 5 bytes
_þ²§½

Try it online!
A dyadic link that takes a matrix as each argument and returns a matrix.
Explanation
_þ    | Outer table using subtract
  ²   | Square (vectorises)
   §  | Sum (vectorises)
    ½ | Square root (vectorises)

Woah, can you explain what this is doing in human terms?

Given a list of length a and a list of length b, _þ creates an a*b matrix of each element from the first list minus each element from the second list. Since the elements are themselves lists, subtraction vectorizes by subtracting corresponding elements from its arguments and resulting in a list of the results. ² then squares every element of every sublist, § replaces each sublist with its sum, and ½ takes the square root of each sum.

Haskell, 45 43 bytes
a#b=[sqrt.sum.map(^2).zipWith(-)l<$>b|l<-a]

Try it online!
I've been trying pretty hard to make this pointfree, and I think it would be shorter but I cannot get it down for some reason.

R, 57 bytes
function(x,y)as.matrix(dist(rbind(x,y)))[a<-1:nrow(x),-a]

Try it online!

Clever use of internal assignment! Sometimes I forget how fun R can be :)

Japt -m, 10 8 bytes
Takes b as the first input and a as the second.
V£MhUí-X

Try it
V£MhUí-X     :Implicit input of 2d-arrays b & V=a and map each U in b
V£           :Map each X in V
  Mh         :  Hypotenuse of
    Uí-X     :    U interleaved with X with each pair reduced by subtraction

6 bytes?

Never heard of Japt before! How's come when I make the input the following, [[1.0  2.0  3.0][-4.0 -5.0 -6.0][7.0  8.0  9.0]]
[[1.0 2.0 3.0][-4.0 -5.0 -6.0]] I get NaN, NaN, NaN ?

@caseyk, because it wasn't clear to me that b is a 2D-array.

@caseyk, updated. Please update the challenge with that test case, plus a few more.

I'm sorry that was my fault. I tried to clarify the prompt further. Nice updated solution!

Sure thing @shaggy! I'll add another test case.

J, 15 13 bytes
+/&.:*:@:-"1/

Try it online!

You can remove the parens for 13 bytes.

Charcoal, 16 bytes
ＩＥθＥη₂ΣＥιＸ⁻ν§λξ²

Try it online! Link is to verbose version of code. Outputs each element on its own line, double-spacing between rows. Explanation:
  θ                 First matrix
 Ｅ                  Map over rows
    η               Second matrix
   Ｅ                Map over rows
        ι           First matrix row
       Ｅ            Map over entries
           ν        First matrix entry
          ⁻         Subtract
             λ      Second matrix row
            §       Indexed by
              ξ     Inner index
         Ｘ     ²    Squared
      Σ             Summed
     ₂              Square rooted
Ｉ                   Cast to string
                    Implicitly printed

J, 12 bytes
+/&.:*: .-|:

Try it online!
How it works
+/&.:*: .-|:  Left: a, Right: b
          |:  Transpose b to get bT
        .     Customized matrix multiply:
         -      Subtract bT's columns from a's rows
  &.:*:         Square each element
+/              Sum
  &.:*:         Sqrt the result

Perl 6, 27 25 bytes
{.&[XZ-]>>²>>.sum X**.5}

Try it online!
Returns the distance matrix as a flat list.
Explanation
{                      }  # Anonymous block
 .&[XZ-]  # Cartesian product using zip-with-minus operator
        >>²  # Square each value
           >>.sum  # Sum of vector elements
                  X**.5  # Square root of each value

05AB1E, 5 bytes
δ-nOt

Takes b as first input and a as second.
Try it online or verify all test cases.
Explanation:
δ      # Outer product; apply double-vectorized on the (implicit) input-lists:
 -     #  Subtract
  n    # Then square each inner value
   O   # Sum each inner list
    t  # And root those sums
       # (after which the result is output implicitly)

Wolfram Language (Mathematica), 24 bytes
Outer[Norm[#-#2]&,##,1]&

Try it online!

By the way, DistanceMatrix works the same way

JavaScript (ES6), 61 bytes
Takes input as (a)(b).
a=>b=>a.map(a=>b.map(b=>Math.hypot(...a.map((v,i)=>v-b[i]))))

Try it online!

Julia, 45 bytes
Using the kernel trick! With broadcasting, starting from here(59 bytes)
D(X,Y)=sqrt.((sum(X.^2,dims=2).+sum(Y.^2,dims=2)').-2X*Y')

we can sneak by a bit here by condensing this down using ascii operators
58 bytes
D(X,Y)=.√((sum(X.^2,dims=2).+sum(Y.^2,dims=2)').-2X*Y')

and by adding a second function(could be a lambda or anonymous fn)
54 bytes
f(S)=sum(S.^2,dims=2)
D(X,Y)=.√(f(X).+f(Y)'.-2X*Y')

It may be tacky to submit an answer to your own question but I ensured I wouldn't win first and figured I'd share this approach. Maybe someone can condense it down further?
Update:
Thanks to @lyndonwhite we can shave this down to 45 bytes after operator overloading!
!S=sum(S.^2,dims=2)
X|Y=.√(!X.+!Y'.-2X*Y')

shorter:
!S=sum(S.^2,dims=2)
X|Y=.√(!X.+!Y'.-2X*Y')

Submit it as an answer! :)

nah, it is just a trival change to yours.
Update your answer and credit me

I don't know how to call that type of function from the REPL! never seen that before.

This is operator overloading, to call it enter in the REPL: for example rand(3,3) | rand(3,3)

This is taken from https://codegolf.stackexchange.com/questions/24407/tips-for-golfing-in-julia

Thanks for clarifying! I updated the answer with your tweaks! Awesome fix shaved off 9 bytes! I wonder how the julia for-loop or outer product approach would fair :)

You should have (!Y)' instead of !Y'

Hm, I think this solution worked when I tried it. I'll have to try again to be sure. Nice catch!

Pari/GP, 52 bytes
(a,b)->matrix(#a~,#b~,i,j,sqrt(norml2(a[i,]-b[j,])))

Try it online!

R, 55 bytes
Inspired by @Nick Kennedy's answer, saving 2 bytes;
function(x,y)fields::rdist(rbind(x,y))[a<-1:nrow(x),-a]

(Sadly doesn't work on tio but does on a local R install with the fields package)

Python (with numpy), 87 bytes
from numpy import *
f=lambda a,b:linalg.norm(r_[a][:,None,:]-r_[b][None,:,:],axis=2)

Thanks for the feedback! I have edited my submission to address the issues.

APL(NARS), chars 35, bytes 70
{⊃√+/¨2*⍨⍵∘-¨(⍴⍵)∘⍴¨{a[⍵;]}¨⍳↑⍴a←⍺}

test:
  f←{⊃√+/¨2*⍨⍵∘-¨(⍴⍵)∘⍴¨{a[⍵;]}¨⍳↑⍴a←⍺}
  a1←3 3⍴ 1 2 3 ¯4 ¯5 ¯6 7 8 9
  b1←1 3⍴ 1 2 3
  a2←3 4⍴1 2 3 4 ¯4 ¯5 ¯6 ¯7 6 7 8 9
  b2←2 4⍴1 2 3 4 1 1 1 1
  a3←⊃(1 2)(3.3 4.4)
  b3←⊃(5.5 6.6)(7 8)(9.9 10.1)
  a1 f b1
 0
12.4498996
10.39230485
  b1 f a1
0 12.4498996 10.39230485
  a2 f b2
 0           3.741657387
16.61324773 13.19090596
10          13.19090596
  a3 f b3
6.435060217 8.485281374 12.03411816
3.111269837 5.1623638    8.720665112

{⊃√+/¨2*⍨⍵∘-¨(⍴⍵)∘⍴¨{a[⍵;]}¨⍳↑⍴a←⍺}
                            ⍳↑⍴a←⍺    gets the number of rows and return 1..Nrows
                    {a[⍵;]}¨          for each number of row return the row
             (⍴⍵)∘⍴¨                  for each row build one matrix has same apparence of ⍵ (the arg of main function) and return it as a list of matrix
                                      so we have the same row that repeat itself until has the same nxm of the ⍵ arg
         ⍵∘-¨                         make the difference with the ⍵ arg
      2*⍨                             make the ^2
 ⊃√+/¨                                sum each doing √ and (in what seems to me) make as colums the element (that are rows)

Can you explain what is happening? This is really cryptic - but cool!

Ruby, 59 bytes
->m,n{m.map{|i|n.map{|j|i.zip(j).sum{|a,b|(a-b)**2}**0.5}}}

Try it online!