Obligatory cloc reading to see which implementations were shortest:
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Rust 17 294 155 3919
C 18 446 383 3356
C# 19 472 235 3314
Visual Basic 17 322 131 2945
Java 17 322 134 2872
Go 17 299 147 2636
Bourne Shell 16 304 241 2308
Perl 19 263 165 2167
Haskell 17 328 99 1951
MATLAB 25 176 114 1880
Javascript 23 263 145 1873
PHP 17 242 118 1791
Scala 16 219 113 1731
Lua 18 227 87 1715
Python 18 218 143 1393
Ruby 17 165 87 1219
OCaml 15 105 98 1154
Clojure 17 247 117 1011
CoffeeScript 17 193 126 989
CSS 6 150 132 792
make 26 233 59 580
HTML 1 17 27 227
C/C++ Header 6 47 9 172
Maven 1 2 7 72
-------------------------------------------------------------------------------
SUM: 380 5554 3072 42067
-------------------------------------------------------------------------------