text:
Print this diamond
This question has been spreading like a virus in my office. There are quite a variety of approaches:
Print the following:
        1
       121
      12321
     1234321
    123454321
   12345654321
  1234567654321
 123456787654321
12345678987654321
 123456787654321
  1234567654321
   12345654321
    123454321
     1234321
      12321
       121
        1

Answers are scored in characters with fewer characters being better.

What is the winning criterion ? And is this a challenge or a golf ?

I read "kolmogorov-complexity" as "code-golf".

@DavidCarraher "kolmogorov-complexity" was edited in after the question was asked. The original questioner has not specified the winning criteria yet.

@Gareth My comment was made after the "kolmogorov-complexity" tag was added but before the "code-golf" tag was added. At that time people were still be asking whether it was a code-golf question.

http://www.perlmonks.com/?node_id=891559 has perl solutions.

If you drop by PPCG again some time, I think you should update the accepted answer to the one in J.

@MartinBüttner not following you here. Not sure which answer you seem correct.

@EricWilson As far as I can tell, this is the shortest answer.

J, 29 26 24 23 22 21 chars
,.(0&<#":)"+9-+/~|i:8

Thanks to FUZxxl for the "+ trick  (I don't think I've ever used u"v before, heh).
Explanation
                  i:8  "steps" vector: _8 _7 _6 ... _1 0 1 ... 7 8
                 |     magnitude
              +/~      outer product using +
            9-         inverts the diamond so that 9 is in the center
  (      )"+           for each digit:
      #                  copy
   0&<                   if positive then 1 else 0
       ":                copies of the string representation of the digit
                         (in other words: filter out the strictly positive
                          digits, implicitly padding with spaces)
,.                     ravel each item of the result of the above
                       (necessary because the result after `#` turns each
                        scalar digit into a vector string)

Instead of "0], write "+.

For one less character, write ,.0(<#":)"+9-+/~|i:8

Here is your solution translated to 25 characters of APL: ⍪↑{(0<⍵)/⍕⍵}¨9-∘.+⍨|9-⍳17

This here is peak J

Clojure, 191 179 bytes
#(loop[[r & s](range 18)h 1](print(apply str(repeat(if(< r 8)(- 8 r)(- r 8))\ )))(doseq[m(concat(range 1 h)(range h 0 -1))](print m))(println)(if s(recur s((if(< r 8)inc dec)h))))

-12 bytes by changing the outer doseq to a loop, which allowed me to get rid of the atom (yay).
A double "for-loop". The outer loop (loop) goes over each row, while the inner loop (doseq) goes over each number in the row, which is in the range (concat (range 1 n) (range n 0 -1)), where n is the highest number in the row.
(defn diamond []
  (let [spaces #(apply str (repeat % " "))] ; Shortcut function that produces % many spaces
    (loop [[row-n & r-rows] (range 18) ; Deconstruct the row number from the range
           high-n 1] ; Keep track of the highest number that should appear in the row
      (let [top? (< row-n 8) ; Are we on the top of the diamond?
            f (if top? inc dec) ; Decided if we should increment or decrement
            n-spaces (if top? (- 8 row-n) (- row-n 8))] ; Calculate how many prefix-spaces to print
        (print (spaces n-spaces)) ; Print prefix-spaces
        (doseq [m (concat (range 1 high-n) (range high-n 0 -1))] ; Loop over the row of numbers
          (print m)) ; Print the number
        (println)

        (if r-rows
          (recur r-rows (f high-n)))))))

Due to a bug in the logic in my first attempt (accidentally inserting the prefix-spaces between each number instead), I managed to get this:
1
1       2       1
1      2      3      2      1
1     2     3     4     3     2     1
1    2    3    4    5    4    3    2    1
1   2   3   4   5   6   5   4   3   2   1
1  2  3  4  5  6  7  6  5  4  3  2  1
1 2 3 4 5 6 7 8 7 6 5 4 3 2 1
12345678987654321
1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1
1  2  3  4  5  6  7  8  9  8  7  6  5  4  3  2  1
1   2   3   4   5   6   7   8   7   6   5   4   3   2   1
1    2    3    4    5    6    7    6    5    4    3    2    1
1     2     3     4     5     6     5     4     3     2     1
1      2      3      4      5      4      3      2      1
1       2       3       4       3       2       1
1        2        3        2        1
1         2         1

Not even correct ignoring the obvious bug, but it looked cool.

That's a super-pretty bug. Perhaps there should be a challenge to generate that...

the bugged output also incorrectly contains a 10.

APL (33 31)
A⍪1↓⊖A←A,0 1↓⌽A←⌽↑⌽¨⍴∘(1↓⎕D)¨⍳9

If spaces separating the numbers are allowed (as in the Mathematica entry), it can be shortened to 28 26:
A⍪1↓⊖A←A,0 1↓⌽A←⌽↑⌽∘⍕∘⍳¨⍳9

Explanation:

(Long program:)
⍳9: a list of the numbers 1 to 9
1↓⎕D: ⎕D is the string '0123456789', 1↓ removes the first element
⍴∘(1↓⎕D)¨⍳9: for each element N of ⍳9, take the first N elements from 1↓⎕D. This gives a list: ["1", "12", "123", ... "123456789"] as strings
⌽¨: reverse each element of this list. ["1", "21", "321"...]
(Short program:)
⍳¨⍳9: the list of 1 to N, for N [1..9]. This gives a list [[1], [1,2], [1,2,3] ... [1,2,3,4,5,6,7,8,9]] as numbers.
⌽∘⍕∘: the reverse of string representation of each of these lists. ["1", "2 1"...]
(The same from now on:)
A←⌽↑: makes a matrix from the list of lists, padding on the right with spaces, and then reverse that. This gives the upper quadrant of the diamond. It is stored in A.
A←A,0 1↑⌽A: A, with the reverse of A minus its first column attached to the right. This gives the upper half of the rectangle. This is then stored in A again.
A⍪1↓⊖A: ⊖A is A mirrored vertically (giving the lower half), 1↓ removes the top row of the lower half and A⍪ is the upper half on top of 1↓⊖A.

+1 Amazing. Could you translate it for us APL illiterates?

Shouldn't non-ascii code be counted in UTF-8 instead of code-points? This would push APL closer to his earthly relatives.

@JanDvorak No, since there is an APL code page, which fits the entire character set into a single byte. But I think you've probably figured this out at some point since 2013. ;)

Mathematica 83  49 43 54 51
Print@@#&/@(Sum[k~DiamondMatrix~17,{k,0,8}]/.0->" ")

With 3 bytes saved thanks to Kelly Lowder.
Analysis
The principal part of the code, Sum[DiamondMatrix[k, 17], {k, 0, 8}], can be checked on WolframAlpha.
The following shows the underlying logic of the approach, on a smaller scale.
a = 0~DiamondMatrix~5;
b = 1~DiamondMatrix~5;
c = 2~DiamondMatrix~5;
d = a + b + c;
e = d /. 0 -> "";
Grid /@ {a, b, c, d, e}

David, you beat me this time! :-)

Another try (55 chars): f = Table[# - Abs@k, {k, -8, 8}] &; f[f[9]] /. n_ /; n < 1 -> "" // Grid

Still another (71 chars): Table[9 - ManhattanDistance[{9, 10}, {j, k}], {j, 18}, {k, 18}] /.    n_ /; n < 1 -> "" // Grid

Grid@#@#@9&[Table[#-Abs@k,{k,-8,8}]&]/.n_/;n<1->"" 50 chars.

A visual display of the code: ArrayPlot[Sum[k~DiamondMatrix~17, {k, 0, 8}], AspectRatio -> 2]

Print@@#&/@(Sum[k~DiamondMatrix~17,{k,0,8}]/. 0->" ") is 3 characters shorter and preserves the lack of spacing between characters

@Kelly, Yes, thanks.

Python 2, 72 69 67 61
Not clever:
s=str(111111111**2)
for i in map(int,s):print'%8s'%s[:i-1]+s[-i:]

doesn't work in Python 3+, which requires parens around the arguments to print :(

@Griffin: In code golf I choose Python 2 or Python 3 depending on whether I need print to be a function.

s=\0x2bdc546291f4b1``

@gnibbler.  Very clever suggestion.  Unfortunately, the repr of that hexadecimal includes a trailing 'L'.

How about s=`111111111**2`? It works for me with 2.7.5 - what version are you running?

@gnibbler: This works in Python running on 64-bit platforms, but not on 32-bit platforms.

C (gcc), 79 bytes
v;main(i){for(;i<307;putchar(i++%18?v>8?32:57-v:10))v=abs(i%18-9)+abs(i/18-8);}

Try it online!

Explanation please?

@LucasHenrique 307 characters total. i%18-9 is x value on cartesian plane mirroring itself on the y-axis. i/18-8 is y value on cartesian plane mirroring itself on the x-axis. Sum them together to get 1:1 diagonal (which causes numeric shift to form on 1:1 diamond. (32:57)-v is unichar numeric value for ASCII 0-9. 10 new line.

Python 2, 60 59 bytes
for n in`111111111**2`:print`int('1'*int(n))**2`.center(17)

Try it online!
Abuses backticks and repunits.

The space after in keyword can be removed, just like you did with print keyboard.

I get an extra L in the middle seven lines of output.

You shouldn't...what version of Python are you using?

GolfScript, 33 31 30 bytes
Another GolfScript solution
17,{8-abs." "*10@-,1>.-1%1>n}%

Try it online!
Thank you to @PeterTaylor for another char.
Previous versions:
17,{8-abs" "*9,{)+}/9<.-1%1>+}%n*

Try it online!
17,{8-abs" "*9,{)+}/9<.-1%1>n}%

Try it online!

You don't need the trailing spaces (the text in the question doesn't have them), so you can skip adding the numbers to the spaces and save one char as 17,{8-abs." "*10@-,1>.-1%1>n}%

Javascript, 114
My first entry on Codegolf!

for(l=n=1;l<18;n-=2*(++l>9)-1,console.log(s+z)){for(x=n,s="";x<9;x++)z=s+=" ";for(x=v=1;x<2*n;v-=2*(++x>n)-1)s+=v}

If this can be shortened any further, please comment :)

damn it!! I missed the space and made half diamond. I must sleep now

Mathematica 55 50 45 41 38
(10^{9-Abs@Range[-8,8]}-1)^2/81//Grid

