g | x | w | all
Bytes Lang Time Link
057C64 Basic250716T140711ZOSI8
011Vyxal 3250715T143548ZThemooni
036Perl 5250709T202337ZXcali
007Vyxal j250707T191007Zpacman25
063AWK250520T201913Zxrs
027TIBasic210906T171926ZYouserna
037Zsh210819T122435Zroblogic
080Java JDK210819T101011Zmindover
020APLDyalog Unicode210906T162154Zwasif
095SNOBOL4 CSNOBOL4210823T112033Zuser1004
056Python 2210804T133951ZElPedro
049Excel210804T161625ZAxuary
010Jelly210804T090402ZUnrelate
040Perl 5210806T000408ZKjetil S
028PowerShell Core210804T221332ZJulian
009Vyxal j210805T122830ZAaroneou
052Python 3210804T081043ZJitse
038Ruby210804T183715ZKirill L
086PHP F210805T062934ZJaydeep
037K oK210804T120329Zwasif
032Haskell210805T011126Zlynn
057brainfuck210805T003522ZHand-E-F
035Haskell210804T194243ZAZTECCO
063C gcc210804T194642ZAZTECCO
067Wolfram Mathematica210804T182514Zpolfosol
008Husk210804T092238ZDominic
1715J210804T105314Zxash
068C gcc210804T141419ZNoodle9
025Retina 0.8.2210804T135534ZNeil
012Charcoal210804T101115ZNeil
008Stax210804T100325ZRazetime
088M4210804T095258Zuser1004
010Vyxal jr210804T091351Zwasif
037JavaScript210804T090555Ztsh
01105AB1E210804T085313Zovs
010Japt210804T084640ZShaggy
059PHP F210804T082729ZKaddath
041Python 2210804T081623Zxnor

C64 Basic, 57 bytes

BASIC V2 code

screenshot

Try in emulator

Vyxal 3, 11 bytes

ƛ')×Ꮬ:-p⊖“,

Vyxal It Online!

ƛ')×Ꮬ:-p⊖“,­⁡​‎‎⁡⁠⁡‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁢‏⁠‎⁡⁠⁣‏⁠‎⁡⁠⁤‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢⁡‏⁠‎⁡⁠⁢⁢‏⁠‎⁡⁠⁢⁣‏⁠‎⁡⁠⁢⁤‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁣⁡‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁣⁢‏⁠‎⁡⁠⁣⁣‏‏​⁡⁠⁡‌­
ƛ            # ‎⁡map over implicit range 1..input
 ')×         # ‎⁢")" times that number (it's too many times but it'll get trimmed later)
    Ꮬ:-p     # ‎⁣prepend ":-"
        ⊖    # ‎⁤take the first n chars
         “,  # ‎⁢⁡display one per line
💎

Created with the help of Luminespire.

<script type="vyxal3">
ƛ')×Ꮬ:-p⊖“,
</script>
<script>
    args=[["1"],["2"],["5"]]
</script>
<script src="https://themoonisacheese.github.io/snippeterpreter/snippet.js" type="module"/>

Perl 5, 36 bytes

say":","-"x!!$_--,')'x$_ for 0..<>-1

Try it online!

Vyxal j, 7 bytes

‛):‹eǓ¦

Try it Online!

using the latest and greatest vyxal 2 we can shave off another two bytes thus beating all other answers

AWK, 63 bytes

{for(;i++<$1;print"")for(j=0;j++<i;)printf 1~j?":":2~j?"-":")"}

Attempt This Online!

TI-Basic, 40 35 27 bytes

Input N
Disp ":
":-
For(I,2,N
Disp Ans
Ans+")
End

-5 bytes thanks to MarcMush

-8 bytes thanks to MarcMush

Zsh, 53 39 37 bytes

a=:-;for n ({1..$1})a+=\)&&<<<$a[1,n]

Try it online!  39 bytes  53 bytes

Realised I was wasting bytes by doing 2 loops when one would suffice.

Java (JDK), 82 80 bytes

String a(int n){return(n>1?a(n-1):"")+(":-"+")".repeat(n)).substring(0,n)+"\n";}

Try it online!

Recursively append longer smileys. A different approach might be shorter...

-2 thanks to ceilingcat!

