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

#7176 2013-02-28 05:50:57

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Hardmath123 wrote:

AoPS

Ah, this is new to me.  Thanks for the pointer.  But why oh why don't they put sample pages on their web site?  I can't tell, for example, from what I read there, whether or not they take an axiomatic approach to algebra -- proving, for example, that if x is a factor of y, and y is a factor of z, then x is a factor of z.  (Not a difficult theorem; I took it from an early chapter of the algebra 1 book I learned from long ago.)

Everything in those two books is proven first. They stress the fact that you don't need to memorize formulae if you know where they come from. Also, sometimes they make you prove it—so for example, I managed to write a proof for Cauchy-Schwarz given only little hints here and there.

Unlike my school, where they just shove a theorem at you and expect you to take it on faith.  tongue

No complex numbers?  Does that mean you haven't run across the sublime Euler's Formula?  (The one about complex exponentials, not the one about polyhedra.)  I've been thinking you know everything.  You have much to look forward to.

e^iπ = -1? Honestly, I never believed that—I don't understand the proof (well, I haven't really tried).  tongue

What's your problem with logarithms?  You don't think it's amazing how they reduce hard multiplication problems into easy addition problems?  (You do understand that Napier and those guys didn't have cell phones with calculator apps, right?  tongue )  And also how they make it possible to picture enormous ranges of values, such as astronomical distances?  Your book isn't actually making you do interpolation in printed log tables, is it?

No, for me logs are a lot of identities. The reason I don't like logs are because they're one level too abstract for my liking. Most logarithm problems have logarithms in the question and in the answer; they feel like someone's forcing you to use their system of identities to solve their problem.

A completely opposite branch is geometry, where theoretically you could give a Martian a diagram and using completely different methods unknown to Earthlings she can solve it (this is kind of obvious from the fact that there's evidence of a proof  of Pythagoras some 2600 years ago in India*). Geometry is more universal, as is number theory.

*it consisted of a single diagram and the word "behold!"

Last edited by Hardmath123 (2013-02-28 06:27:15)


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

Offline

 

#7177 2013-02-28 09:36:01

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Any particular reason we can't specify our password at sign-up (hyphenating for safety)?

EDIT: I'm getting a slight script rendering issue when I move my mouse from the scripting pane to the stage. This is reproducible in Chrome 25.

http://i.imgur.com/cCIH9Ne.png

Last edited by shadow_7283 (2013-02-28 09:40:45)

Offline

 

#7178 2013-02-28 10:46:11

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

Any particular reason we can't specify our password at sign-up (hyphenating for safety)?

EDIT: I'm getting a slight script rendering issue when I move my mouse from the scripting pane to the stage. This is reproducible in Chrome 25.

http://i.imgur.com/cCIH9Ne.png

yeah, I get that too. I think it's a double buffering problem.

Hardmath123 wrote:

e^iπ = -1? Honestly, I never believed that—I don't understand the proof

It's because e^xi = cos x + i * sin x (in radians) (I don't understand the proof for that bit, but I believe it anyway) so e^πi = cos π + i * sin π = -1 + 0i = -1


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#7179 2013-02-28 10:49:16

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

Everything in those two books is proven first.[...]Also, sometimes they make you prove it

Ah, great!  I didn't think anyone published such books any more.  Thanks for the pointer.

e^iπ = -1? Honestly, I never believed that—I don't understand the proof (well, I haven't really tried).  tongue

You won't really really understand it until you get to Functions of Complex Variables (post-calculus) and do Taylor series.  e^iθ = cos θ + i sin θ is just adding the Taylor series for the trig functions and discovering that the result is the Taylor series for the (imaginary) exponential.

No, for me logs are a lot of identities. The reason I don't like logs are because they're one level too abstract for my liking. Most logarithm problems have logarithms in the question and in the answer; they feel like someone's forcing you to use their system of identities to solve their problem.

Identities about logs are just identities about exponentials in a sometimes more useful form.  F'rinstance (if I may use the programming-style multi-letter variables for a moment) a*b = e^(loga) * e^(logb) = e^(loga+logb).  Taking the log of both sides gives log(a*b) = loga+logb.

And the log is such a useful function in its own right.  So for example if you want an efficient sort algorithm then instead of looking at one datum at a time (which ends up taking N^2 time) you divide the data in half and sort recursively (N log N time, which is way smaller for large N).

a proof of Pythagoras some 2600 years ago in India

For extra credit, which US President invented a proof of Pythagoras?  No googling.  smile


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7180 2013-02-28 11:17:02

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

Re: BYOB 3 - Discussion Thread

Yeah, I'm not saying that log isn't a useful function—you do need some way to get a numerical value. I just prefer using variables and exponents.


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

Offline

 

#7181 2013-02-28 11:51:05

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

joefarebrother wrote:

Here is the XML for the whole project: (so far)

I can't load that -- I get an error about <stage> missing.  Could you double check the pasting in?

Maybe it's because it's url encoded?
I'll re-paste it:

Code:

http://snap.berkeley.edu/snapsource/snap.html#open:<project name="object orientation" app="Snap! 4.0, http://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAADfUlEQVR4Xu3XsU1jYRCF0d+IAEiQMCCoA0ENJoEyqIAeEDn1QB0UgSMjZ961g83sncBXE/i8eDQjzvuwYbL6+wwPgSaBiQCb5J3dCAhQCK0CAmzld1yAGmgVEGArv+MC1ECrgABb+R0XoAZaBQTYyu+4ADXQKiDAVn7HBaiBVgEBtvI7LkANtAoIsJXfcQFqoFVAgK38jgtQA60CAmzld1yAGmgVEGArv+MC1ECrgABb+R0XoAZaBQTYyu+4ADXQKiDAVn7HBaiBVgEBtvI7LkANtAoIsJXfcQFqoFVAgK38jgtQA60CAmzld1yAGmgVEGArv+MC1ECrgABb+R0XoAZaBQTYyu+4ADXQKiDAVn7HBaiBVgEBtvI7LkANtAoIsJXfcQFqoFVAgK38jgtQA60CAmzld1yAGmgVEGArv+MC1ECrgABb+R0X4JYGFovFOD09HUdHRyoJCghwC+7Ly8tYrVbj/v5+PD8/j+vr6+BrONzVAtzy7r+/v8fr6+vmE3A+n4/z8/Mxm802QU6n03F7eztOTk4Ot5w9/eQC3AH59fU13t7eNl/F62f9ibhcLsfV1dU4Ozsbx8fH4+PjY0+v4jDXCHDHe//8/Bzv7+//PukEuP9fEgH+5yt4MpmMn5+fcXFxMR4fH8fd3d24vLwcNzc3voL30KMAd/wTso7v4eFhPD09baLz7F9AgFtMf39/N3/7rSP05AQEmLO1uSAgwAKSkZyAAHO2NhcEBFhAMpITEGDO1uaCgAALSEZyAgLM2dpcEBBgAclITkCAOVubCwICLCAZyQkIMGdrc0FAgAUkIzkBAeZsbS4ICLCAZCQnIMCcrc0FAQEWkIzkBASYs7W5ICDAApKRnIAAc7Y2FwQEWEAykhMQYM7W5oKAAAtIRnICAszZ2lwQEGAByUhOQIA5W5sLAgIsIBnJCQgwZ2tzQUCABSQjOQEB5mxtLggIsIBkJCcgwJytzQUBARaQjOQEBJiztbkgIMACkpGcgABztjYXBARYQDKSExBgztbmgoAAC0hGcgICzNnaXBAQYAHJSE5AgDlbmwsCAiwgGckJCDBna3NBQIAFJCM5AQHmbG0uCAiwgGQkJyDAnK3NBQEBFpCM5AQEmLO1uSAgwAKSkZyAAHO2NhcEBFhAMpITEGDO1uaCgAALSEZyAgLM2dpcEBBgAclITuAPbAUXt9D5MqwAAAAASUVORK5CYII=</thumbnail><stage name="Stage" costume="0" tempo="60" threadsafe="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAOhUlEQVR4Xu3VwQkAAAjEMN1/abewn7jAQRC64wgQIECAAIF3gX1fNEiAAAECBAiMAHsCAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQIHLFxAWmhEwHPAAAAAElFTkSuQmCC</pentrails><costumes><list id="2"></list></costumes><sounds><list id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><sprite name="Sprite" idx="1" x="0" y="0" heading="90" scale="1" rotation="1" draggable="true" costume="0" color="80,80,80" pen="tip" id="8"><costumes><list id="9"></list></costumes><sounds><list id="10"></list></sounds><variables></variables><blocks></blocks><scripts><script x="60" y="311"><custom-block s="binary search for %s in %l comparing with %predRing"><l>B</l><block s="reportNewList"><list><l>A</l><l>C</l><l>D</l></list></block><block s="reifyPredicate"><autolambda><block s="reportLessThan"><l></l><l></l></block></autolambda><list></list></block></custom-block></script><comment x="98" y="266" w="80" collapsed="false">Doesn&apos;t work</comment><comment x="97" y="148" w="80" collapsed="false">Works</comment><script x="51" y="192"><custom-block s="binary search for %s in %l comparing with %predRing"><l>B</l><block s="reportNewList"><list><l>A</l><l>B</l><l>D</l></list></block><block s="reifyPredicate"><autolambda><block s="reportLessThan"><l></l><l></l></block></autolambda><list></list></block></custom-block></script></scripts></sprite></sprites></stage><blocks><block-definition s="recursive %&apos;procedure&apos; %&apos;proc&apos;" type="reporter" category="other"><inputs><input type="%upvar"></input><input type="%cmdRing"></input></inputs><script><block s="doSetVar"><l>procedure</l><block var="proc"/></block><block s="doReport"><block var="proc"/></block></script></block-definition><block-definition s="binary search for %&apos;item&apos; in %&apos;list&apos; comparing with %&apos;comparator &lt;&apos;" type="reporter" category="lists"><inputs><input type="%s"></input><input type="%l"></input><input type="%predRing"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="recursive %upvar %cmdRing"><l>bs</l><block s="reifyScript"><script><block s="doDeclareVariables"><list><l>mid</l></list></block><block s="doSetVar"><l>mid</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="lo"/><block var="hi"/></block><l>2</l></block></block></block><block s="doIfElse"><block s="reportGreaterThan"><block var="lo"/><block var="hi"/></block><script><block s="doReport"><block s="reportDifference"><l>0</l><block var="lo"/></block></block></script><script><block s="doIfElse"><block s="evaluate"><block var="comparator &lt;"/><list><block var="item"/><block s="reportListItem"><block var="mid"/><block var="list"/></block></list></block><script><block s="doReport"><block s="evaluate"><block var="bs"/><list><block var="lo"/><block s="reportDifference"><block var="mid"/><l>1</l></block></list></block></block></script><script><block s="doIfElse"><block s="evaluate"><block var="comparator &lt;"/><list><block s="reportListItem"><block var="mid"/><block var="list"/></block><block var="item"/></list></block><script><block s="doReport"><block s="evaluate"><block var="bs"/><list><block s="reportSum"><block var="mid"/><l>1</l></block><block var="hi"/></list></block></block></script><script><block s="doReport"><block var="mid"/></block></script></block></script></block></script></block></script><list><l>lo</l><l>hi</l></list></block></custom-block><list><l>1</l><block s="reportListLength"><block var="list"/></block></list></block></block></script><scripts><comment x="306" y="134.2" w="296" collapsed="false">Searches for the position to  the item is in the list. Asumes that the list is sorted according to comparator &lt;. If the item is not found, this procedure returns a negative number whose absolute value is the position that the item should be inserted at if it is needed.</comment></scripts></block-definition><block-definition s="look up %&apos;key&apos; in %&apos;table&apos; , return %&apos;notfound&apos; in not found" type="reporter" category="lists"><inputs><input type="%s"></input><input type="%l"></input><input type="%s"></input></inputs><scripts><comment x="32" y="84.19999999999999" w="257" collapsed="false">Part of the API for an ADT &quot;Tables&quot; for mapping strings to arbatrary values. &#xD;&#xD;Returns the value associated with the given key, or return &quot;notfound&quot; in not found. Not implemented yet.</comment></scripts></block-definition><block-definition s="// %&apos;comments&apos;" type="command" category="other"><inputs><input type="%mult%s"></input></inputs><scripts><comment x="43" y="63.19999999999999" w="80" collapsed="false">do nothing</comment></scripts></block-definition><block-definition s="new prototype object" type="reporter" category="other"><inputs></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="recursive %upvar %cmdRing"><l>clone</l><block s="reifyScript"><script><block s="doDeclareVariables"><list><l>methods</l><l>data</l></list></block><custom-block s="// %mult%s"><list><l>not implemented yet</l></list></custom-block></script><list><l>parent</l></list></block></custom-block><list><block s="reifyReporter"><autolambda><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l>&lt;no message found: </l><block var="message"/><l>&gt;</l></list></block></autolambda><list><l>args</l></list></block></autolambda><list><l>message</l></list></block></list></block></block></script></block-definition></blocks><variables></variables></project>

So much PNG junk! Maybe if it were all references to the actual image data at the end where they could all be compressed next to each other it would be shorter?

Also:

http://i.imgur.com/r8ci2yD.jpg sad  sad

Last edited by joefarebrother (2013-02-28 12:10:03)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#7182 2013-02-28 11:51:17

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

it consisted of a single diagram and the word "behold!"

I like this.  tongue


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7183 2013-02-28 13:09:20

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

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

Hardmath123 wrote:

it consisted of a single diagram and the word "behold!"

I like this.  tongue

It looked like this:
http://i50.tinypic.com/5jxs1k.png

Can you figure out how that diagram proves it? The "triangles" are congruent right triangles (or at least should be. I'm bad at Penultimate because I'm a lefty and their lefty mode isn't too great).


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

Offline

 

#7184 2013-02-28 13:53:31

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

Re: BYOB 3 - Discussion Thread

'twas easy  tongue
http://i.imgur.com/dkKtHt3.png

bharvey wrote:

For extra credit, which US President invented a proof of Pythagoras?  No googling.

garfield, i believe  big_smile

didnt google

Last edited by roijac (2013-02-28 13:57:16)

Offline

 

#7185 2013-02-28 14:06:44

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

I'm a lefty

Ah, no wonder you're a mathematician!


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7186 2013-02-28 14:07:44

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

roijac wrote:

garfield, i believe  big_smile   didnt google

Yup.  Not to be confused with the cat.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7187 2013-02-28 14:25:37

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

nXIII wrote:

I can't use my password hasher.

Try again (in Chrome).


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7188 2013-02-28 15:57:01

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

nXIII wrote:

I can't use my password hasher.

Try again (in Chrome).

Still not working…it's adding an invisible <input>, not an invisible <input type=text> (@Jens the password hasher I made does work for dynamically-added password fields, so if you fix that it should work).


nXIII

Offline

 

#7189 2013-03-01 03:55:12

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

I just want to be able to paste, password hashers aren't a priority (you can type it in once and just stay logged in if you're at home). Unfortunately capturing "paste" events from dynamically created hidden text inputs seems to work only in Chrome, but not reliably (only when you "physically" touch the hidden input element with the mouse pointer instead of pragmatically focusing it). So I'm capturing the event from the document.body instead, which is reliable in Chrome, but doesn't work elsewhere (even though it should). Anybody get it to work in FF and Safari?


