skx / yal

Yet another lisp interpreter
GNU General Public License v2.0
16 stars 0 forks source link

Support hex & binary numbers #78

Closed skx closed 1 year ago

skx commented 1 year ago

My (embedded) usage is more annoying than it has to be because we can't operate upon bits easily.

These should both just work:

(print "%d" 0xff)
(print "%d" 0b01010101)

Making the change is trivial, and would benefit others.

Not sure if I need to port my bit-manipulation operations, but since it's all tied to the hardware it's probably not so worthwhile.