Inspiration: in 1939, a man named Ernest Vincent Wright wrote a novel called Gadsby without using the letter 'e'.

Your task is to write a set of (up to 5) programs in any language (which has a text-based syntax*) to output all 26 letters of the alphabet in order. However for each vowel aeiou, at least one of the programs must not include any occurrence of the vowel.

So there must be

  • a program that does not use 'a' or 'A' anywhere in the syntax of the program.
  • a program that does not use 'e' or 'E' anywhere in the syntax of the program.
  • a program that does not use 'i'  or 'I' anywhere in the syntax of the program.
  • a program that does not use 'o' or 'O' anywhere in the syntax of the program.
  • a program that does not use 'u' or 'U' anywhere in the syntax of the program.

All of them must output abcdefghijklmnopqrstuvwxyz.

The winner shall be the solution where the length of all programs is the shortest.

* since the constraint wouldn't be much of a challenge in Piet or Whitespace

Current rankings (06 Mar 2014):

The Catalogue

The Stack Snippet at the bottom of this post generates the catalogue from the answers a) as a list of shortest solution per language and b) as an overall leaderboard.

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

## Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

## Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

## Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the snippet:

## [><>](https://esolangs.org/wiki/Fish), 121 bytes

/* Configuration */

var QUESTION_ID = 196898; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 8478; // This should be the user ID of the challenge author.

/* App */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;