Jens Mönig

Offline

 

#7190 2013-03-01 04:12:37

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

how come this only works in Chrome:

Code:

<!DOCTYPE html>
<html>
    <head>
        <title>Paste!</title>
        <script type="text/javascript">            
            window.onload = function () {
                document.addEventListener(
                    "paste",
                    function (event) {
                        alert(event.clipboardData.getData("text"));
                    },
                    false
                );
            };
        </script>
    </head>
    <body>
        <p>Copy some text elsewhere, then paste it here.</p>
    </body>
</html>

It's supposed to, right? http://www.quirksmode.org/dom/events/cutcopypaste.html

Last edited by Jens (2013-03-01 04:13:33)


Jens Mönig

Offline

 

#7191 2013-03-01 08:43:01

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: BYOB 3 - Discussion Thread

According to this source "getData" is ie only.
So far as I can tell, the only methods for getting clipboard data are a bit hacky.

Last edited by shadow_7283 (2013-03-01 08:46:43)

Offline

 

#7192 2013-03-01 10:59:36

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

http://i.imgur.com/NkzACN5.jpg

Code:

data:text/xml,<blocks app="Snap! 4.0, http://snap.berkeley.edu" version="1"><block-definition s="recursive %&apos;procedure&apos; %&apos;proc&apos;" type="reporter" category="other"><inputs><input type="%upvar"></input><input type="%cmdRing"></input></inputs><script><block s="doSetVar"><l>procedure</l><block var="proc"/></block><block s="doReport"><block var="proc"/></block></script></block-definition><block-definition s="binary search for %&apos;item&apos; in %&apos;list&apos; comparing with %&apos;comparator &lt;&apos;" type="reporter" category="lists"><inputs><input type="%s"></input><input type="%l"></input><input type="%predRing"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="recursive %upvar %cmdRing"><l>bs</l><block s="reifyScript"><script><block s="doDeclareVariables"><list><l>mid</l></list></block><block s="doSetVar"><l>mid</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="lo"/><block var="hi"/></block><l>2</l></block></block></block><block s="doIf"><block s="reportGreaterThan"><block var="lo"/><block var="hi"/></block><script><block s="doReport"><block s="reportDifference"><l>0</l><block var="lo"/></block></block></script></block><block s="doIf"><block s="evaluate"><block var="comparator &lt;"/><list><block var="item"/><block s="reportListItem"><block var="mid"/><block var="list"/></block></list></block><script><block s="doReport"><block s="evaluate"><block var="bs"/><list><block var="lo"/><block s="reportDifference"><block var="mid"/><l>1</l></block></list></block></block></script></block><block s="doIf"><block s="evaluate"><block var="comparator &lt;"/><list><block s="reportListItem"><block var="mid"/><block var="list"/></block><block var="item"/></list></block><script><block s="doReport"><block s="evaluate"><block var="bs"/><list><block s="reportSum"><block var="mid"/><l>1</l></block><block var="hi"/></list></block></block></script></block><block s="doReport"><block var="mid"/></block></script><list><l>lo</l><l>hi</l></list></block></custom-block><list><l>1</l><block s="reportListLength"><block var="list"/></block></list></block></block></script><scripts><comment x="297" y="141.2" w="296" collapsed="false">Searches for the position to  the item is in the list. Asumes that the list is sorted according to comparator &lt;. If the item is not found, this procedure returns a negative number whose absolute value is the position that the item should be inserted at if it is needed.</comment></scripts></block-definition></blocks>

