0 Members and 1 Guest are viewing this topic.
you mean =1? I already have plans for optimizing =0 into not(, but like you said, i will need some expressions detection. As for expansion, it doesn't seem to be *to* beneficial on average, so im going to leave it out for now. But i might put it in later. Also im doing the easy stuff first
So i was inspired by SourceCoders' broken Basic Optimizer function, and i thought about making one on the calculator, so you could optimize your Basic Programs without having to transfer them to the computer for any utility. I quickly wrote up some code in Axe, and the optimizations have started Currently it has support for:Ending ParenthasisEnding QuotesDevlarAnd there is plans and psedocode forImplied multiplication=0 into Not(Powers of 10Negative/Positive cancellationany other ideas of simple find and replace optimizations that i could put into the optimizer? Obviously i cant do some of the complicated stuff, but there are some good simple replacements that can make a big difference. And note that it ignores Strings completely Strings Should not be changed ^^. And there also might be an option on whether to erase empty lines or not. Some people like to keep them for readability during development, and then maybe want to take them out later.
I thought that was hiding under the carpet though thats why i was asking about bug reports. Either way, i didnt start this because im dissatisfied with Sourcecoder, i just was inspired by it. Also where should i put my post, in projects or Sourcecoder?And yeah Deep Thought, it recognizes that the last token is not part of a string and so it removes it There are some simple axe optimizations that could be done, but they are few, i'd have to work with axe a lot more until i am as comfortable in it as i am in Ti Basic.