There are a few problems with it.
:X+(X≥3)44→44
gives a syntax error and
:45X/3AC→A
is not the same as
:45X/(3AC)→A
The first parenthesis should stay. And, also, Stop is different than a blank ending. Stop should be kept, Return can be gotten rid of at the end of the program.
I'm making it so they can be suggested but the user doesn't have to accept them all. Erm, didn't ean to store something to 44...
KermMartian wrote:
:If X≥3
:X+44→X
...
:X+(X≥3)44→X
is it optimizing for file size or for speed? I'm wondering because the first "un-optimized" one is faster than the second (just for the two statements in the quote)
A better way would be to do this:
:X+44(X≥3→X
Either way, doing "/3AB" is not the same as "/(3AB", but it is the same as "AB/3".
Hey Kerm, Parse this file:
http://tifreakware.calcgames.org/ainfo/8.htm
When I looked at prgmFF, it had this section:
:0→E
:0→F
For my code, but when it "optimized" it, it had:
EDelvar
FDelvar
Thought you would like to know. Using my FF game ought to help debug the optimizing, anyways...
deleting it would set its value to 0, so the statements do the same thing...
But it was the way it put it, not the fact that it did.
I don't think EDelvar and FDelvar will work...
Except that EDelvar is an invalid argument for Delvar (except for when multiple Delvars are connected). It should be Delvar E.
oops, i didn't even see the syntax error there, lol
Could SC2 be made to optionally save the optimized code as a program?
@Kirb: That's on the to-do list
@Kuro: Not only that, it's gonna have FULL EDITING!!
@Delvars: me checking. EDIT: fixed.
Your welcome, lol
lol, thanks. I appreciate it.
Now for the editor interface...
Geez, if you can make that work, you could almost be considered a coding guru...
Hehe, now THAT I would like.
[postmode=flatter]All hail the soon-to-be omniscient guru of programming[/postmode]
Ok, I made it import the program data into the editor, and I made the clickable keymap. I have a problem though with the optimization of the recompiler, so if someone is skilled in PHP and I can trust him I would like some help...
Edit: Scratch that. figured it out myself in about 2 minutes.
Yes! Now that I failed my calculus final, I can stop studying for it and work on SC!
I see syntax highlighting is going well already... I'll do the rest of them tonight
I found this interesting:
SourceCoder 2.0 Beta wrote:
Optimized from 4893 bytes to 6842 bytes, saving -1949 bytes or -39.8% of the original size.
I didn't take time to look through all 5000 bytes to find what was wrong, but the optimization could apparently be better.
It's actually some kind of mis-retokening bug, I need to find whatever token is causing that.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum