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

#3576 2011-08-24 20:00:10

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

Re: BYOB 3 - Discussion Thread

well, the tree example is just a recursive JavaScript function that calls Snap's turtle drawing primitives. Thing is, merely crunching functions and drawing stuff onto a canvas is probably fast enough in just any implementation programming language, the issues start once you start yielding to other processes and dynamically redrawing the display so users can visually follow what's going on (and interact with it). Even then you can optimize certain operations by making them atomic and by updating the screen only once after the operation is done ("turbo" mode). Instead of redrawing an extremely long list of damaged areas you can instead redraw the whole area in question (i.e. the Stage). That's the idea behind my "tree" example.


Jens Mönig

Offline

 

#3577 2011-08-25 03:14:11

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

Re: BYOB 3 - Discussion Thread

(....) Anyway I would not exchange my Byob 3.1 or Snap for any other programming language.

Let me explain why. As far as I am concerned I highly prefer the "user-friendlyness" of Scratch/Byob to the data-crunching capability of XLogo (which is really impressive for 3d applications).
Anyway XLogo proves that a Java interpreted application running inside a browser can be very fast compared to "compiled" languages applications. I think that the same data-crunching capability applies to Javascript (as your tree example proves it).
But the agenda of Scratch inventors was not datacrunching, and also is not what you aim at with Snap.
One can understaand (and we have had many discussions about that formerly ) that the Scratch user-friendliness (pick-and-stick, instruction panel, script area, multisprite stage etc) is not compatible with datacrunching performances. The "turbo mode" solution can be a good compromise.

Offline

 

#3578 2011-08-25 04:18:45

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

Re: BYOB 3 - Discussion Thread

...I think that the same data-crunching capability applies to Javascript
See as an example of this : DesignBlockJs of Evelyn Eastwood as you mentioned earlier.

Offline

 

#3579 2011-08-26 02:58:47

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

Re: BYOB 3 - Discussion Thread

....
data-crunching capability applies to Javascript

I'm wrong saying that. Logo-like turtle applications does not ask for data-crunching capabilities. As a result Byob 3.1 in Turbo mode is as fast as above mentioned interpreter like XLogo and DesignBlockJS. And Snap could be equally fast if necessary.

For mathematical applications in Byob there is still a difference between Turbo mode and Normal mode, but much less than for turtle-like applis.

As far as performance is concerned the real issue for Snap is probably to improve handling of lists which is very poor with Byob. We will see that in due time.

I also understand that they are 2 aspects : the front-office (what you see when the stage scene changes) and the back-office (computations behind the scene without visual  effects like for example list handling).

Offline

 

#3580 2011-08-26 05:41:23

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

Re: BYOB 3 - Discussion Thread

Snap! update

the pre-pre-pre alpha prototype now sports script variables (temporaries), the first BYOB-specific, non-vanilla-Scratch feature. As of now you cannot directly rename them, which will come later.

Enjoy!

Last edited by Jens (2011-08-26 05:43:31)


Jens Mönig

Offline

 

#3581 2011-08-26 07:02:02

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

Snap! update

the pre-pre-pre alpha prototype now sports script variables (temporaries), the first BYOB-specific, non-vanilla-Scratch feature. As of now you cannot directly rename them, which will come later.

Enjoy!

Yay!

Why does right-clicking, select 'a String-Morph' and than edit not work?  sad

Offline

 

#3582 2011-08-26 07:29:36

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

Re: BYOB 3 - Discussion Thread

roijac wrote:

Jens wrote:

Snap! update

the pre-pre-pre alpha prototype now sports script variables (temporaries), the first BYOB-specific, non-vanilla-Scratch feature. As of now you cannot directly rename them, which will come later.

Enjoy!

Yay!

Why does right-clicking, select 'a String-Morph' and than edit not work?  sad

Use the ReporterBlockMorph spec.  smile

Offline

 

#3583 2011-08-26 07:36:45

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

Re: BYOB 3 - Discussion Thread

scimonster wrote:

roijac wrote:

Jens wrote:

Snap! update

the pre-pre-pre alpha prototype now sports script variables (temporaries), the first BYOB-specific, non-vanilla-Scratch feature. As of now you cannot directly rename them, which will come later.

Enjoy!

Yay!

Why does right-clicking, select 'a String-Morph' and than edit not work?  sad

Use the ReporterBlockMorph spec.  smile

thanks!  smile

Offline

 

#3584 2011-08-26 08:28:06

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

Re: BYOB 3 - Discussion Thread

right clicking currently pops up developers' menus for each object, that help us debug things on-site. There will be a user-mode at the end, just as there is one in Scratch.


Jens Mönig

Offline

 

#3585 2011-08-26 08:55:37

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

Re: BYOB 3 - Discussion Thread

@ Jens and others

Please find herewith an example of script using Script variables.

http://www.xleroy.net/ByobTuto/New/math01.gif

This script is supposed to compute  cos x according to MacLaurin serie (ref to Scratch math gallery).This example shows that Script variables have this particular interest to avoid creating a lot of system variables only for temporary calculations.

Offline

 

#3586 2011-08-26 09:25:52

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

Re: BYOB 3 - Discussion Thread

Wow, Xavier, that's an awesome and extreme test case for script variables. Thanks for trying and posting this!


Jens Mönig

Offline

 

#3587 2011-08-26 11:42:56

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

You guys are doing an amazing job on Snap! Keep up the good work!  big_smile

Offline

 

#3588 2011-08-26 12:03:50

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

Re: BYOB 3 - Discussion Thread

xly wrote:

As far as performance is concerned the real issue for Snap is probably to improve handling of lists which is very poor with Byob. We will see that in due time.

Yes, exactly!  That and procedure calling.  For example, try running this project even in turbo mode!


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

Offline

 

#3589 2011-08-26 16:10:45

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

Re: BYOB 3 - Discussion Thread

See one example of Script Variables Instruction (SVI):

http://www.xleroy.net/ByobTuto/New/math03.gif

You can implement several SVI in the same script.
I ignore which rules applies to variables in such a case !
I imagine that each SVI owns its own set of variables.

Offline

 

#3590 2011-08-27 15:44:25

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

Re: BYOB 3 - Discussion Thread

Our grant got funded!

This will speed up Snap! development and establish summer workshops to teach teachers our CS curriculum based on it.

So, if you're in the US and an interested high school or college teacher, get in touch with me -- and if you're in the US and a high school student, get your CS teacher to get in touch with me (or if there is no CS teacher, pick a teacher you think would be good -- not scared of computers, not scared of kids, ready to learn new things).

(Non-US people who are interested can get in touch too, but our travel budget won't reach you.)

The basic plan is that you get a regional group of around 30 teachers organized, and preferably a cooperating local college that provides space and TAs, and we send you a teacher experienced with the curriculum to lead a workshop that also involves taking our course online.

Oh, and, by the way, if you're a German lawyer-*-programmer, time to get even busier.  smile

bh@cs.berkeley.edu


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

Offline

 

#3591 2011-08-27 15:52:59

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

Re: BYOB 3 - Discussion Thread

Nice! XD
I's love to go to MIT or Berkley.  tongue

Offline

 

#3592 2011-08-27 17:37:19

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

Re: BYOB 3 - Discussion Thread

@bharvey & Jens
Our grant got funded!

Congratulations to both of you !!
By the way, may I have to understand that the final name of Snap is Snap! ?
What is your course online ?

Offline

 

#3593 2011-08-27 18:22:03

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

Re: BYOB 3 - Discussion Thread

xly wrote:

@bharvey & Jens
What is your course online ?

http://bjc.berkeley.edu has pointers to the online CS 10 curriculum.

And, yeah, we think it looks snappier with the exclamation point.  smile


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

Offline

 

#3594 2011-08-27 20:52:05

knubee
New Scratcher
Registered: 2011-05-14
Posts: 12

Re: BYOB 3 - Discussion Thread

In case these are not already on the list of possible features to add to Snap:

- Ability to manually rename variables

- Potentially more controversial: when creating a variable, the default is "for all sprites". This is not what one should be doing most of the time, so it may encourage bad programming style. (On the other hand, one could argue that forcing people manually select "for this sprite only" makes them more aware of the local/global distinction). In any case, I would argue for "for this sprite only" to be the default.

Offline

 

#3595 2011-08-27 23:20:49

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

Re: BYOB 3 - Discussion Thread

knubee wrote:

should

That's sort of an unScratchly word. imho.  I mean, when it comes to dealing with other people, yeah, one should be courteous and generous and all that, but when it comes to programming, and encouraging kids to program, our motto should (  smile  ) be "Let me not admit impediments."  If your program does what you intended, it's a good program.  If it doesn't do what you intended, it might still be a good program:

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

When/if they grow up and start writing life-or-death software, someone else can whip them into shape.


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

Offline

 

#3596 2011-08-28 15:42:31

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Oh, and, by the way, if you're a German lawyer-*-programmer, time to get even busier.  smile

Who?! Oh, yeah, tell him to contact me, too, ASAPst  smile


Jens Mönig

Offline

 

#3597 2011-08-28 15:52:50

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

Re: BYOB 3 - Discussion Thread

@bharvey&Jens
Brian, I've transposed into Byob your script, but surprisingly it does not reproduce the Snap! curve !?!

Offline

 

#3598 2011-08-28 16:08:00

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

Re: BYOB 3 - Discussion Thread

http://www.xleroy.net/ByobTuto/New/inspi.gif

Offline

 

#3599 2011-08-28 19:01:21

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

Re: BYOB 3 - Discussion Thread

xly wrote:

@bharvey&Jens
Brian, I've transposed into Byob your script, but surprisingly it does not reproduce the Snap! curve !?!

Yeah, well, for one thing I think it depends on the sprite's initial heading, and for another, I think maybe it's a bug in Snap!.


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

Offline

 

#3600 2011-08-28 19:26:49

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

Re: BYOB 3 - Discussion Thread

@bharvey
Yeah, well, for one thing I think it depends on the sprite's initial heading, and for another, I think maybe it's a bug in Snap!.

I've already tested several initial headings, all results are the same.

Offline

 

Board footer