APL(Dyalog Unicode), 20 bytes SBCS

{,\⍵⍴':-',')'⍴⍨|⍵-2}

Try it on APLgolf!

Monadic function

{...} monadic function, takes n on right

⍵-2 n minus 2

| abs (No. of braces, call it x)

swap x with

')' brace for

dyadic reshape to get x braces

, concat with

':-' smiley head

⍵⍴ take first n (monadic reshape)

,\ prefixes (ravel scan)

SNOBOL4 (CSNOBOL4), 109 95 bytes

 n =input
b s =gt(n,1) char(10) ':-' dupl(')',n - 2) s :f(c)
 n =n - 1 :(b)
c output =':' s
end

Try it online!

Python 2, 56 bytes

i=input()
o=':-'+')'*i
for x in range(1,i+1):print o[:x]

Try it online!

Without the leading newline

Python 2, 54 bytes

i=input()
o=':-'+')'*i
for x in range(i+1):print o[:x]

Try it online!

Never going to be a winner. Just an alternative approach.

55 bytes

lambda x:'\n'.join((':-'+')'*x)[:x]for x in range(x+1))

Try it online!

Another alternative using a lambda, surprisingly longer than using input(). It's that join() that's expensive.

Excel, 37 49 bytes

+12 bytes to accommodate clarification that the output should be one string

=CONCAT(LEFT(":-"&REPT(")",A1),SEQUENCE(A1))&"
")

This returns one string as opposed to the earlier version which returned multiple cells each containing a string. Due to the Excel string limit, this only works for n <= 254.

Link to Spreadsheet

=LEFT(":-"&REPT(")",A1),SEQUENCE(A1))

Previous version that works for n <= 32767.

Jelly, 10 bytes

“:-)”ṁ«\)Y

Try it online!

        )     Map over (the range from 1 to) the input:
“:-)”ṁ        Mold ":-)" to the shape of the argument, cycling its contents.
      «\      Scan by minimum: replace anything to the right of ) with ).
         Y    Join on newlines.

Thanks to Jonathan Allan for salvaging my first attempt, ”)xⱮa⁾:-Y, for another 10-byter:

Jelly, 10 bytes

”)xa⁾:-ṁ)Y

Try it online!

        )     Map over (the range from 1 to) the input:
”)x           Repeat ")" by the argument.
   a⁾:-       Zipwith-vectorize logical AND with ":-":
              overwrite the first two characters with ":-".
       ṁ      Mold to the shape of the argument, trimming the extra "-" for 1.
         Y    Join on newlines.

Perl 5, 40 bytes

sub f{map{substr':-'.')'x99,0,$_}1..pop}

Try it online!

PowerShell Core, 43 33 28 bytes

':-'+')'*"$args"|% *ve @args

Try it online!

Saved 10 bytes thanks to mazzy!
Saved 5 bytes by:

Vyxal j, 9 bytes

⇩\)*‛:-p¦

Try it Online!

Wasif said I should post my 9-byter as my own answer, but I thought it was too similar to his, so I got rid of the map lambda and the slice, just because why not. :P

Explanation:

⇩          # x = input - 2
 \)*       # Push a 'x' long string of ')'
    ‛:-p   # Prepend the string ':-'
        ¦  # Prefixes
           # 'j' flag - Join top of stack on newlines and print

Python 3, 52 bytes

lambda n:[print((':-'+')'*i)[:-1])for i in range(n)]

Try it online!

-1 byte thanks to Mohammad

Ruby, 40 38 bytes

->n{n.times{|i|puts":-#{?)*n}"[0..i]}}

Try it online!

PHP -F, 86 bytes

Without any predefined funcation!

for($n=0;$n<$argn;$n++){echo':';for($i=1;$i<=$n;$i++){echo$i>1?')':'-';}echo PHP_EOL;}

Try it online!

Thanks.

K (oK), 37 bytes