Why does the second use of the binary search block cause an error when the first doesn't?

Last edited by joefarebrother (2013-03-01 11:00:51)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#7193 2013-03-01 16:04:29

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

joefarebrother wrote:

Why does the second use of the binary search block cause an error when the first doesn't?

Because the first example happens not to need to make a recursive call.  The problem is in RECURSIVE, not in the search block:

http://cs.berkeley.edu/~bh/jfbfact.png

Usually in a case involving scope of variables when I can't decide whether to declare something to be a bug in Snap! or a bug in the user's program, I just try it in Scheme, but Scheme doesn't have upvars.  But it works in BYOB!  So, yeah, it's a Snap! bug.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7194 2013-03-01 16:37:51

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

I just want to be able to paste, password hashers aren't a priority (you can type it in once and just stay logged in if you're at home). Unfortunately capturing "paste" events from dynamically created hidden text inputs seems to work only in Chrome, but not reliably (only when you "physically" touch the hidden input element with the mouse pointer instead of pragmatically focusing it). So I'm capturing the event from the document.body instead, which is reliable in Chrome, but doesn't work elsewhere (even though it should). Anybody get it to work in FF and Safari?

Just use real <input> elements (not hidden!) for text fields.

EDIT: Look at all the wonderful things you can do with native widgets!

