text:
Integer triangles with perimeter less than n
Definition
An "integer triangle" is one with integer coordinates. For example the following triangle is an integer triangle:
(0, 0), (0, 1), (1, 2) with perimeter 1 + sqrt(2) + sqrt(5) ≈ 4.650.

Task
The goal of this challenge is to count all integer triangles (up to congruence) with perimeter less than n.
Input and Output
The argument will be given as an integer, and the output should be the number of triangles with perimeter strictly less than the argument.
Examples
The smallest integer triangle by perimeter is congruent to
(0, 0), (0, 1), (1, 0) which has perimeter 2 + sqrt(2) ≈ 3.414

The next smallest are:
(0, 0), (0, 1), (1, 2) with perimeter 1 + sqrt(2) + sqrt(5) ≈ 4.650,
(0, 0), (0, 2), (1, 1) with perimeter 2 + 2sqrt(2)          ≈ 4.828,
(0, 0), (0, 2), (1, 0) with perimeter 3 + sqrt(5)           ≈ 5.236, and
(0, 0), (1, 2), (2, 1) with perimeter sqrt(2) + 2sqrt(5)    ≈ 5.886

Test cases:
a(1) = 0
a(2) = 0
a(3) = 0
a(4) = 1
a(5) = 3
a(6) = 5
a(7) = 11
a(8) = 18
a(9) = 29
a(10) = 44
a(12) = 94
a(20) = 738
a(30) = 3756
a(40) = 11875

I have coordinates for each of the triangles in this Gist.
Warnings
Notice that two non-congruent triangles can have the same perimeter:
(0, 0), (0, 3), (3, 0) and (0, 0), (0, 1), (3, 4) both have perimeter 6 + 3sqrt(2).

Also keep in mind that the inequality is strict; the 3-4-5 pythagorean triangle should be counted by a(13), not a(12).
Scoring
This is code-golf—the shortest code wins!

Congratulations on finding an easily-described sequence not in OEIS.

I have a draft for a related sequence submitted to the OEIS.

(0, 0), (0, 1), (1, 0) has perimeter 2 + sqrt(2) ≈ 3.14

Good catch. I’ve fixed it!

What about (0,0),(1,1),(2,2) with perimeter 4sqrt(2)≈5.65685? Would make a(6)=6. I see, it's on a line.

Yep, degenerate triangles like (0,0), (1,1), (2,2) aren’t counted.

https://goo.gl/o9VvLh matches a(1)-a(10) but gets a(12)=94, any chance you can post all your a(12) triangles somewhere?

Can the input be an integer value in a floating-point type, or does it have to also be of an integral type?

@gggg, Indeed, I made a mistake! I apologize, and I've posted a correction.

@ggg In your implementation, our values now differ at a(19) because you counted the triangles (1 + 2im, 6 + 7im) and (1 + 7im, 2 + 9im) as distinct, but they are the same by the SSS congruence criterion, with side lengths sqrt(5), sqrt(50), and sqrt(85).

@Ourous, any reasonable input/output format is fine—including floating-point type.

Can we count the empty triangle? ((0, 0), (0, 0), (0, 0))

Erik, all triangles should have positive area, so we don’t count the empty triangle.

Jelly, 28 27 25 23 bytes
pḶŒcÆḊÐfḅı;I$€AṢ€QS€<¹S

Try it online!
How it works
pḶŒcÆḊÐfḅı;I$€AṢ€QS€<¹S  Main link. Argument: n

 Ḷ                       Unlength; yield [0,...,n-1].
p                        Take the Cartesian product of [1,...,n] and [0,...,n-1].
  Œc                     Take all combinations of the resulting pairs.
                         The result are of the form [[a, b], [c, d]].
    ÆḊÐf                 Filter by determinant; keep only pairs of pairs for which
                         the determinant (ad - bc) is non-zero, i.e., those such
                         that [0, 0], [a, b], and [c, d] are not collinear.
        ḅı               Convert each pair [a, b] from base i (imaginary unit) to
                         integer, mapping it to ai + b.
             €           For each pair of complex numbers [p, q]:
          ;I$              append their forward differences, yielding [p, q, p-q].
              A          Take the absolute value of each resulting complex number.
               Ṣ€        Sort each resulting array of side lengths.
                 Q       Unique; remove duplicates.
                  S€     Take the sum of each array, computing the perimeters.
                    <¹   Compare them with n.
                      S  Take the sum of the resulting Booleans.

