@eclown and ThePCKid:
Ok, if you want to, though I think we have a pretty big team already.
Offline
Hardmath123 wrote:
amcerbu: I'm not on Scratch quite often these days. I will, however, check all new posts whenever I do check up. You don't have to bump up a post posted just 3 posts above.
![]()
hpotter134: I agree with you. However, we should try to keep the code compact as well as neat. Our code will involve repeating the "find innermost set of brackets" subscript many times. Moreover, it will perform this code after the setup. Your job was to be the beginning of the calculation. Since it seems reasonable that there should be a logical distinction between the setup and calculation, our code should attempt to be not only compact but clean.
Scimonster's method to find mismatched brackets seems perfect for the job—amcerbu practically needs to just remix his project with that script added in. Your job is completely different. You need to create a new list called (say) "SubProblem". You now need to extract the innermost set of nested brackets, if any, and then put it into the list "SubProblem". Once this is over, I will assign new jobs. New scripts will then evaluate that, and replace that bit of list with the answer. The whole process will then be repeated, starting from finding the innermost bracket set. Once enough of these "simplifications" are done, and we have a single value, we report that.
As you can see, amcerbu's job will really not be compatible with this (unless you want to end up checking for mismatched brackets every time, which would be silly and more inefficient) and it will probably be simpler, faster, cleaner, and on the whole a lot easier if we just go ahead and separate the jobs.
That's my opinion, but as hpotter134 says, we should debate this fairly. Anyway, thanks for reading the whole thing, and please take a minute to think about it.
—Hardmath
What are you, a mindreader? XD I was thinking along similar lines.
Offline
Thanks all for the feedback!
I like the suggestion, but we still haven't described the code itself that finds the innermost brackets. I had proposed a system earlier, but I want to know what other people have to contribute as well.
amcerbu
Offline
amcerbu wrote:
Thanks all for the feedback!
I like the suggestion, but we still haven't described the code itself that finds the innermost brackets. I had proposed a system earlier, but I want to know what other people have to contribute as well.
amcerbu
To find the innermost brackets, I suggest a script like this:
delete all of [temps] add [0] to [temps] repeat until <<(item (1) of [temps] = (length of [Engine]> or <(item (item (1) of [temps]) of [Engine]) = [)]>> replace item (1) of [temps] with ((item (1) of [temps]) + (1)) repeat until <(item (item (1) of [temps]) of [Engine]) = [)]> replace item (1) of [temps] with ((item (1) of [temps]) - (1)) add (item (item (1) of [temps]) of [Engine]) to [SubSolve]
The list "SubSolve" will contain the content of the innermost bracket. Now hpotter134 doesn't have to do his job.
Offline
Hardmath123 wrote:
@eclown and ThePCKid:
Ok, if you want to, though I think we have a pretty big team already.
Thank you!
Offline
Joeman592 wrote:
i bet this will be cool.
I'd get LS97, nXIII, and billeyedward to help. They are good programmers in scratch.
nXIII and billy are inactive, and have been for like six months.
Offline
bbbeb wrote:
Joeman592 wrote:
i bet this will be cool.
I'd get LS97, nXIII, and billeyedward to help. They are good programmers in scratch.nXIII and billy are inactive, and have been for like six months.
And we have a-lot of people.
Last edited by scimonster (2011-05-09 23:05:32)
Offline
Yes, I think it was suggested before.
Maybe it was when I started doing it for the variable based but then we scrapped it for lists.
Offline
scimonster wrote:
amcerbu wrote:
Thanks all for the feedback!
I like the suggestion, but we still haven't described the code itself that finds the innermost brackets. I had proposed a system earlier, but I want to know what other people have to contribute as well.
amcerbuTo find the innermost brackets, I suggest a script like this:
Code:
delete all of [temps] add [0] to [temps] repeat until <<(item (1) of [temps] = (length of [Engine]> or <(item (item (1) of [temps]) of [Engine]) = [)]>> replace item (1) of [temps] with ((item (1) of [temps]) + (1)) repeat until <(item (item (1) of [temps]) of [Engine]) = [)]> replace item (1) of [temps] with ((item (1) of [temps]) - (1)) add (item (item (1) of [temps]) of [Engine]) to [SubSolve]The list "SubSolve" will contain the content of the innermost bracket. Now hpotter134 doesn't have to do his job.
![]()
Now it's my turn to say Mindreader—that's exactly how I imagined the code (except the list was called subProblem).
Offline
Joeman592 wrote:
i bet this will be cool.
I'd get LS97, nXIII, and billeyedward to help. They are good programmers in scratch.
I may, actually. 2/3 of our team's inactive.
In fact, just to see who all's active:
All people on the team to post within the next 3 days, my time and starting now (ending as soon as I check on May 13th), will be put under "active", and the rest under "inactive" [on the main post], unless you have a good serious reason, like being away or something.
Last edited by Hardmath123 (2011-05-10 11:11:57)
Offline
Active, but waiting for amcerbu.
Offline
Active, but I won't be able to do much Scratch for a while. Exams are looming on the horizon. I'll try to finish this up as soon as possible- probably by the end of the week.
I'm sorry to be holding everyone up.
Offline
bbbeb wrote:
Joeman592 wrote:
i bet this will be cool.
I'd get LS97, nXIII, and billeyedward to help. They are good programmers in scratch.nXIII and billy are inactive, and have been for like six months.
oh, i didn't know that... I've been off scratch for a while...
Offline
Can someone make sure that it puts a negative sign with the number if the previous was an operator? Replace the
if <[nums] contains (letter (item (1) of [temps]) of (answer))>
with
if <<[nums] contains (letter (item (1) of [temps]) of (answer))> or <<(letter (item (1) of [temps] of (answer)) = [-]> and <(item (2) of [temps]) = [o]>>>
Offline
Active, but busy with school. The ideas above look good, I'll read them more carefully when I get the chance.
Offline
sorry, the clock on my computer said 5:13 so I thought that was the date
applejack wrote:
AAG! It's still may 13th for me! I'm done with the xenon graphics, and am working hard on the graphing calculator ones.
Offline
And if it's at the beginning of the expression!
scimonster wrote:
Can someone make sure that it puts a negative sign with the number if the previous was an operator? Replace the
Code:
if <[nums] contains (letter (item (1) of [temps]) of (answer))>with
Code:
if <<[nums] contains (letter (item (1) of [temps]) of (answer))> or <<(letter (item (1) of [temps] of (answer)) = [-]> and <(item (2) of [temps]) = [o]>>>
Offline
applejack wrote:
And if it's at the beginning of the expression!
![]()
scimonster wrote:
Can someone make sure that it puts a negative sign with the number if the previous was an operator? Replace the
Code:
if <[nums] contains (letter (item (1) of [temps]) of (answer))>with
Code:
if <<[nums] contains (letter (item (1) of [temps]) of (answer))> or <<(letter (item (1) of [temps] of (answer)) = [-]> and <(item (2) of [temps]) = [o]>>>
Yes, someone needs to do that too.
Offline
Can I join?

Offline