http://i47.tinypic.com/30i99b4.jpg

Last edited by nXIII (2013-03-01 18:40:00)


nXIII

Offline

 

#7195 2013-03-01 18:53:42

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Okay, I've found a problem with the Snap! signup server. I managed to sign up with a birth date of Octember 1894.  tongue

HOW I DID IT:
I made a new version of widgets.js and hosted it online. The file added Octember as a valid month, as well as extending the year limit. I then made a GreaseMonkey userscript that changed the widgets.js script element to my widgets.js. The signup dialog then had the new (fake) inputs. I couldn't, however, get a 1-letter username.

Last edited by technoboy10 (2013-03-01 19:05:41)


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#7196 2013-03-01 19:13:57

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

technoboy10 wrote:

I managed to sign up with a birth date of Octember 1894.

tongue

I don't think we're too worried about this problem.  We only use the birthdate client side during signup, to decide whether to ask for your email address or your parent's email address.  The birthdate itself is never sent to the server.  So, knock yourself out with strange months.  smile

I'll worry when you can log in as someone else.

EDIT: "server side" -> "client side."  Duh.  Sorry for any confusion.

Last edited by bharvey (2013-03-01 22:43:57)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7197 2013-03-01 19:21:56

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

@bharvey Ah. The server itself is pretty hard to hack (I can barely find any real urls on the snap server), so Jens did a good job.  smile

EDIT:
Are there ads in the /snapsource/dan directory on the Snap! site?

Last edited by technoboy10 (2013-03-01 19:26:40)


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#7198 2013-03-01 19:28:01

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: BYOB 3 - Discussion Thread

It is easier to change the month with developer tools in your browser. I signed up with the month 'Novembruary'.  tongue


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#7199 2013-03-01 19:56:56

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

technoboy10 wrote:

so Jens did a good job.

Some of the credit goes to Jens's colleagues at MioSoft, who contributed to the platform that hosts our cloud service.

Are there ads in the /snapsource/dan directory on the Snap! site?

Umm.  Good catch.  snapsource/dan is a symbolic link to a file in my colleague Dan Garcia's home directory.  I suppose he put it there because at one point, at least, putting #open:http://.... in a Snap! URL worked only if the "...." part was in snapsource.  I think this works if the target page's HTML has the right incantation to allow a cross-site reference, but anyway, Dan apparently decided to finesse the problem with a symbolic link.  I have no idea what that music video (I'm assuming; I didn't play it) is doing at the bottom of the page.  I'll enquire.  Watch this space.

EDIT:  Dan says, "I was experimenting with using splicd which allows you to specify the start and end times of a youtube video, used that as a scratch space. Gone now, thanks for the nudge."

Last edited by bharvey (2013-03-01 22:39:20)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7200 2013-03-01 21:20:43

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

nXIII wrote:

Look at all the wonderful things you can do with native widgets!

Umm, are you really sure you want your browser to spell check your password?  tongue

(Sorry, couldn't resist, but I'm going to try not to get in the crossfire between you and Jens.)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

Board footer