This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#376 2011-05-09 07:03:02

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Calling all math lovers and good programmers

@eclown and ThePCKid:
Ok, if you want to, though I think we have a pretty big team already.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#377 2011-05-09 09:47:26

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Calling all math lovers and good programmers

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.  wink


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.  smile

Offline

 

#378 2011-05-09 14:52:55

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: Calling all math lovers and good programmers

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

 

#379 2011-05-09 15:52:36

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Calling all math lovers and good programmers

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:

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.  tongue

Offline

 

#380 2011-05-09 17:05:28

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Calling all math lovers and good programmers

Hardmath123 wrote:

@eclown and ThePCKid:
Ok, if you want to, though I think we have a pretty big team already.

Thank you!

Offline

 

#381 2011-05-09 22:41:18

Joeman592
Scratcher
Registered: 2010-01-23
Posts: 100+

Re: Calling all math lovers and good programmers

i bet this will be cool.

I'd get LS97, nXIII, and billeyedward to help. They are good programmers in scratch.


http://i.imgur.com/HcAj1.png
http://i.imgur.com/gss7S.gifhttp://i.imgur.com/kbcKt.gifhttp://i.imgur.com/0LteM.gif

Offline

 

#382 2011-05-09 23:02:12

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Calling all math lovers and good programmers

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.


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#383 2011-05-09 23:03:22

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Calling all math lovers and good programmers

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

 

#384 2011-05-09 23:22:27

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: Calling all math lovers and good programmers

@scimonster- Your code scans until it finds a ")" and then works backward?  Sounds good! That looks like it will work well!

Offline

 

#385 2011-05-09 23:25:47

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Calling all math lovers and good programmers

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

 

#386 2011-05-10 10:54:14

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Calling all math lovers and good programmers

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. 

amcerbu

To 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.  tongue

Now it's my turn to say Mindreader—that's exactly how I imagined the code (except the list was called subProblem).  big_smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#387 2011-05-10 11:08:04

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Calling all math lovers and good programmers

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)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#388 2011-05-10 12:32:10

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Calling all math lovers and good programmers

Active, but waiting for amcerbu.

Offline

 

#389 2011-05-10 18:11:30

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: Calling all math lovers and good programmers

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

 

#390 2011-05-10 21:27:28

Joeman592
Scratcher
Registered: 2010-01-23
Posts: 100+

Re: Calling all math lovers and good programmers

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...


http://i.imgur.com/HcAj1.png
http://i.imgur.com/gss7S.gifhttp://i.imgur.com/kbcKt.gifhttp://i.imgur.com/0LteM.gif

Offline

 

#391 2011-05-11 10:32:06

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Calling all math lovers and good programmers

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

 

#392 2011-05-11 12:09:56

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Calling all math lovers and good programmers

IDK, but i'm here.
I've been looking at the code to find out what it does.  lol


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#393 2011-05-11 18:15:19

applejack
Scratcher
Registered: 2010-03-23
Posts: 100+

Re: Calling all math lovers and good programmers

AAG! It's still may 13th for me! I'm done with the xenon graphics, and am working hard on the graphing calculator ones.


http://i.imgur.com/zKzps.png
http://blocks.scratchr.org/API.php?action=onlineStatus&amp;type=square&amp;user=applejack -I'm http://blocks.scratchr.org/API.php?action=onlineStatus&amp;type=text&amp;user=applejack

Offline

 

#394 2011-05-11 20:17:35

hpotter134
Scratcher
Registered: 2010-02-21
Posts: 100+

Re: Calling all math lovers and good programmers

Active, but busy with school. The ideas above look good, I'll read them more carefully when I get the chance.  smile


http://i45.tinypic.com/fxgtvc.png

Offline

 

#395 2011-05-11 22:57:57

Joeman592
Scratcher
Registered: 2010-01-23
Posts: 100+

Re: Calling all math lovers and good programmers

do you need any help making this? I could maybe help with some things...


http://i.imgur.com/HcAj1.png
http://i.imgur.com/gss7S.gifhttp://i.imgur.com/kbcKt.gifhttp://i.imgur.com/0LteM.gif

Offline

 

#396 2011-05-12 00:56:31

applejack
Scratcher
Registered: 2010-03-23
Posts: 100+

Re: Calling all math lovers and good programmers

sorry, the clock on my computer said 5:13 so I thought that was the date  tongue

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.


http://i.imgur.com/zKzps.png
http://blocks.scratchr.org/API.php?action=onlineStatus&amp;type=square&amp;user=applejack -I'm http://blocks.scratchr.org/API.php?action=onlineStatus&amp;type=text&amp;user=applejack

Offline

 

#397 2011-05-12 09:18:29

applejack
Scratcher
Registered: 2010-03-23
Posts: 100+

Re: Calling all math lovers and good programmers

And if it's at the beginning of the expression!  big_smile

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]>>>

http://i.imgur.com/zKzps.png
http://blocks.scratchr.org/API.php?action=onlineStatus&amp;type=square&amp;user=applejack -I'm http://blocks.scratchr.org/API.php?action=onlineStatus&amp;type=text&amp;user=applejack

Offline

 

#398 2011-05-12 09:21:09

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Calling all math lovers and good programmers

applejack wrote:

And if it's at the beginning of the expression!  big_smile

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

 

#399 2011-05-12 11:33:38

designer45
Scratcher
Registered: 2011-01-17
Posts: 500+

Re: Calling all math lovers and good programmers

Can I join?  smile


http://www.uploadup.com/di-JOV6.jpg
Grr, I had no life outside of Miscellaneous. (lol jk) Click here to read my pokemon fanfiction! As of this update, jslomba has 2012 posts.

Offline

 

#400 2011-05-12 14:13:02

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: Calling all math lovers and good programmers

could i pls join u?

Offline

 

Board footer