text:
"Hello, World!" (Every other character, Part 2)
As a kind of part 2 to Hello, World! (Every other character), write a program such that all three of these programs print "Hello, World!": the entire program, the 1st, 3rd, 5th, etc. characters of your program, and the 2nd, 4th, 6th, etc.
If your program is:
abc
def

It should output "Hello, World!", but so should
acdf

And
b
e

No solutions with built-in "Hello, World!"s.

Why not just change the text from "Hello, World!" to something else?

I think that avoids loopholes enough and "Hello, World!" is canonical.

IMO it'd be nice to see a different string than "Hello, World!" once in a while (that's just my opinion)

Are whitespaces and newlines counted as characters?

@officialaimm Yes.

Odd/even keeper https://jsfiddle.net/d71x6ah7/6/

@ConorO'Brien With the pleasant side effect that very few languages will have built-ins for literally every other string.

Why are builtins banned here but not on Part 1?

Why exactly was this marked as a duplicate?

Because many programming languages ignore leading whitespace, so an answer to the duplicate could be made an answer to this one by adding or removing a leading space.

@ppperry I think you misunderstood something in the question. The original question was just the full program and the odd characters, but this one is the full program, the even characters, and the odd characters. This makes it much harder to find a solution. For example, in the original question, since many golfing languages ignore spaces, you could just do a regular hello world, but with spaces in between each letter. In part 2, this wouldn't work.

Oh, I did. That wasn't very clear.

@ppperry Thanks for the feedback. I've clarified my question.

x86 machine code, 378 bytes

PROG.COM Download and run it in MS-DOS emulator, DOSBox for example.
B3 B4 B3 02 90 B3 B3 B4 02 B3 B4 B3 02 90 B3 B2
B3 48 90 B3 B3 B2 48 B3 B2 B3 48 90 B3 CD B3 21
90 B3 B3 CD 21 B3 CD B3 21 90 B3 B2 B3 65 90 B3
B3 B2 65 B3 B2 B3 65 90 B3 CD B3 21 90 B3 B3 CD
21 B3 CD B3 21 90 B3 B2 B3 6C 90 B3 B3 B2 6C B3
B2 B3 6C 90 B3 CD B3 21 90 B3 B3 CD 21 B3 CD B3
21 90 B3 CD B3 21 90 B3 B3 CD 21 B3 CD B3 21 90
B3 B2 B3 6F 90 B3 B3 B2 6F B3 B2 B3 6F 90 B3 CD
B3 21 90 B3 B3 CD 21 B3 CD B3 21 90 B3 B2 B3 2C
90 B3 B3 B2 2C B3 B2 B3 2C 90 B3 CD B3 21 90 B3
B3 CD 21 B3 CD B3 21 90 B3 B2 B3 20 90 B3 B3 B2
20 B3 B2 B3 20 90 B3 CD B3 21 90 B3 B3 CD 21 B3
CD B3 21 90 B3 B2 B3 77 90 B3 B3 B2 77 B3 B2 B3
77 90 B3 CD B3 21 90 B3 B3 CD 21 B3 CD B3 21 90
B3 B2 B3 6F 90 B3 B3 B2 6F B3 B2 B3 6F 90 B3 CD
B3 21 90 B3 B3 CD 21 B3 CD B3 21 90 B3 B2 B3 72
90 B3 B3 B2 72 B3 B2 B3 72 90 B3 CD B3 21 90 B3
B3 CD 21 B3 CD B3 21 90 B3 B2 B3 6C 90 B3 B3 B2
6C B3 B2 B3 6C 90 B3 CD B3 21 90 B3 B3 CD 21 B3
CD B3 21 90 B3 B2 B3 64 90 B3 B3 B2 64 B3 B2 B3
64 90 B3 CD B3 21 90 B3 B3 CD 21 B3 CD B3 21 90
B3 B2 B3 21 90 B3 B3 B2 21 B3 B2 B3 21 90 B3 CD
B3 21 90 B3 B3 CD 21 B3 CD B3 21 90 B3 CD B3 20
90 B3 B3 CD 20 B3 CD B3 20 90

Also you can download LEFT.COM and RIGHT.COM
How it works and how to run
See answer to part one
Magic
If you want to execute 0xAB opcode command with one parameter 0xCD, you write

Generator
Run code, get hex. Convert in to binary
cat prog.hex | xxd -r -p > PROG.COM

function byte2hex(byte){
 var ret=byte.toString(16).toUpperCase();
 return ret.length==1 ? "0"+ret : ret;
}

function str2hex(str){
 var ret = [];
 for(var i=0;i<str.length;i++){
  ret.push(byte2hex(str.charCodeAt(i)));
 }
 return ret;
}

function genCode(hexArr){
 var ret = [["B4","02"]];
 for(var i=0;i<hexArr.length;i++){
  if(hexArr[i]!=hexArr[i-1]){
   ret.push(["B2",hexArr[i]]);
  }
  ret.push(["CD","21"]);
 }
 ret.push(["CD","20"]);

 return ret;
}

function format(arr){
 var ret=[],tmp=[];
 for(var i=0;i<arr.length;i++){
  tmp.push(arr[i]);
  if(i%16==15 || i==arr.length-1){ret.push(tmp.join(" "));tmp=[];}
 }
 return ret.join("\n");
}

function magicCode(str,mode){
 var ret=[];
 var code=genCode(str2hex(str));

 for(var i=0;i<code.length;i++){
  var ab=code[i][0],cd=code[i][1],tmp;
  tmp=["B3",ab,"B3",cd,"90","B3","B3",ab,cd,"B3",ab,"B3",cd,"90"];
  for(var j=0;j<tmp.length;j++){
   if((mode&1 && j%2==0) || (mode&2 && j%2==1)){ret.push(tmp[j])}
  }

 }
 return ret;
}

const LEFT=1,RIGHT=2,ALL=3;

var str=prompt("string","Hello, world!");

var out = ["PROG.COM\n",format(magicCode(str,ALL)),"\n\nLEFT.COM\n",format(magicCode(str,LEFT)),"\n\nRIGHT.COM\n",format(magicCode(str,RIGHT))].join("\n");

document.write(out.replace(/\n/ig,"<br>"));

Python 3, 115 bytes
print=="partisn't";
"ran" >="partisn't" ;
print((""" "HHeelllloo,,  wwoorrlldd!! """[" ) #2">"1":: 3- 1] [ 1:-1 ]))

Every odd character
pit=print;"a">"ats'";pit(" Hello, world! "[  2>1: -1  :1])

Every even character
rn="ats'"
rn =print
rn("""Hello, world!""")#""":3 ][1- )

Try it online!
This could probably get a lot shorter, but I'm happy I managed to get it to work in Python. Similar to vroomfondel's answer on the first part.
Boring 93 byte answer
""""""
print("Hello, world!")
""""""#
""""

pprriinntt((""HHeelllloo,,  wwoorrlldd!!""))
#"""

Every odd character
"""pit"el,wrd"
"""
""
print("Hello, world!")#"

Every even character
"""
rn(Hlo ol!)"""#""
print("Hello, world!")
""

Try it online!

><>, 45 bytes
! """!!ddllrrooWW  oolllleeHH"!!"" >~o <> o <

Or just even characters:
 "!dlroW olleH"!">o<

Or just odd characters:
!""!dlroW olleH!" ~ >o<

Try them online: original, evens, odds.
The original version pushes "!!ddllrrooWW  oolllleeHH" to the stack, then the fish bounces between >~o <, which deletes a letter, prints two, deletes two, prints two, deletes two, etc. The two half-programs are fairly standard string printing programs. The tricky part was combining " and ! to toggle in and out of string mode in all three programs correctly.

Befunge-98, 43 bytes
120 x""!!ddllrrooWW  ,,oolllleeHH""cckk,,@@

Try it online!
Only the odd ones:
10x"!dlroW ,olleH"ck,@

Try it online!
Only the even ones:
2 "!dlroW ,olleH"ck,@

Try it online!
Explanation
The full program:
120               Push 1, push 2, push 0.
x                 Pop 0 (y) and 2 (x) and set the instruction pointer's movement
                  delta to (x,y). That is, run the remainder of the code
                  by skipping every other cell.
"!dlroW ,olleH"   Push the code points of the output.
ck,               Print 13 characters from the top of the stack.
@                 Terminate the program.

In the odd program, the 2 is gone, so that 10x really does nothing at all (it sets the delta to (1,0) which is the default anyway). The remainder of the program is then the same.
In the even program, we just push the 2 at the beginning which we can ignore entirely. The remainder of the program is the same as before.

Gammaplex, 46 bytes
//

EERRrrXXXX""HHeelllloo,,  WWoorrlldd!!""XX

See here.
Interpreter. It may need some changes to work in modern compilers.

Mathematica, 65 bytes
PPrriinntt[[""HHeelllloo,,  WWoorrlldd!!""]]Print@"Hello, World!"

It throws some warnings, prints Hello, World!, and returns Null PPrriinntt[["" HHeelllloo, Null, "" WWoorrlldd!!]]. When run as a program (not in the REPL), the return value will not be printed.
After removing the even characters:
Print["Hello, World!"]Pit"el,Wrd"

It prints Hello, World!, and returns "el,Wrd" Null Pit.
After removing the odd characters:
Print["Hello, World!"]rn@Hlo ol!

It prints Hello, World!, and returns Null ol! rn[Hlo].

x86 machine code, 73 bytes
Inspired by Евгений Новиков's solution, I thought it should be doable with less tricks, i.e., just jumping around to otherwise "disjoint" codes for all three variants. I'm still trying with a smart variant that uses lodsb; lodsb as central point (so only one string constant is needed for all variants)
EB 14 00 00 8A 8A 17 16 01 01 B4 B4 09 09 CD CD
21 21 CD CD 20 20 8A 1f 01 B4 09 CD 21 CD 20 48
65 6c 6c 6f 2c 20 57 6f 72 6c 64 21 00 48 48 65
65 6c 6c 6c 6c 6f 6f 2c 2c 20 20 57 57 6f 6f 72
72 6c 6c 64 64 21 21 00 00

If I recall correctly from my childhood days, COM's tiny model starts with DS=CS=SS and the code is loaded beginning from CS:0100h. I do not assume it is guaranteed that the code is loaded into a zeroed memory block (if it were guaranteed, I could drop two bytes).
Disassembly of the long code should be
  JMP *+14h
  ; 20 irrelevant bytes
  MOV DX,message
  MOV AH,09h
  INT 21h;  print string pointed to by DS:DX
  INT 20h;  exit program
message:
  DB "Hello, World!\0"
  DB "HHeelllloo,,  WWoorrlldd!!\0\0"

Disassembly of odd code
  JMP *+00h
  MOV DX,message
  MOV AH,09h
  INT 21h;  print string pointed to by DS:DX
  INT 20h;  exit program
  ; some irrelevant bytes
message:
  DB "Hello, World!\0"

Disassembly of even code:
  ADC AL,00h
  MOV DX,message
  MOV AH,09h
  INT 21h;  print string pointed to by DS:DX
  INT 20h;  exit program
  ; some irrelevant bytes
message:
  DB "Hello, World!\0"

Good job! In DOSBox program is not working. I don't know why com file with this code freeze system at start.

Test your code next time. The 8A at 0116 should be BA instead, and strings are terminated by $, not NULL.

Retina, 48 bytes
G |`

HHeelllloo,,  WWoorrlldd!!
$_&

(.)\1t?
$1

Try it online!
Odd positions:
G|
Hello, World!
_
()1?$

Try it online!
Even positions:
 `
Hello, World!$&
.\t
1

Try it online!
Explanation
The full program:
G |`

This does nothing at all. The | is not an existing configuration option. The G makes this a grep stage, but there is really nothing to be grepped and the regex is empty any, so this doesn't do anything. The purpose of this stage is to have two linefeeds in front of the main "Hello, World!" line so that one of them always survives the reduction. The reason for making this a grep stag is that we need to offset the parity of the lines, and grep stages only require a single line.

HHeelllloo,,  WWoorrlldd!!

This turns the (empty) working string into the required output with each character doubled.
$_&

This does nothing. The regex tries to match a _ and a & after the end of the string which is of course impossible. We'll need those characters in the reduced version though, again to deal with vanishing linefeeds.
(.)\1t?
$1

Finally, we remove the duplicate characters by replacing (.)\1 with $1. The t? is never used but will again be necessary in the reduced versions.
The odd program:
G|
Hello, World!

The G can't match the empty input, but that's why we have the | to allow an alternative empty match. This turns the empty working string into the desired output.
_
()1?$

This replaces underscores with ()1?$, but there are no underscores in the string, so this does nothing.
The even program:
 `
Hello, World!$&

The ` just denotes an empty configuration string, so we again use the empty regex to replace the working string with the output. This time we also insert $& but that's the match itself, which is empty, of course, so it doesn't do anything.
.\t
1

This would replace any character followed by a tab with a 1, but we don't have any tabs, so this is also a no-op.

Lua, 106 bytes
----[[[[
print("Hello, World!")
--[[
---- ] ]
---- ] ]
pprriinntt((""HHeelllloo,,  WWoorrlldd!!""))
----]]

Try it online!
Alternate 1:
--[[
rn(Hlo ol!)-[
--]]--
print("Hello, World!")--]

Try it online!
Alternate #2:
--[[pit"el,Wrd"
-[--
--]]print("Hello, World!")
--]

Try it online!
Alternator script: Try it online!

CJam, 44 bytes
{{HHeelllloo,,  WWoorrlldd!!}}ss{{}}ss-X)%L-

Try it online!

Backhand, 36 bytes
vv^^vv""!!ddllrrooWW  ,,oolllleeHH""

Try it online!
Every other character (in both ways):
v^v"!dlroW ,olleH"

Try it online!
How it works
Backhand's IP starts at the first character and bounces back and forth, skipping certain number of steps at once. The initial step size is 3, which can be adjusted with ^ (increase) and v (decrease) commands.
vv^^vv""!!ddllrrooWW  ,,oolllleeHH""
v                                     decrease step size to 2
  ^                                   increase step size to 3
     v                                decrease step size to 2
       " ! d l r o W   , o l l e H "  push the string
                                 H    halt and print the string

v^v"!dlroW ,olleH"
v                   decrease step size to 2
  v                 decrease step size to 1
   "!dlroW ,olleH"  push the string
                H   halt and print the string

PHP, 70 bytes
"";echo'Hello, World!'.""//pprriinntt''HHeelllloo,,  WWoorrlldd!!''
;;

Odd characters:
";coHlo ol!."/print'Hello, World!';

Even characters:
"eh'el,Wrd'"/print'Hello, World!'
;

Haskell, 92 bytes
{---- }

mmaaiinn==ppuuttSSttrr""HHeelllloo,,  WWoorrlldd!!""----}main=putStr"Hello, World!"

Try it online! It looks like the comment abuse is too much for the syntax highlighting to handle. {- ... -} is an inline or multi-line comment, whereas -- starts a line comment.
Odd characters:
{--}
main=putStr"Hello, World!"--mi=uSrHlo ol!

Try it online!
Even characters:
--
main=putStr"Hello, World!"--}anptt"el,Wrd"

Try it online!

Zsh, 54 bytes
<<<Hello\ world!||eecchhoo  HHeelllloo\\  wwoorrlldd!!

Try it online!
The main program executes the first statement successfully, so the statement after the boolean || is ignored.
For odd/even, the <<<Hello\ world! becomes either an unterminated <<heredoc or a <file provided on stdin. Either way, the || becomes |, and so whatever is output by the first command is piped into and ignored by echo.

LOGO, 71 bytes
;;\\
pr[Hello, World!]er "|

pprr[[HHeelllloo,,  WWoorrlldd!!]]
;;\\
|

(the program have a trailing newline)
Two removed versions:
;\p[el,Wrd]r"
pr[Hello, World!]
;\|

and
;\
rHlo ol!e |
pr[Hello, World!];\

(the program have a trailing newline)
For an explanation what pr and er do, see this post. In this case, er is feed with a word determine procedure name.
The \ is escape character in Logo, which will escape the newline after the end of the comment, therefore make the second line (rHlo ol!e |) of second removed program a comment.

Javascript,68 bytes
//**
alert`Hello, World`//**//aalleerrtt``HHeelllloo,,  WWoorrlldd``

Odd Characters:
/*aetHlo ol`/*/alert`Hello, World`

Even Characters:
/*
lr`el,Wrd/*/alert`Hello, World`

Modified version of my answer on the other one.

Why do you need the space at the start?

This doesn't seem to be syntactically valid when you take the 1st, 3rd, etc. characters. Also, it's missing a l in HHeelllloo.

@CalculatorFeline,@Arnauld fixed

Perl 5, 61 bytes
60 bytes code + 1 for -p.
$ _ =$ _ =q";HHeelllloo,,  WWoorrlldd!!";;;q##;s/;|.\K.//g##

Try it online!
Every Odd Byte
  $_="Hello, World!";q#s;.K/g#

Try it online!
Every Even Byte
$_=  q;Hello, World!;;#;/|\./#

Try it online!

BotEngine, 180 178 bytes
Based on my answer to this question.
 vv
 v <
 eHH
 eee
 ell
 ell
 eoo
 e,,
 e
 eWW
 eoo
 err
 ell
 edd
 e!!

>>P          e     e     e     e     e     e     e     e     e     e     e     e     e P

Odd characters (note the multiple trailing spaces on the last line):
 v
v<
eH
ee
el
el
eo
e,
e
eW
eo
er
el
ed
e!
>P

Even characters:
v     H  e  l  l  o  ,     W  o  r  l  d  !
>     e  e  e  e  e  e  e  e  e  e  e  e  eP

Runic Enchantments, 52 bytes
 L @""H!edlllroo,W  W,oorlllde!H"" ~@"!dlroW ,olleH"

Try it online!
Runic is not usually very good at dealing with radiation as having flow control characters removed at random makes tracing execution a huge pain, but predictable radiation like every other character? Easy, we just encode two programs that are reversed of each other and interleaved, then tack on a third copy for the base execution and control which one is executed with a single character. In program 2, the third copy is garbage that's never seen, and in program 3 it retains the quotes, allowing it to be popped without printing it.
Program 1 only executes this part:
 L                                  @"!dlroW ,olleH"

Program 2 only executes this part:
    " H e l l o ,   W o r l d ! "   @

Like this:
  "Hello, World!" @!lo olH

Try it online!
Program 3 only executes this part:
 L @ " ! d l r o W   , o l l e H " ~ " d r W , l e "

Like this:
L@"!dlroW ,olleH"~"drW,le"

Try it online!
The "drW,le" portion is executed, but the ~ immediately pops it off the stack, preserving the desired output.
Naively it would appear that a conversion of the ><> answer would result in a shorter program, weighing in at 45 bytes:
! ```!!ddllrrooWW  oolllleeHH`!!`` R~$ LR $ L

However, Runic has one limitation that ><> does not have: a maximum stack size of 10 + IP's mana (which is initially 10). And !!ddllrrooWW  oolllleeHH contains 24 characters, causing the IP to bleed mana until it expires just before executing the R command, resulting in no output for the base program.
Try it online!

Vyxal, 33 bytes
\` ð`HHeelllloo,,  WWoorrlldd!!`√

Try it Online!
`ðHello, World!`

Try it Online!
\ `Hello, World!√

Try it Online!
These all exploit the bug/feature that single special characters in strings are ignored during parsing.
\`                                # Push a backtick (useless)
   ð                              # Push a space (useless)
    `HHeelllloo,,  WWoorrlldd!!`  # String literal
                                √ # Get every second character

` Hello, World!` # String literal
 ð               # Single non-ascii character (ignored)

\                 # Push a space
  `Hello, World!  # String literal (unterminated)
                √ # Single non-ascii character - ignored

authors: Евгений Новиков


text:
Calculate Treewidth
The treewidth of an undirected graph is a very important concept in Graph Theory. Tons of graph algorithms have been invented which run fast if you have a decomposition of the graph with small treewidth.
The treewidth is often defined in terms of tree decompositions. Here's a graph and a tree decomposition of that graph, courtesy of Wikipedia:

A tree decomposition is a tree where each vertex is associated with a subset of the vertices of the original graph, with the following properties:

Every vertex in the original graph is in at least one of the subsets.
Every edge in the original graph has both of its vertices in at least one of the subsets.
All of the vertices in the decomposition whose subsets contain a given original vertex are connected.

You can check that the above decomposition follows these rules. The width of a tree decomposition is the size of its largest subset, minus one. Therefore, it is two for the above decomposition. The treewidth of a graph is the smallest width of any tree decomposition of that graph.

In this challenge, you will be given a connected, undirected graph, and you must find its treewidth.
While finding tree decompositions is hard, there are other ways to calculate the treewidth. The Wikipedia page has more info, but one method of calculating treewidth not mentioned there which is often used in algorithms to calculate the treewidth is the minimum elimination ordering width. See here for a paper using this fact.
In an elimination ordering, one eliminates all of the vertices of a graph one at a time. When each vertex is eliminated, edges are added connecting all of that vertex's neighbors to each other. This is repeated until all of the vertices are gone. The elimination ordering width is the largest number of neighbors that any vertex which is being eliminated has during this process. The treewidth is equal to the minimum over all orderings of the elimination ordering width. Here is an example program using this fact to calculate the treewidth:
import itertools
def elimination_width(graph):
    max_neighbors = 0
    for i in sorted(set(itertools.chain.from_iterable(graph))):
        neighbors = set([a for (a, b) in graph if b == i] + [b for (a, b) in graph if a == i])
        max_neighbors = max(len(neighbors), max_neighbors)
        graph = [edge for edge in graph if i not in edge] + [(a, b) for a in neighbors for b in neighbors if a < b]
    return max_neighbors

def treewidth(graph):
    vertices = list(set(itertools.chain.from_iterable(graph)))
    min_width = len(vertices)
    for permutation in itertools.permutations(vertices):
        new_graph = [(permutation[vertices.index(a)], permutation[vertices.index(b)]) for (a, b) in graph]
        min_width = min(elimination_width(new_graph), min_width)
    return min_width

if __name__ == '__main__':
    graph = [('a', 'b'), ('a', 'c'), ('b', 'c'), ('b', 'e'), ('b', 'f'), ('b', 'g'),
            ('c', 'd'), ('c', 'e'), ('d', 'e'), ('e', 'g'), ('e', 'h'), ('f', 'g'), ('g', 'h')]
    print(treewidth(graph))

Examples:
[(0, 1), (0, 2), (0, 3), (2, 4), (3, 5)]
1

[(0, 1), (0, 2), (1, 2), (1, 4), (1, 5), (1, 6), (2, 3), (2, 4), (3, 4), (4, 6), (4, 7), (5, 6), (6, 7)]
2

[(0, 1), (0, 3), (1, 2), (1, 4), (2, 5), (3, 4), (3, 6), (4, 5), (4, 7), (5, 8), (6, 7), (7, 8)]
3

[(0, 1), (0, 2), (0, 3), (0, 4), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)]
4

You will receive the graph as input, and you must return the treewidth as output. The input format is flexible. You may take a list of edges, an adjacency map, or an adjacency matrix as input. If you'd like to use another input format, ask in the comments. You may assume the input is connected, and you may build that assumption into your input format, e.g. by using a list of edges.
EDIT: Built-in operations which calculate treewidth are not allowed. I apologize for not specifying this up front.
Shortest code wins.

Since a graph formally is a tuple (V,E) would this be a valid input?

@Bruce_Forte Absolutely.

Octave, 195 bytes
function x=F(a)r=rows(a);P=perms(s=1:r);x=r;for m=s;b=a;n=0;for z=P(m,:);(T=sum(b)(z))&&{b|=(k=accumarray(nchoosek(find(b(z,:)),2),1,[r r]))|k';n=max(T,n);b(z,:)=0;b(:,z)=0}{4};end;x=min(x,n);end

A function that takes as input an adjacency matrix. It consumes large amount of memory so it is useless if number of vertices is more than 10-12.

there is no need to endfunction however it should be added to tio.

Try it online!
Ungolfed:
function min_width = treewidth(graph_adj)
    Nvertices = rows(graph_adj)
    Permutations = perms(1:Nvertices);                                                            % do not try it for large number of vertices
    min_width = Nvertices;
    for v = 1:Nvertices;
        new_graph=graph_adj;
        max_neighbors=0;
        for p = Permutations(v,:)
            Nneighbors=sum(new_graph)(p);
            if(Nneighbors)>0
                connection=accumarray(nchoosek(find(new_graph(p,:)),2),1,[Nvertices Nvertices]);  % connect all neighbors
                new_graph|=connection|connection';                                                % make the adjacency matrix symmetric
                new_graph(p,:)=0;new_graph(:,p)=0;                                                % eliminate the vertex
                max_neighbors=max(Nneighbors,max_neighbors);
            end
        end
        min_width=min(min_width,max_neighbors);
    end
end

SageMath , 29 bytes noncompeting*
lambda L:Graph(L).treewidth()

*This answer posted before OP's change of the question that "Builtins are banned", so I maked it noncompeting .
Online Demo!

Whelp. That's uninspiring. Unfortunately, I'm going to have to ban builtins, sorry about that.

@isaacg No problem. I have another thing in my hand :)

@isaacg doesn't this answer violate a standard loophole?

rahnema1, see my edit. Builtins are banned, so this answer is not allowed. Please delete it or mark it as noncompeting

@isaacg Thanks,I marked it as noncompeting.

Haskell (Lambdabot), 329 321 245 bytes
Here's my solution, thanks to the flexibility of the input it works on graphs with graphs containing any type that is an instance of Eq.
(&)=elem
l=length
t n g s=last$minimum[max(t n g b)$t(n++b)g$s\\b|b<-filterM(\_->[0>1,1>0])s,l b==div(l s)2]:[l[d|d<-fst g,not$d&n,d/=s!!0,(d&)$foldr(\x y->last$y:[x++y|any(&y)x])[s!!0]$join(>>)[e|e<-snd g,all(&(s!!0:d:n))e]]|1==l s]
w=t[]<*>fst

Try it online!
Ungolfed version:
type Vertex a = a
type Edge a   = [Vertex a]
type Graph a  = ([Vertex a],[Edge a])

vertices = fst
edges = snd

-- This corresponds to the function w
treeWidth :: (Eq a) => Graph a -> Int
treeWidth g = recTreeWidth g [] (vertices g)

-- This is the base case (length s == 1) of t
recTreeWidth graph left [v] =
    length [ w | w <- vertices graph
               , w `notElem` left
               , w /= v
               , w `elem` reachable (subGraph w)
           ]

  where subGraph w = [ e | e <- edges graph, all (`elem` v:w:left) e ]

        reachable g = foldr accumulateReachable [v] (g>>g)
        accumulateReachable x y = if any (`elem` y) x
                                  then x++y
                                  else y

-- This is the other case of t
recTreeWidth graph left sub =
  minimum [ comp sub' | sub' <- filterM (const [False,True]) sub
                      , length sub' == div (length sub) 2
          ]

  where comp b = max (recTreeWidth graph left b)
                     (recTreeWidth graph (left++b) (sub\\b))

source: Stack Exchange

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

sort: votes


text:
Identify the direction of lines in an ASCII-figure
Challenge:
Take a rectangular figure consisting of the two characters # and  (whitespace, ASCII-32), and identify which direction the lines are. The options are: 'Vertical', 'Horizontal', 'Left Diagonal' and 'Right Diagonal'.
Input:
The input will be a figure of size n-by-m where 5 <= m,n <= 20. There will be two spaces between horizontal lines, two spaces between lines in the horizontal/vertical direction. Note that the lines doesn't have to start or end in a corner. The input will look like this:
Horizontal:
##########

##########

##########

Vertical (note that there can be leading spaces):
 #  #  #
 #  #  #
 #  #  #
 #  #  #
 #  #  #

Left diagonal:
#  #  #
 #  #
  #  #
#  #  #
 #  #

Right diagonal:
#  #  #  #  #
  #  #  #  #
 #  #  #  #  #
#  #  #  #  #
  #  #  #  #

The input format is optional. You may substitute the visual newlines by \n, or create the grid by concatenating the rows with ASCII-10 (relevant for MATLAB/Octave).
You may not take the input as numbers (1/0) instead of # and 0.

Output:
The output shall be 4 distinct values/outputs for each of the four different cases. It can for instance be 1,2,3,4, or V,H,L,R.
Test cases:
There will be an asterisk over the top left corner of the figure, and an asterisk below the bottom left corner of the figures. This is to indicate where the figure starts and ends.
Horizontal:
*
#####

#####

    *
*

###########

          *
*

##########################

##########################

##########################
                         *

Vertical:
*
#  #  #  #
#  #  #  #
#  #  #  #
#  #  #  #
#  #  #  #
         *
*
 #  #  #  #  #  #
 #  #  #  #  #  #
 #  #  #  #  #  #
 #  #  #  #  #  #
 #  #  #  #  #  #
                  *

Left diagonal
*
#  #  #
 #  #
  #  #
#  #  #
 #  #
      *
*
#  #  #  #  #
 #  #  #  #
  #  #  #  #
#  #  #  #  #
 #  #  #  #
  #  #  #  #
            *
*
  #  #  #
#  #  #  #
 #  #  #
  #  #  #
#  #  #  #
         *

Right diagonal
*
#  #  #  #  #
  #  #  #  #
 #  #  #  #  #
#  #  #  #  #
  #  #  #  #
             *
*
 #  #  #  #  #  #  #
#  #  #  #  #  #  #
  #  #  #  #  #  #
 #  #  #  #  #  #  #
#  #  #  #  #  #  #
                   *

This is code-golf so the shortest code in each language wins.

Can we assume that the input is padded to a rectangle with spaces?

Actually, the spec says the input will be rectangular, but many of the examples aren't.

I really want a Mathematica answer to show up using something like MaxDetect@*Radon@*Blur@*Graphics@*Text, but I can't imagine it'd be at all competitive

Slip, 6 + 2 = 8 bytes
+2 bytes for the f flag.
^*`#`#

Try it here!
Prints one of the following:
##

#
#

#
 #

 #
#

Explanation
The ^* sets the IP's direction to any one of the eight octilinear directions. Then `#`# simply matches two hash symbols in that direction. The f flag limits Slip to looking only for the first match, and by default the bounding box of that match is printed to STDOUT.
The pattern itself would be two bytes shorter in Snails (z\#2), but I don't think Snails can print the match itself, it only has numeric output (and adapting the pattern to printing 4 different numbers based on the direction would most likely take a lot more bytes).

Grime, 4 bytes
s./$

Try it online!
Prints one of the following 2x2 blocks (which should be padded with spaces, some of which are swallowed up by SE):
##

#
#

#
 #

#

Where the last one indicates lines along antidiagonals.
Explanation
The pattern matches a 2x2 square starting from the first # in reading order. The # is matched with s (the "symbol" character class), the following character with . (which can be any character). To this 2x1 rectangle we concatenate another one vertically with /. That other rectangle is just $ which always matches, so this simply fills up the 2x2 square with the two characters below. This unique identifies all four cases.

I want to note that this answer only works because of a bug in the Grime interpreter. :P

@Zgarb That's just fair for the other bug that doesn't let me compete with Snails in this challenge. ;)

Retina, 48 bytes
ms`^(.*¶)?( *)( ?#)((#)|[^¶]*¶\2( ?#)).*
$3$5¶$6

Try it online! Returns the same results as @MartinEnder's Slip answer.

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


text:
Find a number which generates all the integers mod q
Consider the integers modulo q where q is prime,  a generator is any integer 1 < x < q so that x^1, x^2, ..., x^(q-1) covers all q-1 of the integers between 1 and q-1.  For example, consider the integers modulo 7 (which we write as Z_7).  Then 3, 3^2 mod 7 = 2, 3^3 = 27 mod 7 = 6, 3^4 = 81 mod 7 = 4, 3^5 = 243 mod 7 = 5, 3^6 = 729 mod 7 = 1 covers all the values 3, 2, 6, 4, 5, 1 covers all the integers 1..6 as required.
The task is to write code that  takes an input n and outputs a generator for Z_n.  You cannot use any builtin or library that does this for you of course.
The only restriction on the performance of your code is that you must have tested it to completion with n =  4257452468389.
Note that 2^n  means 2 to the power of n. That is ^ represents exponentiation.

Hmm...1 < x < q makes the challenge a lot easier imo.

@EriktheOutgolfer I am not sure I know what you mean? Those are just all the distinct integers that are not 0 or 1.

I mean that it's easier than what many probably think...or maybe some inactive moment on PPCG.

But I think that requiring people to test it to completion to a large number is unnecessary...basically tio would just memory-error.

@Lembik Is there any case where there is no generator for a certain number? Some test cases would be good.

@Mr.Xcoder No. This is because q is prime.

@EriktheOutgolfer The point of that test is to exclude really naive solutions without specify exactly how efficient the solution should be.

@Lembik you need a tag for that probably, that's not normal code-golf

@StepHen Agree, [tag:restricted-complexity].

@Mr.Xcoder It was suggested to me in chat that this is an alternative way of doing this. It has some advantages we can discuss in chat.

This is just finding a generator of the group of units of Z_p, right? Or do I need to refresh my abstract algebra notes...

@Giuseppe Yes although notice that p is prime in this case.

Would the curator of SCP-155 care to participate?

Pyth, 16 15 bytes
f-1m.^T/tQdQPtQ

Test suite
If p is the input, we know that g^(p-1) = 1 mod p, so we just need to check that g^a != 1 mod p for any smaller a. But a must be a factor of p-1 for that to be possible, and any multiple of an a with that property will also have that property, so we only need to check that g^((p-1)/q) != 1 mod p for all prime factors q of p-1. So, we check all integers g in increasing order until we find one that works.
Explanation:
f-1m.^T/tQdQPtQ
f                  Return the first value T such that the following is truthy:
            PtQ    Take the prime factorization of the input - 1.
   m               Map those prime factors to
       /tQd        Take the input - 1 divided by the factor
    .^T    Q       Raise T to that exponent mod input,
                   performed as modular exponentiation, for performance.
 -1                Check that 1 is not found among the results.

Pretty awesome!

Does your code perform the factorization?

@Lembik It does (the PtQ part).

Mathematica, 52 bytes
Inspired by isaacg's answer.
1//.i_/;PowerMod[i,Divisors[#-1],#]~Count~1!=1:>i+1&


text:
Repeated reciprocal
What you need to do is create a function/program that takes a decimal as input, and outputs the result of repeatedly taking the reciprocal of the fractional part of the number, until the number becomes an integer.
More specifically, the process is as follows:

Let x be the input
If x is an integer, output it.
Otherwise: \$x \leftarrow \frac{1}{\mathrm{frac}(x)}\$. Go back to 2.

\$\mathrm{frac}(x)\$ is the fractional component of \$x\$, and equals \$x - \left\lfloor x \right\rfloor\$. \$\left\lfloor x \right\rfloor\$ is the floor of x, which is the greatest integer less than \$x\$.
Test cases:
0 = 0
0.1 = 1/10 -> 10
0.2 = 1/5 -> 5
0.3 = 3/10 -> 10/3 -> 1/3 -> 3
0.4 = 2/5 -> 5/2 -> 1/2 -> 2
0.5 = 1/2 -> 2
0.6 = 3/5 -> 5/3 -> 2/3 -> 3/2 -> 1/2 -> 2
0.7 = 7/10 -> 10/7 -> 3/7 -> 7/3 -> 1/3 -> 3
0.8 = 4/5 -> 5/4 -> 1/4 -> 4
0.9 = 9/10 -> 10/9 -> 1/9 -> 9
1 = 1
3.14 = 157/50 -> 7/50 -> 50/7 -> 1/7 -> 7
6.28 = 157/25 -> 7/25 -> 25/7 -> 4/7 -> 7/4 -> 3/4 -> 4/3 -> 1/3 -> 3

Summary for 0 to 1 at increments of 0.1: 0, 10, 5, 3, 2, 2, 2, 3, 4, 9, 1
This is code-golf, so fewest bytes wins.
Clarifications:

"Bonus points" for no round-off error
Should work for any non-negative rational number (ignoring round-off error)
You can, but don't have to output the steps taken
You can take input as a decimal, fraction, or pair of numbers, which can be in a string.

Sorry for all the issues, this is my first question on this website.

The fact that this terminates is closely related to the possibility of expressing a decimal in continued fraction.

Are we expected to output floats? They cause some precision issue.

Could you detail the process a little bit more?  I'm unsure as to what "reciprocal of the fractional part of the number" entails, and the test cases don't help much either

Can we take two integers as input to represent a rational number?

I thought you need to output the numbers in the process as well.

Optionally. You can, but don't have to.

This is equal to the final element of the simple continued fraction of the input.

Are the test cases the only input we need to be able to handle?

@Shaggy No.These are just examples. If you encounter round-off error, you can post the version with round-off error and the fixed version together.

Please add more test cases, so, for numbers with more than one decimal place and numbers greater than 1.

J, 18 bytes
%@(-<.)^:(~:<.)^:_

In J, the idiom u ^: v ^:_ means "Keep applying the verb u while condition v returns true.
In our case, the ending condition is defined by the hook ~:<., which means "the floor of the number <. is not equal ~: to the number itself" -- so we'll stop when the main verb u returns an int.
u in this case is another hook -<. -- the number minus its floor -- whose return value is fed into @ the reciprocal verb %.
Try it online!

Also 18, but has some floating point imprecisions because of tolerances presumably: _2{(%@-<.) ::]^:a:.

%@|~&1^:(~:<.)^:_

Mathematica, 36 bytes
Last@*ContinuedFraction@*Rationalize

Demo
In[1]:= f = Last@*ContinuedFraction@*Rationalize

Out[1]= Last @* ContinuedFraction @* Rationalize

In[2]:= f[0]

Out[2]= 0

In[3]:= f[0.1]

Out[3]= 10

In[4]:= f[0.2]

Out[4]= 5

In[5]:= f[0.3]

Out[5]= 3

In[6]:= f[0.4]

Out[6]= 2

In[7]:= f[0.5]

Out[7]= 2

In[8]:= f[0.6]

Out[8]= 2

In[9]:= f[0.7]

Out[9]= 3

In[10]:= f[0.8]

Out[10]= 4

In[11]:= f[0.9]

Out[11]= 9

In[12]:= f[1]

Out[12]= 1

What happens without Rationalize?

@GregMartin Without Rationalize, Mathematica thinks there isn’t sufficient precision to generate all terms of the continued fraction. For example, ContinuedFraction[0.1] is just {0}.

Python 3, 101 bytes
lambda s:g(int(s.replace(".","")),10**s[::-1].index("."))
g=lambda a,b:a and(b%a and g(b%a,a)or b//a)

Try it online!
Format: the string must contain a decimal point.

.replace(".","") -> .replace(*"._") save 1 byte

Perl 6, 42 bytes
{($_,{1/($_-.floor)}...*.nude[1]==1)[*-1]}

Try it online!
The nude method returns the numerator and denominator of a rational number as a two-element list.  It's shorter to get the denominator this way than to call the denominator method directly.

PHP, 69 bytes
for(;round(1e9*$a=&$argn)/1e9!=$o=round($a);)$a=1/($a-($a^0));echo$o;

Try it online!
PHP, 146 bytes
for($f=.1;(0^$a=$argn*$f*=10)!=$a;);for(;1<$f;)($x=($m=max($a,$f))%$n=min($a,$f))?[$f=$n,$a=$x]:$f=!!$a=$m/$n;echo($o=max($a,$f))>1?$o:min($a,$f);

Try it online!

Haskell, 47 bytes
This beats Wheat Wizard's answer because GHC.Real allows us to pattern match on rationals using :%, aswell as having a shorter name
import GHC.Real
f(x:%1)=x
f x=f$1/(x-floor x%1)

Try it online!
f takes a Rational number as input, although ghc allows them to be written in a decimal format, within a certain precision.

Haskell, 40 34 bytes
Edit:

-6 bytes: @WheatWizard pointed out the fraction can probably be given as two separate arguments.

(Couldn't resist posting this after seeing Haskell answers with verbose imports – now I see some other language answers are also essentially using this method.)
! takes two integer arguments (numerator and denominator of the fraction; they don't need to be in smallest terms but the denominator must be positive) and returns an integer. Call as 314!100.
n!d|m<-mod n d,m>0=d!m|0<1=div n d

Try it online!

Ignoring type mismatch, the fractional part of n/d (assuming d positive) is mod n d/d, so unless mod n d==0, ! recurses with a representation of d/mod n d.

34 bytes?  I don't know why you are using such a cumbersome IO method

@WheatWizard Hm well, I interpreted "pair" as having to be a pair rather than two distinct arguments. I suppose that's an overly Haskell-centric interpretation.

Jelly, 8 bytes
®İ$%1$©¿

Try it online!
Floating-point inaccuracies.

Good luck doing it for 0.7

@LeakyNun That luck means either infinite loops or infinite loops...

Use M to fix floating-point inaccuracies :P. It's Jelly but with arbitrary precision mathematics. Doesn't fix the 0.7 loop though.

@HyperNeutrino M is way outdated version of Jelly.

5 bytes

@cairdcoinheringaahing The thing is that you have to do it on the fractional part though. (yes, the code is kinda messy, given that the first $ should be a ¤ instead :p)

Python 3 + sympy, 67 bytes
from sympy import*
k=Rational(input())
while k%1:k=1/(k%1)
print(k)

Try it online!
Sympy is a symbolic mathematics package for Python. Because it is symbolic and not binary, there are no floating point inaccuracies.

JavaScript ES6, 25 bytes
f=(a,b)=>a%b?f(b,a%b):a/b

Call f(a,b) for a/b

If gcd(a,b)=1 can remove /b

Haskell, 62 61 bytes
import Data.Ratio
f x|denominator x==1=x|u<-x-floor x%1=f$1/u

Try it online!
Uses Haskell's Data.Ratio library for arbitrary precision rationals.  If only the builtin names were not so long.

@H.PWiz Nice! I had been trying to pattern match with Data.Ratio. I've never heard of GHC.Real.  Feel free to post that as your own answer.

posted

JavaScript, 70 bytes
x=>(y=(x+'').slice(2),p=(a,b)=>b?a%b?p(b,a%b):a/b:0,p(10**y.length,y))

If we can change input type to a string, then it may save 5 bytes.

This won't work for numbers >= 10.

@Shaggy Is supporting numbers > 1 needed?

Yes, it should work for any rational number (ignoring round-off error).

APL (Dyalog Classic), 18 bytes
{1e¯9>t←1|⍵:⍵⋄∇÷t}

Try it online!
APL NARS, 18 chars
-1 byte thanks to Uriel
test
f←{1e¯9>t←1|⍵:⍵⋄∇÷t}
v←0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1 3.14
⎕←v,¨f¨v
  0 0  0.1 10  0.2 5  0.3 3  0.4 2  0.5 2  0.6 2  0.7 3  0.8 4  0.9 9  1 1  3.14 7

⍵-⌊⍵ → 1|⍵ for one byte

@Uriel thank you... So the bytes are as the J solution

Smalltalk, 33 bytes
[(y:=x\\1)>0]whileTrue:[x:=1/y].x

Stax, 8 bytes
ç▄é⌠á◙àù

Run and debug it
"Bonus points" for no precision errors.  No floating point arithmetic used.  This (finally) makes use of stax's built-in rational type.

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


text:
Lets make a triangle
Most people are familiar with Pascal's triangle.
    1
   1 1
  1 2 1
 1 3 3 1
1 4 6 4 1

Pascal's triangle is an automaton where the value of a cell is the sum of the cells to the upper left and upper right.  Now we are going to define a similar triangle.  Instead of just taking the cells to the upper left and the upper right we are going to take all the cells along two infinite lines extending to the upper left and upper right.  Just like Pascal's triangle we start with a single 1 padded infinitely by zeros and build downwards from there.
For example to calculate the cell denoted with an x
   1
  1 1
 2 2 2
4 5 5 4
   x

We would sum the following cells
   .
  . .
 2 . 2
. 5 5 .
   x

Making our new cell 14.
Task
Given a row number (n), and distance from the left (r) calculate and output the rth non-zero entry from the left on the nth row. (the equivalent on Pascal's triangle is nCr).  You may assume that r is less than n.
This is code-golf, the goal is to minimize the number of bytes in your solution.
Test cases
0,0 -> 1
1,0 -> 1
2,0 -> 2
4,2 -> 14
6,3 -> 106

Here's the first couple rows in triangle form:
                  1
                1   1
              2   2   2
            4   5   5   4
          8  12  14  12   8
       16  28  37  37  28  16
     32  64  94  106 94  64  32
   64  144 232 289 289 232 144 64
 128 320 560 760 838 760 560 320 128

OEIS A035002

Can our submissions use 1-based indexing instead?

@KritixiLithos Sure.  It will make me sad though.

Jelly, 18 17 bytes
SṚ0;+Sṭ
1WWÇ⁸¡ṪṙḢ

Uses 0-based indexing.
Try it online!
How it works
1WWÇ⁸¡ṪṙḢ  Main link. Arguments: n, r

1          Set the return value to 1.
 W         Wrap; yield [1].
  W        Wrap; yield [[1]].
           This is the triangle with one row.
   Ç⁸¡     Call the helper link n times.
           Each iteration adds one row to the triangle.
      Ṫ    Tail; take the last array, i.e., the row n of the triangle.
       ṙ   Rotate row n r units to the left.
        Ḣ  Head; take the first element, i.e., entry r of row n.

SṚ0;+Sṭ    Helper link. Argument: T (triangle)

S          Take the column-wise sums, i.e., sum the ascending diagonals of the
           centered triangle, left to right.
 Ṛ         Reverse the array of sums. The result is equal to the sums of the
           descending diagonals of the centered triangle, also left to right.
  0;       Prepend a 0. This is required because the first element of the next row
           doesn't have a descending diagonal.
     S     Take the column-wise sum of T.
    +      Add the ascending to the descending diagonals.

Python 3, 72 bytes
1 byte thanks to Kritixi Lithos.
f=lambda n,r:n>=r>=0and(0**n or sum(f(i,r)+f(i,r+i-n)for i in range(n)))

Try it online!

You can rearrange to get this: n>=r>=0and and save a byte

@EinkornEnchanter if n is 0, then it gives 1; otherwise, it gives 0. It is like n and ... or 1, but shorter.

I see, nice abuse of broken behavior then, +1.

@EinkornEnchanter 0^0 is 1 in most programming languages.

@Arnauld That doesn't make it true ;)

ES6, 80 78 bytes
p=(n,r,c=0)=>n?(o=>{while(n&&r<n)c+=p(--n,r);while(o*r)c+=p(--o,--r)})(n)||c:1

In action!
Two bytes thanks to Arnauld.

You can save 2 bytes by using while(n&&r<n) and while(o*r).

This answer is perfectly valid. So, whoever downvoted it should definitely provide an explanation... Or can it be one of these weird automatic downvotes from Community?

PHP, 94 bytes
recursive way 0-indexed

function f($r,$c){for($s=$r|$c?$r<0?0:!$t=1:1;$t&&$r;)$s+=f($r-=1,$c)+f($r,$c-++$i);return$s;}

Try it online!
PHP, 125 bytes
0-indexed

for(;$r<=$argv[1];$r++)for($z++,$c=~0;++$c<$z;$v+=$l)$x[$c]+=$t[+$r][$c]=$l=($v=&$y[$r-$c])+$x[$c]?:1;echo$t[$r-1][$argv[2]];

Try it online!
PHP>=7.1, 159 bytes
0-indexed for rows over 50
for([,$m,$n]=$argv;$r<=$m;$r++)for($z++,$c=0;$c<$z;$v=bcadd($v,$l),$x[$c]=bcadd($x[$c],$l),$c++)$t[+$r][$c]=$l=bcadd(($v=&$y[$r-$c]),$x[$c])?:1;echo$t[$m][$n];

Python 3, 61 bytes
f=lambda n,r:sum(f(k,r)+f(k,r+k-n)for k in range(n))or~n<-r<1

This returns True for base case (0, 0), which is allowed by default.
Try it online!

~n<-r<1 is quite clever, I spent a good 10 minutes trying to golf n>=r>=0.

Not actually shorter, but it saves the space. :)

Husk, 16 bytes
!!¡ȯSż+oΘ↔mΣT;;1

Try it online!
Same idea as Dennis' answer, but simpler indexing method.

Pascal, 145 bytes
function f(n,k:integer):integer;var i,r:integer;begin r:=1-Ord((k<0)or(k>n));if n>0 then r:=0;for i:=1 to n do r:=r+f(n-i,k-i)+f(n-i,k);f:=r;end;

Try it online!
Uses the T(n, r) = T(n-1, r-1) + T(n-1, r) recursion.

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


text:
The Lehmer-Comtet sequence
The Lehmer-Comtet sequence is a sequence such that a(n) is the nth derivative of f(x) = xx with respect to x as evaluated at x = 1.
Task
Take a non-negative integer as input and output the nth term of the  Lehmer-Comtet sequence.
This is code-golf so you should minimize the file size of your source code.
Test Cases
OEIS 5727
Here are the first couple terms in order (copied from the OEIS)
1, 1, 2, 3, 8, 10, 54, -42, 944, -5112, 47160, -419760, 4297512, -47607144, 575023344, -7500202920, 105180931200, -1578296510400, 25238664189504, -428528786243904, 7700297625889920, -146004847062359040, 2913398154375730560, -61031188196889482880

Haskell, 77 75 bytes, no differentiation builtins
x@(a:b)&y@(c:d)=a*c:zipWith(+)(b&y)(x&d)
s=1:s&(1:scanl(*)1[-1,-2..])
(s!!)

Try it online!
How it works
We represent a function as its infinite list of Taylor series coefficients about \$x = 1\$:
$$
f(x) = \sum_{n=0}^\infty \frac{f^{(n)}(1)}{n!} (x - 1)^n
$$
is represented by \$[f(1), f'(1), f''(1), ...]\$.
The & operator multiplies two such functions using the product rule.  This lets us recursively define the function \$s(x) = x^x\$ in terms of itself using the differential equation
$$
s(1) = 1, \\
s'(x) = s(x) \cdot (1 + \ln x),
$$
where
$$
\ln x = \sum_{n=1}^\infty \frac{(-1)^{n-1}(n - 1)!}{n!}(x - 1)^n.
$$

Mathematica, 19 bytes
D[x^x,{x,#-1}]/.x->1&

-18 bytes from @Not a tree

Unless I'm missing something, you can get this a lot shorter: D[x^x,{x,#}]/.x->1&, 19 bytes.

actually 21 bytes.. but yes! a lot shorter!

I don't think you need the -1 — the sequence from OEIS starts at n = 0.

ok then! 19 bytes it is

Haskell, 57 bytes
f 0=1
f n=f(n-1)-foldl(\a k->f(k-1)/(1-n/k)-a*k)0[1..n-1]

Try it online!
No built-ins for differentiating or algebra. Outputs floats.

Octave with Symbolic Package, 36 32 bytes
syms x
@(n)subs(diff(x^x,n),x,1)

The code defines an anonymous function which outputs a symbolic variable with the result.
Try it online!

Python with SymPy, 77 75 58 57 bytes
1 byte saved thanks to @notjagan
17 bytes saved thanks to @AndersKaseorg
from sympy import*
lambda n:diff('x^x','x',n).subs('x',1)

lambda n:diff('x**x','x',10).subs('x',1) doesn’t require sympy.abc.

Ummm ... where do you use n?

@ZacharyT thanks! coincidentally I tested anders' proposal right with n=10, so it gave the same result :) fixed now

-1 byte by replacing x**x with x^x.

SageMath, 33 32 bytes
lambda n:diff(x^x,x,n).subs(x=1)

Try it on SageMathCell

Python 3, 150 bytes
lambda n:0**n or sum(L(n-1,r)for r in range(n))
L=lambda n,r:0<=r<=n and(0**n or n*L(n-2,r-1)+L(~-n,r-1)+(r-~-n)*L(~-n,r)if r else n<2or-~-n*L(n-1,0))

Try it online!
Exponential runtime complexity. Uses the formula given in the OEIS page.

n>=r>=0 saves a byte.

You can also save a byte by putting 0**n after sum(...).

You can rearrange your addition to save a third byte.

Save two bytes by using bitwise or

Save two more bytes by using n<1 instead of 0**n

You can save a byte by changing 0<=r<=n and to n>=r>=0and, as @Olmman said.

Python3+mpmath 52 bytes
from mpmath import*
lambda n:diff(lambda x:x**x,1,n)

-3 bytes, Thanks @Zachary T

You should change the language to python3+mpmath, since mpmath is not a standard library.

You can change your first line to from mpmath import*, and the second to diff(lambda x:x**x,1,n). (just removing unnecessary spaces)

Python 3, 288 261 bytes
Differentiation without differentiation built-in.
p=lambda a,n:lambda v:v and p(a*n,n-1)or a
l=lambda v:v and p(1,-1)
e=lambda v:v and m(e,a(p(1,0),l))or 1
a=lambda f,g:lambda v:v and a(f(1),g(1))or f(0)+g(0)
m=lambda f,g:lambda v:v and a(m(f(1),g),m(g(1),f))or f(0)*g(0)
L=lambda n,f=e:n and L(n-1,f(1))or f(0)

Try it online!
How it works
Each of the first five lines define functions and their derivatives and their results when evaluated at 1. Their derivatives are also functions.

p is power i.e. a*x^n
l is logarithm i.e. ln(x)
e is exponential i.e. exp(x)
a is addition i.e. f(x)+g(x)
m is multiplication i.e. f(x)*g(x)

Usage: for example, exp(ln(x)+3x^2) would be represented as e(l()+p(3,2)). Let x=e(l()+p(3,2)). To find its derivative, call x(1). To find its result when evaluated at 1, call x(0).
Bonus: symbolic differentiation

You can save a lot of bytes by using exec compression. Try it online!

Pari/GP, 32 bytes
n->n!*Vec((y=1+x+O(x^n++))^y)[n]

Try it online!


text:
Increasing Goldbach partitions
The Goldbach conjecture states that:

every even number that is greater than 2 is the sum of two primes.

We will consider a Goldbach partition of a number n to be a pair of two primes adding to n.  We are concerned with numbers is of increasing Goldbach partition. We measure the size of a number's Goldbach partitions by the size of the smallest prime in all of that number's partitions.  A number is of increasing partition if this size is greater than the size of all smaller even numbers.
Task
Given an even integer n > 2, determine if n is of increasing Goldbach partition, and output two unique values, one if it is and one if it is not.
This is code-golf, so you should aim to minimize the number of bytes in your source code.
OEIS A025018

Let us continue this discussion in chat.

It is good question, that is difficult to understand. I edited it to simplify the wording. Please check it, and if all is correct apply changes.

@ЕвгенийНовиков I found your edit more confusing than the original.  I have rejected it.  Perhaps we can discuss a way to make this clearer here.

The worked examples are still very confusing - they seem to pull numbers out of nowhere, and each of the comparisons is expressed differently without explaining why certain numbers are used. If you already know the answer, you can figure it out . . . which I did by going back to the first paragraph, ignoring the examples until it was clear, then figuring out how the examples were constructed. Perhaps some tabular structure would help, also including 10 would probably help

@NeilSlater Thanks for the feedback.  I've removed the examples entirely because I think they were doing more harm than good.  I think the challenge is clear from the explanation, and the examples only complicate things.  If the explanation is not sufficient I would be more than happy to expand or clarify on that, however I don't think I will be adding the examples back in because they seem to be the greatest source of confusion so far.

Jelly, 12 bytes
ÆRðfạṂ
Ç€M⁼W

Try it online!
How it works
Ç€M⁼W   Main link. Argument: n

Ç€      Map the helper link over [1, ..., n].
  M     Get all indices of the maximum.
    W   Wrap; yield [n].
   ⁼    Test the results to both sides for equality.

ÆRðfạṂ  Helper link. Argument: k

ÆR      Prime range; get all primes in R := [1, ..., k].
  ð     Begin a dyadic chain with arguments R and k.
    ạ   Absolute difference; yield k-p for each p in R.
   f    Filter; keep the q in R such that q = k-p for some p in R.
     Ṃ  Take the minimum.
        This yields 0 if the array is empty.

PHP, 154 bytes
for(;$n++<$a=$argn;$i-1?:$p[]=$n)for($i=$n;--$i&&$n%$i;);foreach($p as$x)foreach($p as$y)if(!$r[$z=$x+$y]){$r[$z]=$x;$l[]=$z<$a?$x:0;};echo$r[$a]>max($l);

Try it online!
Expanded
for(;$n++<$a=$argn;$i-1?:$p[]=$n) # loop through all integers till input if is prime add to array
  for($i=$n;--$i&&$n%$i;);
foreach($p as$x) #loop through prime array
  foreach($p as$y) #loop through prime array
    if(!$r[$z=$x+$y]){
      $r[$z]=$x; # add only one time lower value for a sum of $x+$y
      $l[]=$z<$a?$x:0;}; # add lower value if sum is lower then input
echo$r[$a]>max($l); # Output 1 if lower value for sum of input is greater then all lower values of all numbers under input

Try it online! Check for all numbers till 1000

JavaScript (ES6), 135 bytes
Uses a similar logic as Jörg's PHP answer.
(n,P=[...Array(n).keys()].filter(n=>(p=n=>n%--x?p(n):x==1)(x=n)))=>P.map(p=>P.map(q=>a[q+=p]=a[q]||(m=q<n&&p>m?p:m,p)),a=[m=0])&&a[n]>m

Demo

let f =

(n,P=[...Array(n).keys()].filter(n=>(p=n=>n%--x?p(n):x==1)(x=n)))=>P.map(p=>P.map(q=>a[q+=p]=a[q]||(m=q<n&&p>m?p:m,p)),a=[m=0])&&a[n]>m

console.log(
  JSON.stringify(
    [...Array(310).keys()].filter(n => f(n))
  )
)

Python 3: 156 151 142 138 136 128 bytes
r=range
m=lambda n:min(x for x in r(2,n+1)if all(o%i for o in[x,n-x]for i in r(2,o)))
f=lambda n:m(n)>max(map(m,r(2,n,2)))or n<5

(thanks to OP)
(thanks to @Rod)(again)(and again)

@Olmman do you like it?

@Rod since max with key returns element with maximal value after applying key, I had to add function application but it's nonetheless shorter.

@Rod and I can't take your suggestions as for range since n is bounded inside lambda.

@enedil Indeed, but for the max, you can use max(map(m,r[::2]))

@Rod ughh, there's gotta be a few bytes to save, to be the shortest of all nonesoteric languages! (except switching to Python2!)

Okay, one last tip and I will stop bothering you : The pfunction can be inserted on m as m=lambda n:min(x for x in r(2,n+1)if all(o%i for o in[x,n-x]for i in r(2,o)))

You don't need to name f and thus can save 2 bytes by removing the f=.

Python 3: 204 196 bytes
Bytes saved thanks to: Olm Man
from itertools import*
m=lambda g:min([x for x in product([n for n in range(2,g)if all(n%i for i in range(2,n))],repeat=2)if sum(x)==g][0])
i=lambda g:1if all(m(g)>m(x)for x in range(4,g,2))else 0

Try it online!

A few tips,  most builtin functions like min and all can take generators as arguments, this means min([...]) can be shortened to min(...) and the same with all.  You also can get rid of some spaces, particularly the space in import * and any space after braces, I see you have one after range(g) and one before [i for i in ..., neither are necessary.

^That's awesome, I didn't know that

Also you can make your prime check a little shorter by changing it to all(n%i for i in range(2,g)), but you have to change range(g) to range(1,g) because this gives a false positive on 1.

authors: Евгений Новиков


text:
Will I tip over?
Overview
Given a 3 line string, figure out if the structure falls to the left, balances, or falls to the right.
Input structure
You can imagine the structure as metal rod with stuff on top, all being balanced on top of a vertical rod.
1  7 4        a
===============
        |

The first line is the items. Each item's weight is calculated as the ascii value of the character minus 32. (Characters under 32 aren't considered and spaces weigh 0). Keep in mind that an item's force on the rod is its weight times the distance to the pivot point.
The second line is the rod. Each length of rod weighs 1 unit by itself. This line is exclusively equals signs (=).
The third line is the pivot point. This can be placed anywhere, and is represented by a number of spaces followed by a single pipe (|) character.
Examples
Input:

=====
  |

Output: Balance
Input:

=====
   |

Output: Falls left
Input:

    %
=====
   |

Output: Balance (Because % weighs enough to counteract the weight of the left side of the rod)
Input:

 a    a
=======
   |

Output: Falls right (because the a on the right is further away from the pivot point)
Input:
1  7 4        A
===============
        |

Output: Falls left
Input:
1  7 4        a
===============
        |

Output: Falls right (lower case letters are heavy!)
Input:
            $ ~
===============
             |

Output: Balance
Notes

Trailing whitespace is permitted, leading whitespace is not.
Your program may output in whatever format you like, as long as there are 3 distinct outputs for left, balance, and right.
Your program must accept the format shown as input.
This is code-golf so the shortest code in bytes wins

Closely related

May the program take the three lines as three separate strings (e.g. as three arguments to a function or as a three element list)?

@notjagan The input must be a single string separated by new line characters.

Related, possible dupe.

@xnor Not a dupe because that question deals with only uppercase letters, and its goal is to find the pivot. My question is about all ascii characters >= 32, and mine supplies the pivot and asks if the structure will fall over. Essentially the reverse of the one you linked.

Also related, but not a dupe.

Could you include a test case where the top row contains a pipe? This could break many solutions.

JavaScript (ES6), 116 111 108 106 bytes
-5 bytes by summing via eval(array.join`+`) instead of array.reduce().
-3 bytes by defaulting to 1 instead of 32 - 31, allowing parentheses to be removed.
-2 bytes since pivot point is the length of the last line - 1
(s,[t,r,b]=s.split`
`)=>Math.sign(eval([...r].map((_,i)=>(t.charCodeAt(i)-31||1)*(i-b.length+1)).join`+`))

Outputs -1, 0, or 1, for left, balanced, or right, respectively. Ended up similar to Chas Brown's python answer, so credit goes there.
Can save 4 bytes if the first line is padded to match the length of the rod by using
(31-t.charCodeAt(i))*(b.length+~i).
Test Snippet
Includes additional output (Left/Balanced/Right) along with the number.

f=
(s,[t,r,b]=s.split`
`)=>Math.sign(eval([...r].map((_,i)=>(t.charCodeAt(i)-31||1)*(i-b.length+1)).join`+`))
<textarea id=I rows=3 cols=20></textarea><br><button onclick="O.value=I.value?`${x=f(I.value)} (${['Left','Balanced','Right'][x+1]})`:''">Run</button> <input id=O disabled>

Another 106 byte method
(s,[t,r,b]=s.split`
`)=>Math.sign(eval(r.replace(/./g,(_,i)=>"+"+(t.charCodeAt(i)-31||1)*(i-b.length+1))))

Instead of joining an array on +s, we create a string of numbers, each prefixed by +. The leading + gets ignored.

I think (b.length+~i) might help to save a byte. (Also I don't understand why you have the ||1.)

@Neil b.length+~i returns the negative of i-b.length+1; that could help if I could negate the other part. As for the ||1, that was because I was assuming the first line wasn't padded to match the length of the rod, so t.charCodeAt(i) would return NaN beyond the end of the first line.

I hadn't though to try a non-padded test case; thanks for explaining.

Python 2, 112 110 bytes
def f(s):w,b,p=s.split('\n');return cmp(sum((ord((w+' '*-~i)[i])-31)*(i-p.find('|'))for i in range(len(b))),0)

Try it online!
EDIT: Finally managed to eliminate the enumerate and rjust for a measly 2 bytes... meh!
Takes in a string; outputs -1,0, or 1 for falls left, balances, falls right, respectively.
First pass at 112 bytes was:
def f(s):w,b,p=s.split('\n');return cmp(sum((ord(c)-31)*(i-p.find('|'))for i,c in enumerate(w.rjust(len(b))),0)

(ord(c)-31) Took me a while to realize that this is actually incorporating the weight of the rod itself along with the items. Very clever!

As per meta, you can replace return with print for -1 byte (although it doesn't really play nicely with the current TIO code).

Jelly, 24 bytes
ṪO_31
ỴµṪLạÐ€ṪL$×Çṣ0S€IṠ

Try it online!
-1 for falling left, 0 for balancing, 1 for falling right (full program).
[-1] for falling left, [0] for balancing, [1] for falling right (function).
First line must have trailing spaces, last line must not.
Explanation (we start with bottom line):
First of all, we're working with individual lines, so we need to somehow get them. That's a job for Ỵ. Then, we need to treat the \n-split version of the input as if it was the original input, so we use µ to make a monadic chain applied to the current value.
Now we begin real work, and our first job would be computing the factors of the weights. Essentially this is a range [distance from far left to pivot..0..distance from pivot to far right]. First of all, we have to find the 1-based index of the pivot, which is essentially the length of the last line without trailing spaces. So we pop the last line (pivot line) from our original list with Ṫ, since we won't need it anymore, and then we take its length with L. We then need to take the length of the rod, for which we do the same thing to the now-last line (rod line) with ṪL$. Finally, to get the range, we map |x - y| to [1..rod length], where x is the pivot index and y is each element of the list we map upon. We do this using ạÐ€, where ạ calculates |x - y| and Ð€ makes a range from 1 up to and including the rod length. Now we'll have the range we want.
After that, we have to multiply each integer, representing a piece of the rod, with its corresponding weight. To calculate the weights, we use Ç, going to the top line of our code. We take the remaining line with Ṫ, its charcodes with O, and then we calculate x - 31 using _31, x being each charcode. We then assign space to weight 1 (0 + rod piece = 1), ! to weight 2 (1 + 1) etc. We're done with the top line, so now Ç would return the list of weights, which we multiply with the corresponding integers representing the rod pieces with ×.
After that, we split with ṣ0 on the pivot point, represented by a 0 (since any weight there won't affect the result), resulting in a list of the form [[1st weight, 2nd weight...weight just before pivot], [weight just after pivot, weight after the one before...last weight]]. Those lists represent the sides of the rod, left and right. We now sum each of the lists using S€ to get the total weights on each side, and use I to take the delta, which will be negative if left side is heavier, zero if they're equal-weighted, and positive if right side is heavier. So, to return the final result using this properly to our advantage, we take the sign with Ṡ.

Haskell, 212 171 bytes (188 if take input as one string)
o!p=map(fst)(zip[p-0,p-1..]o)
x#p=sum(zipWith(\c w->(max(fromEnum c-32)0)*w)x(x!p))+sum(x!p)
x?c=length(takeWhile(==c)x)

171 bytes variant
r a b c=signum(take(b?'=')(a++repeat ' ')#(c?' '))

188 bytes variant
x%y=lines x!!y
r i=signum(take(i%1?'=')(i%0++repeat ' ')#(i%2?' '))

Explanation
o!p=map(fst)(zip[p-0,p-1..]o)        Creates weights coefs list.
                                     o - list, p - pivot position
                                     for list "abcdf" and p=3 (pivot under 'd')
                                     outputs [3,2,1,0,-1]

x#p                                  Calculates total balance
                                     x-list of "objects" on lever, p-pivot place
  sum(zipWith                        sum of zipped lists
   (\c w->(max(fromEnum c-32)0)*w)   weight of ascii "object" times
                                     distance from pivot
    x(x!p))                          x-ascii objects,
                                     (x!p)-distances list(weight coefs)
  +sum(x!p)                          balance of lever ("==") itself

x?c=length(takeWhile(==c)x)          length of list before non c element met
                                     used to find '|' position
                                     and length of "===" lever
                                     before right whitespaces met

r a b c=                             Sums it all up =)
                                     a-ascii objects, b-lever, c-pivot line
   signum(                           1-tips left, 0-balance, -1-tips right
     take(b?'=')(a++repeat ' ')      takes all object on lever
                                     plus whitespaces up to length of the lever
      #                              calculate the balance
       (c?' ')                       determine place of pivot

You can use fromEnum instead of ord and drop the import. c can be simplified to c p=max(ord p-32)0 (or with fromEnum) and as you are using it only once, inline it.

Or you could add (Lambdabot) to your title, this imports pretty much everything you need, see here.

The function c can even be simplified (characters under 32 aren't considered) further to c p=ord p-32. Also p is basically length (minus 1), so p x=length x-1 would work too (and you can inline it too). Also have a look at my solution, how I use signum - you could do r o l s = signum $ 2 * z ... which returns 0,1,-1 for B,L,R.

Apart from, that this solution seems to fail test cases [3,4,7] and takes 3 Strings instead of one. (see lines).

@nimi Thank you a lot for advices. Only starting with Haskell. Already applying your suggestions

@Bruce_Forte Thank for your advice, looking to apply it. And yes - solution fails. I found that I have missed that balance should be calculated regarding the distance from the pivot, not just difference of weights. Working on edit

You're welcome. Have a look at $, this saves you a lot of brackets (example in o!p), also you don't need to do the takeWhile.

Here's a version with a few tips applied (saves you 29 bytes ;)).

Python 2, 90 bytes
def f(s):L=len(s)/3;print cmp(sum((ord(s[i])-31)*(i-s[-L:].find('|'))for i in range(L)),0)

Expects input lines to be padded (with spaces) to the correct length. Outputs -1 for falls left, 0 for balanced, and 1 for falls right.
Try it online!

94 bytes
For +4 bytes we can have a version which, using a while loop, requires stripped lines rather than padded lines:
def f(s):
 i=r=0
 while''<s[i]:r+=(ord(s[i])-31)*(i-s[-3::-1].find('='));i+=1
 print cmp(r,0)

Try it online!

Haskell (Lambdabot), 142 bytes
l=length
g[a,c,b]=splitAt(l b)$a++(' '<$[1..l c-l a])
k e=sum$zipWith((*).(-31+).ord)e[1..]
f=signum.uncurry(-).(k.drop 1.reverse***k).g.lines

Try it online!
Ungolfed version:
-- for readability, allows reading top-down/left-right
(.>) = flip (.)

ungolfed =
     lines                                 -- separate out lines into..
  .> (\[a,b,c] ->                          -- a,b,c (first,second,third)
                                           -- ' ' pad the first line & split on pivot
       splitAt (length c) (a ++ replicate (length b - length a) ' ')
     )
  .> (weight.drop 1.reverse *** weight)    -- reverse left half, drop element above pivot & get weight for both
  .> uncurry (-)                           -- subtract right from left
  .> signum                                -- get sign

-- get ord of the character subtract 31 ('=' char from bar),
-- then multiply with scales ([1..]) and sum it all up
weight es = sum $ zipWith (ord .> subtract 31 .> (*)) es [1..]

Ruby, 543 bytes
def willittip(s)
leftw=0;
rightw=0;
arr=[];
fields=s.split("\n")
pos=fields[2].index("|")
fields[0].split("").each do |i|
arr << i.ord-32
end
arr[pos+1..-1].each_with_index do |x,y|
rightw=rightw+1
if x>0
if pos>0
rightw=rightw+x*(pos-y).abs
else
rightw=rightw+x
end
end
end
arr[0..pos-1].each_with_index do |x,y|
leftw=leftw+1
if x>0
if pos>0
leftw=leftw+x*(pos-y).abs
else
leftw=leftw+x
end
end
end
if leftw==rightw
return "Equal"
elsif leftw<rightw
return "Right"
elsif leftw>rightw
return "Left"
end
end

Welcome to PPCG! :D The goal for [tag:code-golf] challenges is to make your code as small as possible. You can reduce your code size by making all variables and function names a single character, and by deleting whitespace wherever possible.

APL (Dyalog), 43 bytes*
{×(¯31+⎕UCS⊃⍵)+.×(⍳≢⊃⍵)-'|'⍳⍨⊃⌽⍵}⎕TC[2]∘≠⊆⊢

Try it online!
⊆⊢ partition the argument into runs of characters that are
⎕TC[2]∘≠ different from the 2nd Terminal Control character (Linefeed)**
{…} apply the following anonymous function on the list of strings:
 ⊃⌽⍵ in the first string of the reversed list (i.e. the last)
 '|'⍳⍨ find the ɩndex of the pivot point
 (…)- subtract that from the following list:
  ⊃⍵ the first string
  ≢ its length
  ⍳ all the ɩndices of that
 (…)+.× weighted sum with those weights and the following values:
  ⊃⍵ the first string
  ⎕UCS code points in the Universal Character Set
  ¯31+ add negative thirty-one (32 for the required offset minus one for the rod)
 × signum of that

* For 1 byte per char, use {×(¯31+⎕UCS↑⍵)+.×(⍳≢↑⍵)-'|'⍳⍨↑⌽⍵}⎕TC[3]∘≠⊂⊢ with ⎕ML←3. Try it online!
** ⎕TC is deprecated and used here only for golfing purposes. In production code,
 one should use ⎕UCS 10.

Jelly, 30 bytes
O_31×J_¥A+\sṪ€µ÷ḢṪ_2Ṡ
ỴṪLç@ỴḢ$

Test Suite
Outputs 0 for balanced, 1 for right, and -1 for left.
How it Works
O_31×J_¥A+\sṪ€µ÷ḢṪ_2Ṡ - helper function. Arguments position of pivot and first line
O                        - char codes of first line
 _31                     - subtract 31 to get weight
    ×                    - elementwise product with:
     J_¥                 - distances from the pivot
        A                - absolute value
         +\              - cumulative sum
           s             - split to get [[...,left weight],...,[..., right + left weight]]
            Ṫ€           - last element of each sublist: [left weight, ... right weight]
              µ÷Ḣ        - get ratio of each element over left weight: ratio n indicates
                              right + left = n × left ===> right = left if n = 2
                 _2      - subtract 2: positive is right>left and negative is right<left
                   Ṡ     - return the sign of this

ỴṪLç@ỴḢ$              - main link. Argument: 3 line string.
   ç@                  - apply helper function with arguments:
Ỵ                        - split by linefeeds
 Ṫ                       - last line
  L                      - length (returns position of pivot)
       $               - and
     Ỵ                   - split by linefeeds
      Ḣ                  - first line

PHP, 105 bytes
for([$a,$b,$c]=explode("
",$argn);$b[$i];)$w+=(strpos($c,"|")-$i++)*8*(max(1,ord($a[$i])-31));echo$w<=>0;

prints -1/0/1 for left/balance/right. Run as pipe with -nR or try it online.
breakdown
for([$a,$b,$c]=explode("\n",$argn); # import input
    $b[$i];)                        # loop through bar
    $f+=                                # add to force:
        ($i-strpos($c,"|"))             # distance (<0 if left, >0 if right of pivot)
        *8                              # *8
        *(max(1,ord($a[$i++])-31));     # *weight
echo$f<=>0;                         # print -1 if $f<0, 1 if $f>0, 0 if $f==0

Charcoal, 31 bytes
Ａ⁰ξＦＬθＡ⁺ξ×⁻ι⌕ζ|⁻℅§θι³¹ξＩ⁻›ξ⁰‹ξ⁰

Try it online! Link is to verbose version of code. Outputs 0 for balance or -1 or 1 for falling left or right. Edit: Changes in Charcoal now mean that ≔ΣＥθ×⁻κ⌕ζ|⁻℅ι³¹ξＩ⁻›ξ⁰‹ξ⁰ works for 24 bytes: Try it online! Link is to verbose version of code. Note: Both answers require padded input, but can be adapted to accept unpadded input at a cost of 3 bytes: ≔⁰ξＦＬη≔⁺ξ×⁻ι⌕ζ|⁻℅§◨θＬηι³¹ξＩ⁻›ξ⁰‹ξ⁰ Try it online! ≔ΣＥ◨θＬη×⁻κ⌕ζ|⁻℅ι³¹ξＩ⁻›ξ⁰‹ξ⁰ Try it online! Links are to verbose version of code.

You may want to mention this this expects the input lines to be padded to the correct length with spaces, so an unpadded input might not work.

@FlipTack Better still, I've devised versions that accept unpadded input.

C# (.NET Core), 127 95 90 + 18 = 108 bytes
For this function the first line must be right padded with spaces to be the same length as the rod and the third line must not have trialing spaces. This conditions are allowed (see comments of the question).
s=>s.Split('\n')[0].Select((c,i)=>(c-31)*(i-s.Split('\n')[2].Length+1)).Sum().CompareTo(0)

Try it online!
Outputs:
-1 for tip left
 0 for balance
 1 for tip right

C (gcc), 106 107 121 123 124 129 131 bytes
c,b,l,i;f(char*a){l=strlen(a)/3;for(i=b=c=0;32/a[l*2+c];++c);for(;i<l-1;b+=(a[i]-31)*(i++-c));a=b>0?2:!b;}

Return 0 for falling left, 1 for balance and 2 for falling right.
Require all three lines to have same length and finish with \n to determine the length of string.
Try it online!

96 bytes

Mathematica, 91 92 bytes
Sign[(v=(g=ToCharacterCode)@#&@@(d=#~StringSplit~"
")-31).(Range@(l=Length)@v-l@g@Last@d)]&

The first line should have the same length with the rod. The third line should contain no trailing spaces.
Return -1, 0, 1 for falling left, balance and falling right.

Python 3, 217 bytes
Also works in Python 2.7
def f(s):i,b,p=s.split('\n');c=p.find('|');l=sum((ord(e)-32)*(c-i.find(e))for e in i[:c])+sum(x for x in range(1,c+1));r=sum((ord(e)-32)*i[c:].find(e)for e in i[c:])+sum(x for x in range(len(b[c:])));return(l>r)-(r>l)

Returns 1 for left-side, -1 for right-side, or zero if balanced.
Readable version:
def f(s):
    i,b,p = s.split('\n')
    c = p.find('|')

    l = sum((ord(e)-32)*(c-i.find(e))for e in i[:c])+sum(x for x in range(1, c+1))
    r = sum((ord(e)-32)*i[c:].find(e)for e in i[c:])+sum(x for x in range(len(b[c:])))

    return(l>r)-(r>l)

You don't need sum([...]), you can simply have sum(...)

@Daffy this should be 100% conformant to your specification and all given example inputs.  If you agree please let me know so that I might further optimize it.  Thank you.

@veganaiZe Passed all of my tests, looks good! :)

Stuff to shorten it: i[c:].find(e) can be i.find(e,c), use i,m,n=s.split('\n') and avoid the need for s at all, use return 2*(r>l) or l>r to dramatically reduce test cost at end (return value is numerically equivalent, but it's True instead of 1 and False instead of 0), or really, use a different set of return values and do return (l>r)-(r>l) to return the 1, 0 or -1 the way the old cmp function did.

Thanks ShadowRanger , Mr. Xcoder, and Daffy!  @ShadowRanger I had to stick with the i[c:] because the shorter way caused a weird off-by-one issue for some corner-case input (try placing a | exactly in the middle -- above the bar).

Jelly, 18 bytes
ỴµḢO_31×Ẉạ€/$ṣ0§IṠ

Try it online!
This started as a golf of Erik's answer (so be sure to go upvote it), but it developed to be different enough, and Erik is no longer active on the site, that I thought posting a separate answer would be fine.
Outputs [0] for balanced, [1] for tipping right and [-1] for tipping left
How it works
ỴµḢO_31×Ẉạ€/$ṣ0§IṠ - Main link. Takes a string S on the left
Ỵ                  - Split S into a list of lines [I, R, P]
 µ                 - Use this list as the arguments
  Ḣ                - Pop and yield I
   O               - Convert to ordinals
    _31            - Subtract 31, mapping space to 1, ! to 2 etc.
            $      - Previous 2 links as a monad f([R, P]):
        Ẉ          -   Get the length of each
           /       -   Reduce by:
          €        -     Convert len(R) to a range and over each element:
         ạ         -       Take the absolute difference with len(P)
       ×           - Multiply these lists together
             ṣ0    - Split at 0, the pivot point
               §   - Sum of each side
                I  - Difference between the sides
                 Ṡ - Sign


text:
Capped string ladder
Given a string s and a positive integer N, gradually duplicate each character more and more until N duplicates, and then staying at N duplicates until N characters away from the end, then step down again.
For example, given abalone and 3:
a    we start with 1 copy
bb   then 2 copies
aaa  then 3 copies, which is our second parameter
lll  so we continue using 3 copies
ooo  until we reach the end
nn   where we use 2 copies
e    and then finally 1 copy

and the result would be abbaaalllooonne.
It is guaranteed that the string has length greater than 2N and only has characters from a to z.
More testcases:
N string       output
2 aaaaa        aaaaaaaa
3 abcdabcdabcd abbcccdddaaabbbcccdddaaabbbccd

This is code-golf. Shortest answer in bytes wins. Standard loopholes apply.

Jelly, 6 bytes
JṡFṢị⁸

Try it online!
How it works
JṡFṢị⁸  Main link. Arguments: s (string), n (integer)

J       Get the indices of s.
 ṡ      Split the indices into overlapping chunks of length n.
  F     Flatten the array of chunks.
   Ṣ    Sort the resulting array of indices.
    ị⁸   Get the characters of s at these indices.

Sample run
JṡFṢị⁸  "abalone", 3

J       [1, 2, 3, 4, 5, 6, 7].
 ṡ      [[1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 6], [5, 6, 7]]
  F     [1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7]
   Ṣ    [1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7]
    ị⁸  "abbaaalllooonne"

That split+flatten+sort method is pure genius. Nice! :)

Python 2, 57 bytes
f=lambda s,n,i=1:s and s[0]*len(s[:i][:n])+f(s[1:],n,i+1)

Try it online!
Also 57:
Python 2, 57 bytes
f=lambda s,n,i=1:s and s[0]*len(s[:i])+f(s[1:],n,i+(i<n))

Try it online!

Can you explain your logic behind len(s[:i][:n])? I'm convinced there's a shorter way to get that number but I'm not sure how.

Never mind, I got it! But it's one byte shorter than min(len(s),i,n). Great job!

JavaScript (ES6), 67 65 bytes
-2 bytes thanks to Chas Brown's shorter method using min().
s=>n=>s.replace(/./g,(c,i)=>c.repeat(Math.min(i+1,s.length-i,n)))

Takes input in currying syntax: f("abalone")(3).
Test Snippet

f=
s=>n=>s.replace(/./g,(c,i)=>c.repeat(Math.min(i+1,s.length-i,n)))

String: <input id=S> N: <input id=N size=3>
Out: <input id=O size=50 disabled>

Jelly,  8 7 bytes
J««U$⁸x

Try it online!
How it Works
J««U$⁸x - main link, input e.g. abalone
J        - range of length of letters: [1,2,3,4,5,6,7]
 «       - minimum of each term with second input: [1,2,3,3,3,3,3]
  «U$    - termwise minimum with the reverse:
                    min([1,2,3,3,3,3,3],[3,3,3,3,3,2,1])=[1,2,3,3,3,2,1]
     ⁸x  - repeat each character of the input a number of times corresponding to elements:
                    a*1;b*2;a*3...e*1 = abbaaalllooonne

-1 byte thanks to @LeakyNun

Good find @LeakyNun! The closest I got in that direction was J«¥@«U$x@ for 9 bytes.

Explanation please?

@fireflame241 genenrally, x@⁸ is equivallent to ⁸x (I used ⁸ here)

Haskell, 61 60 bytes
Thanks to @Laikoni for helping to shave off 1 byte
n#s=do(i,c)<-zip[1..]s;replicate(minimum[n,i,length s-i+1])c

Try it online!
Ungolfed:
(#) n string = do
    (i, char) <- zip [1..] string
    replicate (minimum [n, i, length(string)-i+1]) char

Great use of a do block! Save a byte by dropping the parenthesis in length(s).

J, 24 bytes
(<.&n<./(|.,:[)>:i.#s)#s

The bit in parens -- (<.&n<./(|.,:[)>:i.#s) -- creates the 1 2 ... n n n ... 2 1 array, as follows:
                   #s    length of s, call it L
                 i.      numbers 0 1 ... L-1
               >:        increment by 1, now 1 2 ... L
        (|.,:[)          fork: |. = reverse, ,: = stack, [ = identity
                         resulting in  L ... 2 1
                                       1 2 ... L
     <./                 min of each element of the top and bottom row
 <.&n                    min of each resulting elm and n

once we have that, J's # operator automatically does exactly what asked for, duplicating each element the number of times specified.
Curious to see a J expert's improvment on this...

23 bytes with a quite different approach [#~#@[$([:>:<:,&:i.-)@] (maybe a stray space got caught in there). I'm at a loss as to why the hook isn't taking x but not in too much a position to care.

Japt, 11 10 bytes
ËpVm°TEnUÊ

Test it

Explanation
Implicit input of string U and integer V.
Ë

Map over U and replace every character.
Vm

Get the minimum of V, ...
°T

T (initially 0) incremented by 1, ...
EnUÊ

And the index of the current character (E) subtracted from (n) the length (Ê) of U.
p

Repeat the current character that many times.
Implicitly output the final string.

PHP>=7.1, 75 bytes
for([,$a,$n]=$argv;--$z?:($x=$a[$i]).$z=min($n,strlen($a)-$i,++$i);)echo$x;

PHP Sandbox Online
PHP>=7.1, 78 bytes
for([,$a,$n]=$argv;~$x=$a[$i];)for($z=min($n,strlen($a)-$i,++$i);$z--;)echo$x;

PHP Sandbox Online
PHP>=7.1, 80 bytes
for([,$a,$n]=$argv;$i<$l=strlen($a);)echo str_repeat($a[$i],min($n,$l-$i,++$i));

PHP Sandbox Online

Haskell (Lambdabot), 74 bytes
r=replicate
f x n=join$zipWith r([1..n]++r(length x-2*n)n++reverse[1..n])x

Try it online!

Imports count in the score! You would be better of with >>=id

Yeah, I did that too before and then I saw this (that's why there's Lambdabot in brackets). What is the right way?

I stand corrected, I think this is alright!

Good to know, there are a lot of very handy imports in that list.

R, 87 bytes
function(N,s)paste(rep(strsplit(s,"")[[1]],c(1:N,rep(N,nchar(s)-2*N),N:1)),collapse="")

Try it online!

Java (OpenJDK 8), 101 97 bytes
n->s->{int i=0,j;for(char c:s)for(j=s.length-i++,j=j<i?j:i,j=j<n?j:n;j-->0;)System.out.print(c);}

Try it online!
So much playing with indices...

Abalone is a type of fish (well, a shellfish), therefore…
><>, 79 bytes
&i1\
0(?\:1+:&::&@)?$~i:@
&~}\&~1
0(?\:&::1+&@)?$~}}:
 ~r\
?!v>l?!;:o$1-:@
~~<^

Try it online, or watch it at the fish playground!
Reads the string from STDIN, and assumes the number is already on the stack.
Explanation: The second, fourth and sixth lines are the main loops. The details are some ugly stack manipulation, but in broad strokes, first, the second line fills the stack alternating between a character of input and min(i, n), where n is the length cap and i is the index of the character in the input: for "abalone", 3, the stack looks like
"a", 1, "b", 2, "a", 3, "l", 3, "o", 3, "n", 3, "e", 3, -1=EOF, 3

Next, line 4 goes through the stack in the same way in reverse, to get the right hand end capped properly:
"a", 1, "b", 2, "a", 3, "l", 3, "o", 3, "n", 2, "e", 1, -1

Then the sixth line takes each character–number pair and prints the character as many times as the number.

Haskell, 68 bytes
g 1
g _""_=""
g i(a:b)n=(a<$[1..min(length b+1)$min i n])++g(i+1)b n

Try it online!

APL (Dyalog), 15 bytes
{⍵/⍨⍺⌊i⌊⌽i←⍳≢⍵}

{…} function where left argument (cap) is ⍺ and right argument (string) is ⍵:
 ≢⍵ count the number of characters in the string
 ⍳ generate that many ɩntegers
 i← store in i
 ⌽ reverse
 i⌊ pairwise minimum with i
 ⍺⌊ pairwise minimum with the cap
 ⍵/⍨ use those numbers to replicate the letters of the string

Try it online!

F#, 96 bytes
let f(s:string)n=Seq.mapi(fun i c->System.String(c,Seq.min[i+1;s.Length-i;n]))s|>String.concat""

Try it online!
A port of Justin Mariners javascript answer

Python 2 68 bytes
f=lambda s,n:''.join(s[i]*min(i+1,len(s)-i,n)for i in range(len(s)))

You don't need the f= in the answer; the function can be anonymous. With that in mind, you can remove 3 bytes with lambda s,n:''.join(c*min(i+1,len(s)-i,n)for i,c in enumerate(s)).

Husk, 10 9 bytes
₁₁ṀR
↔z↑N

Try it online!
The first line is the main function, it repeats each letter n times and then calls the second line twice.
The second line takes at most N letters from each group of repeated letters, where N is the 1-based index of the group, then reverses the list.

Ruby, 59 bytes
Port of xnor’s Python 2 answer.
F=->s,n,i=1{s[0]?s[0]*s[...i][...n].size+F[s[1..],n,i+1]:s}

Attempt This Online!


text:
Is this site down or is it just me?
Challenge
The challenge is simple, using http://isup.me, determine whether an inputted website is up or down.
If the site is up, you should return a truthy value and if the site is down, you should return a falsey value.
Rules
The input will be a web address such as stackexchange.com or google.co.uk. The input will never have http://, https:// etc. at the start of the string, but may have www. or codegolf. at start etc.
You should use the site isup.me/URL where URL is the input.
When a site is up, it will look like:

http://isup.me/codegolf.stackexchange.com
If a site is down, it will look like:

http://isup.me/does.not.exist
URL shorteners are disallowed apart from isup.me.
Example inputs
Probably up (depending on current circumstances):
google.de
codegolf.stackexchange.com
worldbuilding.meta.stackexchange.com
tio.run
store.nascar.com
isup.me

Will be down:
made.up.com
fake.com.us
why.why.why.delilah
store.antarcticrhubarbassociation.an

Winning
Shortest code in bytes wins.

If URL shorteners aren't allowed, should we use downforeveryoneorjustme.com or isup.me ?

@ConorO'Brien No, I'll make an exception for isup.me

By the way: "made.up.co.uk" is actually up.

@GiantTree Hmm... technically up but doesn't exist.

@EriktheOutgolfer Irrelevant

I've just registered fake.com.us to mess with your test cases!

@PierreArlaud I mean, it's just a registrar page.

@Erik isup.me still registers it as up though

But what if isup.me is down?

@Oks Are you sure it's not just you?

Recommended test case: isup.me. It returns a result other than what, say, google.com may return.

@Okx Thanks, that's a good one

I have just notified Tom Jones.  He's shouting at his agent right now.

mabye add a test case for something like qweasdzxc with no .tld - returns different results. I'd say answers should only need to take valid web addresses into account though..

sh (+ curl + grep), 28 26 bytes
curl -L isup.me/$1|grep ^I

Outputs via exit status (0 for up, 1 for down).  Looks for an I at the beginning of a line, which matches when the domain is up (even for the special case of isup.me/isup.me).

curl -L isup.me/$1|grep u! saves 1 byte. This assumes that ! is not a valid character in the domain name.

Is 0 truthy in sh?

0 is indeed truthy in sh, with all nonzero values being falsy. Also, IMO it's really nice that the sh version is so short, since it's absolutely the right language for this task even without considering golfing.

That said this will fail on something like spthissitedoesntexist.invalid

@Score_Under it does work for that domain. the /sp doesn't match the sp in the domain.

It matches on my machine. It matches this bit: spthissitedoesntexist.invalid Specifically it matches inside the href.

@Score_Under oh, you're right. I didn't notice the / from http://.

@Score_Under Fixed.

@stanri I would not accept grep u! because the challenge specifies the result must be truthy on domains that are up.

Stacked, 44 bytes
['http://isup.me/'\+[CS'!'eq sum 2=out]curl]

Asynchronous function that outputs 0 if the site is not up, and any other number greater than 0 if it is up.
Example a:
['http://isup.me/'\+['s u'split#'1-put]curl] @:isup

'Is google up?' put 'google.com' isup

Output (probably): Is google up? 1

Can you add linked to Stacked GH page?

@Downgoat Done.

If this is checking for an occurrence of s u, note that this occurs on any input beginning with u (whether up or down).

@AndersKaseorg Fixed, thanks.

Better example: 'Is example.com up?' put 'example.com' isup output (not just probably but surely): Is example.com up? 1

@EriktheOutgolfer How is that a better example ?

Kotlin REPL - 131 108 106 93 79 55 53 64 63 bytes
First try at Kotlin golfing.
Expects the website in a variable or value named a.
Now with reduced whitespace.
Who said "loo" isn't enough?
Fixed and shorter, doesn't rely on http://isup.me anymore.
No need to open the connection ourselves, just get the stream of data (or not)
The task was to use http://isup.me, right? Also: < is not a valid character in a URL.
Now works with isup.me as the website
Now reads the website as a line, because one can't assume a variable to contain the website.
"m h" !in java.net.URL("http://isup.me/"+readLine()).readText()

Reads one line containing just the website.
Checks for the m h part of from here that is sent when a site is down.
Returns "true" or "false" respectively.

As a Lambda - 172 120 118 99 85 67 66 bytes
{a:String->"m h" !in java.net.URL("http://isup.me/$a").readText()}

Can be invoked directly:
{ ... }("google.com")

forgive me if I'm wrong, but couldn't this be converted to a lambda fairly easily?

@NickClifford sure, but it would actually be longer due to the argument and type definition (15 chars because type inference doesn't work here)

I don't know the language, but it seems like you are checking to see if "loo" is in the returned text. Is it not the case that this text also returns the (variable) site name? And if it is, does that mean you get false negatives for sites like loo.com?

@Cole you are definitely right, I completely forgot about this (I was only testing Google and the fake website). I will update the code next morning (it's 2am where I am currently)

This one will fail on sites with loo in the name. electric.boogaloo doesn't exist but the string loo will be in the output there.

I updated the code, shortened it a bit and use a similar method to the curl solutions.

maybe .openStream() instead of openConnection().connect()?

@OlivierGrégoire thanks, that saves a few more characters.

Yeah, I used the same in Java answer below.

Well, I re-read the challenge and the goal is to use the proxy service isup.me, not testing it yourself. So I deleted my answer and yours is invalid too :(

@OlivierGrégoire you are right. Back to the drawing board.

@OlivierGrégoire Fixed it! It's even shorter thanks to extensions in Kotlin.

Fix for isup.me as website

This is invalid, as you can't just assume the input is in a variable.

@EriktheOutgolfer updated the REPL part; the Lambda is still valid as it uses its argument.

In kotlin, is "http://isup.me/${readLine()}" not interchangeable with "http://isup.me/"+readLine()? If so, the latter is 2 bytes shorter.

@Score_Under it is. Thanks, I definitely use template strings too often.

The challenge specifies “If the site is up, you should return a truthy value”, but you return false.

@AndersKaseorg, you are absolutely right. I'll fix that.

While the challenge does specify truthy-falsey, the meta consensus seems to be for two distinct outputs (or possibly one distinct vs. everything else), so it would be arguable to map True to down and False to up.

Python3   141 133 113 192 141 bytes
Requires Selenium (including webdriver) for python.
Thanks to @cairdcoinheringaahing for reducing 42 bytes!
Thanks to @V.Courtois for pointing out a simple fix!
from selenium import*
d=webdriver.Firefox();d.get("http://isup.me/"+input());print("up"in d.find_element_by_xpath("//*[@id='content']/p[1]"))

Prints 1 if site is up and running, else prints 0.
Ungolfed version:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
urlToTest = "www.f.com"
driver = webdriver.Firefox()
driver.get("http://downforeveryoneorjustme.com/"+urlToTest)
res = driver.find_element_by_xpath("//*[@id='content']/p[1]")
print(1 if "up" in res.text else 0)

They said isup.me is fine in the comments; you can win some bytes :)

-1 This is a snippet. Full programs or functions are required and input cannot be assumed in a variable (such as t). Also, you can golf the print statement to print("up"in r.text)

@cairdcoinheringaahing Okay, will make those changes, thank you! This is my second answer, so I didn't know whether to post a snippet or a full fledged program. So I posted both.

141 bytes

Python 2 or 3 with Requests (70 69 68 bytes)
from requests import*;lambda u:"u. "in get("http://isup.me/"+u).text

1 byte shaved: "u. " → " u" Nope, not a valid optimisation.
1 byte shaved: __import__('requests'). → from requests import*;
This is now really a REPL-only piece of code, and after running this line the function will be named _.

Syntax error at the end (probably a stray )).

Fails for inputs starting with u.

Using from requests import* and get is 1 byte shorter.

it is not REPL-only, it's allowed to answer with unnamed functions (lambdas in python)

It is an unnamed function, but the script as a whole can't be used as an expression (since it uses import), so I think it's safer to just call it a REPL line.

@Score_Under yes it is accepted

Javascript (ES6), 74 66 bytes
f=s=>fetch('//isup.me/'+s).then(r=>r.text()).then(t=>/u!/.test(t))

Thanks to @Shaggy, who brought to my attention that a resolved promise counts as output.
Problem with this solution that it will throw a CORS error unless I test it on a page that's already at isup.me. But currently, that gets redirected to downforeveryoneorjustme.com
Older version:
f=s=>fetch('//isup.me/'+s).then(r=>r.text()).then(t=>alert(t.match(/u!/)))

You can get rid of the alert and just return the Promise. See here. I think you might also be able to make a saving with /u!/.test(t).

05AB1E, 22 bytes
"isup.me/ÿ".w#214è'‚‰Q

Try it online!
Unfortunately "isup.me/ÿ".w§„ uå doesn't seem to work.

Pyth, 24 bytes
}" u"s'+"http://isup.me/

Return True if the site is up, False otherwise. The input URL must be quoted. That cannot be tested on the online interpreter because ' is disabled on it for safety reasons; instead you will need a local copy of Pyth.
Explanation
                        Q    # Implicit input
       +"http://isup.me/     # Concatenate "http://isup.me/" with the input
      '                      # Open the URL
     s                       # Concatenate all the lines of the returned HTML page
}" u"                        # Test whether " u" is in the page or not

Fails for inputs starting with u.

Haskell (Lambdabot), 157 bytes
import Data.ByteString.Lazy.Char8
import Network.HTTP.Simple
f s=httpLBS(parseRequest_$"http://isup.me/"++s)>>=print.not.isInfixOf"u!".unpack.getResponseBody

Unfortunately you can't import Network.HTTP.Simple on tio.run, the easiest way to test would be to run this script (you'll need stack):
#!/usr/bin/env stack
-- stack --install-ghc --resolver lts-8.19 runghc --package http-conduit

import Data.ByteString.Lazy.Char8
import Network.HTTP.Simple
import Data.List

main :: IO ()
main = mapM_ test [ "google.de", "made.up.com"]
  where test url = print ("testing "++url) >> f url

f :: String -> IO ()
f s=httpLBS(parseRequest_$"http://isup.me/"++s)
 >>=print.not.isInfixOf"u!".unpack.getResponseBody

PowerShell, 25 Bytes
!(irm isup.me/$args).html

Uses the fact that Invoke-RestMethod returns the page with a .html property only on failure. (no idea why exactly this happens...)
inverts the line to convert to bool, outputs True for a live site or False for a down site.
PS C:\Users\sweeneyc\Desktop> .\Test-SiteUp.ps1 "connorlsw.com"
True
PS C:\Users\sweeneyc\Desktop> .\Test-SiteUp.ps1 "connorlsw.notawebsite"
False
PS C:\Users\sweeneyc\Desktop> .\Test-SiteUp.ps1 "google.com"
True
PS C:\Users\sweeneyc\Desktop> .\Test-SiteUp.ps1 "isthisreallyasite.com"
False

@TessellatingHeckler irm returns plaintext for non-parsable pages, I was going to do a plaintext match so it would have behaved the same as iwr, regardless I guess if it works it works.

PowerShell, 32 bytes
(iwr isup.me/$args)-notmatch'u!'

Missed your answer before I posted mine sorry! some weird irm behavior saved me a bunch on this one. mine here

Halovi, 20 bytes
oisup.me/⁰
\p
ye$hd0

Outputs p. if the site is down, and e. if it is up.
Explanation:
oisup.me/⁰  ~# Open the concatination of "isup.me/" and arg0
\p          ~# Select first p element
ye$hd0      ~# Edit text with neovim and output result:
            ~#   Go one character before the end of the line and ..
            ~#   delete until beginning

Go, 111 bytes
In typical Go fashion, the shortest method is to shell it out.
import"os/exec"
func h(a string)bool{return exec.Command("sh","-c","curl -L isup.me/"+a+"|grep ^I").Run()!=nil}

Other implementations here: https://play.golang.org/p/8T5HSDQFmC

Clojure, 63 bytes
#(clojure.string/includes?(slurp(str"http://isup.me/"%))"'s j")

Checks if the HTML returned by slurp contains the string "'s j" (as in, "It 's just you"). I might be able to find a smaller string that's unique to the page, but it would at most save me 2 bytes. It would also potentially make it less accurate. "'s j" isn't going to appear in the markup anywhere except in that one scenario. A string like "u." however could potentially appear in the URL, which would break it.
(defn is-up? [site]
  (clojure.string/includes?
    (slurp (str "http://isup.me/" site))
    "'s j"))

PHP, 82 78 bytes
<?=$i=$argv[1],+!preg_match("/!.*$i/",file_get_contents("http://isup.me/$i"));

Example i/o runs:
$ php script.php google.com
> google.com1

Example 2
$ php script.php does.not.exist
> does.not.exist0

Almost the shortest solution possible. Empty output is "a falsy value" too, so you can remove the +. And with $argn instead of $argv[1] you could use another 6 (minus 1) bytes.

Nim, 108 bytes
import httpclient,strutils
echo newhttpclient().getcontent("//isup.me/"&stdin.readline.string).find("ks ")<0

Unfortunate that strutils is needed for contains.
Learning Nim, tips appreciated!