Grid[(10^Array[{9}-Abs[#-9]&,17]-1)^2/81]

Very nice work.

I echo David's remark.  How did you come up with this?

May I update your answer with the shorter modification I wrote?

@Mr.Wizard Certainly.

For the record: The  is the Transpose operator (put it in Mathematica)

Vim, 62 39 38 34 keystrokes
Thanks to @DJMcMayhem for saving a ton of bytes
Thanks to @AaronMiller for saving 4 bytes by generating 12345678987654321 in a different way
9i1<ESC>|C<C-r>=<C-r>"*<C-r>"
<ESC>qqYP9|xxI <ESC>YGpHq7@q

Try it online!
Explanation:
9i1<ESC>                            Write 9 '1's, leaving the cursor at the end of the line
        |C                          Go to the first column and cut all that's to the right of the cursor (implictly into register "), entering insert mode
          <C-r>=                    Enter an expression:
                <C-r>"*<C-r>"        The contents of register " multiplied with itself
                             <CR>   Evaluate it, yielding 12345678987654321

qq                                  Start recording into register q
  YP                                Yank this entire line and Paste above
    9|                              Go to the 9th column
      xx                            Delete character under cursor twice
        I <ESC>                     Go to the beginning of the line and insert a space and enter normal mode
               Y                    Yank this entire line
                G                   Go to the last line
                 p                  Paste in the line below
                  H                 Go to the first line
                   q                End recording
                    7@q             Repeat this 7 times

You can delete the ma and change \aitoI`.

Also, you could probably delete stage 3 if you change stage 1 to pasting above and below.

@DJMcMayhem Thank you for the suggestion! I initially was thinking about introducing a new register for the copied bits, but this is much shorter!

34 bytes by generating the 12345678987654321 mathematically. Readable version

@AaronMiller Thanks, updated.

PHP, 92 90 characters
<?for($a=-8;$a<9;$a++){for($b=-8;$b<9;){$c=abs($a)+abs($b++);echo$c>8?" ":9-$c;}echo"\n";}

Calculates and prints the Manhattan distance of the position from the centre. Prints a space if it's less than 1.
An anonymous user suggested the following improvement (84 characters):
<?for($a=-8;$a<9;$a++,print~õ)for($b=-8;$b<9;print$c>8?~ß:9-$c)$c=abs($a)+abs($b++);

2nd one doesn't work.

I know it's very late, but I always have a need to golf when I see PHP scripts. 83 bytes with <? skipped per meta. Also, you seem to have some encoding problems in the second code.

@Soaku The second one is not mine. It was suggested as an edit to my answer by an anonymous user. I just added it without checking - not really sure why the user didn't just post it as their own attempt really. The meta question post-dates this answer by almost 3 years.

I meant, that I don't include <? in the bytecount. I've made some other improvements too.

Very late to the party too, but you can replace "\n" by "
" (double quotes with litterally a new line inside, doesn't work in comments)

@Kaddath Thanks. For the one character saving, given that my PHP answer is way off the pace, I'm not sure it's worth causing confusion with a literal newline in this one.

Common Lisp, 113 bytes
(defun x(n)(if(= n 0)1(+(expt 10 n)(x(1- n)))))(dotimes(n 17)(format t"~17:@<~d~>~%"(expt(x(- 8(abs(- n 8))))2)))

Try it online!
First I noticed that the elements of the diamond could be expressed like so:
  1   =   1 ^ 2
 121  =  11 ^ 2
12321 = 111 ^ 2

etc.
x recursively calculates the base (1, 11, 111, etc), which is squared, and then printed centered by format. To make the numbers go up to the highest term and back down again I used (- 8 (abs (- n 8))) to avoid a second loop

JavaScript (V8), 81 bytes
for(i=9;--i+9;console.log(s))for(j=9;j;s=j--^9?k>0?k+s+k:" "+s:k+"")k=i<0?j+i:j-i

Try it online!

Running this in my browser shows the diamond, but on an additional line a -7

Charcoal, 13 bytes
Ｆ⁹«ＧX⁻⁹ιＩ⁺ι¹↓

Try it online!
How?
Draws nine, successively smaller, concentric number-diamonds on top of each other:
Ｆ⁹«   Loop ι from 0 to 8:
ＧX     Draw a (filled) polygon with four equilateral diagonal sides
⁻⁹ι      of length 9-ι
Ｉ⁺ι¹    using str(ι+1) as the character
↓       Move down one space before drawing the next one

This should be now competing as per new consensus in meta.

Regenerate, 109 108 bytes
(( {#2-1}| {8})($3${#3+1}|1)(${#4+1}$4|)\n){9}(( $6| )(${$7/10}|${$3/10})(${$8-1+1/$8*(#7-1)}|7){#7-1}\n){8}

Attempt This Online!
Explanation
The solution is divided into two parts, which generate the upper half of the diamond (including the center line) and the lower half, respectively. The upper half consists of group 1, repeated nine times (...\n){9}; the lower half consists of group 5, repeated eight times (...\n){8}.
The first part of each group handles the spaces. (I've replaced space with underscore in the explanations for better visibility.)
Upper-half spaces:
( {#2-1}| {8})
(            )  Group 2:
 _{#2-1}         Space, repeated one less time than the previous length of group 2
        |        Or, if this is the first row and there is no previous value of
                 group 2...
         _{8}    Space, repeated eight times

Lower-half spaces:
( $6| )
(     )  Group 6:
 _$6      Space, concatenated to the previous value of group 6
    |     Or, if this is the first row and there is no previous value of
          group 6...
     _    A single space

Now for the diamond itself. It can be divided into four quadrants, and I used three different approaches to generate them:
Top left & top right: concatenation
We generate the left half (including the center) of each row with group 3, and the right half with group 4. For both halves, observe that we can generate the next row by concatenating a digit to the previous row:
 1234 321
   |   |
   v   v
12345 4321

So we can use a similar approach to what we did for the bottom-half spaces. The only difference is that the character we're concatenating at each step needs to be calculated.
Top left quadrant:
($3${#3+1}|1)
(           )  Group 3:
 $3             Previous value of group 3
   ${    }      concatenated to the result of...
     #3+1       Previous length of group 3 plus 1
          |     Or, if this is the first row and there is no previous value of
                group 3...
           1    The digit 1

Top right quadrant:
(${#4+1}$4|)
(          )  Group 4:
 ${    }       The result of...
   #4+1        Previous length of group 4 plus 1
        $4     concatenated to the previous value of group 4
          |    Or, if this is the first row and there is no previous value of
               group 4...
               Empty string

Bottom left: integer division
We generate the left half (including the center) of each row with group 7. Observe that each row is obtained by removing the rightmost digit from the previous row:
12345
  |
  v
 1234

If we treat the entire thing as an integer, we can perform this transformation easily by dividing it by ten:
(${$7/10}|${$3/10})
(                 )  Group 7:
 ${     }             The result of...
   $7/10              Previous value of group 7, divided by 10
         |            Or, if there is no previous value of group 7...
          ${     }    The result of...
            $3/10     Group 3 (the final upper-left quadrant row) divided by 10

Bottom right: digit-by-digit
There isn't an easy way to remove a digit from the left side of a previous match, so for the right half of each bottom row, we resort to generating one digit at a time with group 8. Here are the first three rows that we need to generate:
7654321
654321
54321

Each digit is one less than the previous digit, except that we have to "reset" when we hit 1. The reset value is always one less than the length of the left half of the row, which we have access to as group 7.
How can we tell when we've hit 1? I used an integer-division trick I first developed for programming in Acc!!: if N is a positive integer, then 1/N will be one iff N = 1 and zero if N > 1. Multiplying this quantity by (length of group 7) - 1 gives us the reset we need.
(${$8-1+1/$8*(#7-1)}|7){#7-1}
(                     )        Group 8 (generates one digit at a time):
 ${                }            The result of...
   $8-1                         Previous value of group 8, minus 1
       +                        Plus
              #7-1              The length of group 7 minus 1
        1/$8*(    )             if the previous value of group 8 equals 1

                    |           Or, if there is no previous value of group 8...
                     7          The digit 7
                       {    }  Generate this many digits on each row:
                        #7-1   One less than the length of group 7

This language looks really cool! Funnily enough I was thinking about making a similar one a few weeks back, but figured it'd be too much work :p. Awarding the bounty now.

Uiua, 17 bytes
+@!÷⊃≥+8⊞+.↧⇌.⇡17

Try it on uiua.org/pad
We use ⇡17 to make a range from 0 to 16, and then min it by its reverse ↧⇌. to get
[0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0]

Then ⊞+. makes an addition table of this list with itself:
╭─
╷ 0 1  2  3  4  5  6  7  8  7  6  5  4  3  2 1 0
  1 2  3  4  5  6  7  8  9  8  7  6  5  4  3 2 1
  2 3  4  5  6  7  8  9 10  9  8  7  6  5  4 3 2
  3 4  5  6  7  8  9 10 11 10  9  8  7  6  5 4 3
  4 5  6  7  8  9 10 11 12 11 10  9  8  7  6 5 4
  5 6  7  8  9 10 11 12 13 12 11 10  9  8  7 6 5
  6 7  8  9 10 11 12 13 14 13 12 11 10  9  8 7 6
  7 8  9 10 11 12 13 14 15 14 13 12 11 10  9 8 7
  8 9 10 11 12 13 14 15 16 15 14 13 12 11 10 9 8
  7 8  9 10 11 12 13 14 15 14 13 12 11 10  9 8 7
  6 7  8  9 10 11 12 13 14 13 12 11 10  9  8 7 6
  5 6  7  8  9 10 11 12 13 12 11 10  9  8  7 6 5
  4 5  6  7  8  9 10 11 12 11 10  9  8  7  6 5 4
  3 4  5  6  7  8  9 10 11 10  9  8  7  6  5 4 3
  2 3  4  5  6  7  8  9 10  9  8  7  6  5  4 3 2
  1 2  3  4  5  6  7  8  9  8  7  6  5  4  3 2 1
  0 1  2  3  4  5  6  7  8  7  6  5  4  3  2 1 0
                                                 ╯

Now we do something clever. Let's call this array x. Then ⊃≥+8 pushes +8x and ≥8x, and ÷ divides the two.
╭─
╷ ∞  ∞  ∞  ∞  ∞  ∞  ∞  ∞  16 ∞  ∞  ∞  ∞  ∞  ∞  ∞  ∞
  ∞  ∞  ∞  ∞  ∞  ∞  ∞  16 17 16 ∞  ∞  ∞  ∞  ∞  ∞  ∞
  ∞  ∞  ∞  ∞  ∞  ∞  16 17 18 17 16 ∞  ∞  ∞  ∞  ∞  ∞
  ∞  ∞  ∞  ∞  ∞  16 17 18 19 18 17 16 ∞  ∞  ∞  ∞  ∞
  ∞  ∞  ∞  ∞  16 17 18 19 20 19 18 17 16 ∞  ∞  ∞  ∞
  ∞  ∞  ∞  16 17 18 19 20 21 20 19 18 17 16 ∞  ∞  ∞
  ∞  ∞  16 17 18 19 20 21 22 21 20 19 18 17 16 ∞  ∞
  ∞  16 17 18 19 20 21 22 23 22 21 20 19 18 17 16 ∞
  16 17 18 19 20 21 22 23 24 23 22 21 20 19 18 17 16
  ∞  16 17 18 19 20 21 22 23 22 21 20 19 18 17 16 ∞
  ∞  ∞  16 17 18 19 20 21 22 21 20 19 18 17 16 ∞  ∞
  ∞  ∞  ∞  16 17 18 19 20 21 20 19 18 17 16 ∞  ∞  ∞
  ∞  ∞  ∞  ∞  16 17 18 19 20 19 18 17 16 ∞  ∞  ∞  ∞
  ∞  ∞  ∞  ∞  ∞  16 17 18 19 18 17 16 ∞  ∞  ∞  ∞  ∞
  ∞  ∞  ∞  ∞  ∞  ∞  16 17 18 17 16 ∞  ∞  ∞  ∞  ∞  ∞
  ∞  ∞  ∞  ∞  ∞  ∞  ∞  16 17 16 ∞  ∞  ∞  ∞  ∞  ∞  ∞
  ∞  ∞  ∞  ∞  ∞  ∞  ∞  ∞  16 ∞  ∞  ∞  ∞  ∞  ∞  ∞  ∞
                                                     ╯

And now +@! adds these as offsets to the char ! (ASCII 33), which maps 16…24 to ASCII digits 1…9 but miraculously treats ∞ as -1 to produce a space (ASCII 32).
╭─
╷ "        1        "
  "       121       "
  "      12321      "
  "     1234321     "
  "    123454321    "
  "   12345654321   "
  "  1234567654321  "
  " 123456787654321 "
  "12345678987654321"
  " 123456787654321 "
  "  1234567654321  "
  "   12345654321   "
  "    123454321    "
  "     1234321     "
  "      12321      "
  "       121       "
  "        1        "
                      ╯

Ruby, 76 69 60 54 characters
(-8..8).map{i=_1.abs;puts' '*i+"#{eval(?1*(9-i))**2}"}

(Thanks, Patrick, G B, and Slim Liser!)
Improvements welcome. :)

69 chars: f=->x{[*1..x]+[*1...x].reverse};puts f[9].map{|i|(f[i]*'').center 17}

Great comment, I didn't know the '...' and didn't understand how this could work.

60 chars: [*-8..8].map{|i|puts' '*i.abs+"#{eval [?1*(9-i.abs)]*2*?*}"}

54 chars: (-8..8).map{i=_1.abs;puts' '*i+"#{eval(?1*(9-i))**2}"}. It's the same solution optimized.

PowerShell (2 options): 92 84 45 bytes
1..8+9..1|%{' '*(9-$_)+[int64]($x='1'*$_)*$x}
1..9+8..1|%{' '*(9-$_)+[int64]($x='1'*$_)*$x}

Thanks to Strigoides for the hint to use 1^2,11^2,111^2...

Shaved some characters by:

Eliminating $w.
Nested the definition of $x in place of its first use.
Took some clues from Rynant's solution:

Combined the integer arrays with + instead of , which allows elimination of the parenthesis around the arrays and a layer of nesting in the loops.
Used 9-$_ to calculate the length of spaces needed, instead of more complicated maths and object methods. This also eliminated the need for $y.

Explanation:
1..8+9..1 or 1..9+8..1 generates an array of integers ascending from 1 to 9 then descending back to 1.
|%{...} pipes the integer array into a ForEach-Object loop via the built-in alias %.
' '*(9-$_)+ subtracts the current integer from 9, then creates a string of that many spaces at the start of the output for this line.
[int64]($x='1'*$_)*$x defines $x as a string of 1s as long as the current integer is large. Then it's converted to int64 (required to properly output 1111111112 without using E notation) and squared.

You can save a byte by casting to a long instead of int64

Another way to save a byte 1..8+9..1|%{' '*(9-$_)+ +($x='1'*$_+'L')*$x}

APL (Dyalog Classic), 20 19 bytes
(⍉⊢⍪1↓⊖)⍣2⌽↑,⍨\1↓⎕d

Try it online!
⎕d are the digits '0123456789'
1↓ drop the first ('0')
,⍨\ swapped catenate scan, i.e. the reversed prefixes '1' '21' '321' ... '987654321'
↑ mix into a matrix padded with spaces:
1
21
321
...
987654321

⌽ reverse the matrix horizontally
(...)⍣2 do this twice:
⍉⊢⍪1↓⊖ the transposition (⍉) of the matrix itself (⊢) concatenated vertically (⍪) with the vertically inverted matrix (⊖) without its first row (1↓)

This doesn't work for me in Dyalog?  The ,⍨\1↓⎕d looks right, but adding the mix ↑ just results in 1.  If I enclose before mixing, I get something closer, but it's still printed all on one line...

@MarkReed what's your ⎕ml?

My comment disappeared and I thought it hadn't gone through, or I would have deleted it. Sorry! I thought I had tried different ⎕ml values, but it seems that my first attempt was under ⎕ml = 3; it works under lower levels.

Well, it works under ⎕ml = 1; it also fails under ⎕ml = 2.

Raku, 42 41 38 35 chars
say " "x 9-$_,(1 x$_)²for 1…9…1

Try it online!

@FrownyFrog Something did change in Perl 6 since this was written (this is a very old answer), fixed.

brainfuck, 158 154 bytes
++++++++[->+>++++>+>++++++<<<<]>>>++<<+[-[-<+>>.<]<[->+<]>>>>+>[->+<<.+>]>+[-<+<.->>]<<<.<<]>>>>-[<<<<+[-<+>>.<]<[->+<]>>>>>[->+<<+.>]>-[-<+<-.>>]<<-<.>>]

Try it online!
[spaceMem, spaceCount, space, lf, "0", numCount, numMem]
++++++++[->+>++++>+>++++++<<<<]>>>++<<+
[ for spaceCount
    -[- for spaceCount minus 1
        <+ inc spaceMem
        >>. print space
        < go to spaceCount
    ]
    <[->+<]> fetch spaceCount from spaceMem
    >>>+ inc number
    >[- for numCount
        >+  inc numMem
        <<.+ print and inc number
        >   go to numCount
    ]
    >+[- for numMem plus 1
        <+ inc numCount
        <.- print and decrement number
        >>  go to numMem
    ]
    <<<. print lf
    <<      go to spaceCount
]
>>>>-[      for numCount
    <<<<+[- for spaceCount plus 1
        <+ inc spaceMem
        >>. print space
        < go to spaceCount
    ]
        <[->+<]> fetch spaceCount from spaceMem
    >>> inc number
    >[- for numCount
        >+  inc numMem
        <<+. print and inc number
        >   go to numCount
    ]
    >-[- for numMem minus 1
        <+ inc numCount
        <-. print and decrement number
        >>  go to numMem
    ]
    <<-     decrement number
    <. print lf
    >> go to numCount
]

Python 3, 54 bytes
saved another 3 bytes by letting the int function crash instead of a loop condition. Thanks to dingledooper.
i=8
while[print(f'{int("1"*(9-abs(i)))**2:^17}')]:i-=1

Try it online!
Python 3, 57 bytes
saved 1 byte by using f-Strings thanks to dingledooper.
i=8
while i+9:print(f'{int("1"*(9-abs(i)))**2:^17}');i-=1

Try it online!
Python 3, 58 bytes
Even shorter solution by a different approach (prints one extra space at the beginning of each line).
i=8
while i+9:j=abs(i);i-=1;print(' '*j,int('1'*(9-j))**2)

Try it online!
Python 3, 61 bytes (without extra spaces)
i=8
while i+9:j=9-abs(i);i-=1;print(f'%{8+j}d'%int('1'*j)**2)

Try it online!
These are my previous solutions:
Python 3, 66 bytes
f=lambda c:f'%{8+c}d'%int('1'*c)**2
for c in f(9):print(f(int(c)))

Try it online!
Python 3, 71 bytes:
f=lambda c:str(int('1'*int(c))**2)
for c in f(9):print(f(c).center(17))

Try it online!

Here's 57 bytes using f-strings. In addition, there's this magical 54 byte solution which works because int() throws an error on an empty string.

JavaScript (V8), 67 bytes
z="9"
for(z of(s=n=>n<z?n+s(n+1)+n:z)(1))print("".padEnd(9-z)+s(1))

One byte less thanks to Fhuvi
Try it online!
JavaScript (V8), 68 bytes
s=n=>n<z?n+s(n+1)+n:z
z="9"
for(z of s(1))print("".padEnd(9-z)+s(1))

Try it online!

You can gain 1 byte by declaring the recursive function the first time you use it (because it allows to get rid of the space after the of) : Try it online!
FIY, since your code is the shortest JS answer for this challenge, i took the liberty to re-use it for another challenge :) https://codegolf.stackexchange.com/a/263329/116582

k (64 50 chars)
-1'(::;1_|:)@\:((|!9)#'" "),'$i*i:"J"$(1+!9)#'"1";

Old method:

-1',/(::;1_|:)@\:((|!9)#\:" "),',/'+(::;1_'|:')@\:i#\:,/$i:1+!9;

(1+!9)#'"1" is ,\9#"1"

R, 71 bytes
For the records:
s=c(1:9,8:1);for(i in s)cat(rep(" ",9-i),s[0:i],s[(i-1):0],"\n",sep="")

Try it online!

+1 - can save a few with message(rep(" ",9-i),s[c(1:i,i:1-1)])

@flodel you'd have to note that that prints to stderr, and you could also do for(i in s<-c(1:9,8:1))... to save a byte

64 bytes

CJam, 31 27 bytes
CJam is a lot newer than this challenge, so this answer is not eligible for being accepted. This was a neat little Saturday evening challenge, though. ;)
8S*9,:)+9*9/2%{_W%1>+z}2*N*

Test it here.
The idea is to form the upper left quadrant first. Here is how that works:
First, form the string "        123456789", using 8S*9,:)+. This string is 17 characters long. Now we repeat the string 9 times, and then split it into substrings of length 9 with 9/. The mismatch between 9 and 17 will offset every other row one character to the left. Printing each substring on its own line we get:
        1
23456789
       12
3456789
      123
456789
     1234
56789
    12345
6789
   123456
789
  1234567
89
 12345678
9
123456789

So if we just drop every other row (which conveniently works by doing 2%), we obtain one quadrant as desired:
        1
       12
      123
     1234
    12345
   123456
  1234567
 12345678
123456789

Finally, we mirror this twice, transposing the grid in between to ensure that the two mirroring operations go along different axes. The mirroring itself is just
_      "Duplicate all rows.";
 W%    "Reverse their order.";
   1>  "Discard the first row (the centre row).";
     + "Add the other rows.";

Lastly, we just join all lines with newlines, with N*.

jq -rn, 76 65 60 59 bytes
-6 bytes thanks to ovs and another -6 (plus -5 more indirectly) thanks to Michael Chatiskatzi
def r:range(9),7-range(8);r|[8-.-r|"\(" "*.//1-.)"[:1]]|add

Try it online!
Explanation
The -n flag specifies that there is no input; the -r flag outputs the result strings, each on its own line, without quotes.
def r:         Define a helper function r
range(9),      which generates the numbers 0 through 8, followed by
7 - range(8);  the numbers 7 through 0
               Main program:
r |            Start with the results of r
[              For each of those numbers, put the following in a list:
 8 - . - r |    8, minus the current number, minus the results of calling r again
 "\(            For each of those numbers, interpolate the following into a string:
  " " * .        Try to repeat a space that many times
  //             and if the result is null (i.e. the number was less than 1),
  1 - .          subtract the number from 1 instead
 )"
 [:1]           Take the first character of each resulting string
] |            Take each resulting list of strings and
add            concatenate it together

To help visualize what's going on, here's what just the r|[8-.-r] part does:
[8,7,6,5,4,3,2,1,0,1,2,3,4,5,6,7,8]
[7,6,5,4,3,2,1,0,-1,0,1,2,3,4,5,6,7]
[6,5,4,3,2,1,0,-1,-2,-1,0,1,2,3,4,5,6]
[5,4,3,2,1,0,-1,-2,-3,-2,-1,0,1,2,3,4,5]
[4,3,2,1,0,-1,-2,-3,-4,-3,-2,-1,0,1,2,3,4]
[3,2,1,0,-1,-2,-3,-4,-5,-4,-3,-2,-1,0,1,2,3]
[2,1,0,-1,-2,-3,-4,-5,-6,-5,-4,-3,-2,-1,0,1,2]
[1,0,-1,-2,-3,-4,-5,-6,-7,-6,-5,-4,-3,-2,-1,0,1]
[0,-1,-2,-3,-4,-5,-6,-7,-8,-7,-6,-5,-4,-3,-2,-1,0]
[1,0,-1,-2,-3,-4,-5,-6,-7,-6,-5,-4,-3,-2,-1,0,1]
[2,1,0,-1,-2,-3,-4,-5,-6,-5,-4,-3,-2,-1,0,1,2]
[3,2,1,0,-1,-2,-3,-4,-5,-4,-3,-2,-1,0,1,2,3]
[4,3,2,1,0,-1,-2,-3,-4,-3,-2,-1,0,1,2,3,4]
[5,4,3,2,1,0,-1,-2,-3,-2,-1,0,1,2,3,4,5]
[6,5,4,3,2,1,0,-1,-2,-1,0,1,2,3,4,5,6]
[7,6,5,4,3,2,1,0,-1,0,1,2,3,4,5,6,7]
[8,7,6,5,4,3,2,1,0,1,2,3,4,5,6,7,8]

Any number that's greater than 0 gets turned into that many spaces (and then trimmed back to a single space). The other numbers gets subtracted from 1 (turning 0 .. -8 into 1 .. 9) and stringified.

tostring can be shortened to @sh here. In general @text and "\(.)" are equivalent with tostring.

And join("") can be shortened to add.

@ovs Very nice! I seem to have skipped over the @ functions when I was looking through the docs.

Applying this tip by ovs you can go down to 60 bytes.

@MichaelChatiskatzi Wow, that's a weird idiom. After some playing around, I found a different 60-byte solution that only uses //, which I like better, but thanks for inspiring me to look!

It does look better! With this new approach you can even save another byte with string interpolation.

jq -nr, 55 bytes
range(17)-8|fabs|" "*.+"123456789"[:9-.]+"87654321"[.:]

fabs is not supported on TIO but you can try it on https://jqplay.org/.
Alternatively try it on TIO with .*.|sqrt instead of fabs, for 59 bytes.

GolfScript, 36 bytes
Assuming that this is meant as a code-golf challenge, here's a basic GolfScript solution:
9,.);\-1%+:a{a{1$+7-.0>\" "if}%\;n}%

Try it online!

Perl, 43+1
adding +1 for -E which is required for say
say$"x(9-$_).(1x$_)**2for 1..9,reverse 1..8
edit: shortened a bit

Is +1 for -E standard? I mean perl -E is the same number of characters as perl -e. :)

Python, 65
for i in map(int,str(int('1'*9)**2)):print' '*(9-i),int('1'*i)**2

Try prepending I=int; to your code and replacing all subsequent instances of int with I

@Cyoce I had thought of that.  It would save 2 chars each time int is used, and it's used 3 times, so it saves 6 chars at a cost of 6 chars.

Bash, 126 109 87 chars
87:
q()(printf %$[9+$1%9]s\\n $[$2*$2];[ 7 -lt $1 ]||(q $[$1+1] ${2}1;q $[$1+9] $2))
q 0 1

As it usually goes, changing from iterative to recursive solution helps us win additional bytes.
Meaning of parameters to q:
$1 How much to remove from 8 to get the number of spaces in the beginning. Note value modulo 9 counts here (actual value is also a hint to quit recursion).
$2 The current chain of 1s to be squared and output by printf.
The  modus operandi  is:

output the sequence (ie. if $2 is 11111, output 123454321)
(if not yet at 12..9..21 - the recursive step)
2.1.  output the next sequence (here: 111111 > $2 , output 12345654321
2.2.  output the sequence once again (123454321).

In the step 2.2 , we pass (indent value + 9) instead of indent value however, so that the algoritm "knows" we are printing the row for the second time. Without this, the [ 7 -lt $1 ] would be false, causing us to retrigger the recursive step 1. This would never finish then.
The recursion goes like this:
q 0 1:                          1
 q 1 11:                       121
  q 2 111:                    12321
   q 3 1111:                 1234321
    q  4 11111:             123454321
     q  5 111111:          12345654321
      q  6 1111111:       1234567654321
       q  7 11111111:    123456787654321
        q  8 111111111: 12345678987654321
        q 16 11111111:   123456787654321
       q 15 1111111:      1234567654321
      q 14 111111:         12345654321
     q 13 11111:            123454321
    q 12 1111:               1234321
   q 11 111:                  12321
  q 10 11:                     121
 q  9 1:                        1

109:
p()(printf "%$[8+i]s\n" $[k*k])
k=;for i in `seq 9`;do k+=1;p;done;for i in `seq 8 -1 1`;do k=${k:1};p;done;

"k+=1" is much cheaper as k=$[10*k+1] , and for k being a string of ones it's the same. Same goes for ${k:1} and $[k/10] .

126:
p() (printf "%$[$1+i]s\n" $[k*k];)
k=1;for i in `seq 8`;do p 8;k=$[10*k+1];done;for i in `seq 8 -1 0`;do p 9;k=$[k/10];done;

I guess there may be even shorter solution, but weather is glorious, I can't stand sitting in front of computer any more :).

Try this, 80 chars:  https://tio.run/##S0oszvj/v1BDU6OgKDOvJE1BVSXaUlvFUNUytjgmJk9BJVrFSEvFKNZaQ0PF0M5cU7OmRqMQJGqobRirYKhiZA3lWcYqqBhpanIVKhgoGP7/DwA

Try even this, 74 chars:  https://tio.run/##S0oszvj/v1BDU6PcVqVa2bDWuqAoM68kTUFVJdpCuzy2OCYmT0ElWsVQS8Uw1lpDQ8XIzlxTs6ZGo1DBUMVQQaXculABSFtoanIBRRQM/v8HAA

Befunge-93, 155 chars
9:v:<,+55<v5*88<v-\9:$_68v
> v>     ^>3p2vpv  -1<!  *
, 1^  2p45*3+9<4:    ,:  +
g -^_75g94+4pg7^!    +^ ,<
1 : ^ `0    :-1$_:68*^$
^1_$:55+\-0\>:#$1-#$:_^

Try it online!
It could definitely be golfed more, but it's my first Funge program and my head already hurts. Had a lot of fun, though

Ruby, 55
puts (-8..8).map{|i|[?\s*a=i.abs,(?1*(9-a)).to_i**2]*''}

Output:
irb(main):342:0> puts (-8..8).map{|i|[?\s*a=i.abs,(?1*(9-a)).to_i**2]*''}
        1
       121
      12321
     1234321
    123454321
   12345654321
  1234567654321
 123456787654321
12345678987654321
 123456787654321
  1234567654321
   12345654321
    123454321
     1234321
      12321
       121
        1

JavaScript, 170 bytes
My first code golf :)
Golfed
a="";function b(c){a+=" ".repeat(10-c);for(i=1;i<c;i++)a+=i;for(i=2;i<c;i++)a+=c-i;a+="\n";}for(i=2;i<11;i++)b(i);for(i=9;i>1;i--)b(i);document.write("<pre>"+a+"</pre>");

Ungolfed
var str = "";
function row(line) {
    str += " ".repeat(10 - line);
    for (var i = 1; i < line; i++) {
        str += i;
    }
    for (var i = 2; i < line; i++) {
        str += line - i;
    }
    str += "\n";
}
for (var line = 2; line < 11; line++) {
    row(line);
}
for (var line = 9; line > 1; line--) {
    row(line);
}
document.write("<pre>" + str + "</pre>");

Welcome to PPCG!

Octave, 38 bytes
x=abs(-8:8);m=x+x';m(m>8)=25;[57-m,'']

To make it work in MATLAB too, you'd need to write x=ndgrid(abs(-8:8));m=x+x';m(m>8)=25;[57-m,''] or x=meshgrid(abs(-8:8));m=x+x';m(m>8)=25;[57-m,'']

Gaia, 9 bytes
9┅…ṫ¦€|ṫṣ

Explanation
9┅         Push [1 2 3 4 5 6 7 8 9]
  …        Prefixes; push [[1] [1 2] [1 2 3] ... [1 2 3 4 5 6 7 8 9]]
   ṫ¦      Palindromize each row: e.g. [1 2 3 4] -> [1 2 3 4 3 2 1]
     €|    Centre-align the rows, padding with spaces
       ṫ   Palindromize the rows
        ṣ  Join with newlines

Jelly,  22 18 12  11 bytes
9ŒḄr1z⁶ṚŒḄY

Try it online!
Done alongside caird coinheringaahing in chat.
How it works

9ŒḄr1z⁶ṚŒḄY - Full program.

9ŒḄ         - The list [1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1].
   r1       - Generate [N, N-1, ..., 1] for each N in ^.
     z⁶     - Zip; transpose ^ with filler spaces.
       Ṛ    - Reverse.
        ŒḄ  - Palindromize without vectorization.
          Y - Join by newlines.

Saved 6 bytes thanks to Leaky Nun!

12 bytes

11 bytes

05AB1E, 9 bytes
žh¦η€ûû.c

Try it online!

Canvas, 7 bytes
９｛Ｒ⇵］↶┼

Try it here!
Explanation:
9{R⇵]↶┼
9{  ]    map over i = 1..9
  R        push a range 1..i
   ⇵       and reverse that array
         in Canvas, an array of arrays is a list of lines,
          and the inner arrays are joined together
     ↶   rotate anti-clockwise
      ┼  and quad-palindromize with 1 overlap

I've just fixed a couple built-ins to make a 6 byte version possible:
９｛Ｒ］／┼

Try it here!
9{R]/┼
9{ ]    map over 1..9
  R       create a range 1..i
    /   pad with a diagonal of spaces
     ┼  and quad-palindromize

PICO-8, 131 bytes
cls()function _draw()for i=1,9do for j=i-9,0do for k=-1,1,2do for l=0,1do print(i,72*l-(l-0.5)*(i-j)*8,48+k*j*6)end end end end end

Output:

Ungolfed version:
cls()                               //clear screen
function _draw()                    //keeps commandline off
    for i=1,9 do                    //numbers
        for j=i-9,0 do              //position control
            for k=-1,1,2 do         //y axis switch
                for l=0,1 do        //x axis switch
                    print(i,72*l-(l-0.5)*(i-j)*8,48+k*j*6)
                end
            end
        end
    end
end

K (ngn/k), 24 bytes
`0:2{+x,1_|x}/-9$,\$1+!9

Try it online!
Takes a lot of inspiration from @zgrep's k answer.

$1+!9 generate "123456789"
,\ take the prefixes, i.e. (,"1";"12";"123";...)
-9$ left-pad each element to nine characters (e.g. ("        1";...))
2{...}/ set up a do-reduce, run twice on the above list

1_|x reverse the input, and drop the first character (e.g. "      123" => "21      ")
x, append this to the input
+ transpose the result, so that the next iteration works on the opposite axis

`0: print to stdout (suppressing implicit result)

Vyxal C, 7 bytes
9ɾKvṅʁ∞

Try it Online!

Bash, 65 bytes
for c in {1..9} {8..1};do printf %$[8+c]s\\n $[(10**c/9)**2];done

Try it online!

I want to upvote this more, for the cool math tricks

K (ngn/k), 21 bytes
Hard to do better than directly translating from ngn's APL.
2{+x,1_|x}/-9$,\$1+!9

Try it online!
2{+x,1_|x}/-9$,\$1+!9
                 1+!9 / 1 2...9
              ,\$     / string prefixes
           -9$        / left pad all to width 9
 {+x,1_|x}            / subroutine with argument x
       |x             /  reverse list x
     1_               /  drop first
   x,                 /  append to x
  +                   /  transpose as matrix of chars
2         /           / do that twice

Here's a fun different approach but I can only squeeze it down to 22.
($7-a+/:a&:|a:!17)@''1
            a:!17      / a is assigned 0 1...16
           |a          / reverse a -> 16 15...0
        a&             / min with a -> 0 1...7 8 7...0
        a :            / reassign to a
    a+/:a              / addition table of a with itself
                       / -> 0 in corners up to 16 in middle
  7-                   / subtract from 7
                       / -> 7 in corners down to -9 in middle
 $                     / convert to strings
(                )@''1 / 2nd character of each string
                       / -> space if 0...9, digit if negative

Perl 56 54 characters
Added 1 char for the -p switch.
Uses squared repunits to generate the sequence.
s//12345678987654321/;s|(.)|$/.$"x(9-$1).(1x$1)**2|eg

K, 59
-1'(-:'9+k,1_|k:!9)$,/'$b,1_||:'b:(-1_'a),'|:'a:1_1+!:'!10;

Groovy 77 75
i=(-8..9);i.each{a->i.each{c=a.abs()+it.abs();print c>8?' ':9-c};println""}

old version:
(-8..9).each{a->(-8..9).each{c=a.abs()+it.abs();print c>8?' ':9-c};println""}

added a 57 char groovy solution. You can replace both each with any to save two chars.

Scala - 86 characters
val a="543210/.-./012345";for(i<-a){for(j<-a;k=99-i-j)print(if(k<1)" "else k);println}

Javascript, 137
With recursion:
function p(l,n,s){for(i=l;i;s+=" ",i--);for(i=1;i<=n;s+=i++);for(i-=2;i>0;s+=i--);return(s+="\n")+(l?p(l-1,n+1,"")+s:"")}alert(p(8,1,""))

First time on CG :)

Or 118
If I can find a JS implementation that executes 111111111**2 with higher precision.
(Here: 12345678987654320).
a="1",o="\n";for(i=0;i<9;i++,o+="         ".substr(i)+a*a+"\n",a+="1");for(i=8;i;i--)o+=o.split("\n")[i]+"\n";alert(o)

111111111**2 yields 12345678987654320 with my browser too. But you can use one 1 less and get something useful too: '0'+11111111**2+'0' -> "01234567876543210" or use '0'+10*11111111**2 and shave of 1 more byte

GolfScript (27 chars)
17,{8-abs' '*1`9*1$,>~.*n}/

or
17,{8-abs' '*.1`9*+9<~.*n}/

Both work by building a suitable repunit as a string and then converting to int and squaring to get a Demlo number.

 APL (40)
r←{⍵,1↓⌽⍵}
{⎕←⍵,⍨' '⍴⍨(2×10-⌈/⍵)}¨r¨r⍳¨⍳9

I guess I'm not beating marinus. :p

PowerShell, 49 48
1..9+8..1|%{"  "*(9-$_)+(1..$_+($_-1)..0|?{$_})}

Nice solution, though it has a lot of spacing not called for in the challenge. Helped me trim mine down to half its original size.

APL, 24 chars
⍉⊃{⍕⍵↑⍨⍵>0}¨9-∘.+⍨|9-⍳17

Tested in Nars2000 and Dyalog (requires ⎕ML←3 in the latter.)
Explanation
                     ⍳17    starting with the naturals up to 17
                  |9-       generate the numbers from 8 to 0 and back to 8
              ∘.+⍨          make a table of their sum (with 0 in the middle)
            9-              turn it into a diamond with 9 in the middle
  {       }¨                for each number
    ⍵↑⍨⍵>0                  keep it only if it's positive
   ⍕                        then convert the result, if any, to a string
⍉⊃                          disclose the nested array and adjust the dimensions

The last step transposes the result, whose shape is 17 17 1 (because of the disclose ⊃ of nested strings) into 1 17 17, which gets printed like a plain 17 17.
Output
⍉⊃{⍕⍵↑⍨⍵>0}¨9-∘.+⍨|9-⍳17
        1
       121
      12321
     1234321
    123454321
   12345654321
  1234567654321
 123456787654321
12345678987654321
 123456787654321
  1234567654321
   12345654321
    123454321
     1234321
      12321
       121
        1

Take the train to save a byte: (⍕>∘0↑⊢)

05AB1E, 17 15 10 bytes
9LJ.pû€û.c

Try it online!

Based on Adnan's answer to a similar challenge, you can palindromize each substring and use the centering built-in: 9LJ.pû€û.c

Ruby 59
(-8..8).map{|i|puts' '*i.abs+"#{eval [?1*(9-i.abs)]*2*?*}"}

Deadfish, 1446 bytes
iisiisddddooooooooiiiiiiiiiiiiiiiiiodddddddddddddddddddddddddddddddddddddddoddddsddddoooooooiiiiiiiiiiiiiiiiioiododddddddddddddddddddddddddddddddddddddddoddddsddddooooooiiiiiiiiiiiiiiiiioioiodododddddddddddddddddddddddddddddddddddddddoddddsddddoooooiiiiiiiiiiiiiiiiioioioiododododddddddddddddddddddddddddddddddddddddddoddddsddddooooiiiiiiiiiiiiiiiiioioioioiodododododddddddddddddddddddddddddddddddddddddddoddddsddddoooiiiiiiiiiiiiiiiiioioioioioiododododododddddddddddddddddddddddddddddddddddddddoddddsddddooiiiiiiiiiiiiiiiiioioioioioioiodododododododddddddddddddddddddddddddddddddddddddddoddddsddddoiiiiiiiiiiiiiiiiioioioioioioioiododododododododddddddddddddddddddddddddddddddddddddddodddsoioioioioioioioiodododododododododddddddddddddddddddddddddddddddddddddddoddddsddddoiiiiiiiiiiiiiiiiioioioioioioioiododododododododddddddddddddddddddddddddddddddddddddddoddddsddddooiiiiiiiiiiiiiiiiioioioioioioiodododododododddddddddddddddddddddddddddddddddddddddoddddsddddoooiiiiiiiiiiiiiiiiioioioioioiododododododddddddddddddddddddddddddddddddddddddddoddddsddddooooiiiiiiiiiiiiiiiiioioioioiodododododddddddddddddddddddddddddddddddddddddddoddddsddddoooooiiiiiiiiiiiiiiiiioioioiododododddddddddddddddddddddddddddddddddddddddoddddsddddooooooiiiiiiiiiiiiiiiiioioiodododddddddddddddddddddddddddddddddddddddddoddddsddddoooooooiiiiiiiiiiiiiiiiioiododddddddddddddddddddddddddddddddddddddddoddddsddddooooooooiiiiiiiiiiiiiiiiiodddddddddddddddddddddddddddddddddddddddo

A more human friendly spaced version:
iisiisdddd oooooooo iiiiiiiiiiiiiiiii o dddddddddddddddddddddddddddddddddddddddo
ddddsdddd ooooooo iiiiiiiiiiiiiiiii oiodo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd oooooo iiiiiiiiiiiiiiiii oioiododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd ooooo iiiiiiiiiiiiiiiii oioioiodododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd oooo iiiiiiiiiiiiiiiii oioioioiododododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd ooo iiiiiiiiiiiiiiiii oioioioioiodododododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd oo iiiiiiiiiiiiiiiii oioioioioioiododododododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd o iiiiiiiiiiiiiiiii oioioioioioioiodododododododo dddddddddddddddddddddddddddddddddddddddo
ddds oioioioioioioioiododododododododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd o iiiiiiiiiiiiiiiii oioioioioioioiodododododododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd oo iiiiiiiiiiiiiiiii oioioioioioiododododododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd ooo iiiiiiiiiiiiiiiii oioioioioiodododododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd oooo iiiiiiiiiiiiiiiii oioioioiododododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd ooooo iiiiiiiiiiiiiiiii oioioiodododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd oooooo iiiiiiiiiiiiiiiii oioiododo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd ooooooo iiiiiiiiiiiiiiiii oiodo dddddddddddddddddddddddddddddddddddddddo
ddddsdddd oooooooo iiiiiiiiiiiiiiiii o dddddddddddddddddddddddddddddddddddddddo

Any way to run this myself?

https://esolangs.org/wiki/Deadfish has implementation for most of the common programming languages

Deadfish~ version.

Groovy, 62, 57 chars
((1..9)+(8..1)).any{println' '*(9-it)+('1'*it as int)**2}

old version:
((1..9)+(8..1)).any{println"${('1'*it as int)**2}".center(17)}

explanation: we create a list [1,2,...,9,8,7,..,1]. Within the closure we create strings '1', '11', '111,..., convert them to numbers, run power of two and center.

///, 233 bytes
        1
       121
      12321
     1234321
    123454321
   12345654321
  1234567654321
 123456787654321
12345678987654321
 123456787654321
  1234567654321
   12345654321
    123454321
     1234321
      12321
       121
        1

Try it online!
Yay.

This is a polyglot. It should work in PHP, and some others also.

@NoOneIsHere Yay.

Matlab 227 223 221 209 208 bytes
z=@cellfun;
C=z(@(a,b,c)[a b c fliplr([a b])],[mat2cell(repelem(' ',36),1,8:-1:1),{''}],[{''},mat2cell(nonzeros(tril(repmat(49:56,8,1))')',1,1:8)],num2cell(49:57),'un',0)';
z(@(c)disp(c),[C;flipud(C(1:end-1))])

k, 37 bytes
r:{x,1_|x};`0:`c$r@r'|8{32,-1_x}\49+!9

Try it online.

PHP, 99 91 81 byte
for($y=17;$y--;print"
")for($x=17;$x--;)echo($d=9-abs($x-8)-abs($y-8))>0?$d:" ";

run in command line
php -r "CODE_ABOVE"

18 bytes saved by Jörg Hülsermann

you must not use open tags if you run PHP from the commndline with the -r option , replacing while with for loops and removing unnessaary spaces ends in Try it online!

@JörgHülsermann It works in ubuntu, but not in tio.run Do you know why?

I understand not really the question cause I have linked a working tio.run example. tio.run is not the same as the command line so you need not to use options

@JörgHülsermann first i seen about r option. Second about for, new line and other hacks. In fact in tio don't support two line arguments

You need no arguments or input in this case and the bytecount is 80

@JörgHülsermann And how i can remove tags without commandline options?

Let us continue this discussion in chat.

74-1 bytes: while($p++<263)echo$p%17?($d=0|9-abs($p%17-8)-abs($p/17-8))>0?$d:" ":"\n"; (-1 with a physical linebreak). Run with php -nr '<code>'.TiO

@JörgHülsermann $argv and $argc are always set; at least if you run php from the command line. -r or -R are used to run snippets without tags. My guess is that tio.run and http://sandbox.onlinephpfunctions.com use exec php with a custom ini file (for timeout and forbidden functions).

Japt -R, 19 18 17 16 11 bytes
9õõ ®¬êÃê û

Test it

Nice, that’s what I had too

T-SQL, 116 115 bytes
DECLARE @ INT=8,@d INT=-1a:PRINT SPACE(@)+STUFF('12345678987654321',9-@,2*@,'')IF @=0SET @d=1SET @+=@d If @<9GOTO a

Pure procedural counter and loop, not very "SQL"-like, but the best I could come up with using what SQL offers. Formatted:
DECLARE @ INT=8, @d INT=-1
a:
    PRINT SPACE(@)+STUFF('12345678987654321',9-@,2*@,'')
    IF @=0 SET @d=1
    SET @+=@d
If @<9 GOTO a

Cuts a length out of a hard-coded string using STUFF. Would work just as easily with any other set of characters.

You can replace 10 with 9 and we get the same result (but saving 1 byte).

MATL, 18 bytes
9Zv-9Zvq!-t0>48*+c

Try it on MATL Online
9Zv - symmetric range from [1:9 8:-1:1]
-9Zv - reverse symmteric range, [9:-1:1 2:9]
q! - decrement that to [8:-1:0 1:8] and transpose to vertical
- - broadcast subtract - matrix of each value in the second range subtracted from each value in the first range
t0> - duplicate that and get a logical matrix of 1s where it's > 0, 0s elsewhere
48* - multiply by 48 to change 1s to 48s (ASCII '0')
+ - add that to the original matrix
c - convert to char and implicitly display

StupidStackLanguage, 468 bytes
avdqvdmffffffffqvvviifavvfblffffffflfifdflavvfbfffffflfififdfdflavvfbffffflfifififdfdfdflavvfbfffflfififififdfdfdfdflavvfbffflfifififififdfdfdfdfdflavvfbfflfififififififdfdfdfdfdfdflavvfbflfifififififififdfdfdfdfdfdfdfavvfbfififififififififdfdfdfdfdfdfdfdflavvfbflfifififififififdfdfdfdfdfdfdflavvfbfflfififififififdfdfdfdfdfdflavvfbffflfifififififdfdfdfdfdflavvfbfffflfififififdfdfdfdflavvfbffffflfifififdfdfdflavvfbfffffflfififdfdflavvfbffffffflfifdflavvfbfffffffflf

Try it online!
Explanation
Super simple, we just create a space and the number 1, then every line just increment and print then decrement and print

Wait, you're telling me this is a completely manual solution?!

Yeah lol, not very efficient at all but I didn't have much time writing this answer, it can probably be compacted hugely.

JavaScript (V8), 75 bytes
for(b of x="12345678987654321")print(b-9?"".padEnd(9-b)+"1".repeat(b)**2:x)

Try it online!
Doing the calculations 1**2, 11**2, 111**2, ...
This solution fixes the precision problem. It correctly produces a 1 at the end of the longest line instead of 0. I think, this one is the clearest of the short solutions for JavaScript.
Instead of x="12345678987654321" you could also write x=111111111**2/10+"1" which is equally short.

JavaScript (V8), 75 bytes
for(a=9;b=--a>0?9-a:9+a;print(s))for(s='',c=9;--c+b;)s+=c<0?b+c:c<b?b-c:' '

Try it online!

Clojure, 160 bytes
(run! #(println(reduce str "" %))(map (fn[i](map #(let[x(- (if(> % 9)(- 9(- % 9))%)(- 9 i))](if(pos? x)x " "))(range 1 18)))(concat(range 1 10)(range 8 0 -1))))

Welcome to this platform. Nice solution! Better than the other solution for Clojure! I suggest, you link your code with TIO as most of the other contributors have done: Try it online!

Have also a look at my solution: Clojure, 127

JavaScript (Node.js), 73 bytes
for(z of(s=z=>"".padEnd(9-z)+(BigInt(10**z)/9n)**2n)(9))console.log(s(z))

Try it online!

Zsh, 91 61 bytes
eval s+={1..9}';<<<${(l:8:)s%?}`rev<<<$s`;'>f;{<f;tac f}|uniq

Try it online!
eval s+={1..9}';<<<${(l:8:)s%?}`rev<<<$s`;'>f;{<f;tac f}|uniq

eval    {1..9}'                          ;'                    # evaluate this 9 times
     s+=       ;                                               #  append the number to s
                <<<                                            #  print
                   ${      s  }                                #   s
                            %?                                 #    with the last character removed
                     (l:8:)                                    #    padded to 8 spaces
                               `rev<<<$s`                      #   then s, reversed
                                          >f;                  # all output to the file f
                                              <f;              # print f
                                                 tac f         # print f in reverse
                                             {        }|uniq   # remove the duplicated line in the middle
```

Julia 1.0, 57 53 51 bytes
!i=[1:i;i-1:-1:1]
!9 .|>i->println(' '^(9-i),!i...)

Try it online!

Templates Considered Harmful, 267 255 bytes
Ap<Fun<If<A<1>,Cat<Ap<Fun<Cat<Ap<Fun<If<A<1>,Cat<Ap<A<0>,Sub<A<1>,T>>,SP>,LF>>,Sub<I<9>,A<1>>>,Ap<Fun<If<lt<A<1>,A<2>>,Cat<Cat<A<1>,Ap<A<0>,Add<A<1>,T>,A<2>>>,A<1>>,A<1>>>,T,A<1>>>>,If<lt<A<1>,I<9>>,A<1>,Sub<I<18>,A<1>>>>,Ap<A<0>,Sub<A<1>,T>>>,LF>>,I<17>>

Try it online!
Has leading and trailing whitespace -- sorry! tch has no concept of "empty string" (at least not that I've found)
I doubt the ungolfed version would answer any questions (probably the opposite). I like to think of TCH as a lisp-like language with no functions, loops, or variables, so all the logic is done through recursive lambdas.
The basic structure:
lambda:  (run lower lambdas with int 1,2,3...,17,18, join output)
   lambda:  (convert input, run lower lambdas, join output)
     lambda:  (int -> string of spaces & newline)
     lambda:  (int -> string of numbers)

Vyxal, 14 bytes
9ɾ∞(9n-Inɾ∞Jṅ,

Try it Online!
Explanation
9ɾ∞(9n-Inɾ∞Jṅ,
9ɾ∞             Palindromise range from 1-9 incl.
   (            Start loop
    9n-I        Push n-9 spaces
        nɾ∞     Palindromise range from 1-n
           J    Join spaces with range
            ṅ,  Join everything by nothing and print it out

get outgolfed lol

@Steffan what the heck

Go, 239 196 187 185 167 bytes
import(."fmt";."strings")
func g(i int){P:=Print
P(Repeat(" ",9-i))
j:=1
for;j<i;j++{P(j)}
for;j>0;j--{P(j)}
P(`
`)}
func f(){i:=1
for;i<9;i++{g(i)}
for;i>0;i--{g(i)}}

Attempt This Online!
My first attempt at golfing in Go.
-18 thanks to @c--
Commented (Old)
import (."fmt"; ."strings")        // Import modules for later
func g(i int) {                    // Helper function g taking an int i
P := Print                         //  Useful function for later
P(Repeat(" ", (9 - i)))            //  Repeat a space 9-i times and print
for j := 1; j <= i; j++ { P(j) }   //  Print each j for j in [1 .. i]
for k := i-1; k > 0; k-- { P(k) }  //  Print each k for k in [i .. 1]
P("\n") }                          //  Print a newline
func f(){                          // Function boilerplate
for i := 1; i < 10; i++ { g(i) }   //  Call g for each i in [1 .. 9]
for i := 8; i > 0; i-- { g(i) }}   //  Call g for each i in [8 .. 1]

Swift, 132 131 130 bytes
let r={(1..<$0)+(1...$0).reversed()}
r(9).map{(0...9-$0).map{$0
print(terminator:" ")}
r($0).map{print($0,terminator:"")}
print()}

owl lisp, 158 bytes
(map (λ (x) (map display (append (map (λ (_) " ") (iota 1 1 (- 10 x))) (iota 1 1 (+ 1 x)) (iota (- x 1) -1 0) `("\n")))) (append (iota 1 1 9) (iota 9 -1 0)))

un-golfed
(map (λ (x)
        (map display
             (append
               (map (λ (_) " ") (iota 1 1 (- 10 x)))
               (iota 1 1 (+ 1 x))
               (iota (- x 1) -1 0)
               `("\n"))))
     (append (iota 1 1 9)
             (iota 9 -1 0)))

Welcome to Code Golf, and nice first answer!

J, 20 bytes
(1{2{.":)@-9-+/~|i:8

Try it online! Exploits a few silly features of J, some of which are already present in other solutions.
(1{2{.":)@-9-+/~|i:8
                 i:8 NB. -8 -7 ... 7 8
                |    NB. abs
             +/~     NB. addition table: 16 in corner down to 0 in center
           9-        NB. subtract from 9: -7 in corner up to 9 in center
(       )@-          NB. for each number, negate and...
   2{.":             NB.  convert to string and right pad to width 2
 1{                  NB.  take second character

": prints negative signs so 2{.": gives a 2 character string which ends in a space for 0 through 9 and in a digit for -1 or less. Also of note is the symmetrical-integers-around-zero primitive i: which combines with absolute value | to give a terse palindrome of ints.

Jelly, 25 bytes
L_8Cx@32;
9RR€+48Ç€ŒBŒḄỌY

Definitely have some extra bytes because I get messed up on when and how things are converted to strings in jelly
L_8Cx@32;   # Replicate a space (ascii 32) 9-length amount of times
            # and prepend that to the original input

9RR€+48Ç€ŒBŒḄỌY
9R                 # [1..9]
  R€               # Each of those as a range
                   # [[1], [1,2], [1,2,3] ... ]
    +48            # Turn the number to ascii
       Ç€          # Call the space prepender (previous link) on each
         ŒB        # Mirror each element of the list
           ŒḄ      # Mirror the entire list (bottom half of diamond)
             ỌY    # Convert to characters and join with linefeeds

Welcome to code golf stack exchange, and nice submission! FYI, somebody already came up with a really cool 11-byte Jelly solution to this challenge: https://codegolf.stackexchange.com/a/145963/108687 You can search for submissions to a given challenge in a specific language by going to the search bar on that challenge’s page and typing inquestion:this jelly or whatever other language you’re looking for.

oh, thank you @noodleman

Javascript, 129* 126
for(i=1;i<18;i++){s="";a=Math.abs(9-i);for(j=0;j<a;j++)s+=" ";for(k=a+1;k<=9;k++)s+=k-a;for(l=8;l>a;l--)s+=l-a;console.log(s)}

Includes suggestion from Shmiddty in comments. Original preserved below:

for(i=1;i<18;i++){s="";a=Math.abs(9-i);for(j=0;j<a;j++){s+=" "}for(k=a+1;k<=9;k++){s+=k-a}for(l=8;l>a;l--){s+=l-a}console.log(s)}

I'm sure this could be condensed further, but darned if I know how. :P

This gets the JS nod. It multiplies correctly.

Instead of wrapping your for loops in brackets, use a semicolon. eg: for(j=0;j<a;j++)s+=" ";for(k...

Thank you for pointing that out, @Shmiddty. I've adjusted the snippet.

Javascript 88
for(i=9,a=Math.abs;--i>-9;console.log(o))for(j=9,o='';j-->-9;)o+=(n=9-a(i)-a(j))>0?n:' '

C++ 223 Byte
#include <iostream>
using std::cout;using std::size_t;int main(){for(int a=0;a<2;++a)for(size_t b=1+a*7;b<10-a;((a!=1)?++b:--b)){size_t c=9-b;for(;c-->0;)cout<<" ";for(c=1;c<b;)cout<<c++;for(c=b;0<c;)cout<<c--;cout<<'\n';}}

Ungolfed:
#include <iostream>
using std::cout; //for not having to type std::cout over and over again
using std::size_t; //for not having to type std::size_t over and over again

int main()
{
    for(int a = 0; a < 2; ++a)
        for(size_t b=1+a*7; b<10-a; ((a!=1)?++b:--b))
        {     //either count up to nine or down from nine
            size_t c = 9-b; //space count we need
            for(; c-- > 0;)
                cout << " ";
            for(c = 1; c < b;) //set c to the counter that will be print
                cout << c++; //post-crement :)
            for(c = b; 0 < c;) //count backwards
                cout << c--; //post-decrement :)
            cout << '\n'; //line is done
        }
}

Explanation please?

@LucasHenrique updated

Haskell, 77 bytes
r=[-8..8]
f n|n<1=" "|1>0=show n
mapM putStrLn[[9-abs x-abs y|x<-r]>>=f|y<-r]

This is not a complete runnable program. I think, you should add main= in the third line. Try it online. Would be 82 bytes then.

You can shorten this by 2 bytes; Try it online, 80 bytes

Recursiva, 31 22 bytes
{pB9'P+*" "- 9}J""WpB}

Try it online!
Explanation:
{pB9'P+*" "- 9}J""WpB}
{                       - For each
 p                      - palindromize [1,2,..9,..1]
  B9                    - range [1,2...9]
    '                   - Iteration command begin
     P                  - Print
      +                 - concatenate
       *" "- 9 }        - appropriate number of spaces
                J""WpB} - obtain number string
                J""     - Join with nothing '123454321'
                   W    - map each element as string ['1','2'..'5','2','1']
                    p   - palindromize [1,2,..5,..2,1]
                     B} - range [1,2,3,4,5]

APL (Dyalog Classic), 21 bytes
{⊃⍵/⍕⍵}¨9-+/↑|8-⍳2⍴17

Try it online!

(assumes ⎕io←0)

Python 2, 72 bytes
z="123456789"
for i in range(9)+range(8)[::-1]:print"% 8s"%z[:i]+z[i::-1]

Try it online!

Welcome to the site! I've edited in a link to an interpreter, so that others can test your solution

///, 124 bytes
/(/# '87#//'/"67//&/123//%/43!//$/  //#/654321
//"/&45//!/21
$ /$$$$1
$$$ 1!$ &!$&% "%"#$'('8987($'65%"65% "%$&%$ &!$$1!$$ 1

Try it online!
Shorter than this answer by 109 bytes! Just applies a bunch of substitutions with whitespace and common numbers.

Stax, 10 bytes
▌┼î▲░ò╝╪.¢

Run and debug it

Kotlin, 125 bytes
fun d(){for(i in 0..307){val v=Math.abs(i%18-9)+Math.abs(i/18-8)
print(if(i%18!=0)if(v>8)' '
else(57-v).toChar()
else '\n')}}

Try it online!

R, 62 bytes
for(i in c(1:9,8:1))cat(rep(" ",9-i),1:i,(i:1)[-1],"
",sep="")

Try it online!

Powershell, 45 bytes
1..9+8..1|%{' '*(9-$_)+-join(1..$_+$_..1|gu)}

2 solutions with 44 bytes were proposed in the comments to the Iszi's post

Perl 5, 50 bytes
s/-//,$==8-$_,say$"x$_,map$=+1-abs,-$=..$=for-8..8

Try it online!

Java, 155 chars
interface A{static void main(String[]a){var o=System.out;for(int i=-9,j,k;++i<9;o.println())for(j=-9;++j<9;)o.print((k=(i<0?-i:i)+(j<0?-j:j))>8?" ":9-k);}}

-7 chars thanks to a kind commenter.

Nice solution, I clould improve it by 1 char. Have a look at: https://tio.run/##Fc1LCsMgFIXhrYgjxRg6bGJs6BoyLB1IHuVeGy1qAyVk7dbMDnw/HDSbkTjZnMGlOSxmnMl9j8kkGMnmYSKrAceGFMC9Hk/D98UHVloCWjYVVlYJAV2j@L6ZQKKmVJ0FFi2Cp0ShmdUMuksvoQUuGJ4TW@T8du0poW0jrRp@Mc1r7b@p/pS39HYscnUcR85/

Java (JDK), 132 bytes
interface A{static void main(String[]v){for(long m=0,a=0;++a<18;System.out.printf("%"+(a>9?26-a:8+a)+"d%n",m*m))m=a>9?m/10:m*10+1;}}

Try it online!
This is a different way to do it than my first answer for Java. It is using integer arithmetics. It is even shorter, maybe the shortest possible.
Formatted version of this code:
interface A {
  static void main(String[] v) {
    for (long m = 0, a = 0; ++a < 18; System.out.printf("%" + (a > 9 ? 26 - a : 8 + a) + "d%n", m * m))
      m = a > 9 ? m / 10 : m * 10 + 1;
  }
}

Or more readable:
class A {
  public static void main(String[] v) {
    for (long m = 0, a = 0; ++a < 18; ) {
      long width = a > 9 ? 26 - a : 8 + a;
      m = a > 9 ? m / 10 : m * 10 + 1;
      System.out.printf("%" + width + "d%n", m * m);
    }
  }
}

///, 139 bytes
/~/\/\///;/3&~|/*#~*/5432~&/2^~^/#!~%/$56~$/1234~#/1
~@/  ~!/@@/!!^@ 1&@12; $;$|@ %|@%76| %7876|%789876| %7876|@%76|@ %54;$54; $;@12;@ 1&!#

Try it online!

Java, 156 chars
interface A{static void main(String[]v){for(int x,a=-9;++a<9;System.out.printf("%9s%s%n","123456789".substring(0,9-x),"87654321".substring(x)))x=a>0?a:-a;}}

Formatted version of this solution:
interface A {
  static void main(String[] v) {
    for (int x, a = -9; ++a < 9; System.out.printf("%9s%s%n", "123456789".substring(0, 9 - x), "87654321".substring(x)))
      x = a > 0 ? a : -a;
  }
}

Java code is generally longer. This is my shortest solution so far.
It does not produce additional whitespace in the right side as another solution does, but it is a little bit longer.

REXX, 86 chars
x='         12345678987654321 '
do n=1 to 17
m=9-abs(9-n)
say substr(x,m,10)right(x,m)
end

Complete program. No real tricks used except some smooshing and keeping to a single loop. I'm assuming EOL doesn't count.

Perl 5, 33 bytes
say$"x abs.(1x(9-abs))**2for-8..8

Try it online!
Using 11 * 11 = 121, 111 * 111 = 12321, 1111 * 1111 = 1234321, ...
3 bytes saved thanks to naffetS.

33: say$"x abs.(1x(9-abs))**2for-8..8

T-SQL, 104 bytes
Inspired by @BradC's answer
DECLARE @ INT=8a:PRINT
space(abs(@))+stuff('12345678987654321',9-abs(@),abs(@)*2,'')SET
@-=1IF~@<8GOTO a

Try it online

Clojure, 115 bytes
(defn s[n](concat(range 1 n)(range n 0 -1)))(print(apply str(mapcat #(concat(repeat(- 9 %)" ")(s %)'("\n"))(s 9))))

Try it online!
Shortened from 127 to 121 to 115.

Python 3, 123 bytes
k=[]
for t in range(10):
    l=str(111111111**2)[:t]
    k.append(l.rjust(9)+l[:-1][::-1])
print("\n".join(k+k[:-1][::-1]))

Try it online!

116 bytes

Java 10 IntStream, 230 chars
interface A{static void main(String[]a){f(i->{var o=System.out;f(j->o.print(i+j>8?" ":""+(9-i-j)));o.println();});}static void f(java.util.function.IntConsumer c){java.util.stream.IntStream.range(-8,9).map(Math::abs).forEach(c);}}

Try it online!
Readable:
interface A {
    static void main(String[] a) {
        f(i -> {
            var o = System.out;
            f(j -> o.print(i + j > 8 ? " " : "" + (9 - i - j)));
            o.println();
        });
    }

    static void f(java.util.function.IntConsumer c) {
        java.util.stream.IntStream.range(-8, 9).map(Math::abs).forEach(c);
    }
}

C (gcc), 171 163 147 142 bytes
-5 bytes thanks to @ceilingcat
#define f(x,y);for(j=0;j++<(i<9?x:y);)printf(
j;D(i){for(i=0;++i<19;puts("")){f(9-i,i-9)" ")f(i,18-i)"%d",j)f(i-1,17-i)"%d",i<9?i-j:18-i-j);}}

Try it online!
This code first prints a certain amount of spaces and then the numbers.
166 bytes
i,j;D(){for(;++i<19;){for(j=0;++j<19;i<10?(i+j>9&&j-i<9?printf("%d",j<9?i+j-9:9-j+i):printf(" ")):i-j<9&&i+j<27?printf("%d",j<9?j-i+9:27-i-j):printf(" "));puts("");}}

Try it online!
This code always chooses whether to print a space or a number, depending on the values of i and j.

@ceilingcat thank you. The semicolon at the start of the macro is a nice and original idea

MathGolf, 11 bytes
9╒ñmÆ╒ñyFΩn

Try it online.
Explanation:
9╒           # Push a list in the range [1,9]
  ñ          # Palindromize it: [1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1]
   m         # Map over each inner integer,
    Æ        # using the following five character as inner code-block:
     ╒       #  Convert the integer to a list in the range [1,n]
      ñ      #  Palindromize it similar as before
       y     #  Join the list together to a string
         Ω   #  Prepend/append potential leading/trailing spaces (centralize)
        F    #  to make the string length 17
          n  # After the map: join the strings in the list by newlines
             # (after which the entire stack is output implicitly as result)

Lua, 80 bytes
for i=-8,8 do x=9-math.abs(i)n=math.ceil(10^x-1)//9print((" "):rep(9-x)..n*n)end

Try it online!

Vyxal, C, 9 bytes
9ƛɾømĴ;ḆJ

Try it Online!

Haskell, (complete program) 79 bytes
main=mapM putStrLn[(' '<$[n..8])++(s n>>=show)|n<-s 9]
s n=[1..n-1]++[n,n-1..1]

Try it online!

JavaScript (Node.js), 107 bytes
b=Math.abs,e="";for(i=0;i<17;i++){for(j=0;j<17;j++){z=9-(b(i-8)+b(j-8));e+=z>0?z:" "}e+="\n"}console.log(e)

Try it online!

104 bytes

C (gcc), 82 78 bytes
#define W printf("%*lld\n",i,1ll*j*j)
g(i,j){i<17&&g(W,j*10+1);W;}D(){g(9,1);}

Try it online!

printf("%*ld\n",i,1l*j*j)

Vyxal C, 17 bytes
»÷rṡF»S¦øṁ½ƛ÷⋎;øm

Explanation
»÷rṡF»S                - 123456789 as string
       ¦               - Take all the prefixes
        øṁ             - Vertical mirror
          ½ƛ÷⋎;        - Halve and split, then join while removing the duplicate ends.
               øm      - Horizontal palindromize.
<C flag>               - Center and join list by newlines
<implicit output>      - Print

Try it Online!

Excel, 80 bytes
=CONCAT(LET(x,ABS(9-ROW(1:17)),y,9-ABS(9-COLUMN(A:R)),IFS(y>x,y-x,y," ",1,"
")))

Link to Spreadsheet

Java 8 (OpenJDK 8), 157 161 bytes
-4 bytes thanks to @ceilingcat
Tried to use only 1 for instead of 2 for two-dimensional printing, but couldn't beat the best Java answers.
interface M{static void main(String[]b){for(int r,s,a=0;a<289;System.out.print((r<1?s<1?" ":"":r)+(s>7?"\n":"")))r=9-Math.abs(s=a%17-8)-Math.abs(8-a++/17);}}

Try it online!

JavaScript (V8), 77 78 bytes

-1 byte thanks to Donat!

Not the shortest JS solution, but not the longest either!
for(i=9;--i+9;)print(("".padEnd(a=i<0?-i:i)+"1".repeat(9-a)**2).replace(0,1))

Try it online!

i goes from 8 to -8.
We generate the correct number of spaces for each line by using the absolute value of i.

We take advantage of the fact that:
1 * 1 = 1
11 * 11 = 121
111 * 111 = 12321
1111 * 1111 = 1234321
(and so on)

So we generate the correct number of 1 by repeating it 9 minus the absolute value of i.
But unfortunately, JS can't handle properly the biggest calculation: 111111111 at power 2 gives 12345678987654320, so we also have to replace this single 0 with a 1, which costs 14 bytes :(

You can substitute " ".repeat by "".padEnd and save one byte.

@Donat Thanks for your tip! I've updated my solution.

FMSLogo, 107 bytes
to a
show map[(word map["\ ]r 9-? reverse r ?-1 r ? "\n)]word "12345678 r 9
end
to r :
op member : "987654321

The power 111111111 2 trick doesn't work because FMSLogo renders this number as 1.23456789876543e+16.
member a b outputs the segment of b from the first occurrence of a in it to the end, and so r : outputs a word with descending digits from : to 1.
Apparently, the empty string is a valid variable name in Logo. (variables are always prefixed with : to get their value or " to express their name)
"Templates", the special anonymous functions which map takes, have ? stand for their parameter by default.
For each line, word concatenates together:

map["\ ]r 9-?, where every character in r 9-? is replaced with a space
reverse r ?-1,
r ?,
"\n

YASEPL, 77 bytes
=a$`1!d$10-a;" ",d~!e$`6~+}2,a,6!@8!e`7~-]8,7`8>" "!c@2!++`2!-}2,9,5!c$`5}1,0

explained:
=a$`1!d$10-a;" ",d~!e$`6~+}2,a,6!@8!e`7~-]8,7`8>" "!c@2!++`2!-}2,9,5!c$`5}1,0     packed
=a$                                                                               set variable a to 1
   `1                                                                    }1,0     while a > 0 || c > 0
     !d$10-a;" ",d~                                                               print (10-a) space characters
                   !e$                                                            set variable e to 1
                      `6  }2,a,6                                                  while e < a...
                        ~+                                                        print e and add one to e
                                !@8          `8                                   if a != 1...
                                   !e`7  ]8,7                                     while e != 0...
                                       ~-                                         print e and subtract e by one.
                                               >" "                               print a space
                                                   !c@2!++`2!-                    add 1 to a if c != 1
                                                              }2,9,5!c$`5         if a < 9 then set c to one

Vyxal 3 jR, 8 bytes
9ᵖэ“9«ṅṅ

Try it Online!
There's no way to center stuff in vyxal 3 so I used some palindrome tricks
9ᵖэ“9«ṅṅ
9         # R flag treats numbers as ranges when used as iterable
 ᵖэ       # Map the lambda over the prefixes of the range [1,9]
   “      # join by nothing
    9«    # prepend spaces to length 9
      ṅ   # palindromise horizontally
       ṅ  # palindromise vertically

Created with the help of Luminespire.

Easyfuck, 61 54 bytes

Î£6lÙ³fÍSGCINe␏R>kfýµ¯SGCI.yu]ëwSTS«½vò␕«m§[uSHYMWÒPU2>RSHY#åyó<Zµ#ìà

due to lack of unicode representations for c1 control characters, they have been replaced by their superscripted abbreviations
Decompressed:
g(ffffffff)f(=$>5Y_[->2.<]+^[^'+^]^!--['-]5Y.J$>)+$>+gf<--$>g

                                                 +$>+gf       set first cell to 1 and copy it to storage cell, then set 2nd cell to 1 and invoke functions g and f
g(ffffffff)                                                   declare function g that invokes function f 8 times
           f(                                   )             declare function f
             =$>5Y_                                           add storage cell to 2nd cell, copy it to the storage cell, and set 3rd cell to 10 - storage
                   [->2.<]+                     )             print an amount of spaces specified by value of 3rd cell, then set it to 1
                           ^[^'+^]^!--                        print and increment the 3rd cell until its value is equal to the storage cell, then set it to the value of storage cell - 2
                                      ['-]5Y.J$>              print and decrement until 0, then print a new line, copy the first cell to the storage cell and goto the second cell
                                                       <--$>g set the first cell to -1 (255), copy it to the storage cell and run g again

C, 98 chars
l=9,n;p(i){for(i=18;i;putchar(i?n>l?48+n-l:32:10))n=9<--i?18-i:i;}
main(){p(l--);l&&p(main());l++;}

Java, 177 chars
public class A{public static void main(String[]v){
for(int a=-8,b,c;a<9;a++){
for(b=-8;b<9;){c=Math.abs(a)+Math.abs(b++);
System.out.print(c>8?" ":9-c);}System.out.println();}}}

correct formatting of this solution (352 chars):
public class A {
    public void main(String[] args) {
        for (int a = -8; a < 9; a++) {
            for (int b = -8; b < 9;) {
                int c = Math.abs(a) + Math.abs(b++);
                System.out.print(c > 8 ? " " : 9 - c);
            }
            System.out.println("");
        }
    }
}

You can trim off a few characters here and there. For example, String[] args can be String[]v, and System.out.println("") can be System.out.println(). Similarly, int b= -8; b < 9; can be int b=-8;b<9;.

@A.R.S.: Thanks. Now it has 9 characters less (and is still by far the longest solution)

You can spare 2 more characters by moving variable c's declaration into the for: for(int b=-8,c;b<9;){c=Math.….

@manatwork: Thanks. I could remove 5 characters with this :-) And I've just seen that a VBA-solution is longer

Your class does not need the public modifier.

You can remove all the newlines in your code

You can get that down to 168 if you drop the newlines and the unneeded public  on the class itself. The static calls to Math.abs and System.out.print{,ln} sadly don't add up to enough that a static import would be a win..

159 bytes

VBA, 197
for i=1 to 9:?string(27-i*3,32)l;:for j=1 to i:?j;:next:for j=i-1 to 1 step -1:?j;:next:?:next:for i=8 to 1 step -1:?string(27-i*3,32)l;:for j=1 to i:?j;:next:for j=i-1 to 1 step -1:?j;:next:?:next

if vba didn't automatically add a space for the + sign it doesn't print, perhaps I could avoid the 27-i*3 construct for making it look right

Excel, 24 chars (cheating?)

In cell B2 put =MAX(A2,B1,B3,C2)-1 (19 chars)
Fill down to B18 and right to R18.
Select B2 through B18 and Format:Cells:Number:Custom: 0; (2 chars)
Enter a 8.9 in J10 (3 char)
Ignore all complaints about circular references throughout the process.  Use Preferences:Calculation to allow iteration if it is not already allowed.
Select columns B through R and resize their width to make square boxes.
Profit?

Note: Some might call step 2 cheating as it creates 19 to 23 characters in every cell for a total of over 6000 chars.  If you really want to count it that way, you would be better off not putting the formula into those squares that are to remain blank.  In that case, you can use a 9 in J10 and you don't need the custom formatting.  The total character count would then be just over 3000.

Excel VBA, 81 76 Bytes
Anonymous VBE immediate window function that takes no input and outputs to the VBE Immediate Window
For i=-8To 8:j=Abs(i):r=Mid(987654321,j+1):?Spc(j)StrReverse(r)Mid(r,2):Next

Old Version, 81 Bytes
For i=-9To 8:For j=-8To 9:k=Abs(i)+Abs(j):l=l &IIf(k>8," ",9-k):Next:?l:l="":Next

SmileBASIC, 65 bytes
FOR I=-8TO 8A=ABS(I)Q=VAL("1"*(9-A))?" "*A;Q*Q
NEXT
LOCATE 16,8?1

I used the fact that 11*11=121, 111*111=12321, etc. Unfortunately, 12345678987654321 can't be stored as a 64 bit float, so I had to add the last 1 separately, adding 14 bytes.

tcl, 122 110
proc P i {puts [format %[expr 8+$i]s [expr [string repe 1 $i]**2]]}
time {P [incr i]} 9
time {P [incr i -1]} 8

demo

Common Lisp SBCL, 145 bytes
(do((b 1)(l'(1 2 3 4 5 6 7 8 9))(i 1(+ i b)))((= i 0))(format t"~17:@<~v{~a~}~v{~a~}~>~%"i l i(reverse(subseq l 0(1- i))))(if(> i 8)(setf b -1)))

It is worse than the other Common Lisp solution, but it works and I think it is different enough to be posted.
Explanation
i is incremented up to 9 and then decremented to 0 (when i=9 sign of b is changed effectively changing addition to subtraction - this avoids second loop.
In each line I print numbers: `123...i(i-1)...1 using loops of format function (for first loop I use list '(1 2 3 4 5 6 7 8 9) and for decrementing loop I use reversed subsequence of this list. Text is then centered.
I didn't notice that numbers are squares of 11..11. As far as this solution is concerned the diamond could be made out of letters or (! @ # ...) (for that you would need to change ~a to ~c in format function.

Python 2, 59 bytes
i=8;exec'print" "*abs(i)+`int("1"*(9-abs(i)))**2`;i-=1;'*17

Try it online!

Alternate 59-byte solution: i=8;exec'print\int("1"*(9-abs(i)))**2`.center(18);i-=1;'*17`

Also, 58-bytes: i=8;exec'j=abs(i);print" "*j+\int("1"*(9-j))**2`;i-=1;'*17`

Yabasic, 89 bytes
Anonymous function that takes no input and outputs to STDOUT.
For i=-8To 8
For j=-8To 9
k=Abs(i)+Abs(j)
If k>8Then?" ";
Else?Chr$(57-k);
Fi
Next
?
Next

Try it online!

///, 132 bytes
/T/123//F/T45//f/4321//S/  //s/S //N/
s//a/F678//b/765f//A/1Ns 121Ns/ssSAT21NSTfN FfNF65f
SF6b
 ab
a98b
 ab
SF6bNF65fN FfNSTfNsT2AS1

Try it online!

Canvas, 14 bytes
９｛：９∔ ×；Ｒ］∑９ｎ┼

Try it here!

Attache, 49 bytes
Print@Join=>Table[{If[_%9=_,9-_,sp]}@`+,Abs!-8:8]

Try it online!
Simply tables (that is, applies a function like a multiplication table) the function which adds two numbers (from [8, 7, 6, 5, ..., 5, 6, 7, 8]), checks if they are less than 9, then yields 9 - that number if so, otherwise a space. Then, prints each row accordingly.

Japt -R, 11 bytes
9õ_õ ¬êÃê û

Try it online!
Unpacked & How it works
9õZ{Zõ q ê} ê û

9õZ{  [1..9].map(Z=>...)
Zõ      [1..Z]
q       Join with nothing; ["1", "12", ..., "123...9"]
ê       Make palindrome;   ["1", "121", ..., "123...9...321"]
}
ê     Make palindrome on the array
û     Center-pad each element to the longest one
      `-R` joins with newline
      implicit output

I like the õ_õ emoji.

C - 118 characters
x,c,i=1,j;main(){for(;i<20;){x=10;for(j=1;j<20;){j++<10?x--:x++;printf(x>c?" ":"%d",x);}i++<10?c++:c--;printf("\n");}}

My very first code golf! I still need to get into the golfing mindset, I know there is probably a lot I can do differently.
Edit: Try it online!

Welcome to PPCG!

100 bytes

JavaScript, 84 bytes
Saved many bytes thanks to ETHProductions
[...s="12345678987654321"].map(x=>"".padEnd(9-x)+s.slice(0,x-1)+s.slice(-x)).join`
`

Try it online!

Tcl, 99 bytes
time {puts [string repe { } [expr abs([incr i]-9)]][expr [string repe 1 [expr 9-abs($i-9)]]**2]} 17

Try it online!

C# (Visual C# Interactive Compiler), 103 bytes
for(int i=1,j=1;i>0;i+=j=i>8?-1:j)Write($"{"123456789".Substring(0,i),9}"+"87654321\n".Substring(9-i));

Try it online!
Definitely not the shortest answer, and this interpreter was published after the question was posted. But I did not see a C# answer. When using the regular C# compiler, the print statement is much longer: System.Console.Write. Also, string interpolation was not a thing when this question was posted.

Javascript, 103 96 93 89 88 87
f=(i=[...Array(17)].map((x,i)=>i<8?i:i-2*(i-8)))=>i.map(x=>i.map(y=>x+y>7?(x+y-7):' ').join``).join`\n`

I haven't looked at the other answers up until this point, and just started out with this spreadsheet. Just saw that this answer isn't too bad of a golf compared to the other Javascript answers.
I tried to be clever coming up with something that generates a particular array (i) that I use for the x and y-axis. But it turns out, spelling out that array is shorter.
f=(i=[0,1,2,3,4,5,6,7,8,7,6,5,4,3,2,1,0])=>i.map(x=>i.map(y=>x+y>7?(x+y-7):' ').join``).join`\n`

Update. Spelling out the array differently, but I'm sure that I can golf this further
f=(i=[...'01234567876543210'])=>i.map(x=>i.map(y=>1*x+1*y>7?(1*x+1*y-7):' ').join``).join`\n`

Last update for tonight:
f=(i=[...'01234567876543210'])=>i.map(x=>i.map(y=>+x+1*y>7?+x+1*y-7:' ').join``).join`\n`

Getting rid of one more byte:
f=(i=[...'0'+10*11111111**2])=>i.map(x=>i.map(y=>+x+1*y>7?+x+1*y-7:' ').join``).join`\n`

And one more:
f=(i=[0,...11111111**2+'0'])=>i.map(x=>i.map(y=>+x+1*y>7?+x+1*y-7:' ').join``).join`\n`

Duocentehexaquinquagesimal, 58 bytes
(Úv×H.F°ǝ=ÉÈNŸ=~ʒ€
₁Ë¨Dûl`N₆rÇX³ΣJd‘×∞*Åv€rØ(0ÕœÖ¤ΔNā—St€ô

Try it online!

FreeBASIC, 100 characters
Dim As Byte i,j,k
for i=-8 to 8 : for j=-8 to 9
k=abs(i)+abs(j)
if k > 8 then print " "; : else : ? chr(57-k);
next
?
next
Sleep
End

Welcome to Code Golf, and nice first answer!

Uiua, 33 bytes
⊂:↘1⇌.≡(⊂⇌↘1.)⬚@ ≡°□+@1≡(□⇌⇡)+1⇡9

Try it
I’ll come back to this later and see if I can reduce it, it’s likely that I can shave off like 10 bytes

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

authors: Вадим Вадимович

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


text:
Regions of regular polygons
Given a regular N-gon with all diagonals drawn, how many regions do the diagonals form?
For example, a regular triangle has exactly 1, a square has exactly 4, pentagon has exactly 11, and a hexagon has 24.

score is inversely proportional to number of bytes in solution
small fudge factors may be added to scores based on their runtime
the region surrounding the polygon does not count

So ... write a program that returns this

Mathematica 118
Although  there are well-defined routines for computing the number of regions in a regular n-gon with all the diagonals drawn, they are quite cumbersome. I thought it might be fun to take an image processing approach: if we draw the n-gon with it's diagonals, would it be possible to count the regions from the drawn image (more precisely, from the rasterized and binarized representation of the image as an array)?
The following produces and processes an actual image of a polygon and determines the number of regions from the rasterized image.
Table[MorphologicalEulerNumber@Binarize@Rasterize@CompleteGraph[k, ImageSize->1200,EdgeStyle->Thickness[Large]],{k,3,14}]

{1, 3, 11, 24, 50, 80, 154, 220, 375, 444, 781, 952}

This is what might be referred to as an engineer's solution. It gets the job done, but only within some limited conditions. (And it's slow: the above code took 4.24 s to run.) The above routine works correctly up to and including a 14-Complete graph, shown below. I found this surprising, given that some of 952 regions are very difficult to see, even when the image is displayed at 1200 by 1200 pixels.
The picture below is the image before being rasterized and binarized.

+1 because lol "Just count the regions!"

Excel, 341 bytes
Implements the formula given on the Woflram Mathworld link in @mob's comment.
=A1*(A1^3-6*A1^2+23*A1-42)/24+1+(MOD(A1,2)=0)*(A1*(42*A1-5*A1^2-40)/48-1)-(MOD(A1,4)=0)*3*A1/4+(MOD(A1,6)=0)*A1*(310-53*A1)/12+(MOD(A1,12)=0)*49/2*A1+(MOD(A1,18)=0)*32*A1+(MOD(A1,24)=0)*19*A1-(MOD(A1,30)=0)*36*A1-(MOD(A1,42)=0)*50*A1-(MOD(A1,60)=0)*190*A1-(MOD(A1,84)=0)*78*A1-(MOD(A1,90)=0)*48*A1-(MOD(A1,120)=0)*78*A1-(MOD(A1,210)=0)*48*A1

Ungolfed for some clarity:
=A1*(A1^3-6*A1^2+23*A1-42)/24+1
+(MOD(A1,2)=0)  *(A1*(42*A1-5*A1^2-40)/48-1)
-(MOD(A1,4)=0)  *3*A1/4
+(MOD(A1,6)=0)  *A1*(310-53*A1)/12
+(MOD(A1,12)=0) *49/2*A1
+(MOD(A1,18)=0) *32*A1
+(MOD(A1,24)=0) *19*A1
-(MOD(A1,30)=0) *36*A1
-(MOD(A1,42)=0) *50*A1
-(MOD(A1,60)=0) *190*A1
-(MOD(A1,84)=0) *78*A1
-(MOD(A1,90)=0) *48*A1
-(MOD(A1,120)=0)*78*A1
-(MOD(A1,210)=0)*48*A1

Haskell, 232 bytes
f n|t<-(.(0^).mod n).(*)=div(t(1176*n)12-t(3744*n)120+t(1536*n)18+t(42*n^2-5*n^3-40*n-48)2-t(2394*n)210+t(912*n)25-t(1728*n)30-t(36*n)4-t(2400*n)42+t(1240*n-212*n^2)6-t(9120*n)60-t(3744*n)84-t(2304*n)90+2*n^4-12*n^3+46*n^2-84*n)48+1

Try it online!
Uses the formula from OEIS user Chai Wah Wu.

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:
Perform basic operations on complex numbers in a language without native support for complex numbers
Your code has to provide the following functions:
read(x)

Reads a complex number from the standard input. It has to accept and evaluate something in the form of for example 1.42 + 3i.

print(x)

Prints the complex number in the form of, for example 1.23 - 4.32i

add(x,y)
sub(x,y)
mult(x,y)
div(x,y)

Adds, subtracts, multiplies and respectively divides the two complex numbers.

It is enough if your functions are accurate to two digits after the decimal point, of course, it can be more if you so wish. The input will never have more than two digits after the decimal point.
Any language without native support for complex numbers may be used. Similarly, libraries or other language features which deal with complex numbers are not permitted. The point is, you have to do all the handling of complex numbers by yourself.
Scoring
This is a code golf. The score is the sum of the lengths of the function bodies. For example, int add(int a, int b) {return a+b;} will have a length of 11 because of return a+b. Your solution must have a main program which demonstrates the use of the functions (for easier evaluation of your solution), but it will not be part of the scoring.
You can store the complex numbers in any way you wish, but the functions must have exactly the same amount of parameters as in the above description.
EDIT: For languages that support it, you can use operator overloading instead of the add, sub, etc. functions.
EDIT 2: To prohibit the cheap #define all_your_code_here A, I'll try to clarify the "only function bodies count" better: every character in the code counts, except for the overhead required to declare and define the functions and the libraries required to do basic I/O. By basic I/O I still mean no language features which directly deal with complex numbers. The main or equivalent where you call these functions don't count but you are not allowed to do anything besides using those functions for demonstrative purpose.

any bonus for operator overload (in languages that support it)?

You're obviously talking about languages that use the word "function" in the way C does, like Python, Lisp, JavaScript etc.. But read and print aren't actually functions (they have side-effects), so in a more rigorous language you can't define them in that precise way. Are those languages "out", or may we use the corresponding signatures (e.g. read :: IO ComplexNum and print :: ComplexNum -> IO() in Haskell)? Or why shall we not rather define functions to parse / build strings, rather than perform actual IO?

If only the function bodies count, are any lines of e.g. standard library includes for free, or permitted at all?

@leftaroundabout: includes are free, unless they deal with complex numbers, in which case they are not permitted. The point is, you have to do all the handling of complex numbers by yourself.

Allright. But I suppose any other code outside the function bodies is forbidden? In most languages it would be natural to first properly declare the type (class, or whatever) of the complex numbers, but it's easy to do this in such a way that the actual functions become trivial. — Are you going to answer my first comment, yet?

-1 Boring and not very well specified. The mathematical definitions of the operations are really quite simple, so the most interesting part is the IO (not that it's really interesting), and in those parts the level of detail for what is acceptable is insufficient.

APL (33 + 16 + 1 + 1 + 14 + 17 = 82)
APL does have support for complex numbers if you use it (of the format 5J6, like Python's 5+6j), but it is of course not used.
I represent complex numbers as a 2-tuple of regular numbers, (A B) where A is the real part and B is the imaginary part. This means I can use APL's + and - operators directly, as they can be used on multidimensional types. (i.e. 1+2 3 4 gives 3 4 5 and 1 2+20 10 gives 21 12).
An APL function is represented as {body}. Functions are first-class objects. I have counted the function body without the braces, except for + and - which I've counted as 1 each.
read  ← {⎕ML←3⋄(1,1-2×'-'∊⍵)×⍎¨⍵⊂⍨⍵∊'.',⎕D} ⍝ 33 chars
print ← {⍕(⊃⍵)'+'(⊃⌽⍵)'i'}                   ⍝ 16 chars
add   ← +                                      ⍝ 1 char
sub   ← -                                      ⍝ 1 char
mul   ← {(-/⍺×⍵),+/⍺×⌽⍵}                      ⍝ 14 chars
div   ← {⍺mul 1 ¯1×⍵÷+/⍵*2}                   ⍝ 17 chars

Usage:
(clarification: APL is evaluated right-to-left so this is actually calculating 8+9i ÷ 5+6i.)
      print (read⍞) div (read⍞)
5 + 6i
8 + 9i
1.540983607 + ¯0.04918032787 i

print←{∊⍵,¨'+i'}

read←{⍎¨w⊂⍨'-+'∊⍨w←'+',⍵~' i'}

D (205 chars)
import stdio;

struct Complex{
  real a,b;

  this(real a,real b){
      this.a=a;
      this.b=b;
  }

  static Complex read(){
      Complex c;
      readf("%f%+fi",&c.a,&c.b);
      return c;
  }

  /** does both addition and substraction */
  Complex opOpBinary(op)(Complex o)if(op=="+"||op=="-"){
    mixin("return Complex(a"~op~"o.a,b"~op~"o.b);");
  }

  Complex opBinary(op)(Complex o)if(op=="*"){
    return Complex(a*o.a-b*o.b,a*o.b+b*o.a);
  }

  Complex opBinary(op)(Complex o)if(op=="/"){
    real z=c**2+d**2
    return this*Complex(o.a/z,-o.b/z);
  }

  void write(){
     writef("%f%+fi",a,b);
  }

}

using operator overloading
I didn't count the constructor

+1 for showcasing some of the most hideous syntax I've ever seen in any language.

Python, 131 chars
add=lambda (a,b),(c,d):(a+c,b+d)
sub=lambda (a,b),(c,d):(a-c,b-d)
mul=lambda (a,b),(c,d):(a*c-b*d,a*d+b*c)
def div(x,(c,d)):z=c**2+d**2;return mul(x,(c/z,-d/z))
def _print(x):print"%f+%fi"%x
read=lambda:tuple(map(float,raw_input()[:-1].split('+')))

x=read()
y=read()
_print(add(x,y))
_print(sub(x,y))
_print(mul(x,y))
_print(div(x,y))

Makes lots of use of lambda unpacking, which I'm not including in my "body" count.  (I'm counting everything after the first :).  Kinda cheating, but I'm not really sure how to count it otherwise.

Doesn't work with e.g. 1 - 3i this way.

@leftaroundabout: true.  The input format hasn't really been well-specified (e.g. is 3 passed as 3 or 3+0i?).

C# – 369 (I guess)
Func<float,float,float[]>C=(x,y)=>new[]{x,y};
Func<float[]>read=()=>{var m=new Regex(@"(\d*(\.\d*)?) *([+-]) *(\d*(\.\d*)?)i").Match(Console.ReadLine()).Groups;return C(float.Parse(m[1].Value),float.Parse(m[2].Value+m[4].Value));};
Action<float[]>print=x=>{Console.WriteLine("{0} {1} {2}i",x[0],x[1]>=0?"+":"-",Math.Abs(x[1]));};
Func<float[],float[],float[]>add=(x,y)=>C(x[0]+y[0],x[1]+y[1]);
Func<float[],float[],float[]>sub=(x,y)=>C(x[0]-y[0],x[1]-y[1]);
Func<float[],float[],float[]>mul=(x,y)=>C(x[0]*y[0]-x[1]*y[1],x[0]*y[1]+x[1]*y[0]);
Func<float[],float[],float[]>div=(x,y)=>mul(x,C(y[0],-y[1])).Select(_=>_/(y[0]*y[0]+y[1]*y[1])).ToArray();

var a = read();
var b = read();
var c = C(3, -7);
var d = C(2, 5);
var e = div(a,c);
var f = mul(b,d);
var g = add(e,f);
print(g);

Not sure about the character counting definition, really…

Haskell 698
Counted everything before main. This question struck me as being too
straight forward, so I did everything in my power to make my answer more
interesting. Also Haskell borks if you redefine Prelude functions
(div, print, read), so I renamed those.
import Control.Arrow
import Control.Monad
import Control.Applicative
import Data.List.Split
a=uncurry(***)
f!g=a(f,g)
j=join(!)
f%b=a$j f b
add=((+)%)
sub=((-)%)
o=join
g#h=(*)<$>g.fst<*>h.snd
c=o.curry
m=add<$>c((fst#fst)!(snd#fst))<*>c((negate.(snd#snd))!(fst#snd))
mul=curry m
b`d1v`c=b`mul`(j (/uncurry(+)(j(^2)c)).second negate$c)
s :: (Show a) => (a, a) -> String
s=uncurry(++).first(++" ").second((++"i").(let g('-':x)="- "++x;g x="+ "++x in g)).j show
pr1nt :: (Show a) => (a, a) -> IO ()
pr1nt=putStrLn.s
t=filter(`notElem`" i")
re4d :: (Read a, Num a) => String -> (a, a)
re4d s|elem '+'s=(\[x,y]->j(read.t)(x,y)).splitOn"+"$s
      |0<1=(\[x,y]->read!(negate.read.t)$(x,y)).splitOn"-"$s

main= do
  let p = pr1nt
  a <- fmap re4d getLine
  b <- fmap re4d getLine
  p $ a `add` b
  p $ a `sub` b
  p $ a `mul` b
  p $ a `d1v` b

This spits a "non-exhaustive pattern-match in input" if the input given
does not match "a (+|-) bi".

I'm fairly certain that you could do import Prelude hiding (div,print,read) as long as you don't plan on ever using those functions. If you do need them you can probably import them qualified.

I know that's possible, I just didn't want to sacrifice char count :P.

Pascal, 317 bytes
The simple data type complex belongs to Extended Pascal’s vocabulary (ISO standard 10206).
However, Standard Pascal – as laid out by ISO standard 7185 – does not support complex numbers.
Complying with the task specification, the following implementation is restricted to SP.
Note, the routine read had to be renamed to readComplex, otherwise Pascal’s built‑in read procedure will become unavailable.
Similarly, the word div is a reserved word (identifies the integer division operator) and had to be renamed, too (for the purposes of scoring a three-letter identifier has been chosen).
program basicOperationsOnComplexNumbers(input, output);
    type
        complex = record
                r: real;
                j: real;
            end;
        { In _Standard_ Pascal a `function` can
          only return _simple_ data type values. }
        complexReference = ↑complex;

    var
        { These are used for the test in the main block.
          Standard Pascal has a strict block order
          (`label` → `const` → `type` → `var` → routines → `begin … end`)
          therefore these are “global” variables. }
        x, y: complex;

    { Reads a `complex` in Cartesian (rectangular) format. }
    procedure readComplex(var x: complex);
        begin
            { The `Ln` is necessary so the rest of the line
              (in particular the `'i'`) is consumed, too. }
            readLn(x.r,x.j)
        end;

    { Prints a `complex` in Cartesian (rectangular) format. }
    procedure print(x: complex);
        begin
            { For non-negative `real` values a space (`' '`) is printed.
              Therefore we will need to print the plus sign ourselves. }
            write(x.r);if x.j≥0 then write('+');write(x.j,'i')
        end;

    { Returns the sum of two `complex` numbers. }
    function add(x, y: complex): complexReference;
        var
            { The implicitly defined result variable
              bearing the function’s name (here `'add'`)
              accepts only _complete_ assignments
              (this ensures there are no _partially_ defined results).
              Therefore we will need a temporary result variable. }
            z: complexReference;
        begin
            x.r≔x.r+y.r;x.j≔x.j+y.j;new(z);z↑≔x;add≔z
        end;

    { Returns the difference of two `complex` numbers. }
    function sub(x, y: complex): complexReference;
        var
            z: complexReference;
        begin
            x.r≔x.r−y.r;x.j≔x.j−y.j;new(z);z↑≔x;sub≔z
        end;

    { Returns the product of two `complex` numbers. }
    function mult(x, y: complex): complexReference;
        var
            z: complexReference;
        begin
            new(z);z↑.r≔x.r*y.r−x.j*y.j;z↑.j≔x.r*y.j+x.j*y.r;mult≔z
        end;

    { Returns the quotient of two `complex` numbers.
      CAUTION: DOES NOT CHECK FOR NON-ZERO DIVISOR. }
    function quo(x, y: complex): complexReference;
        var
            z: complexReference;
        begin
            new(z);with z↑do begin
            r≔y.r*y.r+y.j*y.j;j≔r;r≔(x.r*y.r+x.j*y.j)/r;j≔(x.j*y.r−x.r*y.j)/j
            end;quo≔z
        end;

    { === MAIN ========================================================= }
    begin
        readComplex(x);
        readComplex(y);

        write('       sum: '); print( add(x, y)↑); writeLn;
        write('difference: '); print( sub(x, y)↑); writeLn;
        write('   product: '); print(mult(x, y)↑); writeLn;
        write('  quotient: '); print( quo(x, y)↑); writeLn
    end.

Example input:
-3.00 + 2.00i
-2.72 + 0.00i

Example output (subject to implementation-defined behavior):
       sum: -5.7200000000000006e+00+ 2.0000000000000000e+00i
difference: -2.7999999999999980e-01+ 2.0000000000000000e+00i
   product:  8.1600000000000001e+00-5.4400000000000004e+00i
  quotient:  1.1029411764705881e+00-7.3529411764705876e-01i

RosettaCode │
FreePascal Compiler Wiki │
GNU Pascal Compiler Programmer’s Guide

authors: عبد الرحمن الحريصي

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