Solve hoppity first regardless of what you may have been told to do.
Follow these instructions carefully. The robot has zero tolerance for error.
Your program must be compatible with Erlang 5.5.
On Windows, save your program with Unix-style line endings (LF) and no byte-order mark (BOM). Notepad cannot do this, so do not use it. In Notepad++, select format “Unix” and encoding “UTF-8 without BOM”. Editors intended specifically for programming will not use a BOM, but they often default to Windows-style line endings (CRLF).
Name your program hoppity
, not hoppity.erl
.
Put #!/usr/bin/env escript
as the first line, with no leading space. (#!/usr/bin/escript
and #!/usr/local/bin/escript
are also acceptable.) This is the shebang line, which specifies the executable that interprets your program.
Put -mode(compile).
as the second line.
Read from the file specified as the first command-line argument. Open this file for reading only.
Write the unique correct sequence of bytes to the standard output stream (“the screen”) and terminate. Do not write to the standard error stream.
Attaching your program, send an email to 1051962371@fb.com
with subject hoppity
. If you use OS X Mail, first deselect Edit > Attachments > Always Send Windows Friendly Attachments. Do not attach a digital signature.
You should receive a reply within an hour or so.
Sample solution: hoppity
© 2009–2011 David Eisenstat
part of An unofficial guide to the Facebook Engineering Puzzles