A very enjoyable debugging story. Thanks, and it ended with a patch that makes the current Arc implementation more cross-platform.
Now we just need to make (date) cross-platform. Since Scheme provides seconds->date which will do the same as the call to GNU date in arc.arc, this looks pretty easy.
I wonder if there wasn't some reluctance to use easy Scheme-provided functions? There are several places like this where Arc does something "the hard way" by using something already defined rather than importing another dependancy.
That seems fair enough, if I was doing Arc then I'd want to define as much as I could in Arc so that porting it would be easy (and also to prove the expressiveness of the 'simpler' parts of the language).
In this case you need access to date information and currently that's done by assuming that it's ok to (system) to GNU date. That's a big assumption. I think it would be fairly easy to wrap up the Scheme code into an Arc native definition.
For example, Arc defined seconds to be the current Unix epoch (which is does via Scheme's current-seconds). It would be pretty easy to do the same thing for month, day, year and make them primitive and then write date on top of them entirely in Arc.
Funny, I came to the same conclusion, but by a much less scientific method: I found where "frug" was being written into the hash file. That led me to ensure-dir and ultimately to the mkdir problem, too.
His blog post and description is a lot more entertaining than what I would have written, though.
Thanks a bunch! Just what I needed to get my head around the current boundries of the release, and I'll get it running on my lap quicker. Now, if you'd just add an itty bitty little patch to implement Unicode... ;-)
Now we just need to make (date) cross-platform. Since Scheme provides seconds->date which will do the same as the call to GNU date in arc.arc, this looks pretty easy.