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

#4251 2011-12-06 12:46:00

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

@Jens &bharvey
Snap! computes 360 values of sin x with Cordic algorithm. This needs to calculate for each value a matrix of 3 columns + 24 lines.
1st case - The 360 values are calculated "one by one" and displayed with a graph. It takes 144 s.(5.3 s with warp)
Then these 360 values are stored into a list (each item is a list of sin+cos).
2 - The 360 sine values are extracted from this list as to display the with the same method as before. Then the time is 114 s ! The time to only extract 360 values from one list is 80% the time needed to calculate these values...It seems surprising and need further investigation .

Offline

 

#4252 2011-12-06 13:58:49

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

Re: BYOB 3 - Discussion Thread

roijac wrote:

how does he actually implement saving?

Umm.  We have code already to take one Snap! value and turn it into text.  Next thing is to take a list of starting points (all the global variables plus some system things) and serialize (turn into text) all of them.  Finally, a way to direct this either to a URL for uploading or to a Javascript sandboxed local file.  (We'll provide a separate program you can use to run a server on your machine that connects only to your local Snap! process and turns URLs into filenames, so people who aren't worried about security can save to real files.)

n?  You want to say more?


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

Offline

 

#4253 2011-12-06 19:58:59

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

roijac wrote:

how does he actually implement saving?

Umm.  We have code already to take one Snap! value and turn it into text.  Next thing is to take a list of starting points (all the global variables plus some system things) and serialize (turn into text) all of them.  Finally, a way to direct this either to a URL for uploading or to a Javascript sandboxed local file.  (We'll provide a separate program you can use to run a server on your machine that connects only to your local Snap! process and turns URLs into filenames, so people who aren't worried about security can save to real files.)

n?  You want to say more?

Right now we're using JSON, so I convert all the morphs into their representations as plain objects, then serialize that using the built-in JSON.stringify(). To load, I convert the representations serialized in JSON into the real objects (this gets complicated because some initialization methods rely on the morph already being in the world...) and swap the stage (the base object which is saved) with the one currently in the world. People with modern(ish) browsers get the feature that they can load projects directly from URLs, i.e.,  every time they save the project the URL is updated to include a long hash part with the project in it. They can then just copy-paste the URL to share their projects.

Last edited by nXIII (2011-12-06 19:59:15)


nXIII

Offline

 

#4254 2011-12-06 21:04:58

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

a long hash part with the project in it.

"Long" is definitely the word for it!  Will this really work once we have multiple sprites, costumes, and all that?


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

Offline

 

#4255 2011-12-06 21:26:46

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

nXIII wrote:

a long hash part with the project in it.

"Long" is definitely the word for it!  Will this really work once we have multiple sprites, costumes, and all that?

I believe so, because the hash part is used only by the client (it doesn't have to be sent to the server, which can really limit the URL length) so there is no real limit on its size.


nXIII

Offline

 

#4256 2011-12-07 02:52:40

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

"It doesn't have to be sent to the server, which can really limit the URL length, so there is no real limit on its size."

Why have we to send our application to a server. As far as I know I can already use Snap! off-line (which may be useful if I must spend some time in a remote place were the web is not available) ? Why not create, run and save our application locally ?

Offline

 

#4257 2011-12-07 10:20:22

TomTom69
New Scratcher
Registered: 2011-12-05
Posts: 3

Re: BYOB 3 - Discussion Thread

Super...

Offline

 

#4258 2011-12-07 11:47:56

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

Re: BYOB 3 - Discussion Thread

why not integrate a bitly as saving process?  big_smile

Offline

 

#4259 2011-12-07 12:10:56

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

Re: BYOB 3 - Discussion Thread

roijac wrote:

why not integrate a bitly as saving process?  big_smile

Maybe as an option, but most of the time when I save something it's not really ready to share with the world.  And we privacy fanatics don't like building automatic sharing of information with advertising scrapers into systems.


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

Offline

 

#4260 2011-12-07 12:51:26

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

@Jens
I appreciate the "script error assistant" which informs us that one slot in not filled and which one.
Reversedly I've been blocked several times when clicking  by error on the pallet name of a variable, instead of clicking on the hide/show tick-box. Snap! blocks definitively . Arghhhhhh !

Offline

 

#4261 2011-12-07 15:34:23

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

Re: BYOB 3 - Discussion Thread

xly wrote:

"It doesn't have to be sent to the server, which can really limit the URL length, so there is no real limit on its size."

Why have we to send our application to a server. As far as I know I can already use Snap! off-line (which may be useful if I must spend some time in a remote place were the web is not available) ? Why not create, run and save our application locally ?

You can use it offline (the color sensing throws some security errors, but hopefully we'll fix that), in which case nothing is sent to any server. However, if you use a version hosted somewhere, the hash part of the URL isn't limited in length (like the query string or the URL itself)


nXIII

Offline

 

#4262 2011-12-07 23:16:51

iTweak0r
Scratcher
Registered: 2011-07-30
Posts: 100+

Re: BYOB 3 - Discussion Thread

i'm trying the BYOB thing in Snap! and i cant get pass the block spec dialog (it does not let me press OK).

EDIT: I'm using chrome as my browser

Last edited by iTweak0r (2011-12-07 23:17:20)


Make it in Scratch! because it's cooler when it's made in scratch
http://i.imgur.com/D4iqPHR.png

Offline

 

#4263 2011-12-07 23:53:50

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

Re: BYOB 3 - Discussion Thread

iTweak0r wrote:

i'm trying the BYOB thing in Snap! and i cant get pass the block spec dialog (it does not let me press OK).

It's not done yet.  Watch this space for announcement.


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

Offline

 

#4264 2011-12-08 03:29:17

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

@Jens
"Reversedly I've been blocked several times when clicking  by error on the pallet name of a variable, instead of clicking on the hide/show tick-box. Snap! blocks definitively . Arghhhhhh !"

Seems fixed for me. Now if you click on the name "slot" you get its value which is convenient.This featured existed previously as far as I remember.

Offline

 

#4265 2011-12-08 05:47:43

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

Re: BYOB 3 - Discussion Thread

Ooh... custom blocks!  big_smile

Now waiting for the OK button to do something.  tongue
(In case it's just my browser's fault, at the moment it just puts the window-let into a drag mode.)


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

Offline

 

#4266 2011-12-08 06:12:10

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

I'm in favor of pickles: Yum

Last edited by 14God (2011-12-08 06:12:21)


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#4267 2011-12-08 09:09:47

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

Re: BYOB 3 - Discussion Thread

OK button works now.  big_smile

Offline

 

#4268 2011-12-08 09:13:43

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

Re: BYOB 3 - Discussion Thread

No, still the same problem. I'm using FireFox (I have too many Safari tabs open at the moment to run Snap!) on a Mac. I'll just get back on a WebKit browser, just a second...

EDIT: AWESOME! It must be glitching with Gecko, because on a WebKit browser it works perfectlybig_smile  Now to add functionality... *opens up objects.js*

Last edited by Hardmath123 (2011-12-08 09:16:06)


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

Offline

 

#4269 2011-12-08 12:06:30

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

Re: BYOB 3 - Discussion Thread

ff worked  tongue

Offline

 

#4270 2011-12-08 18:11:53

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

No, still the same problem.

Perhaps its your cache. I know Google Chrome sometimes does weird things with JavaScript. Even if you clear the cache for a specific page, it often doesn't clear the cache for the JavaScript file, and you are then forced to clear ALL of you cache.

I hope they hurry up and fix it.  hmm

Offline

 

#4271 2011-12-08 18:17:40

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

Re: BYOB 3 - Discussion Thread

So, my mom got a Kindle Fire for her birthday, and I thought I'd report how it runs Snap!  big_smile

For the most part, its dual-core processor has no trouble with it. However, the tablet doesn't have the touch-precision of an iPad, and therefore, I had great difficulties with simple tasks like selecting the variable in the "set" block. Zooming in and out definitely slows down the Fire, but it doesn't have any problems with scrolling through the block panes or touch and drag. I have yet to try running a project, but I'll get to that later.

Just so you know, it doesn't use the default Android web browser. Instead, Amazon opted for a new one called "Silk", which uses Amazon's servers to do the web page lifting.

Oh, one more thing. The 1024x600 can't really fit all of Snap!'s content, and I was forced to switch between portrait and landscape mode occasionally.

Offline

 

#4272 2011-12-08 19:22:09

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

So, my mom got a Kindle Fire for her birthday, and I thought I'd report how it runs Snap!  big_smile

Thanks!  It's fantastic that we can run on tablets even without trying.  smile   But, yeah, we're definitely going to have to think later about arranging things on smaller screens.  I want it to be usable on my phone!


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

Offline

 

#4273 2011-12-08 21:22:10

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

Re: BYOB 3 - Discussion Thread

I'm really happy about all those dual (and soon to be quad) core tablets coming out! They really maximize HTML/JavaScript potential and value.  big_smile

Offline

 

#4274 2011-12-08 22:04:10

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

Re: BYOB 3 - Discussion Thread

Snap! update

As many of you might have noticed we've started implementing "Make a block". I've just uploaded a new version which actually lets you Build Your Own Blocks in Snap, but still on a very primitive and limited basis, much like the first BYOB prototype way back in 2008. Just so you know that this is bleeding edge and probably full of bugs and under construction everywhere, enjoy nonetheless! (and clear your browser's cache  smile  )

Last edited by Jens (2011-12-08 22:04:19)


Jens Mönig

Offline

 

#4275 2011-12-08 22:53:50

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Try making a block with a one letter name.  tongue


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

Board footer