{({(":-",(x-2)#")")[!x]}'!x+1)[1+!x]}

Try it online!

My first non trivial K answer, a lot of room for inprovement.

Haskell, 32 bytes

(`take`(":":iterate(++")")":-"))

Try it online!

brainfuck, 57 bytes

This assumes the initial memory location contains n in binary (0x05 == 5). The TIO link allows a single ASCII character as input and converts it to binary.

->>++++++++[-<+++++++>]<++.<[->-------------.----<[->.<]]

Try it online!

Haskell, 37 35 bytes

f x=($":-"++cycle")").take<$>[1..x]

Try it online!

C (gcc), 63 bytes

f(x){x&&f(x-1)+g(x);}g(x){x&&g(x-1);putchar("\n:-)"[x<3?x:3]);}

Try it online!

Wolfram Mathematica, 67 bytes

Column@With[{n=#},":-"<>")"~StringRepeat~n~StringTake~#&/@Range@n]&

Try it online!

For some reasons unbeknownst to me, TIO doesn't display the list in column form. But if you run it in Mathematica, it will generate the desired result.

Explanation:

s=":-"<>StringRepeat[")",n]   (* generates the main string *)
StringTake[s,#]& /@ Range[n]  (* a list of substrings up to length n *)

Husk, 11 10 9 8 bytes

Edit: -1 byte simultaneously spotted by Razetime

↑ḣ¡→":-)

Try it online!

    ":-)    # the string ":-)"
  ¡         # construct infinite list by repeatedly appending
   →        # last element of list so far;
 ḣ          # now make list of all prefixes,  
↑           # and take number of elements equal to input

J, 17 15 bytes

-1 thanks to Jonah!

[:]\$!.'('&':-'

Try it online!

Reshape :- with fill ( to length n. [:[\ return each prefix.

C (gcc), 68 bytes

i;f(n){char*s=calloc(n,4);for(s[i=0]=58;n--;s[i]=i++?41:45)puts(s);}

Try it online!

Retina 0.8.2, 25 bytes

.+
$*)
^.
:
:.
:-
.
$`$&¶

Try it online! Explanation:

.+
$*)

Start with n chins.

^.
:

Change the first chin into eyes.

:.
:-

Change the second chin, if any, into a nose.

.
$`$&¶

Output all of the nontrivial prefixes.

Charcoal, 12 bytes

NθG↓→θ⁺:-×)θ

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

Nθ

Input n.

G↓→θ

Draw a triangle of size n.

⁺:-×)θ

Paint the triangle using a smiley with n chins.

Stax, 8 bytes

╞■¼╤╝<Ñ┬

Run and debug it

outputs with newlines.

M4, 88 bytes

Just a port of the syntax in OP.

define(g,`ifelse($1,2,,`)g(decr($1))')')define(f,`ifelse($1,1,:,`f(decr($1))
:-g($1)')')

Try it online!

Usage

f(number here)

Vyxal jr, 10 bytes

ƛ?\)*‛:-+Ẏ

Try it Online!

Thanks to @emanresuA for -2 bytes

Vyxal j, 12 bytes

‛:-?⇩\)*+¦?Ẏ

Try it Online!

JavaScript, 37 bytes

f=n=>--n?f(n)+(s=n>1?s+')':`
:-`):':'

Try it online!

05AB1E, 11 bytes

…:-).ÞI£Jη»

Try it online!

Or, for the same length:

')ׄ:-쨨η»

Try it online!

…:-)         # string literal ":-)"
    .Þ       # cycle last character to create infinite list
      I£     # take the first input characters
        J    # join into a string
         η   # take all prefixes
          »  # join by newlines

')×          # repeat ")" input times
   „:-ì      # prepend ":-"
       ¨¨    # remove the last two characters
         η»  # join the prefixes by newlines

Japt, 11 10 bytes

Outputs an array of lines.

õî":-"ú')U

Try it

õî":-"ú')U     :Implicit input of integer U
õ              :Range [1,U]
 î             :For each slice the following to that length
  ":-"         :  Literal string
      ú')U     :  Right padded with ")" to length U

PHP -F, 59 bytes

for(;$i<$argn;)echo$i++?":-".str_repeat(")",$i-2)."
":":
";

Try it online!

Straightforward stuff.. Probably golfable a bit more, I'll try other things later

Python 2, 41 bytes

s=':-'
exec"print s[:-1];s+=')';"*input()

Try it online!

42 bytes

s,c=':-'
exec"print s;s+=c;c=')';"*input()

Try it online!

43 bytes

s=':'
exec"print s;s+='-)'[s>':'];"*input()

Try it online!