mojombo / chronic

Chronic is a pure Ruby natural language date parser.
http://injekt.github.com/chronic
MIT License
3.24k stars 458 forks source link

Use OmNomNum #352

Open JesseBuesking opened 7 years ago

JesseBuesking commented 7 years ago

Hey all!

I just created the library OmNomNum, a C extension that I aim to use as a replacement for Numerizer. OmNomNum currently does not support fractions, so it's not a 100% replacement for Numerizer just yet.

The main purpose of adding this issue was to let you know that my library exists. Ideally other Rubyists using this library could benefit from OmNomNum. Let me know if you're interested in possibly working together to add support for OmNomNum to Chronic. I've read recent issues and I realize that there's a rewrite underway for Chronic, but there's immediate benefit to using OmNomNum within Chronic in it's current version until the rewrite is finished.

If you have any questions, just let me know.

:+1:

TheKidCoder commented 7 years ago

While I see the merit in adding this feature - I would just like to cast my vote against it as any reliance on a cext would limit Chronic's portability. We use Chronic on jruby, for example.

JesseBuesking commented 7 years ago

@TheKidCoder Ideally this wouldn't replace anything within Chronic but would be offered as an alternative implementation of the Numerizer logic. For example, we could have a gem that simply monkey patches Chronic allowing anyone who is using MRI to simply include the gem to get the benefits.

I really posted this to raise awareness of OmNomNum and to see what the community thinks is the right approach to using it within Chronic.