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

Dynamic settings #119

Merged
merged 21 commits into from
Jul 22, 2023
Merged

Dynamic settings #119

merged 21 commits into from
Jul 22, 2023

Conversation

JohnDTill
Copy link
Owner

@JohnDTill JohnDTill commented Jul 18, 2023

This adds dynamic settings to the Forscape language, which update the compiler settings within a lexical scope.

As wacky as the feature sounds, it's the right design decision.

- We want CAS code with symbolic computation, and numeric code without snowballing computation from infinite precision
- We don't want to overspecify in the code, e.g. float(pi), sym('x'), float(5/2), or rat(5, 2)
- We sometimes want to support imaginary numbers, and sometimes treat them as errors
- We want library writers to pick their own settings, and avoid C++ style warnings from external libraries
=> we need dynamic settings, the cleanest and most general way being lexically-scoped settings
- New users need to discover valid settings / values
- Power users need to avoid excessive typing
=> update settings via a UI form
- Need to interact with settings
- Don't want possibility of invalid settings
- Want to quickly parse settings
=> use a Construct

Dynamic settings support the future goals of Forscape, and should be implemented well here.

Copy link
Owner Author

@JohnDTill JohnDTill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proof of concept works, but there is a lot cleanup work

meta/construct_codes.py Show resolved Hide resolved
src/forscape_serial.h Show resolved Hide resolved
src/forscape_static_pass.cpp Show resolved Hide resolved
src/forscape_static_pass.cpp Outdated Show resolved Hide resolved
src/typeset_constructs/typeset_settings.h Outdated Show resolved Hide resolved
src/typeset_settings_dialog.cpp Outdated Show resolved Hide resolved
@JohnDTill JohnDTill merged commit d8916bb into main Jul 22, 2023
9 checks passed
@JohnDTill JohnDTill deleted the dynamic_settings branch July 22, 2023 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant