kiedtl / finwe

A concatenative language for the Uxn VM with full compiler-enforced stack safety.
MIT License
33 stars 0 forks source link

Fixed point #1

Open kiedtl opened 7 months ago

kiedtl commented 7 months ago

In-progress on the fixpt branch.

TODO:

kiedtl commented 7 months ago

Unsure if fixed point literals baked into the compiler are a good idea. If there's a way for modules to "claim" a literal suffix, with custom parsing code, that would be nice. Would probably be too complicated to implement however.

As for the syntax, if it is added: 3.14fs or 3.14xs? F for fixed point, x for... fixed point. (Reserving f for a future half-float type.) S for short, of course.

kiedtl commented 1 week ago

https://git.phial.org/d6/nxu/src/branch/main/fix16.tal

Will probably drop this feature after doing a comparison. Need to first work on the assembler/TAL imports first.