Jelly,  38  33 bytes
-1 thanks to Erik the Outgolfer (invert SP¬+÷/E$ by using SẠ>÷/E$ and use ÇÐf rather than ÇÐḟ)
-1 thanks to Mr. Xcoder (no need to flatten prior to the sort)
-2 thanks to Mr. Xcoder (S<¥Ðf³L -> S€<³S)
-1 stealing a trick from an earlier revision of Dennis's answer (ṗ2’Œc -> p`⁺’ - more redundant cases but golfier!)
SẠ>÷/E$
p`⁺’ÇÐfµ_/ṭ⁸²S€Ṣµ€Q½S€<³S

A full program taking an integer and printing the result.
Try it online! (too slow to complete test cases 20+ in under 60s)
How?
SẠ>÷/E$ - Link 1, straightLineFromOrigin?: coordinates       i.e. [[a,b],[c,d]]
S       - sum                                                     [a+c,b+d]
 Ạ       - all? (0 if either of a+c or b+d are 0 otherwise 1)      all([a+c,b+d])
      $ - last two links as a monad:
   ÷/   -   reduce by division                                    [a÷c,b÷d]
     E  -   all equal?  (i.e. 1 if on a non-axial straight line)  a÷c==b÷d
  >     - greater than? (i.e. 1 if not on any line, 0 otherwise)  all([a+c,b+d])>(a÷c==b÷d)

p`⁺’ÇÐḟµ_/ṭ⁸²S€Ṣµ€Q½S€<³S - Main link: integer, n
p`                        - Cartesian product of implicit range(n) with itself
  ⁺                       - repeat (Cartesian product of that result with itself)
   ’                      - decrement (vectorises)
                          -  - i.e. all non-negative lattice point pairs up to x,y=n-1
     Ðf                   - filter keep only if:
    Ç                     -   call last link (1) as a monad
       µ         µ€       - monadic chain for €ach:
        _/                -   reduce with subtraction i.e. [a-c,b-d]
           ⁸              -   chain's left argument, [[a,b],[c,d]]
          ṭ               -   tack                   [[a,b],[c,d],[c-a,d-b]]
            ²             -   square (vectorises)    [[a²,b²],[c²,d²],[(c-a)²,(d-b)²]]
             S€           -   sum €ach               [[a²+b²],[c²+d²],[(c-a)²+(d-b)²]]
                          -    - i.e. the squares of the triangle's edge lengths
               Ṣ          -   sort
                  Q       - de-duplicate (get one of each congruent set of triangles)
                   ½      - square root (vectorises)  - get sides from squares of sides
                    S€    - sum €ach
                       ³  - program's 3rd argument, n
                      <   - less than?
                        S -   sum (number of such triangles)
                          - implicit print

Explanation corrections: [(a+c)×(b+d)] -> (a+c)×(b+d), [c÷a,d÷b] -> [a÷c,b÷d], c÷a==d÷b -> a÷c==b÷d, " c÷a==d÷b -> " a÷c==b÷d. Function.

Also, nice abuse of nan.

Thanks. Unfortunately it still needs the SP¬ and does not actually abuse the divide by zero results (I guess that could be explicit with an actual or)

Actually, you can replace ¬+ with <. (EDIT: you don't need to replace P with Ạ, as you're only using non-negative coordinates.)

That does not work (7 returns 21 for example)

Then this :P

Let us continue this discussion in chat.

JavaScript (ES7), 157 bytes
f=(n,i=n**4,o={})=>i--&&([p,P,q,Q]=[0,1,2,3].map(k=>i/n**k%n|0),!o[k=[a=(H=Math.hypot)(p,P),b=H(p-q,P-Q),c=H(q,Q)].sort()]&a+b+c<n&&(o[k]=P*q!=p*Q))+f(n,i,o)

Test cases
Only small values can be computed with the default stack size of most JS engines.

f=(n,i=n**4,o={})=>i--&&([p,P,q,Q]=[0,1,2,3].map(k=>i/n**k%n|0),!o[k=[a=(H=Math.hypot)(p,P),b=H(p-q,P-Q),c=H(q,Q)].sort()]&a+b+c<n&&(o[k]=P*q!=p*Q))+f(n,i,o)

;[
  1,  // 0
  2,  // 0
  3,  // 0
  4,  // 1
  5,  // 3
  6,  // 5
  7,  // 11
  8,  // 18
  9   // 29
]
.forEach(n => console.log('a(' + n + ') = ' + f(n)))

Non-recursive version, 165 bytes
n=>[...Array(n**4)].reduce((x,_,i,o)=>x+=!o[[p,P,q,Q]=[0,1,2,3].map(k=>i/n**k%n|0),k=[a=(H=Math.hypot)(p,P),b=H(p-q,P-Q),c=H(q,Q)].sort()]&(o[k]=P*q!=p*Q)&a+b+c<n,0)

Test cases
This version also works for a(30) and a(40), but that would take too much time for the snippet.

let f =

n=>[...Array(n**4)].reduce((x,_,i,o)=>x+=!o[[p,P,q,Q]=[0,1,2,3].map(k=>i/n**k%n|0),k=[a=(H=Math.hypot)(p,P),b=H(p-q,P-Q),c=H(q,Q)].sort()]&(o[k]=P*q!=p*Q)&a+b+c<n,0)

;[
  1,  // 0
  2,  // 0
  3,  // 0
  4,  // 1
  5,  // 3
  6,  // 5
  7,  // 11
  8,  // 18
  9,  // 29
  10, // 44
  12, // 94
  20  // 738
]
.forEach(n => console.log('a(' + n + ') = ' + f(n)))

Julia 0.6, 135 bytes
Iterate over possible non-origin points to make up the triangle, represent them as complex numbers, sort the square lengths and keep them in a set to check for congruence. Avoids colinear points by checking that the angle between their complex numbers is nonzero. Then it returns the length of the set. It's shorter to use the lengths directly, but you get the wrong answer for a(40). The solution is too slow to reach run a(40) because of a deprecation warning, so I have a link to a faster version as well.
n->(q=Set();for x=0:n,y=1:n,a=1:n,b=0:n
r=x+y*im
t=a+b*im
g=sort(abs2.([r,t,r-t]))
sum(√g)<n&&angle(r/t)>0&&push!(q,g)
end;length(q))

Try it online!
Faster, longer version with deprecation avoided. Try it online! Uses sqrt.(g) in place of deprecated √g for elementwise square root.

Clean, 227 ... 143 bytes
import StdEnv
@n#l=[0.0..n]
=sum[1\\p<-removeDup[sort(map(sqrt o\[u,v]=u*u+v*v)[[a-i,b-j],[a,b],[i,j]])\\a<-l,b<-l,i<-l,j<-l|a*j<>i*b]|sum p<n]

Try it online!
Detects congruent triangles via comparing the three values which sum to make the perimeter, and colinear points by verifying that the two smallest such values do not sum to the third.
Here's a version that uses a faster, more memory-heavy, approach: Try it online!

If I change to Start = @ 12.0 I don't get any output, am I doing something wrong?

@gggg test to your heart's content now


text:
3D ASCII Block Building
Challenge
Write a program that takes an 11x11 array of integers, and constructs a 3D ASCII block building, where each value in the array represents the height of a column of blocks at the coordinates matching the array position. A negative height is a "floating" column - only the top block is visible.
Example
                                                        __________________
                                        ___            /\__\__\__\__\__\__\
 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,      /\__\          /\/\__\__\__\__\__\__\
 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,     /\/__/         /\/\/__/__/__/__/__/__/
 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,    /\/\__\        /\/\/\__\      /\/\/__/
 1, 0, 0, 7,-7,-7,-7,-7, 7, 0, 0,    \/\/\__\      /\/\/\/__/     /\/\/__/
 0, 0, 0, 7,-7,-7,-7,-7, 7, 0, 0,     \/\/__/     /\/\/\/\__\    /\/\/__/
 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,      \/\__\    /\/\/\/\/__/   /\/\/__/
 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,       \/__/    \/\/\/\/\__\_  \/\/__/
 1, 0, 0, 4, 3, 2, 1, 0, 0, 0, 1,                 \/\/\/\/__/_\_ \/__/
 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,            ___   \/\/\/__/__/_\_         ___
 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,           /\__\   \/\/__/__/__/_\       /\__\
 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1,           \/\__\   \/__/__/__/__/       \/\__\
                                             \/\__\_________         ______\/\__\
                                              \/\__\__\__\__\       /\__\__\__\__\
                                               \/__/__/__/__/       \/__/__/__/__/

Input
The input will be a list of 121 integers, either read from stdin (choice of separator is up to you), or passed in as an array (can be 1D or 2D).
Heights will be in the range -11 to 11.
Output
The generated building can be written to stdout, displayed directly on the screen, or returned as a newline-separated string.
Leading and trailing whitespace is allowed.
Building Rules
The shape of an individual 3D block looks like this:
 ___
/\__\
\/__/

And a 2x2x2 cube of blocks looks like this:
  ______
 /\__\__\
/\/\__\__\
\/\/__/__/
 \/__/__/

When blocks overlap, a higher block takes precedence over a lower one, blocks in front take precedence over those further back, and blocks to the left takes precedence over those to the right. The only special case is that the top line of a block should never overwrite any non-space character behind it.
The interpretation of column heights can best be explained by looking at a 2D representation from the side.
HEIGHT:  1    2    3   -3   -2   -1
                  __   __
             __  |__| |__|  __
        __  |__| |__|      |__|  __
       |__| |__| |__|           |__|

Test Cases
If you want to try out your solution on a few more inputs, I've put together a couple of test cases here.
Winning
This is code-golf, so the shortest submission (in bytes) wins.

Ohh boy, get ready for 300+ byte solutions. Good challenge. +1

@totallyhuman Nah, Dennis is going to have a 9-byte solution for this in 20 minutes.

Does the perspective have to be as shown with the bottom left of the input data in the foreground? The fact that this is not the first or last element of data makes it harder. Is it acceptable to either 1. keep the mapping as is and draw output with the bottom right column in the foreground or 2. draw a mirror image or 90 deg rotation of the data? Either of these would make the last data element correspond with the column in the foreground, which would be easier.

I feel inclined to use a real game engine (or part of it) to render a photo and convert it to ASCII

@LevelRiverSt That seems like a reasonable request - you can choose the order of the 121 input elements to be whatever makes the most sense for your solution, as long as your ordering is consistent. It must be possible to produce every kind of layout that can be produced with the default order.

related

This reminds me of Snake Rattle 'n' Roll

@QBrute That's exactly the kind of thing I had in mind when I came up with this challenge. In my day, though, it was Knight Lore and Alien 8 that popularised the isometric style.

Charcoal, 70 69 68 bytes
≔Ｅ¹¹⮌Ｉ⪪Ｓ,θＦ²Ｆ¹¹Ｆ¹¹Ｆ¹¹«Ｊ⁻⁻⁺λκ×μ³ι⁻λκ≔§§θλμη¿∨⁼±η⊕κ‹κη¿ι“↗⊟&⁹κＵhnI”___

Try it online! Link is to verbose version of code. Explanation:
≔Ｅ¹¹⮌Ｉ⪪Ｓ,θ

Read the array, split each line on commas and cast to integer, but also reverse each line, since we want to draw right-to-left so that left columns overwrite right columns. (Other dimensions already have desired overwriting behaviour.)
Ｆ²Ｆ¹¹Ｆ¹¹Ｆ¹¹«

Loop through i) top lines and bodies k) height l) rows m) columns. (Looping through first top lines and then bodies avoids overwriting bodies with top lines.)
Ｊ⁻⁻⁺λκ×μ³ι⁻λκ

Jump to the position of the cube.
≔§§θλμη

Fetch the height at the current row and column.
¿∨⁼±η⊕κ‹κη

Test whether a cube should be drawn at this height for this row and column.
¿ι“↗⊟&⁹κＵhnI”___

Draw the body or top of the cube.

When I change the first 3 to a 33, I only get 11 blocks in the tower. In general towers seem to be capped at 11. How does that happen?

@Fabian I'm slightly confused that Ｆ¹¹Ｆ¹¹Ｆ¹¹ wasn't a clue...

I don't know this programming language, I just played around a bit with the TIO link.

C,  376   350   313   309  285 bytes
Thanks to @Jonathan Frech for saving four bytes!
#define F for(
char*t,G[26][67],*s;i,j,e,k,v,x,y;b(){F s="\\/__//\\__\\ ___ ";*s;--y,s+=5)F e=5;e--;*t=*s<33&*t>32?*t:s[e])t=G[y]+x+e;}f(int*M){F;e<1716;++e)G[e/66][e%66]=32;F k=0;++k<12;)F i=0;i<11;++i)F j=11;j--;v+k||b())x=i+j*3+k,y=14+i-k,(v=M[i*11+j])>=k&&b();F;++e<26;)puts(G+e);}

Try it online!
Unrolled:
#define F for(

char *t, G[26][67], *s;
i, j, e, k, v, x, y;

b()
{
    F s="\\/__//\\__\\ ___ "; *s; --y, s+=5)
        F e=5; e--; *t=*s<33&*t>32?*t:s[e])
            t = G[y]+x+e;
}

f(int*M)
{
    F; e<1716; ++e)
        G[e/66][e%66] = 32;

    F k=0; ++k<12;)
        F i=0; i<11; ++i)
            F j=11; j--; v+k||b())
                x = i+j*3+k,
                y = 14+i-k,
                (v=M[i*11+j])>=k && b();

    F; ++e<26;)
        puts(G+e);
}

Can 26*66 not be 1716?

@JonathanFrech Sure, I forgot about that.

*s==32 -> *s<33.

for(e=k=1;e;++k)for(e= -> for(k=1;e;++k)for(e=.

#define B b(...)&++e -> #define B++e&b(...) (assuming b does not depend on e, which I think it does not).

@JonathanFrech It doesn't. Thanks!

#define F for( and using whitespace saves no less bytes than #define F for and using an open-parenthesis after the F, and it somewhat adds to readability... other than that (very minor OCD detail) this is a great answer! +1

@MDXF Thanks, but doesn't #define F for( save one byte over #define F for, because there are two instances where with #define F for( there is no need for whitespace after F, because the init part of the loop is empty and the F can be directly followed by the semicolon?

@MDXF There are two occurrences of F; in this code. Redefining F to be for instead of for( saves one byte, replacing both F;s with F(; adds two. In total this would add one byte.

@both Oh, I didn't notice that, sorry!

262 bytes, I couldn't fit all test cases on the link due to the character limit, just copy them from the answer

JavaScript (ES6), 277 251 bytes
a=>(n=55,$=f=>[...Array(n)].map((_,i)=>f(i)),S=$(_=>$(_=>' ')),n=11,$(l=>$(z=>$(y=>$(x=>(x=10-x,X=x*3+y+z,Y=y-z+n,Z=a[y][x])<=z&&Z+z+1?0:l?['/\\__\\','\\/__/'].map(s=>S[++Y].splice(X,5,...s)):S[Y].splice(X+1,3,...'___'))))),S.map(r=>r.join``).join`
`)

f=

a=>(n=55,$=f=>[...Array(n)].map((_,i)=>f(i)),S=$(_=>$(_=>' ')),n=11,$(l=>$(z=>$(y=>$(x=>(x=10-x,X=x*3+y+z,Y=y-z+n,Z=a[y][x])<=z&&Z+z+1?0:l?['/\\__\\','\\/__/'].map(s=>S[++Y].splice(X,5,...s)):S[Y].splice(X+1,3,...'___'))))),S.map(r=>r.join``).join`
`)

console.log(f([
 [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11],
 [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
 [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
 [1, 0, 0, 7,-7,-7,-7,-7, 7, 0, 0],
 [0, 0, 0, 7,-7,-7,-7,-7, 7, 0, 0],
 [0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0],
 [0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0],
 [1, 0, 0, 4, 3, 2, 1, 0, 0, 0, 1],
 [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
 [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
 [1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 11]
]))

Saved 26 bytes from @Neil's suggestion.
Ungolfed
a=>(
    n=55,
    $=f=>[...Array(n)].map((_,i)=>f(i)),
    S=$(_=>$(_=>' ')),
    n=11,
    $(l=>
        $(z=>$(y=>$(x=>(
            x=10-x,
            X=x*3+y+z,
            Y=y-z+n,
            Z=a[y][x],
            Z<=z && Z+z+1 || (
                l
                ? ['/\\__\\','\\/__/'].map(s=>S[++Y].splice(X,5,...s))
                : S[Y].splice(X+1,3,...'___')
            )
        ))))
    ),
    S.map(r=>r.join``).join`\n`
)

,$(w=>$(z=>$(y=>$(x=>(Z=a[y][x=10-x,X=x*3+y+z,Y=y-z+n,x])<=z&&Z+z+1?0:w?['/\\__\\','\\/__/'].map(s=>S[++Y].splice(X,5,...s)):S[Y].splice(X+1,3,...'___'))))), seems to save 26 bytes.

@Neil Brilliant! Drawing all the top lines first saves me the trouble of checking for non-spaces.

Python 2, 243 bytes
a=input()
s=eval(`[[' ']*55]*23`)
for h in range(7986):
 k=h%3;x=h/3%11;y=h/33%11;z=h/363%11;i=h/3993;u=y+z-x*3+30;v=y-z+10
 if~-(z>=a[y][10-x]!=~z):
	if i*k:s[v+k][u:u+5]='\//\____/\\'[k%2::2]
	if~-i:s[v][u+1+k]='_'
for l in s:print''.join(l)

Try it online!
A Python translation of Neil’s Charcoal approach.

Nice to see a golfed Python solution for this. My Python proof-of-concept was more than 900 bytes!

+1+k -> -~k.

Tcl, 380 409 bytes
User sergiol has been busy crunching this down very nicely:
set X [read stdin]
proc L {a b c d e s} {time {incr z
set y -1
time {incr y
set x -1
time {if {abs([set Z [lindex $::X [expr ($y+1)*11-[incr x]-1]]])==$z|$z<$Z} {set s [string repl [string repl $s [set i [expr -3*$x+57*$y-55*abs($z)+701]] $i+$b $a] [incr i $c] $i+$e $d]}} 11} 11} 12
set s}
puts [L /\\__\\ 4 56 \\/__/ 4 [L "" -1 -55 ___ 2 [string repe [string repe \  55]\n 23]]]

Try it online!
Original Content
set xs [read stdin]
proc L {a b c d e s} {set z 0
while {[incr z]<12} {set y -1
while {[incr y]<11} {set x -1
while {[incr x]<11} {set Z [lindex $::xs [expr ($y+1)*11-$x-1]]
if {abs($Z)==$z||$z<$Z} {set i [expr -3*$x+57*$y-55*abs($z)+701]
set s [string repl [string repl $s $i $i+$b $a] [incr i $c] $i+$e $d]}}}}
set s}
puts [L /\\__\\ 4 56 \\/__/ 4 [L "" -1 -55 ___ 2 [string repe [string repe \  55]\n 23]]]

Try it online!
Alas, it is what it is. It’s only a tad easier on the eyes when “ungolfed”
set s [string repeat [string repeat " " 55]\n 23]

proc loops {s0 i0 io s1 i1} {
  set z  0; while {[incr z] < 12} {
  set y -1; while {[incr y] < 11} {
  set x -1; while {[incr x] < 11} {
    set Z [lindex $::xs [expr {($y+1) * 11 - $x - 1}]]
    if {abs($Z) == $z || $z < $Z} {
        set i [expr {-3*$x + 57*$y - 55*abs($z) + 701}]
        set ::s [string replace $::s $i $i+$i0 $s0]
        incr i $io
        set ::s [string replace $::s $i $i+$i1 $s1]
    }
  } } }
}

loops ""      -1 -55 \
       ___     2
loops /\\__\\  4  56 \
      \\/__/   4

puts $s

Builds a string, as per requirements. Takes the array from stdin. Goes from bottom to top, front to back, right to left over the string data. Does it in two passes, once for the top edge and again for the rest of the body of each cube.
I tried to make it smaller using some sweet functional lambda mojo, but alas, that made it larger.

You can golf: https://tio.run/##lZHdboJAEIXv9ylOzF4oZqOLrqRG38AnUDZEYdtuQqgBmuLfs9NBaAqt2pRkAjPfmTOzSx7GZZmZHEWGTWq2EbI8solm@/QtxAqnLXYIEcEgu@D08Wpjg9PGJmGKo15Il4pV@wFCsg49EJUNLX7RokXX2MQ2iUwBPp9Xe5hin6LPD0M5cKQUvBBSa2afaZtd1ufrwXLJj@czPy74uvGgrixPbfKC1OzjbsIrSBrbOIuJw4uh8hx@EEo5V8/jYOiNaQq4HfId@FajXtSCh3XVgEf6Qg@7Dryw/XtOziuMfD8IfB9TqBl8fxQEI/om0OvRuUEzEAQB3PZWppv4gFLaT@BOtNZlCYzxHRLdvBMMNIzab7B2X8WnrH7PKLzbfsJruGq0Vf5ExxhTyFaMr/Wa/1c7bWb8pXVbZ7uzL5p9xYy0Lmr9F3Nv6N1KC/bgQn9cyOyO9oa5UOzxD2vXp@wT

More golfing: https://tio.run/##lVFbboMwEPz3KUaVPxIQCiY81Ki5QU6QYKEE3MpSShFQCUg4OzWPqBCRVP1YzM7M7uzaeXhumkzkKDIcUnGMkOWRjDlJ0q8QO1yOOCFEBIGsxiWXnwIXGYcpKtKWlTAYGaFlhxZ3aNGhexzOMo5EAbrZtH6iSFIsaKmzpcaYQQuDcU7ku3I9ZQu6X263tLpeafVG98q87aGqsjyV8QdSkZynCW1JpZFDZ2Ot0UJ3PI2WhuNoXc9qqXumcgGVOj2BHjkO3YgSNOxRARrxugZjuH2sbv6sJsl3rkx2WPl@EPg@bDgufH8VBCv1r4iXF7U6lB2CIIA1HlBMEx9wHO7HsNac86YBTPwGwzSfBIEyU@Uz3Liu5W3Sn64Kb76f4Q28M2jb/FWtYapgozA7vOf/q7UHj7@01mi3B/NimNdwldZCr79x1ozearUgTy707kLcB9qZ5oZDnj/YGLfJDw

More: https://tio.run/##lVFbboMwEPz3KUaRP5IgFEx4qFFzg5wgsYUScCtLKUVAJSDl7NQ8qkJFUvVjZHZmdmdt8vDaNJnMUWQ4pfIcIcsjFQuSpO8hDridcUGICBJZjVuu3iRuKg5TVKRtK2EyMmLLji1@sUXHHnG6qjiSBehu1@bJIkmxpKXBVmvGTFqYTAiiXnTqJVvS42q/p9UnrZ7pUWe3I3RTlqcqfkUqk@u0oK2oPWoYbG7XtDBcf01L03XX3chqZfiWDgFVBr2AngVO3YYKNOxZCRqJugZjA@xu@awmyUeuIw7YcB4EnMOB64HzTRBs9LcWFgt9b@gwBEEAe7yenBYccF3BY9hbIUTTABZ@wDCtJyDQYbp9Rhv3tbpD@tPT8Ofnmf6gu4O3rZ/0NSwNNoLV8b3@X68zZPzltUd3u7Mvhn1NT3tt9P5vzZ7x260X5MGD/noQ7453Zrjpksc/bMw75As

Yet more: https://tio.run/##lVFbboMwEPz3KUaRPxIQCiYB1Ki5QU6Q2EIJuJWllCKgEpBydmoeVaEiqfoxMjszu@M1eXhtmkzmKDKcUnmOkOWRigVJ0vcQB9zOuCBEBImsxi1XbxI3FYcpKtK2lbAYGbFlxxY/bFsecbqqOJIF6G7XBskiSbGkpclWBmPWqWsthMWEIOpFh16yJT2u9ntafdLqmR7rfpBuzfJUxa9IZXKdFrQVtUcN462NQQvT9Q1aWq5rdCOrlenbOgRUmfQCehbosxVo2LMSNBJ1DcYGON1GWU2Sj1xHHLDmPAg4xxauB87XQbDW31pYLPTa0GEIggDO@HpyWnDAdQWP4WyEEHbTADZ@wDCtJyDQabp/Rhv3tfqW9Ken4c/Ps/xBdwdvWz/pPWwNNoLd8b3@X@92yPjL64x2u3NfDPe1PO110Pu/NWfG77RekAcP@utBvDvemeGWSx7/sDG/JV8

More yet: https://tio.run/##lVHtboJAEPx/TzEx90MlRA75SE19A59AIETh2lxiKQGaoJZnp3tAU2zQpj82sDOzM7tQJae2LWWFukRQyEOKskpVFrG8eE@ww/WAIxKkkCgbXCv1JnFVWVLgwvTYGaZgI/TcofUIfSGPYzkPNL5HcFJZKmvwzUYnyjovMOdnQyyWQphB51FHpoiiaLHd8ssnvzzzPSXrcRooq0JlryhkfrptuCZJowZTc73kteH6S342XXepV@CXheFbZA2uDH4EP0ToExV40qMSPI2aBkIMZXcHlQ3LPyqK2GEVhnEchnDgegjDVRyv6J2I2YyuBoUhjmPY4/XkbRMCrhuFGew13Wm1LWDhpwRu@5tioDSan@DGc5p3WP/0qPxpP9MfeHfQ6v6J7rCoxKisDu/5/2qdIeMvrT267c6@GPY1PdLa6PXfnD2ht7UW7MEH/fVBvDvaCXPTZY9/2Bh32Bc

Even more: https://tio.run/##lVHbaoNQEHw/XzGU85AoEo/xQkPzB/mAEhVJ9LQIqRW1oKZ@u10vpVpMSh8W3ZnZmV0twkvb5rLAM9xMniLkRRQnPkuz9xAHXE84I0QEibzBtYjfJK5xEmaoWTdVQRNsglY9Wk7QF/I45yu3w49wL3ESyRJ8t6NAWaYZVrxSxVoRQnN7i9LXhO/76/2e15@8fuJHCu6mc7h5kcXJKzKZXuYN70jSxKOptlV4qVqOwivNspRuA16vVUcna/BY5Wfwk48hMQYPB1SCR37TQIixjP6evGHpR0ERB2w8Lwg8DyYsG563CYINvRPx8EBHg8IQBAGM6Xpy3niAZfleAmNLd@ptC@j4KYF5PysGSqP5BW461/EmG542lbPspzkjb43arn@kO3QqMSm9xwf@v1pzzPhLa0xuu7Evxn01m7QGBv03ZyzojU4LdueD/vog9g3tgrlmsfs/bIqb7As

The last 0 is not part of the answer! My fault!

Oops! I'll fix it ASAP.

I fixed it myself

APL (Dyalog Unicode), 117 116 112 bytesSBCS
a←23 55⍴0⋄{i←11 0+⍵+.×3 2⍴3-7897⊤⍨6⍴5⋄(,2 5↑i↓a)←745366⊤⍨10⍴4⋄(3⍴i↓1⌽¯1⊖a)⌈←1}¨j[⍋-/↑j←⍸↑⎕↑¨⊂⌽1,11/⍳2]⋄' _/\'[a]

Try it online!

source: Stack Exchange

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

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

sort: votes


text:
RoboZZle interpreter
Your task is to write a RoboZZle interpreter. If you're not familiar with the game, please watch the video at robozzle.com or read my description below.
A robot lives on a rectangular grid of squares coloured red, green, blue, or black. Black squares are inaccessible. The others are accessible and some of them contain a star. The goal is to collect all the stars without stepping on the black squares or falling off the map. The robot occupies one square and faces a particular direction - left, right, up, or down. It follows assembly-like instructions grouped into subroutines F1,F2,...,F5. An instruction is a pair of a predicate ("none", "if on red", "if on green", "if on blue") and an action ("go forward", "turn left", "turn right", "paint the current square red", "paint it green", "paint it blue", "do nothing", "call F1", ..., "call F5"). Calls to subroutines use a stack and can be recursive. Just like in conventional programming, after the last instruction of a subroutine is completed, execution carries on from the point where the subroutine was called. Execution begins from the first instruction of F1 and continues until either the robot has visited all squares with stars, or when the robot steps on a black square or outside the map, or 1000 instructions have been executed (failed predicates and "do nothing" actions don't count), or there are no more instructions to execute (stack underflow).
Inputs:

a - a 12x16 character matrix (as usually represented in your language, e.g. array of strings) that encodes a map - '#' for inaccessible (black) squares, '*' for squares with a star, '.' for the rest
c - a 12x16 character matrix describing the colours of accessible squares - 'R'(red), 'G'(green), or 'B'(blue). Inaccessible squares will be represented by an arbitrary letter from the three.
y and x - the robot's 0-based row and column; a[y][x] is guaranteed to be '.'
d - the direction the robot is facing: 0 1 2 3 for right, down, left, up, i.e. towards (y,x+1),(y+1,x),(y,x-1),(y-1,x)
f - a single string, the concatenated implementations of F1...F5. Each implementation is a (possibly empty) sequence of predicate-action pairs (at most 10 pairs per subroutine), terminated with a '|'.

predicates: '_' none, 'r' red, 'g' green, 'b' blue
actions: 'F' go forward, 'L' turn left, 'R' turn right, 'r' paint red, 'g' paint green, 'b' paint blue, '1' call F1, ..., '5' call F5, '_' do nothing

You don't have to name you inputs like the above, but their values must be as specified.
Output: 1 (or true) if the robot collects all stars according to the rules, 0 (false) otherwise.
Example:
a=["################","################","##*....*...*#.##","##.####.#####.##","##.####.#####.##","##.####*...*#.##","##.########.####","##*........*#.##","################","################","################","################"]
c=["RRRRRRRRRRRRRRRR","RRRRRRRRRRRRRRRR","RRRBBBBRGGGGRRRR","RRBRRRRGRRRRRRRR","RRBRRRRGRRRRRRRR","RRBRRRRRGGGBRRRR","RRBRRRRRRRRGRRRR","RRRBBBBGGGGBRBRR","RRRRRRRRRRRRRRRR","RRRRRRRRRRRRRRRR","RRRRRRRRRRRRRRRR","RRRRRRRRRRRRRRRR"]
y=2; x=6; d=2

// and then depending on "f":
f="_FrLg2_1|_FbLrR_2||||" // result:1
f="_FrRg2_1|_FbLrR_2||||" // result:0 (stepped on a black square)
f="_FrLrL_1|_FbLrR_2||||" // result:0 (1000-step limit exceeded)
f="_FrLg2__|________||||" // result:0 (stack underflow)

Another example, involving "paint" instructions:
a=["#***************","#*###*###*###*##","#*###*###*###*##","***#***#***#***#","***#***#***#***#","*###*###*###*###","***#***#***#***#","***#***#***#***#","***#***#***#***#","*###*###*###*###","*.*#***#***#***#","***#***#***#***#"]
c=["RGGGGGGGGGGGGGGG","RBRRRGRRRGRRRGRR","RBRRRGRRRGRRRGRR","RBRRGGGRGGGRGGGR","BRRRGGGRGGGRGGGR","BRRRGRRRGRRRGRRR","BRRRGGGRGGGRGGGR","RBRRGGGRGGGRGGGR","BRRRGGGRGGGRGGGR","BRRRGRRRGRRRGRRR","BGRRGGGRGGGRGGGR","RBRRGGGRGGGRGGGR"]
y=10; x=1; d=0
f="_2_R_R_1|_FgRgFgFg3rRr4b2_Fgb|_F_F_R|_2_L_r||"
// result:1

To generate your own test, go to a puzzle from the list at robozzle.com, try to solve it (or not solve it), press F12 in your browser, type in the JS console:
r=robozzle;s=JSON.stringify;with(r.level)console.log('a='+s(Items)+'\nc='+s(Colors)+'\ny='+RobotRow+'\nx='+RobotCol+'\nd='+RobotDir+'\nf='+s(r.encodeSolution()))

and reformat the result for your language.
Shortest wins. No loopholes.

Can we use any distinct characters to represent the data instead of the ones provided?

@HyperNeutrino Normally I don't mind flexible input, but here I'd rather stick these particular characters, as they are the ones used at robozzle.com (except the variable names for the inputs - you can name them however you like)

For your APL answer to the "Loop it" challenge, you can sort the last angle value by decreasing complex magnitude.

@user202729 Uh, I didn't expect a comment about that challenge here :) Your idea works, thanks! I'll try to implement it without making the character count too disgraceful.

Can we take the character matrices as a lists of pairs of locations and characters?

@0 ' The principle I've been following here (see also HyperNeutrino's comment) is to stay as close as possible to the input format actually used at robozzle.com, so I'm afraid it shouldn't be a list of pairs.

Prolog (SWI), 574 bytes
Z*A:-findall(X^Y-D,(nth0(Y,Z,O),nth0(X,O,C),plus(32,C,D)),L),list_to_assoc(L,A).
N^C^G^[P,I|R]^F^X^Y^D:-map_assoc(\=(74),G);N<1e3,get_assoc(X^Y,G,J),J>67,put_assoc(X^Y,G,78,H),T=N+1,((I\=95,(P=95;get_assoc(X^Y,C,P)))->(between(49,53,I),plus(48,M,I),nth1(M,F,Q),append(Q,R,S),T^C^H^S^F^X^Y^D;member(I,`RL`),E is(D-I//3)mod 4,T^C^H^R^F^X^Y^E;I=70,(D=0,U is X+1;D=1,V is Y+1;D=2,U is X-1;D=3,V is Y-1),(U=X;V=Y),T^C^H^R^F^U^V^D;I>97,put_assoc(X^Y,C,I,W),T^W^H^R^F^X^Y^D);N^C^H^R^F^X^Y^D).
A+C+F+L:-A*G,C*B,split_string(F,"|","",P),maplist(string_codes,P,[M|N]),0^B^G^M^[M|N]^L.

Try it online!
This defines a predicate that when called succeeds if the all the stars are successfully collected and fails otherwise. The predicate takes the arguments as such: a+c+f+x^y^d.. a and c must be lists of backtick quoted strings, while f must be a double quoted string.
Explanation
This program contains three predicates, */2, ^/2, and +/2. The */2 predicates which is defined on the first line is responsible for part of the input processing. The ^/2 predicate recursively calculates how the robot moves step by step and succeeds if the robot legally collects all the stars and fails otherwise. The +/2 predicate is the main predicate of the program and prepares the input for the ^/2 predicate with some help from the */2 predicate. Note that each of these predicates technically takes only two arguments but using operators and pattern matching they can behave as if they had more arguments (I discuss this phenomenon more in depth here).
*/2
Z*A:-findall(X^Y-D,(nth0(Y,Z,O),nth0(X,O,C),plus(32,C,D)),L),list_to_assoc(L,A).

This predicate takes two arguments. The first is a list of lists of character codes (this is how Prolog parses backtick quoted strings). The second is a associative map from points in the 12x16 map (represented as X^Y) to 32 plus the character code stored at that point in the list of lists of character codes. The 32 is added to each of the character codes so that for the color matrix it will turn the uppercase color characters into lowercase color characters.
The way it does this is generates a list of pairs of points and the character codes at that point using findall/3. It then uses list_to_assoc/2 to create the corresponding associative map from points to the character code at that point.
The findall/3 predicate is a builtin takes a "template" as its first argument, a goal as its second argument and a list as its third argument. The predicate fills the list with all the possible values of the template that cause the goal to succeed. Due to operator precedence, the template that is passed to findall/3 in */2 is parsed as (X^Y)-D. The - operator represents a pair of two values in Prolog so the template represents the point's location (X^Y) paired with 32 plus the point's character code (D). Note that the ^ used in representing the point is in no way connected to the ^/2 predicate.
Let us consider the goal that is passed to the findall/3 predicate.
nth0(Y,Z,O),nth0(X,O,C),plus(32,C,D) % Note that the O (oh) is not a 0 (zero)

The goal contains three predicates each of which need to succeed for the goal to succeed. The nth0/3 predicate which is used twice is used to get the value at a particular index of the list (the 0 in its name indicates it is zero indexed). The first call to it stores the Yth row of the character matrix in O while the second call stores the Xth character in that row in C. The final predicate plus/3 succeeds if its first two arguments sum to its third argument. This is used to make the character code in the pair is 32 greater than the character code in the character matrix which as stated above will turn all uppercase letters into lowercase letters.
Finally findall/3 stores all of the X^Y-D combinations that cause its goal to succeed in the list L which the associative map is built from.
More Coming Soon...

JavaScript (ES6), 298 276 264 bytes
Saved 8 bytes thanks to @ngn
Takes input as (a,c,x,y,d,f), where a and c are arrays of arrays of characters. Returns 0 or 1.
(a,c,x,y,d,f,k=1e3)=>(g=(F,p=0,s=f.split`|`[F],r=a[y])=>!k|!r|x&16||r[x]<'$'?2:/\*/.test(a)?(r[x]=o=0,(I=s[p+1],P=s[p])&&(P<'b'|P==c[y][x].toLowerCase()&&I!='_'&&k--?+I?o=g(I-1):I=='L'?d--:I=='R'?d++:I<'b'?y+=(d&=3,x-=~-d%2,2-d)%2:c[y][x]=I:0,o||g(F,p+2))):1)(0)&1

Test cases

let f =

(a,c,x,y,d,f,k=1e3)=>(g=(F,p=0,s=f.split`|`[F],r=a[y])=>!k|!r|x&16||r[x]<'$'?2:/\*/.test(a)?(r[x]=o=0,(I=s[p+1],P=s[p])&&(P<'b'|P==c[y][x].toLowerCase()&&I!='_'&&k--?+I?o=g(I-1):I=='L'?d--:I=='R'?d++:I<'b'?y+=(d&=3,x-=~-d%2,2-d)%2:c[y][x]=I:0,o||g(F,p+2))):1)(0)&1

getA = _ => [
  "################",
  "################",
  "##*....*...*#.##",
  "##.####.#####.##",
  "##.####.#####.##",
  "##.####*...*#.##",
  "##.########.####",
  "##*........*#.##",
  "################",
  "################",
  "################",
  "################"
].map(s => [...s]);

getC = _ => [
  "RRRRRRRRRRRRRRRR",
  "RRRRRRRRRRRRRRRR",
  "RRRBBBBRGGGGRRRR",
  "RRBRRRRGRRRRRRRR",
  "RRBRRRRGRRRRRRRR",
  "RRBRRRRRGGGBRRRR",
  "RRBRRRRRRRRGRRRR",
  "RRRBBBBGGGGBRBRR",
  "RRRRRRRRRRRRRRRR",
  "RRRRRRRRRRRRRRRR",
  "RRRRRRRRRRRRRRRR",
  "RRRRRRRRRRRRRRRR"
].map(s => [...s]);

y=2; x=6; d=2;

[
  "_FrLg2_1|_FbLrR_2||||", // result:1
  "_FrRg2_1|_FbLrR_2||||", // result:0 (stepped on a black square)
  "_FrLrL_1|_FbLrR_2||||", // result:0 (1000-step limit exceeded)
  "_FrLg2__|________||||"  // result:0 (stack underflow)
]
.forEach(code => console.log('Example #1', code, '-->', f(getA(), getC(), x, y, d, code)));

getA = _ => [
  "#***************",
  "#*###*###*###*##",
  "#*###*###*###*##",
  "***#***#***#***#",
  "***#***#***#***#",
  "*###*###*###*###",
  "***#***#***#***#",
  "***#***#***#***#",
  "***#***#***#***#",
  "*###*###*###*###",
  "*.*#***#***#***#",
  "***#***#***#***#"
].map(s => [...s]);

getC = _ => [
  "RGGGGGGGGGGGGGGG",
  "RBRRRGRRRGRRRGRR",
  "RBRRRGRRRGRRRGRR",
  "RBRRGGGRGGGRGGGR",
  "BRRRGGGRGGGRGGGR",
  "BRRRGRRRGRRRGRRR",
  "BRRRGGGRGGGRGGGR",
  "RBRRGGGRGGGRGGGR",
  "BRRRGGGRGGGRGGGR",
  "BRRRGRRRGRRRGRRR",
  "BGRRGGGRGGGRGGGR",
  "RBRRGGGRGGGRGGGR"
].map(s => [...s]);

y=10; x=1; d=0;

[
  "_2_R_R_1|_FgRgFgFg3rRr4b2_Fgb|_F_F_R|_2_L_r||" // result:1
]
.forEach(code => console.log('Example #2', code, '-->', f(getA(), getC(), x, y, d, code)));

Commented
(                                           // main function taking:
  a, c, x, y, d, f,                         //   - input variables
  k = 1e3                                   //   - k = instruction counter
) => (                                      //
  g = (                                     // g = recursive execution function, taking:
    F,                                      //   - F = subroutine id
    p = 0,                                  //   - p = instruction pointer
    s = f.split`|`[F],                      //   - s = instruction string
    r = a[y]                                //   - r = current row in a[]
  ) =>                                      //
    !k |                                    // if we've executed 1000 instructions
    !r | x & 16 ||                          // or we've felt out of the map
    r[x] < '$' ?                            // or we've reached a black square:
      2                                     //   exit with error code 2
    :                                       // else:
      /\*/.test(a) ? (                      //   if there are still some stars:
        r[x] = o = 0,                       //     mark the current cell as visited
        (I = s[p + 1], P = s[p]) &&         //     I = instruction, P = predicate
        (                                   //     if P is defined:
          P < 'b' |                         //       if the predicate is '_'
          P == c[y][x].toLowerCase()        //       or it matches the color of the cell
          && I != '_'                       //       and the instruction is not '_',
          && k-- ?                          //       then decrement k and:
            +I ?                            //         if I is '1' ... '5':
              o = g(I - 1)                  //           process call to subroutine
            :                               //         else:
              I == 'L' ?                    //           if I is 'L':
                d--                         //             turn left
              :                             //           else:
                I == 'R' ?                  //             if I is 'R':
                  d++                       //               turn right
                :                           //             else:
                  I < 'b' ? (               //               if I is not a color:
                    y += (                  //                 I must be 'F',
                      d &= 3,               //                 so make the bot advance
                      x -= ~-d % 2,         //                 by updating x
                      2 - d                 //                 and y
                    ) % 2                   //
                  ) :                       //               else:
                    c[y][x] = I             //                 paint the current cell
          :                                 //       else:
            0,                              //         do nothing
          o ||                              //       provided that o is equal to 0,
          g(F, p + 2)                       //       go on with the next instruction
        )                                   //     end of instruction execution
      ) :                                   //   else:
        1                                   //     success: return 1
  )(0) & 1                                  // initial call to the subroutine F1

x+='2101'[d&3]-1,y+='1210'[d&3]-1 -> d&=3,x+=(1-d)%2,y+=(2-d)%2

x changes by at most 1, so I think you can replace x&~15 with x&16

APL (Dyalog Classic), 236 233 bytes
-3 thanks to Erik the Outgolfer
Now that I've given away the bonus, I'm posting a sample solution to my own challenge. There's room for improvement here - feel free to copy and golf further.
a c r d f←⎕⋄c←819⌶c⋄F←0,('|'=¯1⌽f)/⍳≢f⋄t←n←0
{~(⊂r)∊⍳⍴a:0⋄'#'=r⌷a:0⋄p q←2↑f↓⍨⊃⌽t⋄(_←p≡'|')∧×≢t:0⋄_:∇t↓←¯1⋄(⊃⌽t)+←2⋄~p∊'_',r⌷c:∇0⋄n+←1⋄n>999:0⋄(r⌷a)←'.'⋄~'*'∊a:1⋄r+←(q≡'F')×11 9○0j1*d⋄d+←4|'.R.L'⍳q⋄q∊'rgb':∇(r⌷c)←q⋄q∊⎕d:∇t,←F[⍎q]⋄∇0}0

Try it online!
Same as the above, expanded with comments:
⎕io←0                   ⍝ 0-based indices (not counted in the score)
a c r d f←⎕             ⍝ decompose eval'ed input (⎕) into variables
c←819⌶c                 ⍝ make c lowercase
F←0,('|'=¯1⌽f)/⍳≢f      ⍝ split f at the '|'-s
t←n←0                   ⍝ t:stack, n:step counter
{                       ⍝ lambda
  ~(⊂r)∊⍳⍴a:0           ⍝ if the robot is off the map, return 0
  '#'=r⌷a:0             ⍝ if the robot is on a wall, return 0
  p q←2↑f↓⍨⊃⌽t          ⍝ current instruction - p:predicate, q:action
  (_←p≡'|')∧1≥≢t:0      ⍝ if at end of func and stack is empty, return 0
  _:∇t↓←¯1              ⍝ if at end of func, pop from stack and recurse
  (⊃⌽t)+←2              ⍝ increment program counter (top of stack)
  ~p∊'_',r⌷c:∇0         ⍝ if predicate doesn't match cell colour, recurse
  n+←1⋄n>999:0          ⍝ if too meany steps, return 0
  (r⌷a)←'.'             ⍝ consume star
  ~'*'∊a:1              ⍝ if no more stars left, return 1
  r+←(q≡'F')×11 9○0j1*d ⍝ if action is F, move forward
  d+←4|'.R.L'⍳q         ⍝ if action is L or R, turn left or right
  q∊'rgb':∇(r⌷c)←q      ⍝ if action is paint (r,g,b), do it
  q∊⎕d:∇t,←F[⍎q]        ⍝ if action is F1...F5, push on stack and recurse
  ∇0                    ⍝ action is nop (_), recurse
}0                      ⍝ call the lambda (argument will be ignored)

233 bytes

@EriktheOutgolfer change applied, thanks

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


text:
Confusing Alphabet Staircase
Given no input, output this interesting alphabet pattern in either case (the case has to be consistent) via an accepted output method:

A
AB
ACBC
ADBDCD
AEBECEDE
AFBFCFDFEF
AGBGCGDGEGFG
AHBHCHDHEHFHGH
AIBICIDIEIFIGIHI
AJBJCJDJEJFJGJHJIJ
AKBKCKDKEKFKGKHKIKJK
ALBLCLDLELFLGLHLILJLKL
AMBMCMDMEMFMGMHMIMJMKMLM
ANBNCNDNENFNGNHNINJNKNLNMN
AOBOCODOEOFOGOHOIOJOKOLOMONO
APBPCPDPEPFPGPHPIPJPKPLPMPNPOP
AQBQCQDQEQFQGQHQIQJQKQLQMQNQOQPQ
ARBRCRDRERFRGRHRIRJRKRLRMRNRORPRQR
ASBSCSDSESFSGSHSISJSKSLSMSNSOSPSQSRS
ATBTCTDTETFTGTHTITJTKTLTMTNTOTPTQTRTST
AUBUCUDUEUFUGUHUIUJUKULUMUNUOUPUQURUSUTU
AVBVCVDVEVFVGVHVIVJVKVLVMVNVOVPVQVRVSVTVUV
AWBWCWDWEWFWGWHWIWJWKWLWMWNWOWPWQWRWSWTWUWVW
AXBXCXDXEXFXGXHXIXJXKXLXMXNXOXPXQXRXSXTXUXVXWX
AYBYCYDYEYFYGYHYIYJYKYLYMYNYOYPYQYRYSYTYUYVYWYXY
AZBZCZDZEZFZGZHZIZJZKZLZMZNZOZPZQZRZSZTZUZVZWZXZYZ

Trailing spaces and newlines are acceptable, standard loopholes are disallowed, and this happens to be code-golf, so the shortest answer in bytes wins!

Related, Related

BTW if I see an amazing answer I will bounty it 50 rep

The leading A really messes things up for me...

Why the downvote? Can I improve anything?

Some people simply don't like these kind of challenges I think.

@ETHproductions It simplifies things for me!

Can it be lowercase?

@l4m2 Sure thing

Canvas, 7 bytes
Ｚ［Ｋ＊¹＋］

Try it here!
Explanation:
Ｚ［     ］ for each prefix of the uppercase alphabet
    Ｋ        pop off the last letter
     ＊       and join the rest of the string with that character
      ¹＋     and append the current iterated character to it

Why didn't you edit your previous answer?

@Neil good question. Not sure

Accepted! You beat Jelly and Charcoal by two bytes!

Jelly, 9 bytes
ØAjṪ$Ƥż¹Y

Try it online!
How it works
ØAjṪ$Ƥż¹Y  Main link. No arguments.

ØA         Yield "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
     Ƥ     Map the link to the left over all prefixes, i.e., ["A", "AB", ...].
    $        Combine the two links to the left into a chain.
   Ṫ           Tail; yield and remove the last letter of each prefix.
  j            Join the remainder, using that letter as separator.
      ż¹   Zip the resulting strings and the letters of the alphabet.
        Y  Separate the results by linefeeds.

Oh, haha and I was just about to post ØAjṪ$ƤżØAY :D

Charcoal, 9 bytes
Ｅα⁺⪫…ακιι

Try it online! Link is to verbose version of code. Explanation:
 α          Predefined uppercase alphabet
Ｅ           Map over each character
    …ακ     Get current prefix of alphabet
   ⪫   ι    Join with current character
  ⁺     ι   Append current character
            Implicitly print on separate lines

C, 82 bytes
f(i,j){for(i=!puts("A");++i<26;puts(""))for(j=0;j++<i*2;)putchar(65+(j&1?j/2:i));}

Try it online!

R, 50 bytes
l=LETTERS
for(i in 0:25)cat(l[0:i],"
",sep=l[i+1])

Try it online!
Perhaps the cleverest part here is using letters[0] for the empty string to get cat(character(0),'\n',sep="A") to print the first line.

Python 2, 56 bytes
n=65;s='';exec'c=chr(n);print c.join(s)+c;s+=c;n+=1;'*26

Try it online!

6502 machine code routine (C64), 39 bytes
A9 41 20 D2 FF AA A8 84 FB E4 FB B0 0B 8A 20 D2 FF 98 20 D2 FF E8 D0 F1 A9 0D
20 D2 FF A2 41 C0 5A F0 03 C8 D0 E1 60

Position-independet machine code subroutine, clobbers A, X and Y.
Online demo
The demo loads at $C000, so use SYS49152 to call the routine.

Commented disassembly:
A9 41       LDA #$41            ; 'A'
20 D2 FF    JSR $FFD2           ; Kernal CHROUT (output character)
AA          TAX                 ; copy to X (current pos)
A8          TAY                 ; copy to Y (current endpos)
  .outerloop:
84 FB       STY $FB             ; endpos to temporary
  .innerloop:
E4 FB       CPX $FB             ; compare pos with endpos
B0 0B       BCS .eol            ; reached -> do end of line
8A          TXA                 ; current pos to accu
20 D2 FF    JSR $FFD2           ; and output
98          TYA                 ; endpos to accu
20 D2 FF    JSR $FFD2           ; and output
E8          INX                 ; next character
D0 F1       BNE .innerloop      ; (repeat)
  .eol:
A9 0D       LDA #$0D            ; load newline
20 D2 FF    JSR $FFD2           ; and output
A2 41       LDX #$41            ; re-init current pos to 'A'
C0 5A       CPY #$5A            ; test endpos to 'Z'
F0 03       BEQ .done           ; done when 'Z' reached
C8          INY                 ; next endpos
D0 E1       BNE .outerloop      ; (repeat)
  .done:
60          RTS

Uiua 0.1.0 0.10.0, 21 bytes
∵(&p+@A♭≡⊂⇡.)⇡26&pf@A

See it in action

Welcome to Code Golf!

SNOBOL4 (CSNOBOL4), 169 143 124 123 bytes
	L =LEN(1)
	OUTPUT ='A'
I	&UCASE (ARB K L) . R L . S :F(END)
	O =K =
T	R K L . K :F(O)
	O =O K S :(T)
O 	OUTPUT =O :(I)
END

Try it online!
Explanation for older version of the code:
i &ucase len(x) . r len(1) . s	;* set r to the first x characters and s to the x+1th.
 o =				;* set o,i to empty string
 i =
t r len(i) len(1) . k :f(o)	;* set k to the ith letter of r. on failure (no match), go to o.
 o =o s k			;* concatenate o,s,k
 i =i + 1 :(t)			;* increment i, goto t
o o s =				;* remove the first occurrence of s (the first character for x>1, and nothing otherwise)
 output =o s			;* output o concatenated with s
 x =lt(x,25) x + 1 :s(i)	;* increment x, goto i if x<25.
end

The problem here is the first line
using o s k will add an extra separator character at the beginning of each line and also not have an s at the end. This is OK because line t will jump over the following two lines when x=0. This means that o will still be blank. Hence, o s = will remove the first s character from o, and then we can simply print o s to have the appropriate last s.

Java 8, 93 91 90 bytes
v->{String t="";for(char c=64;++c<91;t+=c)System.out.println(t.join(c+"",t.split(""))+c);}

-1 byte thanks to @OlivierGrégoire by printing directly instead of returning
Explanation:
Try it online.
v->{                     // Method with empty unused parameter and String return-type
  String t="";           //  Temp-String, starting empty
  for(char c=64;++c<91;  //  Loop over the letters of the alphabet:
      t+=c)              //    After every iteration: append the letter to the temp-String
    System.out.println(  //   Print with trailing new-line:
       r.join(c+"",t.split(""))
                         //    The temp-String with the current letter as delimiter
       +c);}             //    + the current letter as trailing character

90 bytes (just using stdout instead of returning).

Nice answer! I ported to C# to see if it was shorter and I get 91 (more if I include System.) :)

JavaScript (ES6), 81 bytes

f=
_=>[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ"].map((c,i,a)=>a.slice(0,i).join(c)+c).join`
`
;document.write('<pre>'+f());

Save 9 bytes if a string array return value is acceptable.

><>, 44 34 bytes
"BA"oao"ZA"\=?;1+40.
o1+:{::o}=?\:

Try it online!
><>, 44 bytes
"A"o10ao\55*=?;1+40.
1+:{:}=?\:"A"+o{:}"A"+o

Try it online!
As I use a different route to producing the output I've posted my own ><> answer; The other ><> answer can be found here.
Big thanks to Jo king for spotting I didn't need to keep putting "A" onto the stack if I just compared against "Z" instead of 26. (-10 bytes)
Explanation
The explanation will follow the flow of the code.
"BA"                 : Push "BA" onto the stack;
                       [] -> [66, 65]
    oao              : Print the stack top then print a new line;
                       [66, 65] -> [66]
       "ZA"\         : Push "ZA" onto the stack then move down to line 2;
                       [66, 90, 65]
o          \:        : Duplicate the stack top then print
 1+:                 : Add one to the stack top then duplicate;
                       [66, 90, 65, 65]
    {::              : Shift the stack right 1 place then duplicate the stack top twice;
                       [90, 65, 65, 66, 66]
       o}            : Print the stack top then shift the stack left 1 place;
                       [66, 90, 65, 65, 66]
         =?\         : Comparison for equality on the top 2 stack items then move to line 1 if equal otherwise continue on line 2;
                       [66, 90, 65]
           \=?;      : Comparison for equality on the top 2 stack items then quit if equal else continue on line 1;
                       [66]
               1+    : Add 1 to the stack top;
                       [67]
                 40. : Move the code pointer to column 4 row 0 of the code box and continue execution of code.

36 bytes. Your method is much better than mine

inb4 "crossed out 44 is still 44 ;("

@JoKing Excellent spot with comparing to Z, only improvement I made was moving line logic and placing the Z in the middle of the stack items to save using those quote marks again.

PowerShell, 56 bytes
"A";65..89|%{([char[]](65..$_)-join[char]++$_)+[char]$_}

Try it online!
Loops 65 to 89, each iteration constructing a char array of 65 to the current number $_, then -joins that array together into a string with the next character, then tacks on that character at the end.
Change the 89 to some other ASCII number to see the behavior better.

Japt (-R flag), 14 12 bytes
-2 bytes thanks to @Shaggy
;B¬
ËiU¯E qD

Test it online!

If only there were a shortcut for s0,! ;p

12 bytes. But why aren't you counting the -R here?

@Shaggy Oh wow, I knew I was missing something :P The i trick is great, thanks! As for the flag, there appears to be a new consensus that each unique invocation of a program should be considered a separate language. (which makes Japt's flag system seem kind of cheaty...)

Haskell, 49 48 bytes
'A':unlines[init['A'..x]>>=(:[x])|x<-['A'..'Z']]

Try it online!
Edit: -1 byte thanks to totallyhuman!

Acc!!, 84 bytes
This is actually what inspired this challenge:
Write 65
Count i while i-26 {
Count b while b-i {
Write b+65
Write i+65
}
Write 10
}

Try it online!

Ruby, 44 34 bytes
?A.upto(?Z){|w|puts [*?A...w]*w+w}

Try it online!
Thanks benj2240 for getting it down to 37 bytes. And of course crossed out 44 blah blah.

Here's a 37-byte version

C# (.NET Core)
Port from Kevin Cruijssen's answer:
91 90 bytes
_=>{var t="";for(char c='@';++c<91;t+=c)Console.WriteLine(string.Join(c+"",t.Skip(0))+c);}

Try it online!
132 122 110 109 104 103 bytes
_=>"ABCDEFGHIJKLMNOPQRSTUVWXYZ".Select((c,i)=>string.Join(""+c,"ABCDEFGHIJKLMNOPQRSTUVWXYZ".Take(i))+c)

Try it online!

Replace () with _ to show that we declare an unused variable. Thank you Kevin Cruijssen.

You can also reduce it to 90 bytes by using an empty unused parameter like I did in my Java answer. So o=>{...} instead of ()=>{...}. Try it online: 90 bytes.

@KevinCruijssen I didnt know! Thank you!

@KevinCruijssen I added this tip to Tips for code-golfing in C#

Jelly, 22 bytes
ØAż€Ð€`F€µJ’Ḥ»1ż@¹ḣ/€Y

