Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor improvements #1527

Merged
merged 2 commits into from Feb 7, 2019

Conversation

Projects
None yet
3 participants
@debrouxl
Copy link

debrouxl commented Feb 7, 2019

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...
While working on various pieces of OSS related to TI graphing calculators for 17+ years, I've never signed a NDA with TI EdTech, or received money from TI. At the time of this writing, I don't own a TI-Python Adapter, or a Trinket M0.

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 :)

debrouxl added some commits Feb 7, 2019

Make several const char / const char * arrays static to save a bit of…
… space.

Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
Fix a couple variable shadowing varnings.
Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
@ptorrone

This comment has been minimized.

Copy link
Member

ptorrone commented Feb 7, 2019

just wanted to say thank you, and this is very cool and interesting!

@tannewt tannewt self-requested a review Feb 7, 2019

@tannewt

tannewt approved these changes Feb 7, 2019

Copy link
Collaborator

tannewt left a comment

Yay! Thank you! You may want to see if any more recent changes to the libm source are helpful to you. It looks like it came from here: http://www.musl-libc.org/ More updates to it are welcome!

@tannewt tannewt merged commit 72f0783 into adafruit:master Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.