Skip to content

Instantly share code, notes, and snippets.

@aw
Last active March 8, 2017 04:40
Show Gist options
  • Save aw/065c1f13e7bd194dc751c2b076ebd0d4 to your computer and use it in GitHub Desktop.
Save aw/065c1f13e7bd194dc751c2b076ebd0d4 to your computer and use it in GitHub Desktop.
PicoLisp backwards compatibility hacks

This gist is meant to track backwards incompatible changes in PicoLisp, and provide simple hacks to ensure backwards compatibility with older versions.

PicoLisp v17.3.4 - March 2017

  • (local) syntax changes
  • (local) is now undefined in 32-bit
  • (local) [doesn't accept parameters in 64-bit]

HACK:

(and (>= (version T) (17 3 4)) (== 64 64) (from "######"))
(undef 'local)
(de local () (mapc zap (read)))
######

This checks if the running version is 64-bit and newer/equal to v17.3.4 if yes, it defines a new (local) which allows the new syntax to work on older versions of PicoLisp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment