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

Functions inside functions are reevaluated #2002

Merged
merged 4 commits into from
Apr 4, 2023

Conversation

dqnykamp
Copy link
Member

Resolve #1996

@dqnykamp
Copy link
Member Author

This PR is intended to be applied after #1998, so the first commit is not part of the PR.

@dqnykamp
Copy link
Member Author

Rebased so now all commits are part of this PR.

Copy link
Contributor

@jaltekruse jaltekruse left a comment

Choose a reason for hiding this comment

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

+1

great to see all of the removed similar code no longer needed for handling null vs NaN

@dqnykamp
Copy link
Member Author

dqnykamp commented Apr 4, 2023

Yeah, I was glad to finally get around to making the change in math-expressions to have evaluate_to_constant return NaN rather than null. The fact that javascript coerces null into 0 makes null a pretty bad indicator that we didn't get a numerical value.

If you approve this PR, I'll merge it in.

Copy link
Contributor

@jaltekruse jaltekruse left a comment

Choose a reason for hiding this comment

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

Sorry I meant to give an approval with the last comment, hit the wrong button

@dqnykamp dqnykamp merged commit bd04a17 into Doenet:main Apr 4, 2023
@dqnykamp dqnykamp deleted the reevaluateFunctions branch April 4, 2023 02:56
jaltekruse added a commit to jaltekruse/DoenetTools that referenced this pull request Apr 8, 2023
Squashed commit of the following:

commit c2f29cc
Merge: 9d23ae5 7cab3f6
Author: Kevin Charles <[email protected]>
Date:   Fri Apr 7 13:37:58 2023 -0500

    Merge pull request Doenet#5 from Lyanthropos/deployVite2

    update with vite-bugfix

commit 7cab3f6
Merge: cfd2ab8 9d23ae5
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 13:07:17 2023 -0500

    Merge remote-tracking branch 'Kevin/deployVite2' into deployVite2

commit cfd2ab8
Merge: 7001361 33c4426
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 18:06:55 2023 +0000

    Merge remote-tracking branch 'Emilio/vite-bugfix' into deployVite2

commit 33c4426
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 17:25:24 2023 +0000

    increase default node space size

commit 0875f63
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 17:04:13 2023 +0000

    move geogebra to public (references)

commit 6c191f8
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 17:03:48 2023 +0000

    move geogebra to public (files)

commit e668f5a
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 17:00:22 2023 +0000

    explicit worker module type

commit 87fc436
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 00:59:05 2023 +0000

    add cache to gitnore

commit 578f693
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 00:58:50 2023 +0000

    update commands

commit 825f7e5
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 00:58:27 2023 +0000

    add gnome-keyring

commit 5012664
Merge: b6eabed 8c19893
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 10:23:22 2023 -0500

    Merge branch 'main' into vite-bugfix

commit b6eabed
Merge: a95e754 bd04a17
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 15:19:21 2023 +0000

    Merge remote-tracking branch 'Doenet/main' into vite-bugfix

commit a95e754
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 15:18:55 2023 +0000

    inlcude plotly

commit bcebb93
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 15:12:56 2023 +0000

    increase npm build space to 4gb

commit 8c19893
Author: Duane Nykamp <[email protected]>
Date:   Mon Apr 3 23:17:07 2023 -0500

    graph inside graph renders children inside parent graph (Doenet#2007)

commit 541f71f
Author: Duane Nykamp <[email protected]>
Date:   Mon Apr 3 23:11:54 2023 -0500

    dark mode support in core styles and test environments (Doenet#2006)

commit f5d66b1
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 03:17:16 2023 +0000

    fix geogebra import

commit 8384bab
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 03:15:46 2023 +0000

    switch to import flags

commit bd04a17
Author: Duane Nykamp <[email protected]>
Date:   Mon Apr 3 21:56:09 2023 -0500

    Functions inside functions are reevaluated (Doenet#2002)

    * evaluate_to_constant return NaN for non-numeric
    * Functions default to symbolic
    * Functions default to simplify
    * function simplify/expand do not affect formula

commit fc2fbc3
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 02:55:51 2023 +0000

    fix image imports

commit ed43229
Author: Emilio Alvarez <[email protected]>
Date:   Mon Apr 3 21:11:42 2023 -0500

    upgrade development to vite (Doenet#2008)

commit 6fa3a61
Author: Jason Altekruse <[email protected]>
Date:   Mon Apr 3 10:35:59 2023 -0500

    Upgrade to react 18 (Doenet#1991)

    * Upgrade react 18

    - also update packages with peer dependencies on react
    - delete file not referenced anywhere (it happened to also reference
      a datetime package that has not be updated to be compatible with react
      18, but it doesn't matter because we didn't actually need it)
    - palantir/blueprint#5699

    * package lock

    * Change to use the new API for the root render call reqired in version 18

    * Remove unneeded depedency, move cypress-parallel to optional depedencies

commit 8d61204
Author: Duane Nykamp <[email protected]>
Date:   Thu Mar 30 20:08:25 2023 -0500

    piecewise function (Doenet#1998)

(cherry picked from commit 86f9660)
jaltekruse added a commit to jaltekruse/DoenetTools that referenced this pull request Jul 26, 2024
Squashed commit of the following:

commit c2f29cc
Merge: 9d23ae5 7cab3f6
Author: Kevin Charles <[email protected]>
Date:   Fri Apr 7 13:37:58 2023 -0500

    Merge pull request Doenet#5 from Lyanthropos/deployVite2

    update with vite-bugfix

commit 7cab3f6
Merge: cfd2ab8 9d23ae5
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 13:07:17 2023 -0500

    Merge remote-tracking branch 'Kevin/deployVite2' into deployVite2

commit cfd2ab8
Merge: 7001361 33c4426
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 18:06:55 2023 +0000

    Merge remote-tracking branch 'Emilio/vite-bugfix' into deployVite2

commit 33c4426
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 17:25:24 2023 +0000

    increase default node space size

commit 0875f63
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 17:04:13 2023 +0000

    move geogebra to public (references)

commit 6c191f8
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 17:03:48 2023 +0000

    move geogebra to public (files)

commit e668f5a
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 17:00:22 2023 +0000

    explicit worker module type

commit 87fc436
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 00:59:05 2023 +0000

    add cache to gitnore

commit 578f693
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 00:58:50 2023 +0000

    update commands

commit 825f7e5
Author: Emilio Alvarez <[email protected]>
Date:   Fri Apr 7 00:58:27 2023 +0000

    add gnome-keyring

commit 5012664
Merge: b6eabed 8c19893
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 10:23:22 2023 -0500

    Merge branch 'main' into vite-bugfix

commit b6eabed
Merge: a95e754 bd04a17
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 15:19:21 2023 +0000

    Merge remote-tracking branch 'Doenet/main' into vite-bugfix

commit a95e754
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 15:18:55 2023 +0000

    inlcude plotly

commit bcebb93
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 15:12:56 2023 +0000

    increase npm build space to 4gb

commit 8c19893
Author: Duane Nykamp <[email protected]>
Date:   Mon Apr 3 23:17:07 2023 -0500

    graph inside graph renders children inside parent graph (Doenet#2007)

commit 541f71f
Author: Duane Nykamp <[email protected]>
Date:   Mon Apr 3 23:11:54 2023 -0500

    dark mode support in core styles and test environments (Doenet#2006)

commit f5d66b1
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 03:17:16 2023 +0000

    fix geogebra import

commit 8384bab
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 03:15:46 2023 +0000

    switch to import flags

commit bd04a17
Author: Duane Nykamp <[email protected]>
Date:   Mon Apr 3 21:56:09 2023 -0500

    Functions inside functions are reevaluated (Doenet#2002)

    * evaluate_to_constant return NaN for non-numeric
    * Functions default to symbolic
    * Functions default to simplify
    * function simplify/expand do not affect formula

commit fc2fbc3
Author: Emilio Alvarez <[email protected]>
Date:   Tue Apr 4 02:55:51 2023 +0000

    fix image imports

commit ed43229
Author: Emilio Alvarez <[email protected]>
Date:   Mon Apr 3 21:11:42 2023 -0500

    upgrade development to vite (Doenet#2008)

commit 6fa3a61
Author: Jason Altekruse <[email protected]>
Date:   Mon Apr 3 10:35:59 2023 -0500

    Upgrade to react 18 (Doenet#1991)

    * Upgrade react 18

    - also update packages with peer dependencies on react
    - delete file not referenced anywhere (it happened to also reference
      a datetime package that has not be updated to be compatible with react
      18, but it doesn't matter because we didn't actually need it)
    - palantir/blueprint#5699

    * package lock

    * Change to use the new API for the root render call reqired in version 18

    * Remove unneeded depedency, move cypress-parallel to optional depedencies

commit 8d61204
Author: Duane Nykamp <[email protected]>
Date:   Thu Mar 30 20:08:25 2023 -0500

    piecewise function (Doenet#1998)
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.

Naive adding to a function doesn't work
2 participants