Arc Forumnew | comments | leaders | submitlogin
patch to fix (date) on linux
11 points by starc 6133 days ago | 3 comments
This is a crude hack, but it allows (date) to work on Linux for the no-args case. Hopefully I didn't break BSD in the process.

I'd paste it in-line, but I don't want the patch to be mangled. So it's at http://blakeley.com/linux-date.patch



4 points by rcoder 6133 days ago | link

Here's an alternate version which uses the underlying mzscheme date-handling library; it's less "bootstrapped", but also supports formatting of arbitrary timestamps under Linux.

http://paste.lisp.org/display/55071

(Feel free to ignore the 'os-name' and 'chomp' functions added to arc.arc; they are obviously from an earlier variant of the function which used the same approach as @starc.)

-----

1 point by starc 6133 days ago | link

Thanks, that's much better than calling system.

-----

2 points by rcoder 6133 days ago | link

Agreed, though what I'd really like is a full time/date stack built in Arc...using the MzScheme primitives is pretty ugly for a supposedly "bootstrapped" language.

There are enough other areas where Arc is coupled to the underlying Scheme runtime, though, that it's probably not worth worrying about at this point.

-----