Write a program that uses all printable non-alphanumeric ASCII symbols
Perl, 32 chars
no hiding symbols in comments, string literals, or regular expressions. uses all symbols precisely once.
$`<@"^[(\{_},)]/+-~%'?&|:!*.=>;#
Description
i have tried to indicate operator precedence with indentation: the right-most expressions are evaluated before those to their left
$` # scalar variable $ named `
< # numeric less-than inequality <
@" # array variable @ named "
# (array evaluated in scalar context)
^ # bitwise XOR ^
[(\{_},)] # array reference []
# containing array ()
# containing reference \
# to anonymous hash reference {}
# with one key "_"
# and no value (nothing following comma ,)
# (reference evaluated in scalar context)
/ # numeric division /
+-~%' # unary addition +
# and unary negation -
# and bitwise complement ~
# on hash variable % named '
# (hash evaluated in scalar context)
? # ternary conditional operator ?:
&| # code reference variable & named |
: # ternary conditional operator ?:
! *. # logical negation !
# on typeglob variable * named .
# (typeglob evaluated in scalar context)
=> # fat comma => for compound expression
# (evaluates LHS as string, RHS is empty)
; # end of expression ;
# # start of comment #
Brainf*ck, 32 characters
!"#$%&'()*+.-/:;>=<?@[\]^_`{|}~,
Prints a smiley face (if your console can output ASCII symbol 1)
Yay, a Branf*ck solution that beats Golfscript! :P
If you insist on no output, just exchange the +
and .
:
!"#$%&'()*.+-/:;>=<?@[\]^_`{|}~,
Whitespace, 32
!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
all non whitespace characters are ignored, so this is actually an empty program