Try it online!
How it works:
                       take argument implicitly
ØA                     the uppercase alphabet
    Ð€`                for C in the alphabet
  ż€                     appends C to every letter in the alphabet
       F€              flatten every sublist
          J            get indices
           ’           subtract 1
            Ḥ          and double
             »1        take max([n, 1])
         µ     ż@¹     interleave alphabet list and indices
                  ḣ/€  reduce on head() for each element
                     Y join on newline
                       implicitly output

05AB1E, 29 bytes
'A,Au©.sRí¦®RSDgÝ×Rs)ø˜.Bíø»=

Try it online!

Perl 5, 30 bytes
New method here shaves off a lot of the length.
say$,=A;say A..$,++,''for A..Y

Try it online!
Old way: Perl 5, 39 38 bytes
@DomHastings shaved off a byte
say$.=A;say map$_.$.,A..$.++while$.!~Z

Try it online!

Nice solution, I've played with this a bit and managed to get a slightly different approach, but with this, you can save 1 cheeky byte using $.!~Z vs. $.ne Z!

Oh, that new answer is inspired!

brainfuck, 96 bytes
+++++[->+++++>++>+++++++++++++>+++++++++++++<<<<]>>>.<.<[->>>+>+[-<<.+>.>>+<]>[-<+<<->>>]<<<<.<]

Try it online!
Tape Layout:
[Init] [Line Count] [newline] [Growing Ascii] [Repeated Ascii] [Loop 1] [Loop 2]
Explanation:
+++++[->+++++>++                      Sets Line counter and newline cell
    >+++++++++++++>+++++++++++++<<<<] Sets Ascii cells to 65 ('A')
>>>.<.<                               Prints first "A" and moves to Line loop
  [->>>+>+                            Increment Repeated Ascii cell in outer loop
      [-<<.+>.>>+<]>                  Increment Growing Ascii cell in inner loop,
                                         Prints both Ascii cells and Sets Loop 2
      [-<+<<->>>]                     Resets Growing cell and Loop 1
  <<<<.<]                             Prints newline and moves to next Line

brainfuck, 81 bytes
+++[[->++<<+>]>]<<,<[----<<+>>]<+<+.<+<--.>[>+>>+[-<.+<.>>>+<]>[-<+<->>]<<<<<.>-]

Try it online!
Prints in lowercase
Explanation:
+++[[->++<<+>]>]  Sets up the tape as 3*2^n (3,6,12,24,48,96,192,128)
<<,               Removes excess 128
<[----<<+>>]      Adds 196/4 to 48 resulting in 96
<+<+.             Add 1 to both 96s and print A
<+<--.            Add 1 to 25, subtract 2 from 12 to print a newline
                  Tape: 3 6 10 25 96 96 0 0
>[ Start loop
   >+>>+          Add one to the unchanging ASCII and the inner loop counter
   [-<.+<.>>>+<]  Print row while preserving counter
   >[-<+<->>]     Undo changes to changing ASCII and return inner loop counter to its cell
   <<<<<.>-       Print newline and decrement loop counter
]

This is really short but needs a specific interpreter with the following features:

negative pointer or pointer wrapping
cell wrapping
cell size 8 bits
end of input = 0

If the interpreter doesn't support any of these, it will produce garbish

@Dorian Generally, any type of interpreter that exists is valid on this site (though most I've seen have used the described specifications) . I will be sure to include which interpreter type I'm using in future answers though thanks

brainfuck, 88 bytes
++++++++[->+++>+>++++++++>++++++++<<<<]>+>++>+.<.<[->>+>>+[-<+.<.>>>+<]>[-<+<->>]<<<<.<]

Try it online!
should run on all brainfuck interpreters. No wrapping or negative values, no undefined input behaviour, values between 0 and 90.
How it works
Initialize tape: 25(row count) 10(lf) 64(row letter) 64(col letter) 0(col count) 0(temp)
++++++++[->+++>+>++++++++>++++++++<<<<]>+>++

>+.<.            print "A" and lf
<[               for each letter count
  -                decrement letter count
  >>+              increment row letter
  >>+              increment col count
  [                do col count times
    -                decrement col count
    <+.              increment and print col letter
    <.               print row letter
    >>>+             move col count to temp
    <                return to colcount
  ]
  >[-<+<->>]       move value from temp back to col count and set col letter back to "A" minus 1
  <<<<.            print lf
  <                return to row count
]

Deadfish~, 4152 bytes
{i}cc{iiiii}iiiiic{ddddd}dddddc{iiiii}iiiiicic{ddddd}ddddddc{iiiii}iiiiiciicdcic{dddddd}iiic{iiiii}iiiiiciiicddciicdcic{dddddd}iic{iiiii}iiiiiciiiicdddciiicddciicdcic{dddddd}ic{iiiii}iiiiiciiiiicddddciiiicdddciiicddciicdcic{dddddd}c{iiiii}iiiiiciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{dddddd}dc{iiiii}iiiiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{dddddd}ddc{iiiii}iiiiic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{dddddd}dddc{iiiii}iiiiic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{dddddd}ddddc{iiiii}iiiiic{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{dddddd}dddddc{iiiii}iiiiic{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{dddddd}ddddddc{iiiii}iiiiic{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}iii}iiic{iiiii}iiiiic{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}iii}iic{iiiii}iiiiic{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}iii}ic{iiiii}iiiiic{i}iiiiic{d}ddddc{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}iii}c{iiiii}iiiiic{i}iiiiiic{d}dddddc{i}iiiiic{d}ddddc{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}iii}dc{iiiii}iiiiic{ii}dddc{d}ddddddc{i}iiiiiic{d}dddddc{i}iiiiic{d}ddddc{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}iii}ddc{iiiii}iiiiic{ii}ddc{dd}iiic{ii}dddc{d}ddddddc{i}iiiiiic{d}dddddc{i}iiiiic{d}ddddc{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}iii}dddc{iiiii}iiiiic{ii}dc{dd}iic{ii}ddc{dd}iiic{ii}dddc{d}ddddddc{i}iiiiiic{d}dddddc{i}iiiiic{d}ddddc{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}iii}ddddc{iiiii}iiiiic{ii}c{dd}ic{ii}dc{dd}iic{ii}ddc{dd}iiic{ii}dddc{d}ddddddc{i}iiiiiic{d}dddddc{i}iiiiic{d}ddddc{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}iii}dddddc{iiiii}iiiiic{ii}ic{dd}c{ii}c{dd}ic{ii}dc{dd}iic{ii}ddc{dd}iiic{ii}dddc{d}ddddddc{i}iiiiiic{d}dddddc{i}iiiiic{d}ddddc{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}iii}ddddddc{iiiii}iiiiic{ii}iic{dd}dc{ii}ic{dd}c{ii}c{dd}ic{ii}dc{dd}iic{ii}ddc{dd}iiic{ii}dddc{d}ddddddc{i}iiiiiic{d}dddddc{i}iiiiic{d}ddddc{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}ii}iiic{iiiii}iiiiic{ii}iiic{dd}ddc{ii}iic{dd}dc{ii}ic{dd}c{ii}c{dd}ic{ii}dc{dd}iic{ii}ddc{dd}iiic{ii}dddc{d}ddddddc{i}iiiiiic{d}dddddc{i}iiiiic{d}ddddc{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}ii}iic{iiiii}iiiiic{ii}iiiic{dd}dddc{ii}iiic{dd}ddc{ii}iic{dd}dc{ii}ic{dd}c{ii}c{dd}ic{ii}dc{dd}iic{ii}ddc{dd}iiic{ii}dddc{d}ddddddc{i}iiiiiic{d}dddddc{i}iiiiic{d}ddddc{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}ii}ic{iiiii}iiiiic{ii}iiiiic{dd}ddddc{ii}iiiic{dd}dddc{ii}iiic{dd}ddc{ii}iic{dd}dc{ii}ic{dd}c{ii}c{dd}ic{ii}dc{dd}iic{ii}ddc{dd}iiic{ii}dddc{d}ddddddc{i}iiiiiic{d}dddddc{i}iiiiic{d}ddddc{i}iiiic{d}dddc{i}iiic{d}ddc{i}iic{d}dc{i}ic{d}c{i}c{d}ic{i}dc{d}iic{i}ddc{d}iiic{i}dddcddddddciiiiiicdddddciiiiicddddciiiicdddciiicddciicdcic{{d}ii}c

Try it online!

Nice! Looks like the python interpreter exceeds the recursion depth but it looks like this would work otherwise.

Jelly, 12 bytes
ØA;\;€Ṫ$€YFḊ

Try it online!
Bah just got ØAjṪ$ƤżØAY which is a step between this and the already posted solution of Dennis :/

Pyth, 13 bytes
+\ajmPjedd._G

Try it here!, Alternative
That leading a though...

Good morning :p

@JonathanAllan Morning bro :p You and your inside jokes!

Python 2, 92 86 79 75 64 bytes
s=map(chr,range(65,91))
for d in s:print d.join(s[:ord(d)-65])+d

Try it online!
11 bytes thx to Rod.

you don't need to use '\n'.join(..)

APL+WIN, 51 bytes
⍎∊'a←⎕av[65+⍳26]⋄a[n←1]',25⍴⊂'⋄,⊃a[⍳n-1],¨a[n←n+1]'

Explanation:
a←⎕av[65+⍳26] create a vector of upper case letters

a[n←1] first A

25⍴⊂'⋄,⊃a[⍳n-1],¨a[n←n+1]' create an implicit loop to concatenate subsequent letters

><>, 47 bytes
d2*:1-v
-&$:?!\$:&$:1
1-:?!v\69*-$1-:
+*88~< 1o

Try it online!
How It Works:
d2*:1-v Initialise the stack with 26 (outer loop counter) and 26-1 (inner loop counter)
....
....
....

....
-&$:?!\$:&$:1 Repeatedly make copies of both counters
....          And decrement the inner loop counter
....          Go to third line when inner loop counter is 0

....            Add -54 to the stack (for the newline) and decrement the outer loop counter
....            Initialise the inner loop counter as outer-1
1-:?!v\69*-$1-: If the inner counter is 0, go to the fourth line, else back to the second.
....

....
....
....      Transform numbers and -54s into letters and newlines by adding 64
+*88~< 1o Output each character until it runs out of stack and errors

Canvas, 11 10 bytes
Ｚ｛Ｚ²╷ｍ¹＊×］

Try it here!

J, 38, 33 30 bytes
-5 bytes thanks to Bolce Bussiere
-3 bytes thanks to FrownyFrog
'A ',}.(}:,@,.{:)\(65+i.26){a.

How?
(65+i.26){a. - uppercase alphabet
\ - prefixes
(}:,@,.{:) - drops the last letter from each prefix and inserts it between the remaining letters
}. drops the leading row since it's empty (not "A")
, - append
'A '  - "A"
Try it online!

You can use (,.'A') instead of ('A',49$' ') :)

@Bolce Bussiere Thanks, it's much better now!

Just append 'A ' TIO

@FrownyFrog Thanks! I didn't know it works. Only the space is used as a fill?

@GalenIvanov The space is the default fill, it doesn’t come from the 'A '.

@FrownyFrog I think I got it: 'A' is an atom, so it would be repeated to match the length of the 1-cells, resulting in a list of 50 As. 'A ' is a list, so it's filled with spaces to match the length.

@GalenIvanov Yes, that’s why (,'A') instead of (,.'A') also works.

GNU M4, 119 bytes
The worst so far. Well, time's already spent…
define(f,`ifelse($1,$2,,`format(%c%c,$1,$2)`'f(incr($1),$2)')')define(g,`f(65,$1)ifelse($1,90,,`
g(incr($1))')')A
g(66)

