glycerine / zygomys

Zygo is a Lisp interpreter written in 100% Go. Central use case: dynamically compose Go struct trees in a zygo script, then invoke compiled Go functions on those trees. Makes Go reflection easy.
https://github.com/glycerine/zygomys/wiki
BSD 2-Clause "Simplified" License
1.71k stars 81 forks source link

Add uint64 support support as SexpUint64 #40

Closed japanoise closed 5 years ago

japanoise commented 5 years ago

Addresses my own feature request, #39

The tests could probably do with some work and it definitely needs a once-over from the maintainer, though. I'd also like to have some way of coercing values to uint64 without just relying on overflows.

glycerine commented 5 years ago

I'd also like to have some way of coercing values to uint64 without just relying on overflows.

I agree. I don't like the range overflow for creation. How about the old C++ designation with a ULL suffix to designate uint64:

(def a 0ULL) // 0 in an uint64

and a coercion function

(asUint64 x)
glycerine commented 5 years ago

integrated into releases v5.0.9 and v5.1.0.