Skip to content

Fix Issue 12#13

Open
RubyTheRoobster wants to merge 22 commits intomasterfrom
rubytheroobster
Open

Fix Issue 12#13
RubyTheRoobster wants to merge 22 commits intomasterfrom
rubytheroobster

Conversation

@RubyTheRoobster
Copy link
Collaborator

@RubyTheRoobster RubyTheRoobster commented Jan 20, 2023

This pull request fixes Issue #12 by adding nested functions.

@RubyTheRoobster RubyTheRoobster added the enhancement New feature or request label Jan 20, 2023
@RubyTheRoobster
Copy link
Collaborator Author

My original idea worked better, I'm going to use that.

@RubyTheRoobster
Copy link
Collaborator Author

RubyTheRoobster commented Feb 23, 2023

For some reason, the function is duplicating parentheses blocks. Per the output:

x1*(x2*x3(x2*x3)

Is the function being sent to verification, which in addition to being wrong (syntactically), is not equivalent to the original function at all, which was

x1*(x2*x3)

All previous functions seem to be passed correctly. As a matter of fact, it only seems to be a problem when the parentheses come last. Finally, it doesn't build on Ubuntu for whatever reason, yet it builds perfectly fine on my Windows machine.

@RubyTheRoobster RubyTheRoobster linked an issue Feb 23, 2023 that may be closed by this pull request
@RubyTheRoobster
Copy link
Collaborator Author

Fixed the above by removing the oldi variable.

@RubyTheRoobster
Copy link
Collaborator Author

RubyTheRoobster commented Feb 24, 2023

A new bug has arisen: the substitution never happens in the first place.

Edit: I'm an idiot, I was calling it incorrectly anyways.

Edit 2: Fixed the above, now it crashes.

@RubyTheRoobster
Copy link
Collaborator Author

RubyTheRoobster commented Feb 24, 2023

Even with all that fixed, the substitution part still never happens.

Edit: It misses a parenthesis when copying the function, it fails BEFORE the substitution.

@RubyTheRoobster
Copy link
Collaborator Author

I'm going with the original idea I had, by denoting functions after operators with spaces preceding them. This had to be done, as otherwise it would interpret +f(x2)(Number) as if +f was the function being called. Now, to achieve addition it should be written

g(x1)(Number)+ f(x2)(Number)

Let's see how this goes.

@RubyTheRoobster
Copy link
Collaborator Author

With my current changes, now it is messing up the g(x1)(Number) part, and not the addition. Probably a bug when I substitute it into the main body.

@RubyTheRoobster
Copy link
Collaborator Author

Nevermind. For whatever reason, it includes the value of g(x1)(Number) in tempstr2. I am still struggling to find where the bug is.

@RubyTheRoobster
Copy link
Collaborator Author

For the record: It still doesn't work. I STILL CAN'T FIX THAT SINGLE LINE TO WORK FOR ALL TEST CASES ARGHHHHHHHHHHHHHHHHHH

@RubyTheRoobster
Copy link
Collaborator Author

This is being delayed until the next release.

@RubyTheRoobster RubyTheRoobster self-assigned this Mar 7, 2023
@RubyTheRoobster RubyTheRoobster added the stalled This issue or pull request is temporarily put on hold. label Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request stalled This issue or pull request is temporarily put on hold.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Add Support for Functions Within Functions

1 participant