Husk, 13 bytes
Γ·:mhSzJḣ…"AZ

Try it online!
Explanation
This leading A really messes things up -.-
          "AZ  -- string literal: "AZ"
         …     -- fill gaps: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
     S         -- with alphabet and
        ḣ      -- | alphabet rangified: ["A","AB","ABC",…,"AB……XYZ"]
      zJ       -- : zipWith join: ["A","ABB","ACBCC","ADBDCDD",…,"AZB……ZYZZ"]
Γ              -- pattern match (x:xs) with the following function (x is "A" and xs ["ABB","ACBCC",…,"A……ZYZZ"]
 · mh          -- | drop the last element of each element of xs: ["AB","ACBC",…,"A……ZYZ"]
  :            -- | cons (construct list): ["A","AB","ACBC",…,"A……ZYZ"]
               -- : strings are printed implicitly

Java 8, 121 bytes
I know there are better approaches but wanted to try it :)
q->{String s="";for(int i=0;i<26;i++){for(int j=0;j<((i<1)?1:i*2);j++){s+=(char)((j%2!=0?i:j/2)+65);}s+="\n";}return s;}

ungolfed:
static String d(){
    String s="";
    for(int i=0;i<26;i++){      //Loop for each line
        for(int j=0;j<((i<1)?1:i*2);j++){ //Loop to create the "word"
            s+=(char)((j%2!=0?i:j/2)+65);
        }
        s+="\n";
    }
    return s;
}

110 bytes

Red, 130 122 bytes
prin"A"repeat n 26[b: copy/part"ABCDEFGHIJKLMNOPQRSTUVWXYZ"n
foreach d copy/part b back tail b[prin d prin last b]print""]

Try it online!

F# (.NET Core), 132 bytes
let x=['A'..'Z']|>Seq.map(fun c->(+)(['A'..'Z']|>Seq.take((int c)-65)|>Seq.map(fun s->string s)|>String.concat(string c))(string c))

Try it online!
A naive port of my C# answer

Perl 6, 51 bytes
.say for 'A',{join |('A'..'Z')[++$,^++$ ],''}.../Z/

Try it
Expanded:
.say     # print with trailing newline

  for    # each of the following

    # start the sequence
    'A',

    # code used to generate the rest of the sequence
    {
      join
        | # flatten arguments

        ( 'A' .. 'Z' )[  # Range of characters
          ++$,           # auto incrementing anon state var (value used to join)
          ^++$           # Range upto an incrementing anon
        ],
        ''               # an empty string so that the joiner is added to end
    }

    ...  # keep doing that until
    /Z/  # there is a "Z" in the value

Jelly, 13 bytes
ØA¹Ƥ+"¹Ṗ€Yṭ”A

Try it online!
Explanation
ØA¹Ƥ+"¹Ṗ€Yṭ”A  Main Link
ØA              Uppercase Alphabet
  ¹Ƥ            Prefixes
    +"¹         Doubly-vectorized addition to identity (uppercase alphabet) (gives lists of lists of strings)
       Ṗ€      a[:-1] of each (get rid of the double letters at the end)
         Y     Join on newlines
          ṭ”A  "A" + the result

