Arc Forumnew | comments | leaders | submitlogin
3 points by akkartik 4449 days ago | link | parent

Thanks! I got news.arc up and running!

One other change I had to make was to add keywords to the call to open-output-file in nu.rkt:

  (open-output-file f #:mode 'text #:exists mode)
This is looking great.


2 points by Pauan 4449 days ago | link

Ah, right, Nu is still using the mzscheme version of open-output-file, whereas Racket uses keywords... thanks, I'll fix that right now.

EDIT: Fixed.

-----

1 point by Pauan 4449 days ago | link

I just realized that Arc uses 'text mode with outfile... but that breaks on Windows if the file you're writing to isn't a regular file. Even worse, there's no way to specify 'binary from within Arc.

It does, however, allow Arc to pretend that "everything is Unix" since 'text mode automatically converts "\n" to "\r\n" on Windows. But infile uses 'binary mode, so in that case it should probably use 'text mode too, to maintain the illusion.

Alternatively, make outfile use 'binary mode. Just so long as outfile and infile are consistent and agree with each other.

-----