# Print the alphabet without using each vowel

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.

## 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 COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 8478; // This should be the user ID of the challenge author.

/* App */

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

}

jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function (data) {
data.items.forEach(function(a) {
});
comment_page = 1;
}
});
}

jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function (data) {
data.items.forEach(function(c) {
if (c.owner.user_id === OVERRIDE_USER)
});
else process();
}
});
}

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

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

function process() {
var valid = [];

var body = a.body;
if(OVERRIDE_REG.test(c.body))
body = '<h1>' + c.body.replace(OVERRIDE_REG, '') + '</h1>';
});

var match = body.match(SCORE_REG);
if (match)
valid.push({
user: getAuthorName(a),
size: +match[2],
language: match[1],
});
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;
++place;

.replace("{{NAME}}", a.user)
.replace("{{LANGUAGE}}", a.language)
.replace("{{SIZE}}", a.size)

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.push(languages[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)
language = jQuery(language);
jQuery("#languages").append(language);
}

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

width: 290px;
float: left;
}

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

font-weight: bold;
}

table td {
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="language-list">
<h2>Shortest Solution by Language</h2>
<table class="language-list">
<tr><td>Language</td><td>User</td><td>Score</td></tr>
<tbody id="languages">

</tbody>
</table>
</div>
<tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr>

</tbody>
</table>
</div>
<table style="display: none">
</tbody>
</table>
<table style="display: none">
<tbody id="language-template">
</tbody>
</table>

• @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". – schnaader Apr 24 '12 at 11:09
• @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 :) – mellamokb Apr 24 '12 at 13:51
• Are newlines acceptable in the output (i.e. one per character)? I can shorten some of my code if that is the case... – Gaffi Apr 24 '12 at 21:17
• Is uppercase output allowed? – Erik the Outgolfer Sep 16 '16 at 11:09
• I'm the OP. Uppercase not allowed. – shamp00 Sep 17 '16 at 5:21

## Sage CLI, 42

No e,i,o,u:

map(chr,[97..122])


No a,i,o:

'%c'*26%tuple([97..122])


Fun fact: str, chr, and cmp are the only Python builtins that don't contain vowels!

# Brainfuck, 31 bytes

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


How it works

-              wrap to 255
[----->++>+<<] loop 51 times  r1=102 r2=51
>----->+       r1=97 r2=52
[--<.+>]       loop 26 times and print letters a-z

• I was wondering when a Brainfuck solution would rear its head... +1 – WallyWest Jun 2 '15 at 6:02

## Perl 5.10+, 23 chars

