justinethier / cyclone

:cyclone: A brand-new compiler that allows practical application development using R7RS Scheme. We provide modern features and a stable system capable of generating fast native binaries.
http://justinethier.github.io/cyclone/
MIT License
823 stars 42 forks source link

Does Cyclone Scheme have a method of handling dates? #529

Open may opened 5 months ago

may commented 5 months ago

Hi! Does Cyclone Scheme have a method of handling dates and times beyond (current-seconds)?

I've scoured the documentation but there doesn't appear to be any way to format an ISO 8601 compliant date string (eg YYYY-MM-DD HH:MM) using the built-in libraries, or anything available in Winds.

It also appears that SRFI-19 is not supported.

Am I missing something?

I'm enjoying using Cyclone and it's speed and portability, but I'm not interested in rolling my own bug-ridden date library. Obviously I could download the code for SRFI-19 myself and use that, but it would be nice if this basic functionality was smoothy implemented out of the box.

Thanks for creating a great -- and super well documented!! -- implementation!

justinethier commented 5 months ago

Thanks for the report @may!

I agree it would be nice if this was provided. The issue is that support has not been added for many libraries, such as SRFI-19. Still, it there is a reference implementation of that SRFI and it should be possible to port that to a library: https://github.com/scheme-requests-for-implementation/srfi-19

Once there is a working library we can make that available via Winds like many of the other SRFI's that have been ported. Do you have any interest in doing a first-cut of organizing the SRFI code into a library?

may commented 5 months ago

I'd love to, but unfortunately I am currently overcommitted; if this changes I'll be sure to let you know.

For future reference, if I was to take this on, I'd start here: https://github.com/OpinionatedGeek/SRFI19

justinethier commented 5 months ago

That's fair, there's only so much time to go around.

Thanks for the link! That should be a good place to start, depending on how much it relies on Chibi-specific functionality.