[erlang-questions] what's happened in the shootout

Bengt Kleberg bengt.kleberg@REDACTED
Tue Jun 19 14:58:58 CEST 2007


On 2007-06-18 18:44, Ulf Wiger (TN/EAB) wrote:

> BTW, I made minor optimizations of the n-body
> benchmark (Erlang Hipe #3), and then started 
> looking at the Mandelbrot. Requiring the program
> to output one byte at a time is cruel and unusual
> punishment for the lowly Erlang programmer.

after spending some time with the shootout i came to the conclusion that 
this might be intentional.
it could just have been me, of course.


> Couldn't we introduce a BIF, erlang:put_chars(IoList),
> (or possibly put_chars(stdout | stderr, IoList))
> which simply writes the given bytes to stdout?
> 
> This would be similar to erlang:display(Term), but 
> without the auto-formatting of erlang terms, and 
> without the trailing newline.
> 
> I understand that there are great advantages to 
> using the standard IO subsystem, but it seems a bit
> rude to not have raw output for those who want

there is a file:read/2 and file:write/2. they are both used for raw io. 
they are currently of limited use since it is not possible to use them 
with stdin/stdout/stderr. i suggest that it would be better to add this 
possibility (stdin/stdout/stderr), that to ask for a new bif.
imho.


bengt
-- 
Those were the days...
    EPO guidelines 1978: "If the contribution to the known art resides
    solely in a computer program then the subject matter is not
    patentable in whatever manner it may be presented in the claims."



More information about the erlang-questions mailing list