(This is an improvement on previous such entry but I don't have the reputaion to comment there):

no a, e, o, u:

print "\x61"..z


no e, i, o, u:

say a..z


# Marbelous, 94 Bytes(I think)

.. @1 61 ..
.. .. // ..
.. Dn \\ ..
++ =0 \/ ..
@1 !! .. ..

:Dn
}0 .. 85 }0 }0
\\ {0 // {> {<


One program, no vowels, I think this qualifies as text-based, but I could be wrong. Marbelous interpreter

• I think this is 94 bytes (unless there was whitespace originally that wasn't put into your answer). – laurencevs Sep 30 '14 at 17:18

# Piet, 104 (8x13) codels

Not eligible for this challenge, but I did it nonetheless.

I guess I could golf it a bit more, but this should be a good start.

output:

D:\codegolf\npiet-1.3a-win32>npiet "alphabet codegolf.png"
abcdefghijklmnopqrstuvwxyz

• Not eligible to win as the question says “any language (which has a text-based syntax*)”, but nice one anyway. – manatwork Aug 18 '15 at 13:09
• I know. I did it just for the fun of it and wasn’t going for winning the challenge. :) – M L Aug 18 '15 at 13:17

# Burlesque, 12 characters

''zr@[-\[sh

(see here in action.)

With a:

'a'zr@\[sh

# 05AB1E, 4 bytes (non-competing?)

žpRl


Try it online!

Doesn't use any vowel. If it were to use vowels, It'd be just this instead.

A


# JS (ES2018), 54 bytes

\141l\145rt\141bcd\145fgh\151jklmn\157pqrst\165vwxyz


Alerts "abcdefghijklmnopqrstuvwxyz".

So, you can update the JS score to 54 bytes.

# Pyth - 1 Byte

G


Implicitly print alphabet

• Implicitly Print Alphabet. IPA. – user85052 Dec 14 '19 at 13:44

## Keg, 8 bytes (SBCS)

b;(|:1+


TIO

## Keg, 7 bytes (SBCS)

\zɧ^_^


This generates the range from backtick to z and removes the backtick character.

# Keg, 4 bytes

b;zɧ


Generates a range from a to z and prints it.

Try it online!

## W, 8 bytes

97;122.C


Pretty simple:

97;122.  % Generate a range from 97 ('a') to 122 ('z')
C % Convert this to its character form


# Wd, 5 4 bytes

(ÇL·


## Explanation

After decompression:

'a    % Character a
'z. % Up to character z


## C 108

Technically cheating, but

x[]={1684234849,1751606885,1818978921,1886350957,1953722993,2021095029,31353};y(){z("%s",x);}


Compile with -Dy=main -Dz=printf (I counted those towards the char count). Of course if you're allowing -D, go full hog and say -Dp=main(c){for(;c<27;)putchar(96+c++);} 39 characters there. (Or one, depending on how you count).

• With the same method, you could shorten a lot with "abcd%cfg.... – ugoren Jun 3 '12 at 19:55
• Yes, but the the array was more intimidating. That's half comprehensible. – walpen Jun 3 '12 at 21:32

# Lua, 56

_G["pr\105nt"]"\97bcd\101fgh\105jklmn\111pqrst\117vwxyz"

## Erlang escript 75

It's pretty hard to do any golfing in Erlang but anyway:

$cat alphabet 'm\x61\x69n'(_)-> '\x69\x6f':'f\x6frm\x61t'('l\x69sts':'s\x65q'(97,122)).  Note empty line at beginning of escript and also line break in main function. They are both mandatory. Run it using $ escript alphabet


## MATLAB, 17 characters

x='':'z';x(2:27)


NOTE: Would be a winner with 7 characters if the first letter wasn't a vowel :-)

'a':'z'


## Powershell, 29 + 39 = 68 chars

If newlines are acceptable in the output (as has been asked in the question's comments), this can be further reduced to 51 chars.

Uses no 'eiou' (29 chars):

$s="";$s+=97..122|%{[char]$_}  Uses no 'au' (39 chars): -join(97..122|%{new-object string($_)})


Both work off of the same concept of translating integers into their ASCII values, the first by an explicit cast to char and the second by using the string constructor to perform the cast implicitly.

• The "no eiou" solution doesn't output anything, and the variable has a bunch of spaces in it which weren't in the question spec. (Though, having not yet gotten an answer for newlines, I'm not sure we can assume any whitespace is out.) You'd need to add ;$s (3 characters) to make it output. – Iszi Dec 12 '13 at 21:52 • That said, you could stick with the same principle and even shorten it by 3. 97..122|%{$s+=[char]$_};$s This also eliminates the spaces. – Iszi Dec 12 '13 at 21:55
• Another variant of the 39-character script. Same length. 97..122|%{$s+=new-object string($_)};$s – Iszi Dec 12 '13 at 22:01 • another modification to the first one which eliminate spaces $ofs='';"$(97..122|%{[char]$_})" however it adds an 'o' and is now 32 characters. – Tim Lewis Mar 4 '14 at 15:27

# Python shell, 48 + enter

str('\x61bcd\x65fgh\x69jklmn\x6fpqrst\x75vwxyz')


Output:

'abcdefghijklmnppqrstuvwxyz'


If this is valid, I think my answer is too?

## Forth, 46

.\" \x61bcd\x65fgh\x69jklmn\x6fpqrst\x75vwxyz"


C (77)

Here's my crack at it. Dunno if I broke some kind of anti-compiler-flag rule, but here goes:

int main(){int i=97;while(++i<'{')if(i^'e'&&i^'i'&&i^'o'&&i^'u')putchar(i);


To compile and run:

$gcc az.c -include "stdio.h" -o az$ ./az
bcdfghjklmnpqrstvwxyz


In case anyone's interested, here's a quick explanation of some of the 'micro-optimizations':

97 is the decimal equivalent of 0x61, or 'a'. Used because it saves one char over 'a'.

'{' is the char immediately after 'z', it saves me an = (i<='z' vs i<'{').

A^B returns 0 when A and B are equal, and anything but when they aren't, which is as good as != for my purposes. It saves me four chars.

Loop starts out immediately ++'ing i to skip 'a' from the get-go, and save me an extra two chars. It saves me 9 chars altogether (exclude i^'a'&& and the i and ; I would've had to put had I incremented i within the block)

And finally, I used a compiler flag to include stdio.h instead of putting it in the file, saving me 18 chars. I don't know if this is "cheating" or anything, so feel free to point it out if it is.

P.S. This is my first code golf, so if I'm missing a rule, spoken or not, don't hesitate to correct me.

• This program uses the letters a and i (in main) and e, o, and u in if(i^'e'&&i^'i'&&i^'o'&&i^'u'). I suspect you've misunderstood the question. – Gareth Jan 30 '14 at 9:19
• @Gareth I probably did. I interpreted the goal as to "make a program that prints every letter in the alphabet (sans a,e,i,o,u) in the shortest amount of code you can manage." – Braden Best Jan 30 '14 at 17:58
• @Gareth Oh. Yes, I completely misunderstood the question. I thought the output was supposed to exclude vowels, but the source was fine including them. It was the other way around. – Braden Best Jan 30 '14 at 18:09

# Bash, 31 chars

I think this is the shortest bash version so far:

z=({Z..z});tr -d \ <<<${z[@]:7}  This one outputs exactly abcdefghijklmnopqrstuvwxyz with no whitespace between any letters. ## Clojure: 81 over 2 statements No i, o, or u: 35 chars (apply str(map char(range 97 123)))  No a or e: 46 chars (str \u0061"bcd"\u0065"fghijklmnopqrstuvwxyz")  REPL (RPL?) session: cd-glf-s-hrd> (apply str(map char(range 97 123))) "abcdefghijklmnopqrstuvwxyz" cd-glf-s-hrd> (str \u0061"bcd"\u0065"fghijklmnopqrstuvwxyz") "abcdefghijklmnopqrstuvwxyz"  ## Cjam 6 '{,97>  • creates the character "{" • lists all characters less than "{" (this ends if you try to print it because character 0 stops things from outputting) • removes any with a value less than or equal to 97 • CJam was created after this challenge was posted. – lirtosiast Aug 18 '15 at 15:31 • @ThomasKwa I realised that after having answered it. This disqualifies it from winning, but I think it is interesting enough it shouldn't be removed. – kaine Aug 18 '15 at 15:33 ## T-SQL, 120 (65+55) This answer assumes results of both PRINT and SELECT are allowed as output. 65 characters without e, o, u: PRINT'abcd'+CHAR(101)+'fghijklmn'+RTRIM(0x6F707172737475)+'vwxyz'  55 characters without a, i: SELECT LEFT(0x616263646566676869,9)+'jklmnopqrstuvwxyz'  # Haskell (interpreted), 17 [[''..]!!1..'z']  Back-quote comes before 'a', so a is the second element of the sequence starting with back-quote. This is then just the sequence from a to z. This is technically a naked Haskell expression. (If you save it to ".ghci", though, running ghci will print the alphabet.) # ><>, 35 bytes !v99*:f1++$ff++31p!
>: 1+:bb*1+)?;


><> outputs with the command 'o', hopefully it also provides introspection capability so we'll just edit the code at runtime to add the 'o'. This is done with the command 'p' at the end of the first line.

# Simplex v.0.7, 3 bytes

Noncompeting, as Simplex postdates question

^lg
^l  ~~ sets current byte to the alphabet [a-z]
g ~~ output as string


# F# (96) characters, using fsharpi

// Without u (48 chars)
sprintf "abcdefghijklmnopqrst%cvwxyz" (char 117)

// Without a, e, i, o (48 chars)
"\u0061bcd\u0065fgh\u0069jklmn\u006fpqrstuvwxyz"


This was tough since all the functions to manipulate sequences contain vowels. Also the functions for outputting to stdout are printf and printfn, therefore this only produces a string instead of writing it out.

These lines will need to be ran through the F# interpreter and ended with ;; to execute.