Glad you found the error! What list/string support have you found missing?
Viewing post in Guile Hoot game template repository
I had to define filter, count, and delete. A variety of other issues I've since found:
- There is no inexact->exact, which means it has to be approximated with FFI when an exact integer is needed (i.e. in list-ref).
- Division of a float by an integer inexplicably winds up as positive infinity?
- I'm not sure that this is Hoot-specific, but having type predicates in define-typed-record would be nice, especially given that interactive debugging doesn't yet work.
Ah, SRFI-1 stuff. Yeah we don't ship any SRFIs currently. Could borrow it from Guile or any portable implementation, though. We'll be filling in more of this as we go on now that we more-or-less have R7RS-small covered.
Regarding inexact->exact, the equivalent R7RS-small procedure is simply 'exact', available in (scheme base). Likewise, 'inexact' is also available from that module. Hoot 0.5.0 will have inexact->exact, though, as part of the (guile) module. Either way, there's no need to use the FFI for this as R7RS-small has you covered.
For float/integer division, do you happen to have an example of two numbers that produce positive infinity? I can't reproduce on my end with the numbers I've tried.
The define-record-type syntax includes definition of a predicate. For example: (define-record-type <foo> (make-foo bar) foo? (bar foo-bar)) ...or did I misunderstand?
Thanks for the feedback!