Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Minor improvements #1527
While trying to hack up a third-party DPFP-based version of CircuitPython for the Trinket M0 compatible TI-Python Adapter, because SPFP just doesn't make the cut for math purposes (it can easily yield wrong results for high school level math problems, i.e. the target audience of this thing; all other calculator-based implementations of Python use DPFP, for excellent reason !), I stumbled across a couple shadowing variables, and most of all, several variables which can be made "static" to save a bit of space: 100+ bytes in my build with Debian sid's arm-non-eabi-gcc (GCC 7.3). So I'm sending a quick PR to improve those.
I know little about the code of MicroPython or CircuitPython. I'm doing that work on my free time for users who bought this underwhelming thing (at least, when equipped with the version of the official firmware contained in the first TI-Python Adapters which reached buyers last week) which cannot even be used from a TI-83 Premium CE calculator yet because the "PyAdaptr" software isn't available. Of course, I'm also indirectly working for TI if they pull in some of these changes...
If you're curious about what kind of a hacky job I did to cram a DPFP-based build onto a Trinket M0-class platform, you can check the master branch in my repo. At least, it builds, the binary running on a TI-Python Adapter or a Trinket M0 produces reasonable results for FP operations, and benchmarks can be made. My work can certainly be made better, I'm all ears :)