function getAnswers() {
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answers_hash[id] = a;
      if (!data.has_more) more_answers = false;
      comment_page = 1;

function getComments() {
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();


var SCORE_REG = /<h\d>\s*([^\n,<]*(?:<(?:[^\n>]*>[^\n<]*<\/[^\n>]*>)[^\n,<]*)*),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;

function process() {
  var valid = [];
  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
        body = '<h1>' + c.body.replace(OVERRIDE_REG, '') + '</h1>';
    var match = body.match(SCORE_REG);
    if (match)
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
    else console.log(body);
  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);

    var lang = a.language;
    lang = jQuery('<a>'+lang+'</a>').text();
    languages[lang] = languages[lang] || {lang: a.language, lang_raw: lang, user: a.user, size: a.size, link: a.link};

  var langs = [];
  for (var lang in languages)
    if (languages.hasOwnProperty(lang))

  langs.sort(function (a, b) {
    if (a.lang_raw.toLowerCase() > b.lang_raw.toLowerCase()) return 1;
    if (a.lang_raw.toLowerCase() < b.lang_raw.toLowerCase()) return -1;
    return 0;

  for (var i = 0; i < langs.length; ++i)
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);

body {
  text-align: left !important;
  display: block !important;

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;

#language-list {
  padding: 10px;
  width: 500px;
  float: left;

table thead {
  font-weight: bold;

table td {
  padding: 5px;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/codegolf/all.css?v=ffb5d0584c5f">
<div id="language-list">
  <h2>Shortest Solution by Language</h2>
  <table class="language-list">
    <tbody id="languages">

<div id="answer-list">
  <table class="answer-list">
    <tbody id="answers">

<table style="display: none">
  <tbody id="answer-template">
    <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr>
<table style="display: none">
  <tbody id="language-template">
    <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr>

  • 4
    \$\begingroup\$ @w0lf: No, it says "up to 5 programs" and "length of all programs", which I read as "there can be only one program and its length counts in this case". \$\endgroup\$ – schnaader Apr 24 '12 at 11:09
  • 9
    \$\begingroup\$ @PeterTaylor: You don't think having to avoid using vowels in your syntax is a unique challenge? As a JS programmer, it's especially interesting :) \$\endgroup\$ – mellamokb Apr 24 '12 at 13:51
  • 2
    \$\begingroup\$ Are newlines acceptable in the output (i.e. one per character)? I can shorten some of my code if that is the case... \$\endgroup\$ – Gaffi Apr 24 '12 at 21:17
  • 2
    \$\begingroup\$ Is uppercase output allowed? \$\endgroup\$ – Erik the Outgolfer Sep 16 '16 at 11:09
  • 2
    \$\begingroup\$ I'm the OP. Uppercase not allowed. \$\endgroup\$ – shamp00 Sep 17 '16 at 5:21

117 Answers 117


Golfscript - 8 chars

  • 8
    \$\begingroup\$ damn, really can't beat golfscript in terms of conciseness... \$\endgroup\$ – Patrick Oscity Apr 25 '12 at 11:12
  • 18
    \$\begingroup\$ That being said, the readability stinks like crazy. \$\endgroup\$ – Andrew Gray Apr 9 '13 at 17:25
  • 5
    \$\begingroup\$ It's not that bad ;) generate a list of 123 numbers, remove those who aren't greater than 97, coerce it (array of numbers) to a string. \$\endgroup\$ – McKay Jan 29 '14 at 16:38
  • 5
    \$\begingroup\$ Use 91,65>+ instead. \$\endgroup\$ – Erik the Outgolfer Aug 3 '16 at 17:00
  • \$\begingroup\$ Funny to read old comments marveling about how concise Golfscript is now that we have golfing languages like O5AB1E \$\endgroup\$ – Redwolf Programs Aug 18 '20 at 17:45

Brainfuck, 38 chars


There are, of course, no vowels (or any other letters) in brainfuck syntax.

  • 2
    \$\begingroup\$ Valid point there! ;) \$\endgroup\$ – WallyWest Dec 16 '13 at 0:17
  • 4
    \$\begingroup\$ 30 bytes: ++[[<+++>->++++<]>]<<<<++[->+.<] \$\endgroup\$ – primo Aug 7 '16 at 3:13

PHP, 31 Bytes

No a,e,i,o,u:


The binary string after the tilde has the following hex representation:


Since there's a language scoreboard, I may as well submit this one as well:

Ruby (v1.8) 18 bytes

  • \$\begingroup\$ I'm not sure I understand how this works. Could I get an explanation? \$\endgroup\$ – Mr. Llama Apr 25 '12 at 18:22
  • \$\begingroup\$ When applied to a string, the ~ operator inverts all of the bits. Here I've inverted abc...xyz. Because there are no symbols characters (or whitespace) in the binary string, quotes are not necessary either. \$\endgroup\$ – primo Apr 25 '12 at 18:31
  • 1
    \$\begingroup\$ You may want to specify an encoding for what you have there. \$\endgroup\$ – Joey Apr 26 '12 at 5:36
  • 1
    \$\begingroup\$ iso-8859-1. Three 'unprintable' characters were removed when it was posted, which is why I included the hex. \$\endgroup\$ – primo Apr 26 '12 at 6:33
  • 2
    \$\begingroup\$ Nice and probably the shortest possible PHP version. A command to generate the file: php -r 'echo("<?=~\x9e\x9d\x9c\x9b\x9a\x99\x98\x97\x96\x95\x94\x93\x92\x91\x90\x8f\x8e\x8d\x8c\x8b\x8a\x89\x88\x87\x86\x85;");' > script.php. The command to run it: php -d error_reporting=0 script.php; echo. \$\endgroup\$ – axiac Aug 18 '15 at 12:39

Pyth, 1 Character


Pyth predefines certain variables. G is predefined as the lowercase alphabet. Pyth also implicitly prints each line with a reasonable return value.

  • 3
    \$\begingroup\$ Ninja'd me by 3 years... \$\endgroup\$ – Stan Strum Sep 6 '17 at 3:23

Ruby (24 22)

Edit: parentheses can be omitted, 2 chars less:


24 chars in Ruby:


How it works

$> is an alias for $stdout or STDOUT. You can write to it using the << operator. The term '%c'*26 repeats the string '%c' 26 times. The % operator is defined on String as an alias to sprintf, so str % val is equivalent to writing sprintf(str,val). The format character %c is used to transform a char value to a char. These values come from [*97..122] which creates an array containing the values from 97 to 122. Et voilá!

  • \$\begingroup\$ Very nice. I was looking for a way to use << but had forgotten about $>. \$\endgroup\$ – Mark Reed Apr 25 '12 at 10:49
  • 1
    \$\begingroup\$ I didn't even know about $> before, but i guessed there had to be some dollar-variable alias for $stdout that no one can remember :) \$\endgroup\$ – Patrick Oscity Apr 25 '12 at 11:04
  • \$\begingroup\$ 21 characters: $><<[*"`".."z"][1,26] (note: this only works in Ruby 1.8) \$\endgroup\$ – Ventero May 5 '12 at 0:11
  • \$\begingroup\$ @Ventero not only in Ruby 1.8, in Ruby 1.9.2 works as well. But using p [*"".."z"][1,26]` is even shorter. \$\endgroup\$ – Hauleth Sep 14 '12 at 9:57
  • \$\begingroup\$ @Hauleth: No, running it in 1.9 doesn't generate the correct output, as in 1.9 Array#to_s is the same as Array#inspect, whereas in 1.8 it's Array#join - so in 1.9 the output is ["a", "b", "c", "d", "e", ...] instead of abcdef.... For the same reason, p can't be used (it calls inspect on its arguments, instead of to_s). \$\endgroup\$ – Ventero Sep 14 '12 at 10:08

JavaScript (100)

No 'aeou':


No 'i':

  • \$\begingroup\$ +1 Nice improvement on my answer :) I had thought about using the \x## codes but weren't sure if they were valid in JavaScript. \$\endgroup\$ – mellamokb Apr 24 '12 at 16:28
  • \$\begingroup\$ why the alerts at all? on a js terminal, objects are echo'd automagically. ('\x61bcd\x65fghijklmn\x6fpqrst\x75vwxyz') @ 42 characters. \$\endgroup\$ – antony.trupe Apr 24 '12 at 17:26
  • 3
    \$\begingroup\$ @antony.trupe, for code golf, IO is typically done via the language's built in IO mechanisms (or common plugins). For JS this is typically alert, confirm, prompt, console.log, and document.write. Simply declaring a string literal doesn't produce it as output when executed. Otherwise, you'd be correct, and I would have used that. \$\endgroup\$ – zzzzBov Apr 24 '12 at 17:52
  • \$\begingroup\$ it produces output(by the definition I use anyways) in the google chrome console, but I concede the issue; it's an arbitrary restriction to begin with. \$\endgroup\$ – antony.trupe Apr 24 '12 at 18:32
  • \$\begingroup\$ @antony.trupe, in a language like PHP you'd be able to get away with using a literal, because that's how it performs IO. \$\endgroup\$ – zzzzBov Apr 24 '12 at 18:35






  • 2
    \$\begingroup\$ and a silly way to do it with no letters at all (12 chars): (@$`)$97+!26 \$\endgroup\$ – Aaron Davies Jan 20 '14 at 9:56
  • 1
    \$\begingroup\$ The K5 way is nearly your second solution but $ takes symbols instead of strings to control the type converted into: `c$97+!26 \$\endgroup\$ – JohnE Jun 2 '15 at 3:17

J, 26 23 17 16 characters

After an hour or so rummaging around in J's underwear drawer I've finally found a way to eliminate the a. and u: verbs.




with thanks to randomra for the #\ trick.

  • \$\begingroup\$ Nice solution! Managed to shorten with 1 char using #\ instead of +/\ . \$\endgroup\$ – randomra Apr 9 '13 at 0:47
  • 5
    \$\begingroup\$ Get out of my underwear drawer \$\endgroup\$ – Joe Dec 3 '14 at 10:33

R, 17 + 19 = 36 characters

no ae (17):


no iou (19):


Bash (38)

No vowels at all.

/*/*/*ntf "/*/?ch? {\x61..z}"|/*/b?sh
  • \$\begingroup\$ This program fails on my system, because /*/b?sh does not exist. I have /usr/local/bin/bash, not /bin/bash. \$\endgroup\$ – kernigh May 4 '12 at 17:36
  • 2
    \$\begingroup\$ Nice use of shell globbing! \$\endgroup\$ – Mechanical snail May 19 '12 at 21:48
  • \$\begingroup\$ @kernigh [[ ! -d "/bin" ]] && mkdir "/bin"; sudo cp "/usr/local/bin/bash" "/bin/bash" \$\endgroup\$ – Stan Strum Jan 7 '18 at 2:09
  • \$\begingroup\$ It would be better if /bin/sh is bash. Then the code can end with /*/sh (36 bytes). But I have not found a system where this works. In Debian, /bin/sh isn't bash. In my old Mac, /bin/sh is bash 2.05b0.(1), but this version is too old and doesn't expand {a..z}. \$\endgroup\$ – kernigh Jan 7 '18 at 21:25

C, 90 88 84 characters

Compile using gcc -nostartfiles

b;_exit(){for(;b<26;)printf("%c",b+++97);}    // 42 chars, works for a, u
b;_start(){putchar(b+++97)>121?:_start();}    // 42 chars, works for e, i, o
  • \$\begingroup\$ _start and _exit are a nice way to get around main. But if a non-standard compilation line is OK, why not -DX=main? \$\endgroup\$ – ugoren Apr 24 '12 at 12:53
  • 4
    \$\begingroup\$ Somehow, -DX=main feels worse than -nostartfiles does (for me). It is a way to move a part of the source code to the compilation line and it is the same as writing #define X main in the source code which would be clearly invalid. Whereas -nostartfiles isn't a way to rename main, but removes the restriction that there must be a main function (called in _start). On the other hand, using -nostartfiles does feel a bit like cheating, especially as it contains 4 of the 5 "bad" letters :) \$\endgroup\$ – schnaader Apr 24 '12 at 13:21
  • \$\begingroup\$ It's a slippery slope... The distance from -nostartfiles to -DX=main is small, and then why not save some chars with -DX=main() and so forth. But I can't find a solution that doesn't involve anything fishy. \$\endgroup\$ – ugoren Apr 24 '12 at 16:22
  • \$\begingroup\$ There's no way you can define the main function to be "mn" for instance? \$\endgroup\$ – Neil Apr 26 '12 at 10:22
  • \$\begingroup\$ @Neil, only by doing something like -Dmn=main. A C function must have a main function unless a non-standard option like -nostartfiles is used. \$\endgroup\$ – Matthew Flaschen Apr 29 '12 at 3:17

Golfscript, 10 characters

  • 20
    \$\begingroup\$ Why so verbose? \$\endgroup\$ – Peter Taylor Apr 24 '12 at 13:43

BASH: 40 characters

  • No aeiou used.
  • No wildcard used.
`tr c-y '\141-w'<<<'rtkpvh %s c'` {b..z}

Ruby, 20 chars

  • 97.chr is an elaborate way of saying 'a'
  • .. specifies a Range
  • ?z is a shorter way of saying "z"
  • the [*range] causes the range to splat al it's values in an array
  • *'' is the same as join(''); it glues all array values together.
  • $><< Perlicism: print to stdout.
  • \$\begingroup\$ This code doesn't seem to work. ?z is not shorthand for 'z', but rather for 122. This, however, does work for 18 bytes: $><<[*97.chr..'z'] \$\endgroup\$ – primo Sep 13 '12 at 7:17
  • \$\begingroup\$ It does work in Ruby 1.9. \$\endgroup\$ – steenslag Sep 13 '12 at 14:42
  • 1
    \$\begingroup\$ I downloaded 1.9.3... and you're right. Why would they change something like that? I can see why anarchy golf is still running 1.8.7. Anyway, the 18 byte solution works for v1.8.7- \$\endgroup\$ – primo Sep 13 '12 at 15:30
  • 2
    \$\begingroup\$ (4 years later...) You can replace 97.chr with ?\x61 for -1 byte. \$\endgroup\$ – Jordan Sep 16 '16 at 5:46

dc: 18 17 characters


And there died a brave character.

  • \$\begingroup\$ I doubt so. I'm wrapping head around it and I don't see any way to shorten it. I have ended with exactly same solution except I used x for register which makes mine solution more obfuscated. \$\endgroup\$ – Hynek -Pichi- Vychodil Apr 21 '13 at 21:01
  • 3
    \$\begingroup\$ 97[dP1+dBD>m]dsmx, 17 characters. Apparently you can always enter hexadecimal characters in DC, but as the input base is ten the value is B*10+D=11*10+13=123='{', and not 0xBD. \$\endgroup\$ – Fors Apr 21 '13 at 22:53
  • \$\begingroup\$ Oh, nice glich ;-) \$\endgroup\$ – Hynek -Pichi- Vychodil Apr 21 '13 at 23:25

Powershell, 75 62 characters

Edit: Used -f (String.Format) and array indexing to significantly reduce the code length.


How it works

gm is an alias for get-members, so 1|gm returns members of the value 1, which is of the System.Int32 type:

PS C:\> 1|gm
   TypeName: System.Int32
Name        MemberType Definition
----        ---------- ----------
CompareTo   Method     int CompareTo(System.Object value), int CompareTo(int value)
Equals      Method     bool Equals(System.Object obj), bool Equals(int obj)
GetHashCode Method     int GetHashCode()

"$(1|gm)" returns a string representation of the above list, which happens to contain all the vowels we need to complete the alphabet: "int CompareTo(System.Object value)..."

  • 2
    \$\begingroup\$ This isn't stable if MS adds members to System.Int32, though :-) \$\endgroup\$ – Joey Apr 26 '12 at 5:12
  • \$\begingroup\$ I think that would have to be ($x=''+$(gv))[8]+"bcd$($x[4])fgh$($x[25])jklmn$($x[26])pqrst$($x[19])vwxyz" which is also 75 characters :) \$\endgroup\$ – Danko Durbić Apr 26 '12 at 7:02
  • \$\begingroup\$ Argh, right. I fished the wrong item from my history. Sorry. \$\endgroup\$ – Joey Apr 26 '12 at 7:53
  • \$\begingroup\$ Actually, if you replace ''+$(gv) with "$(gv)" you get ($x="$(gv)")[8]+"bcd$($x[4])fgh$($x[25])jklmn$($x[26])pqrst$($x[19])vwxyz" which is 74 characters. Nice! \$\endgroup\$ – Danko Durbić Apr 26 '12 at 8:54
  • 2
    \$\begingroup\$ I used -f (String.Format) and array indexing to significantly reduce the code length. \$\endgroup\$ – Tim Lewis Mar 4 '14 at 20:03

Haskell, 12


Or is this cheating? :)

  • \$\begingroup\$ I admittedly don't know much about Haskell, but it gives me this error: Parse error: naked expression at top level \$\endgroup\$ – primo Dec 20 '12 at 9:39
  • 1
    \$\begingroup\$ You run it in the interpreter \$\endgroup\$ – RobAu Dec 20 '12 at 10:21

MATLAB, 12+20=32 characters

No eiou (12):


No aeou (20)


In Perl,

it's also possible without any vowels

but much harder than in Ruby etc. This uses a total of 101 chars but doesn't require cmd line (perl -e) invocation.


=> Result: abcdefghijklmnopqrstuvwxyz

In contrast to the 'similar looking' PHP Solution, this is a real program. The program decoded reads:

perl -e "print STDERR a..z"

After encoding to octal values, another perl interpreter is called during run by the `` (backticks). The backticks would consume the output, therefore it's printed to STDERR.

The encoding is done by sprintf:

my $s = q{perl -e "print STDERR a..z"};
my $cmd = eval(
       '"' . join('', map sprintf("\\%o",ord $_), split //, $s) . '"'

and the eval'd encoding is the program posted (within backticks):




  • 8
    \$\begingroup\$ You could shorten this to 44 characters by only encoding the vowels :) \$\endgroup\$ – marinus Apr 30 '12 at 22:35

Perl 5, 22 characters

(1) only contains a and e, 10 chars (requires 5.10+, run from the command line):


(2) only contains 'i', 12 chars:

print v97..z

If not allowed to run from the command line, then you need to use use 5.01;say a..z for the first one, at a cost of 7 characters and one more vowel, but it still has no 'i', so it results in a valid entry at 29 total characters.

  • \$\begingroup\$ The '-E' option is ok I think, but usually the 2 characters '-E' are added into the total character length. \$\endgroup\$ – Gareth Apr 24 '12 at 15:56
  • \$\begingroup\$ @gareth - the -E takes the place of -e for running a one-liner. If you're running a program from a file, then you're stuck with the use, although you could replace it with the command line option -M5.01 and shave off two more characters. \$\endgroup\$ – Mark Reed Apr 24 '12 at 16:17
  • \$\begingroup\$ I was thinking of the rule with the -p option where 2 characters are added to the count. Looking at this meta question though, you should be able to use the -M5.010 for free if that option helps shorten your code. \$\endgroup\$ – Gareth Apr 24 '12 at 16:29
  • \$\begingroup\$ you could replace your print statement with die to shave off 2 chars \$\endgroup\$ – ardnew Apr 30 '12 at 20:49
  • \$\begingroup\$ chr 97..z may be replaced with v97..z for 3 bytes. \$\endgroup\$ – primo Jul 24 '13 at 7:01

APL (Dyalog) (11 13)

You might need an APL font. This is supposed to be Unicode but there's no preview...

Only U (and perhaps if counting Greek vowels):

⎕UCS 96+⍳26

(That's: [quad]UCS 96+[iota]26)

Only A:

  • 2
    \$\begingroup\$ U is a vowel... \$\endgroup\$ – Tobia Jul 24 '13 at 23:26
  • \$\begingroup\$ @Tobia: and it took over a year for someone to see that (including me). I guess iota is actually also a vowel now that I'm thinking about it. Fixed it. \$\endgroup\$ – marinus Jul 25 '13 at 20:35
  • \$\begingroup\$ The APL functional symbol iota (U+2373) is not considered a letter in Unicode, and therefore can't be a vowel. Note, that it is distinct from the Greek small letter iota (U+03B9). \$\endgroup\$ – ngn Jun 13 '14 at 9:31

Python 2, 83

No a, i, o or u; 47:

x=97;s='';exec"s+=chr(x);x+=1;"*26+"pr\x69nt s"

No e; 36:


Python 2, 175 characters

Note: prints to output unlike earlier python answer.

Uses 'e', but no a,i,o,u - 63 61 59 65 (fix mistaken i move to lowercase) 115 chars (get rid of spaces).

exec('fr%cm sys %cmp%crt*\nf%cr x %cn r%cnge(97,123):std%c%ct.wr%cte(chr(x)),'%(111,105,111,111,105,97,111,117,105))

(Originally, it used print with a comma that inserted a space; also printed upper case letters. Now saw stringent requirements for 'abcdefghijklmnopqrstuvwxyz' as output; so adding import statement).

Doesn't use 'e' (uses a,i,o,u; could trivially get rid of a,u for small extension) - 61 60 chars

import string
print string.__dict__['low%crcas%c'%(101,101)]
  • 1
    \$\begingroup\$ Your first solution does use the letter i, so it should be: exec('f%cr x %cn r%cnge(65,91):pr%cnt chr(x),'%(111,105,97,105)) and we're back to 64 characters. \$\endgroup\$ – BioGeek Apr 26 '12 at 11:02
  • 1
    \$\begingroup\$ exec('fr%cm sys i mp%crt*\nf%cr... \$\endgroup\$ – Gareth Apr 26 '12 at 14:20
  • \$\begingroup\$ BioGeek & @Gareth - my manual vowel detection skills suck. Thanks for point it out; but I had an extra e written as a '%c' so in the end it evens out. \$\endgroup\$ – dr jimbob Apr 26 '12 at 15:58
  • \$\begingroup\$ You can remove the parentheses from exec('...') \$\endgroup\$ – mbomb007 Sep 16 '16 at 16:52

JavaScript (154)

(1) Only contains i (99 chars):


(2) Only contains aeou (55 chars):


Demo: http://jsfiddle.net/SvN5n/

  • \$\begingroup\$ $("h\x65\x61d")[0]["\x6fwn\x65rD\x6fc\x75m\x65nt"]["l\x6fc\x61t\x69\x6fn"]="j\x61v\x61scr\x69pt:\x65v\x61l(`f\x6fr(s='',l=65;l<90;l++){s=s+Str\x69ng.fr\x6fmCh\x61rC\x6fd\x65(l);};c\x6fns\x6fl\x65.l\x6fg(s)`)" 208chars, no aeoui used in code. Works on chrome browser. \$\endgroup\$ – Esc Điệp Oct 3 '19 at 10:09

Python 159 117

As mentioned in the other python post the hardest part is dealing with the fact that the only way to output is to use print or sys.stdout.write, both of which contain i. Have to do it with 2 programs (which are freestanding and don't use the python interactive shell to create the output):

This one only uses i for 55 chars:


This one avoids using i for 104 chars:


EDIT: Massive breakthrough!!! I was thinking that use of eval (or even exec) was a bit of a cheat and not truly in the spirit of the competition. Anyway, trawling through the builtins I found a way to get hold of the print function without using i. So here is the avoid-i (and o) program for 68 chars:


But because that also avoids o, this can be paired with one that only avoids a, e, u for 49 chars:

  • \$\begingroup\$ You can toss away compatibility, and gain a character - vars(vars().values()[0]).values()[47] \$\endgroup\$ – ugoren May 6 '12 at 20:43

Ruby 196 164 44 47

  • \$\begingroup\$ Is this a valid answer, since p outputs quotation marks around the alphabet? \$\endgroup\$ – Mark Reed Apr 24 '12 at 14:51
  • \$\begingroup\$ i agree p x is equivalent to calling puts str.inspect, which results in surrounding quotation marks. \$\endgroup\$ – Patrick Oscity Apr 25 '12 at 11:13
  • \$\begingroup\$ @padde you are both right; changed. \$\endgroup\$ – Cristian Lupascu Apr 25 '12 at 11:52
  • 1
    \$\begingroup\$ @padde I used your $><<, so +1 for that and congratulations; your version is much better \$\endgroup\$ – Cristian Lupascu Apr 25 '12 at 11:54

Ruby, 22


No letters whatsoever :)


VBA: 76 brute force, 116 without 'cheating' (98 if newlines are acceptable in the output)

Standard Functions

Thanks to VBA's verbosity, I don't believe this can be done without 'E' or 'U' in a standard code module...

  • "E nd"
  • "F u nction"
  • "S u b"

Immediate Functions

Running with mellamokb's assumption, here's without the function declaration (leaving out SUB and FUNCTION) (116 chars, 98 if newlines are acceptable in output):

The below uses neither 'e' nor 'a' (43 chars, formatted to run in the immediate window):

b=65:Do:z=z+Chr(b):b=b+1:Loop Until b=91:?z

The below uses neither 'i' nor 'a' nor 'u' (33 chars, formatted to run in the immediate window):

For b=65 To 90:z=z+Chr(b):Next:?z

The below uses neither 'a' nor 'o' nor 'u' (40 chars, formatted to run in the immediate window):

b=65:While b<91:z=z+Chr(b):b=b+1:Wend:?z

If newline characters are allowed in the output, then the above examples can be shorter:

(37 chars)

b=65:Do:?Chr(b):b=b+1:Loop Until b=91

(27 chars)

For b=65 To 90:?Chr(b):Next

(34 chars)

b=65:While b<91:?Chr(b):b=b+1:Wend

Brute Force

Running with w0lf's Ruby answer

(76 chars, formatted to run in the immediate window):

  • 1
    \$\begingroup\$ I think it would be fair to leave Sub..End Sub out, since most other programs don't include function definition. \$\endgroup\$ – mellamokb Apr 24 '12 at 13:52
  • \$\begingroup\$ @mellamokb Well, that makes me feel better. I'll whip up some examples to add to this. \$\endgroup\$ – Gaffi Apr 24 '12 at 13:53
  • 2
    \$\begingroup\$ Just think of it as "code you run in the immediate window" :) \$\endgroup\$ – mellamokb Apr 24 '12 at 13:54
  • 2
    \$\begingroup\$ Well, if in doubt just call it VBScript which can be included in a file without needing a Sub :) \$\endgroup\$ – Joey Apr 26 '12 at 9:13
  • \$\begingroup\$ Fixed a bunch of needless spaces, changed print to ? since that works in the immediate window. \$\endgroup\$ – Gaffi Dec 19 '12 at 20:42

Rebmu: 15 characters


Reading Rebmu always requires a bit of unmushing to start with:

c: tc '` l 26 [pn ++ c]

Then it helps to expand the abbreviations:

c: to-char-mu '`
loop 26 [
    prin ++ c

It would be more obvious using a character literal for the predecessor of lowercase a:

c: #"`"
loop 26 [
    prin ++ c

But that doesn't "mush", so converting a word literal to a character passes for the same purpose. What I like about it, as with most Rebmu, is that it has the spirit of a sensible program despite the compression. (The Golfscript answer is shorter but doesn't map to the way a programmer would usually think when coding.)


<>< (Fish) - 22 characters

Because <>< uses the 'o' to print a character, this challenge seems impossible to do. Luckily, fish can change its own code in runtime. This allowed me to add the print instruction to the code.

This code uses none of the vowels:


You can run the code here


Not the answer you're looking for? Browse other questions tagged or ask your own question.