Remove vowels without using too many different characters
Brainfuck, 8 distinct (2121 total)
>,+[-<>>>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>[-]++<[-<+>>>>->>>->>>->>>->>>->>>->>>->>>->>>->>>-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[<<<]+>-[<-<.>>-]<[<<<]<[-]>,+]
The distict characters: <>+-[],.
. Works with interpreters that use -1
for EOF
.
$ echo '
This program will remove VOWELS.
So we can now speak without them.
' | bf vowel-rm.bf
Ths prgrm wll rmv VWLS.
S w cn nw spk wtht thm.
Whitespace, 3 points (218 chars)
You knew it was coming.
↲___↲____↲⇥↲⇥_____↲___⇥_____⇥↲___⇥___⇥_⇥↲___⇥__⇥__⇥↲___⇥__⇥⇥⇥⇥↲___⇥_⇥_⇥_⇥
↲___⇥⇥____⇥↲___⇥⇥__⇥_⇥↲___⇥⇥_⇥__⇥↲___⇥⇥_⇥⇥⇥⇥↲___⇥⇥⇥_⇥_⇥↲↲___⇥↲_↲_↲⇥_⇥↲___
_↲⇥⇥⇥⇥__⇥↲⇥_↲↲_↲_⇥↲↲__↲↲⇥__↲↲_↲↲↲__⇥↲____↲⇥⇥⇥_↲_↲⇥___↲⇥↲__↲_↲_↲↲____↲↲↲↲
(_ = space, ⇥ = tab, ↲ = newline)
Here's the script encoded in base64:
CiAgIAogICAgCgkKCSAgICAgCiAgIAkgICAgIAkKICAgCSAgIAkgCQogICAJICAJICAJCiAgIAkg
IAkJCQkKICAgCSAJIAkgCQogICAJCSAgICAJCiAgIAkJICAJIAkKICAgCQkgCSAgCQogICAJCSAJ
CQkJCiAgIAkJCSAJIAkKCiAgIAkKIAogCgkgCQogICAgCgkJCQkgIAkKCSAKCiAKIAkKCiAgCgoJ
ICAKCiAKCgogIAkKICAgIAoJCQkgCiAKCSAgIAoJCiAgCiAKIAoKICAgIAoKCgo=
And here's the program written in visible assembler-like form:
ioloop: charin 0
push 0, 'A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u'
ckloop: dup
jz out
get 0
sub
jz skip
jump ckloop
skip: jz ioloop
jump skip
out: get 0
dup
jz done
charout
jump ioloop
done: exit
SED (10 distinct bytes, 13 total)
s/[aeIou]//gI
Sample usage:
echo The quick brown fox jumps over the lazy dOg. | sed -e s/[aeIou]//gI
outputs:
Th qck brwn fx jmps vr th lzy dg.