partially abuses the way strings and character lists differ in Jelly

That was quick!

@tfbninja ehhh, 11 mins is ok for Jelly. thanks though :P

You can replace your second ØA with ¹ (like Dennis's)

@JonathanAllan oh cool, thanks!

uBASIC, 80 bytes
Anonymous function that takes no input and outputs to the console
0?"A":ForI=65To89:ForJ=65ToI:?Left$(Chr$(J),1)+Left$(Chr$(I+1),1);:NextJ:?:NextI

Try it online!

MY-BASIC, 77 bytes

Anonymous function that takes no input and outputs to the console.
Print"A";
For I=65 To 89
For J=65 To I
Print Chr(J)+Chr(I+1)
Next
Print;
Next

Try it online!

Visual Basic .NET (Mono), 134 bytes
Declared function that takes no input and outputs to the console
Module M
Sub Main
Dim S,I,J
S="A"
For I=65To 90
Console.WriteLine(S)
S=""
For J=65To I
S+=Chr(J)+Chr(I+1)
Next
Next
End Sub
End Module

Try it online!

Yabasic, 60 bytes
?"A"
For I=65To 89
For J=65To I?Chr$(J)+Chr$(I+1);Next
?Next

Try it online!

Kotlin, 76 bytes
{for(l in 'A'..'Z'){for(c in 'A'..l){print(c)
if(c+1<l)print(l)}
println()}}

Try it online!

Perl 5, 35 bytes
@a=A..$_,$"=pop@a,say"@a$_"for A..Z

Try it online!
I managed to get frustratingly close for 23 bytes, but the above is the shortest valid solution I've managed so far:
$,=$_,say A..$,for A..Z

Try it online!

05AB1E, 12 bytes
AuηćsvyS¤ý¨»

Try it online.
Explanation:
Au            # Push the uppercase alphabet
  η           # Pop and push its prefixes
   ć          # Extract the head; pop and push the remainder and head
    sv        # Loop `y` over each of the remainder prefixes:
      yS      #  Convert `y` to a list of characters
        ¤     #  Push it's last character (without popping)
         ý    #  Join the characters by this character
          ¨   #  Remove the last character of the string
           »  #  And join the entire stack by newlines
              # (after the loop, the result is output implicitly)

Vyxal j, 63 bitsv2, 7.875 bytes
n¦ƛṫv+∑∨

Try it Online!
Bitstring:
100001100010111101100111000011000110100000111001111001111010011

Explained
n¦ƛṫv+∑∨
n¦ƛ       # To the prefixes of the lowercase alphabet:
   ṫv+    #   Add the tail to each character in (the prefix with the tail removed).
      ∑   #   Convert to a single string
       ∨  #   Special case the first a

Created with the help of Luminespire.

Julia 1.0, 40 bytes
!_=["A";'B':'Z'.|>i->join(('A':i-1).*i)]

Try it online!
function taking an unused argument and ouputing an array of strings

Zsh, 40 bytes
for c ({A..Z})<<<${(pj:$c:)s}$c&&s+=($c)

Try it online!
for c ({A..Z})             # for each character
    <<< ${(pj:$c:)s}$c &&  # print line
    #   ${(p     ) }       # - enable simple $parameters inside PE flags
    #   ${( j:$c:) }       # - join with $c
    #   ${        s}$c     # - concatenate $s with $c
    s+=($c)                # add $c to the end of the list $s

Clean, 74 72 bytes
import StdEnv
Start=("A",[(zip2['A'..s-one][s,s..],'
')\\s<-['A'..'Z']])

Try it online!
This actually doesn't print a String, but rather a bare (String, [([(Char, Char)], Char)]), which is functionally the same. Unless you grab the output from this with another Clean program.

C (gcc), 77 bytes
f(i,j){for(i=0;i<26;puts("A"+!!i++))for(j=0;j<i;)printf("%c%c",j+++65,i+65);}

Try it online!

VBA, 60 Bytes
Anonymous VBE immediate window that takes no input and outputs to the VBE immediate window
?"A":For i=65To 89:For j=65To i:?Chr(j)Chr(i+1);:Next:?:Next

QBasic 1.1, 62 bytes

Takes no input and outputs to the STDIN
?"A"
FOR i=65TO 89
FOR j=65TO i
?CHR$(j)CHR$(i+1);
NEXT
?
NEXT

Easyfuck, 36 bytes

\ùòGEPAí½xÑZG×í½x¹ZGË¯ÝzSHYòGËPM<¿v␄␘6Å␀ÿ

due to lack of unicode representations for c1 control characters, they have been replaced by their superscripted abbreviations
Decompressed:
.>>$<_[=<4+$>_[=<.+$>._]=+>$>.<<_]@AA[␊

Explanation:
.>>$<_[=<4+$>_[=<.+$>._]=+>$>.<<_]@AA[␊
.>>$<                                   print the initial A
     _[=                        _]      loop until 2nd cell is equal to 3rd
        <4+$>                           set first cell to A
             _[=      _]=               loop until 1st cell is equal to 2nd
                <.+$>.                  print 1st cell and increment it, then print 2nd
                         +>$>.<<        increment 2nd cell and print 4th
                                  @     return
                                   AA[␊ initializer data


text:
Write numbers as a difference of Nth powers
Challenge
There are many numbers which can be expressed as the difference of two squares, or as the difference of two cubes, or maybe even higher powers. Talking about squares, there are various ways of writing a number, say 75, as the difference of 2 squares. You can write:
75 = (10)^2 - (5)^2
   = (14)^2 - (11)^2
   = (38)^2 - (37)^2

So let's talk about the challenge. Firstly, the user enters a number and then he enters a value for n. You need to display all the ways in which that number can be written in the form of aⁿ - bⁿ.
Input and Output
The input will be the number and the value of n. Your output shall have all such pairs of 'a' and 'b' such that the above-stated condition is met. The first number in the pair must be larger than the second. Please note that a, b, n and the input number are all positive integers, and n > 1.
Examples
50, 2 -> (none)

32, 2 -> (9,7), (6, 2)

7, 3 -> (2,1)

665, 6 -> (3, 2)

81, 4 -> (none)

Scoring
This is code-golf , so the shortest code wins!

Jelly, 8 bytes
p*ƓIFẹ+d

This is a monadic link that takes the number as argument and reads n from STDIN.
Try it online!
How it works
p*ƓIFẹ+d  Main link. Argument: k

p         Cartesian product; yield all pairs [b, a] with b and a in [1, ..., k].
  Ɠ       Get; read an integer n from STDIN.
 *        Power; map each [b, a] to [b**n, a**n].
   I      Increments; map each [b**n, a**n] to [a**n-b**n].
    F     Flatten the resulting list of singleton arrays.
     ẹ    Every; find all indices of k in the list we built.
      +   Add k to the indices to correct the offset.
       d  Divmod; map each index j to [j/k, j%k].

Haskell, 42 bytes
k#n=[(a,b)|b<-[1..k],a<-[b..k],a^n-b^n==k]

Try it online!
Ungolfed with UniHaskell and -XUnicodeSyntax
import UniHaskell

f     ∷ Int → Int → [(Int, Int)]
f k n = [(a, b) | b ← 1 … k, a ← b … k, a^n - b^n ≡ k]

Can't change much else...

Actually, the equal sign == in UniHaskell is somewhat confusing, as it denotes congruence in mathematics.

MATL, 11 bytes
t:i^&-!=&fh

Try it online! Or verify all test cases.
Explanation
t     % Implicit input: M. Duplicate
:     % Range [1 2 ... M]
i     % Input: n
^     % Power, element-wise. Gives [1^n 2^n ... M^n]
&-    % Matrix of pairwise differences (size n×n)
!     % Transpose. Needed so the two numbers in each pair are sorted as required
=     % Is equal? Element-wise. Gives true for entries of the matrix equal to M
&f    % Row and column indices of true entries
h     % Concatenate horizontally. Implicit display

05AB1E, 9 bytes
Very inefficient for larger input values.
LãDImÆ¹QÏ

Try it online!
Explanation
L           # range [1 ... input_1]
 ã          # cartesian product with itself
  D         # duplicate
   Im       # raise each to the power of input_2
     Æ      # reduce each pair by subtraction
      ¹QÏ   # keep only values in the first copy which are true in this copy

APL (Dyalog), 21 bytes
{o/⍨⍵=-/¨⍺*⍨¨o←,⍳2⍴⍵}

Try it online!
Left argument is n.

Python 2, 65 bytes
lambda k,n:[(j%k,j/k)for j in range(k,k*k)if(j%k)**n-(j/k)**n==k]

Try it online!

Python 3, 71 bytes
Thanks Mr.Xcoder for saving some bytes!
lambda x,n:[(a,b)for b in range(1,x)for a in[(b**n+x)**(1/n)]if a%1==0]

Try it online!

Python 3, 69 bytes
lambda x,n:[(a,b)for b in range(1,x)for a in range(x)if a**n-b**n==x]

Try it online!
Use totallyhuman's x^2 brute force approach actually saves bytes.

77 bytes

Unfortunately, brute forcing is usually the shortest approach. :P

'b in range(x)' works on TIO. That makes 67 bytes.

@AlixEisenhardt I don't think so.

Jelly, 10 bytes
*Iċ³
ṗ2çÐf

A full program taking i, and n which prints out the pairs of [b,a] with an empty output when there are none.
Try it online!
How?
*Iċ³ - Link 1, isValid?: pair of +ve integers, [b,a]; +ve integer, n
*    - exponentiate             -> [b^n,a^n]
 I   - incremental differences  -> [a^n-b^n]
   ³ - program's third argument -> i
  ċ  - count occurrences        -> 1 if a^n-b^n == i, otherwise 0

ṗ2çÐf - Main link: +ve integer i, +ve integer n
ṗ2    - second Cartesian power = [[1,1],[1,2],...,[1,i],[2,1],...,[2,i],...,[i,i]]
   Ðf - filter keeping if:
  ç   -   call last link (1) as a dyad (left = one of the pairs, right = n)
      - implicit print of Jelly representation of the list

Okay fine. You can keep it as you wish.

JavaScript (ES7), 64 bytes
A recursive function taking input in currying syntax (n)(p). Returns a space-separated list of pairs of integers, or an empty string if no solution exists. Uses the same algorithm as user202729's Python answer.
n=>p=>(g=x=>x--?((y=(x**p+n)**(1/p))%1?[]:[y,x]+' ')+g(x):[])(n)

Or 60 bytes with 0-terminated, encapsulated arrays:
n=>p=>(g=x=>x--&&((y=(x**p+n)**(1/p))%1?g(x):[y,x,g(x)]))(n)

This would output [ 9, 7, [ 6, 2, 0 ] ] for f(32)(2).
Test cases

let f =

n=>p=>(g=x=>x--?((y=(x**p+n)**(1/p))%1?[]:[y,x]+' ')+g(x):[])(n)

console.log(f(50)(2))
console.log(f(32)(2))
console.log(f(7)(3))
console.log(f(665)(6))

Pyth, 14 bytes
f/.+^RvzTQ^SQ2

Try it here!, Alternative!

Octave, 80 bytes
function r=f(n,p)[X Y]=meshgrid(1:n,1:n);r=[X(:) Y(:)](X(:).^p-Y(:).^p==n,:);end

Try it online!

Perl 6, 45 bytes
->\k,\n{grep * **n-* **n==k,flat 1..k X 1..k}

Try it online!


text:
Generate combinations that add up to a target value
Challenge
Suppose you have a list of numbers, and a target value. Find the set of all combinations of your numbers which add up to the target value, returning them as list indices.
Input and Output
The input will take a list of numbers (not necessarily unique) and a target summation number. The output will be a set of non-empty lists, each list containing integer values corresponding to the position of the values in the original input list.
Examples
Input: values = [1, 2, 1, 5], target = 8
Output: [ [0,1,3], [1,2,3] ]

Input: values = [4.8, 9.5, 2.7, 11.12, 10], target = 14.8
Output: [ [0,4] ]

Input: values = [7, 8, 9, -10, 20, 27], target = 17
Output: [ [1,2], [0,3,4], [3,5] ]

Input: values = [1, 2, 3], target = 7
Output: [ ]

Scoring
This is code-golf, so the shortest code wins!

Related, possibly a dupe.

I think this is a dupe but I would rather close the older one because it is outdated.

Do floating point numbers really add something to the challenge? Not sure what the consensus is, but they will probably lead to precision errors in many languages.

I was intending to allow for floating points, yes

Bleh, indices? I think this would be a nicer challenge returning a list of values, though I guess that raises a question with how repeated values are dealt with in subsets.

@HeebyJeebyMan Have you "close the older one"?

@user202729 I have voted to now.  Prior I was unable to because this one had no answers.

Husk, 10 bytes
ηλfo=¹ṁ⁰tṖ

1-indexed. Try it online!
Explanation
ηλfo=¹ṁ⁰tṖ  Inputs are a number n (explicit, accessed with ¹) and a list x (implicit).
η           Act on the incides of x
 λ          using this function:
         Ṗ   Take all subsets,
        t    remove the first one (the empty subset),
  f          and keep those that satisfy this:
      ṁ⁰      The sum of the corresponding elements of x
   o=¹        equals n.

This uses the latest addition to Husk, η (act on indices).
The idea is that η takes a higher order function α (here the inline lambda function) and a list x, and calls α on the indexing function of x (which is ⁰ in the above program) and the indices of x.
For example, ṁ⁰ takes a subset of indices, maps indexing to x over them and sums the results.

JavaScript (ES6), 96 bytes
Takes input in currying syntax (list)(target).
a=>s=>a.reduce((b,_,x)=>[...b,...b.map(y=>[...y,x])],[[]]).filter(b=>!b.reduce((p,i)=>p-a[i],s))

Test cases
This would fail on the 2nd test case if 4.8 and 10 were swapped because of an IEEE 754 precision error -- i.e. 14.8 - 4.8 - 10 == 0 but 14.8 - 10 - 4.8 != 0. I think this is fine, although there may be a more relevant reference somewhere in meta.

let f =

a=>s=>a.reduce((b,_,x)=>[...b,...b.map(y=>[...y,x])],[[]]).filter(b=>!b.reduce((p,i)=>p-a[i],s))

console.log(JSON.stringify(f([1, 2, 1, 5])(8)))
console.log(JSON.stringify(f([4.8, 9.5, 2.7, 11.12, 10])(14.8)))
console.log(JSON.stringify(f([7, 8, 9, -10, 20, 27])(17)))
console.log(JSON.stringify(f([1, 2, 3])(7)))

Commented
a => s =>                 // given an array a[] of length N and an integer s
  a.reduce((b, _, x) =>   // step #1: build the powerset of [0, 1, ..., N-1]
    [ ...b,               //   by repeatedly adding to the previous list b[]
      ...b                //   new arrays made of:
      .map(y =>           //     all previous entries stored in y[]
        [...y, x]         //     followed by the new index x
      )                   //   leading to:
    ],                    //   [[]] -> [[],[0]] -> [[],[0],[1],[0,1]] -> ...
    [[]]                  //   we start with a list containing an empty array
  )                       // end of reduce()
  .filter(b =>            // step #2: filter the powerset
    !b.reduce((p, i) =>   //   keeping only entries b
      p - a[i],           //     for which sum(a[i] for i in b)
      s                   //     is equal to s
    )                     //   end of reduce()
  )                       // end of filter()

Not one but two reduces? I've got to upvote this.

@Neil The lesser known "reduceMapReduce"

J, 32 31 bytes
(=1#.t#])<@I.@#t=.1-[:i.&.#.1"0

Try it online!
                  1-[:i.&.#.1"0         Make a list of all masks
                                        for the input list. We flip the bits
                                        to turn the unnecessary (0...0)
                                        into (1...1) that would be missing.
                                        Define it as t.

(=1#.t#])                               Apply the masks, sum and
                                        compare with the target

         <@I.@#                         Turn the matching masks into
                                        lists of indices

I feel like an explicit definition would help given all of the compositions, but unfortunately I only got the same length: 4 :'<@I.t#~x=1#.y#~t=.#:}.i.2^#y'. Try it online!

Python 2, 110 bytes
lambda a,n:[b for b in[[i for i in range(len(a))if j&1<<i]for j in range(2**len(a))]if sum(a[c]for c in b)==n]

Try it online!

R, 85 84 bytes
function(l,k){N=combn
o={}
for(i in I<-1:sum(l|1))o=c(o,N(I,i,,F)[N(l,i,sum)==k])
o}

Try it online!
1-indexed.
combn usually returns a matrix, but setting simplify=F returns a list instead, allowing us to concatenate all the results together. combn(I,i,,F) returns all combinations of indices, and we take N(l,i,sum)==k as an index into that list to determine those which equal k.

Japt, 14 bytes
m, à f_x!gU ¥V

Test it online!
How it works
m, à f_x!gU ¥V   Implicit: U = input array, V = target sum
m,               Turn U into a range [0, 1, ..., U.length - 1].
   à             Generate all combinations of this range.
     f_          Filter to only the combinations where
       x           the sum of
        !gU        the items at these indices in U
            ¥V     equals the target sum.
                 Implicit: output result of last expression

Nice trick with m,. I had Êo à k@VnXx@gX for the same byte count.

Clean, 104 102 98 bytes
import StdEnv
@n=[[]:[[i:b]\\i<-[0..n-1],b<- @i]]
?l n=[e\\e<-tl(@(length l))|sum(map((!!)l)e)==n]

Try it online!

[1, 2, -1, 5] 0  --> [[],[2,0]] A set of non-empty lists is required.

@FrownyFrog Fixed

Jelly, 11 bytes
ị³S=
JŒPçÐf

Try it online!
1-indexed. 4 bytes spent on returning indices rather than just the elements themselves.
-1 byte thanks to user202729
-1 byte thanks to Jonathan Allan

12 bytes

@user202729 Cool, thanks!

-1 byte: The ⁴ is unnecessary if you use ç rather than Ç.

@JonathanAllan o good catch thanks!

Haskell, 76 bytes
x#t=[i|i<-tail$concat<$>mapM(\z->[[],[z]])[0..length x-1],t==sum[x!!k|k<-i]]

Try it online!

[1, 2, -1, 5]#0 --> [[],[0,2]] A set of non-empty lists is required.

@FrownyFrog Thanks! Fixed.

Wolfram Language (Mathematica), 43 bytes
1-indexed.
Pick[s=Subsets;s@Range@Tr[1^#],Tr/@s@#,#2]&

Try it online!

Python 3, 144 bytes
lambda a,t:[[e for e,_ in x]for r in range(len(a))for x in combinations(list(enumerate(a)),r+1)if sum(y for _,y in x)==t]
from itertools import*

Try it online!
0-indexed. 44 bytes spent on returning indices rather than just the elements themselves.

Brachylog, 18 15 bytes
hiᶠ⊇Shᵐ+~t?∧Stᵐ

Try it online!
-3 bytes because it now works as a generator. (It's probably possible to golf more, but working around the need to use indices is awkward.)
    S              The variable S
   ⊇               is a sublist of
  ᶠ                the list of all
 i                 pairs [element, index] from
h                  the first element of
                   the input;
     hᵐ            the first elements of each pair
       +           add up to
        ~t         the last element of
          ?        the input
           ∧       which isn't necessarily
            S      S,
             tᵐ    from which the last elements of each pair
                   are output.

hiᶠ⊇z+ʰXh~t?∧Xt comes out to the same length.

Perl 6, 45 bytes
->\a,\b{grep {a[$_].sum==b},^a .combinations}

Test it
Expanded:
->
  \a, # input list
  \b, # input target
{

  grep

  {
      a[ $_ ].sum # use the list under test as indexes into ｢a｣
    ==
      b
  },

  ^a              # Range upto ｢a｣ (uses ｢a｣ as a number)
  .combinations   # get all of the combinations
}

APL(NARS), 49 chars, 98 bytes
{∨/b←⍺=+/¨{∊⍵⊂w}¨n←{⍵⊤⍨k⍴2}¨⍳¯1+2*k←≢w←⍵:⍸¨b/n⋄⍬}

1-indexed; test:
  f←{∨/b←⍺=+/¨{∊⍵⊂w}¨n←{⍵⊤⍨k⍴2}¨⍳¯1+2*k←≢w←⍵:⍸¨b/n⋄⍬}
  ⎕fmt 8 f 1 2 1 5
┌2──────────────┐
│┌3────┐ ┌3────┐│
││2 3 4│ │1 2 4││
│└~────┘ └~────┘2
└∊──────────────┘
  ⎕fmt   14.8  f  4.8 9.5 2.7 11.12 10
┌1────┐
│┌2──┐│
││1 5││
│└~──┘2
└∊────┘
  ⎕fmt 17 f 7, 8, 9, ¯10, 20, 27
┌3──────────────────┐
│┌2──┐ ┌2──┐ ┌3────┐│
││4 6│ │2 3│ │1 4 5││
│└~──┘ └~──┘ └~────┘2
└∊──────────────────┘
  ⎕fmt 7 f 1 2 3
┌0┐
│0│
└~┘

comment:
{∨/b←⍺=+/¨{∊⍵⊂w}¨n←{⍵⊤⍨k⍴2}¨⍳¯1+2*k←≢w←⍵:⍸¨b/n⋄⍬}
                             ⍳¯1+2*k←≢w←⍵         copy ⍵ in w, len(⍵) in k, return 1..2^(k-1)
                 n←{⍵⊤⍨k⍴2}¨                     traslate in binary each element of  1..2^(k-1) and assign the result to n
          {∊⍵⊂w}¨                                for each binary element of n return the elemets of ⍵ in the place where there are the 1s
    b←⍺=+/¨                                       sum them and see if the sum is ⍺, that binary array saved in b
  ∨/                                     :⍸¨b/n   if or/b, get all the elements of n that are 1s for array b, and calculate each all indexs
                                               ⋄⍬ else return Zilde as void set

Pyth, 11 bytes
fqvzs@LQTyU

Try it online here, or verify all the test cases at once here.
fqvzs@LQTyUQ   Implicit: Q=input 1 (list of numbers), z=input 2 (target value, as string)
               Trailing Q inferred
          UQ   Generate range [0-<length of Q>)
         y     Powerset of the above
f              Keep elements of the above, as T, when the following is truthy:
      L T        Map elements of T...
     @ Q         ... to the indicies in Q
    s            Take the sum
 q               Is the above equal to...
  vz             z as an integer
               Implicit print of the remaining results