JuliaLang/julia — pull request #7466 by tanmaykm (2014-06-30 12:25:14+00:00)
Title: readcsv can read true and false strings as Bool.

fixes #7463

````
julia> x = randbool(3, 5)
3x5 BitArray{2}:
true true false false false
true true true true true
true false true true false

julia> writedlm("/tmp/bools.txt", x)

julia> readdlm("/tmp/bools.txt", Bool)
3x5 Array{Bool,2}:
true true false false false
true true true true true
true false true true false
````

Comparing speeds of some different ways of reading bools:

````
julia> x = randbool(100, 100);

julia> writedlm("/tmp/bools.txt", x);

julia> writedlm("/tmp/ints.txt", int(x));

julia> @time convert(Array{Bool}, readdlm("/tmp/ints.txt", Int));
elapsed time: 0.004178626 seconds (1126928 bytes allocated)

julia> @time map(parse, readdlm("/tmp/bools.txt"));
elapsed time: 0.169436071 seconds (4093824 bytes allocated)

julia> @time readdlm("/tmp/bools.txt", Bool);
elapsed time: 0.00311209 seconds (1051616 bytes allocated)
````