I've created an srfi-169 implementation here:

https://code.dieggsy.com/srfi-169/

with release-info:

https://code.dieggsy.com/srfi-169/plain/srfi-169.release-info

The implementation is purely a hack, but it does seem to work and pass tests... 
Looking for a second opinion on whether or not this is an awful idea.

The entirety of the code is simply:

(module srfi-169 ()
  (import scheme
          chicken.platform
          chicken.irregex)

  (register-feature! 'srfi-169)

  (define orig-sys ##sys#string->number)
  (set! ##sys#string->number
    (lambda (str . rest)
      (apply orig-sys
             (irregex-replace/all "([0-9A-Z])_(?=[0-9A-Z])" str 1)
             rest)))

  (define orig-scheme string->number)
  (set! scheme#string->number
    (lambda (str . rest)
      (apply orig-scheme
             (irregex-replace/all "([0-9A-Z])_(?=[0-9A-Z])" str 1)
             rest))))


- Diego

Reply via email to