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

#151 2010-04-26 22:07:04

PlayWithFire
Scratcher
Registered: 2010-01-20
Posts: 1000+

Re: BYOB 3 - Discussion Thread

i clicked on it and it only makes the reporter form of the variable.


http://scratch.mit.edu/static/projects/PlayWithFire/1610180_sm.png
Check out the DG Games Website For the latest news on games like Infected

Offline

 

#152 2010-04-26 22:10:39

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: BYOB 3 - Discussion Thread

PlayWithFire wrote:

i clicked on it and it only makes the reporter form of the variable.

Hmm! Good point. I didn't notice that.


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

Offline

 

#153 2010-04-26 22:15:43

PlayWithFire
Scratcher
Registered: 2010-01-20
Posts: 1000+

Re: BYOB 3 - Discussion Thread

did it do this in previous versions?  i've used older versions before but i don't remember.


http://scratch.mit.edu/static/projects/PlayWithFire/1610180_sm.png
Check out the DG Games Website For the latest news on games like Infected

Offline

 

#154 2010-04-26 22:18:26

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

Re: BYOB 3 - Discussion Thread

PlayWithFire wrote:

um when i edit a block i can't have a 'block only' variable that has [set (variable) to] and [change (variable) by].  is this just me or is this just something that byob does.

A change in BYOB 3 is that there are no longer SET and CHANGE blocks inside the block editor; instead, the regular SET and CHANGE blocks in the Variables palette work on block variables.  If you click a SET or CHANGE block into your block's script (not just floating in the Block Editor) then its pulldown list of variables will incude the block's local variables.  We thought this way is less kludgy.


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

Offline

 

#155 2010-04-26 22:21:37

PlayWithFire
Scratcher
Registered: 2010-01-20
Posts: 1000+

Re: BYOB 3 - Discussion Thread

i tried that but it didn't work on a reporter block when i was creating it, it only showed the variables that were not for the blocks.

Edit: in fact it hasn't worked for any blocks now that i've tested it.

Last edited by PlayWithFire (2010-04-26 22:22:28)


http://scratch.mit.edu/static/projects/PlayWithFire/1610180_sm.png
Check out the DG Games Website For the latest news on games like Infected

Offline

 

#156 2010-04-26 22:25:43

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

Re: BYOB 3 - Discussion Thread

Lucario621 wrote:

I don't really get what the scripts variable script does  hmm

It's an alternative to the "Make a variable" button inside the Block Editor, but (a new feature) can also be used in scripts outside the Block Editor that need temporary storage.  For example, you've probably used the Scratch REPEAT block along with a variable that counts repetitions, using a CHANGE BY block inside the REPEAT.  Well, if that variable doesn't need to be kept around forever, instead of making it a sprite variable or a global variable you can make it local to this script, so you get a new variable each time you run the script.  This avoids clutter in the project.

We're talking about getting rid of the Block Editor's "Make a variable" button, since Script Variables does the same job better, we think.  But it's true that it takes a little getting used to, and the "Make a variable" button has the advantage of being just like the Scratch one.


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

Offline

 

#157 2010-04-26 22:32:43

PlayWithFire
Scratcher
Registered: 2010-01-20
Posts: 1000+

Re: BYOB 3 - Discussion Thread

oh i see, i have to have it in the script as opposed to just in the build a block window.


http://scratch.mit.edu/static/projects/PlayWithFire/1610180_sm.png
Check out the DG Games Website For the latest news on games like Infected

Offline

 

#158 2010-04-26 22:36:53

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

Re: BYOB 3 - Discussion Thread

Lucario621 wrote:

http://i993.photobucket.com/albums/af54 … lolwut.png

Do I have to explain? XD

smile   This is an example of Jens's sense of humor that I would never have found in a million years!  I wonder what other surprises are in there.

http://en.wikipedia.org/wiki/Metasyntactic_variable


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

Offline

 

#159 2010-04-27 02:31:31

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Um... how do you get into the System Browser for BYOB? For Scratch, you Shift-click the R, but what do we do in BYOB?  big_smile


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#160 2010-04-27 03:30:49

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

Re: BYOB 3 - Discussion Thread

Okay, gang, the long-awaited BYOB "Building Tool Blocks" tutorial is now online!  Get the whole 20-minute thing from http://byob.berkeley.edu/BYOB3-tutorial1.sb or see it as two parts on the Scratch site; start with http://scratch.mit.edu/projects/bharvey/1011223 which has a link to the second part.

You folks will find the beginning a little slow, because you've built blocks in BYOB3 and it starts by explaining how to add inputs to the prototype and so on, but I promise you'll learn something in the second part, and there are a few details even in the first part you might have missed, like how to make an upvar.  smile

Critiques happily accepted.

Last edited by bharvey (2010-04-27 03:31:51)


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

Offline

 

#161 2010-04-27 04:00:10

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

Re: BYOB 3 - Discussion Thread

To Bharvey ...and others

I've been very happy to discover Scratch which is wonderful, but I was rather disappointed and frustrated to not find the beautiful features of Logo (inspired from Lisp), mainly the ability to build your own functions, map functions and so one.

I had written in 1983, long time ago, a Logo book based on Apple II Logo , with a lot of examples of map functions applications, and many others.

Scratch-BYOP it's provides again these lost features. I've just started to transcript my "old" exercises to Scratch-BYOP...It works perfectly (my grandson is very impressed).

I think that BYOP extension would allow Scratch to benefit from the impressive work already achieved by the Logo community since 35 years : books, examples, applications (some of them having a high level).

Thanks for you to have proven that this is not a wish, but a reality.

Xavier Leroy - paris

Offline

 

#162 2010-04-27 04:09:16

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

Re: BYOB 3 - Discussion Thread

You guys are soo awesome! Like Brian said: Keep those bug reports coming, then we'll soon have a more stable version. Let me just point you some non-obvious features that are new to BYOB 3

Script and Block Variables

Whenever you see one of those "elevated" variables in a block that indicates that you can drag a copy of it off to somewhere else (I'm calling those templates). You already knew that one, of course.

Also, you can just click on the template and rename it to something else (like "foo")  smile  This also works for your own externalized variables (look at the "upvars" in Brian's tutorial).

In the Block Editor you can still press the "make a variable" button. This creates a new reporter in the Block Editor's variables pane. Also, if you delete a parameter (a variable template) from the block definition's head line (we're calling this one the prototype) that variable moves to the Block Editor's variables pane. You can also drag variables from the Block Editor's variables pane and drop them on the prototype to turn them into parameters (but only if a parameter of that name doesn't already exist).

If you want to turn block variables (e.g. from an ald BYOB project) into script variables, you can right-click / ctrl-click onto the Block Editor's scripting area and select the option to "turn block variables into script variables".

Importing Sprites

You should be able to open any project in BYOB. Currently there's a bug in the project reading code (thanks for the report!) that occasionally leads to projects not loading. I've already fixed that, it'll be in the next release.

You can currently only import sprites that have been exported from BYOB. I'm working hard on a solution that will let you also import sprites exported from Scratch.

Browsing the BYOB Source Code

You can look at the underlying BYOB source code (all of it) in the Elements window by right clicking on any non-BYOB block. What you see in this windows looks like Scratch, but it is really Smalltalk. You can also look at any other class or method in the whole system that way. It's all open for you to look at. The cool thing about it (I think) is that it makes you realize that "serious" programming of complex systems like Scratch or BYOB boils down do nothing more than what you can now do for yourself in BYOB.

Yeah, eventually we'll also post a developer's image for all of you who want to draw your own logo and skin  smile


Jens Mönig

Offline

 

#163 2010-04-27 04:11:31

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

At bharvey - great, I'll check the trailer out!  wink

Just a thought - maybe the icon for BYOB could be a Gobo? After all, the start sprite is a Gobo...  smile

Last edited by Jonathanpb (2010-04-27 04:12:00)


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#164 2010-04-27 04:14:53

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

Re: BYOB 3 - Discussion Thread

Jonathanpb wrote:

Just a thought - maybe the icon for BYOB could be a Gobo? After all, the start sprite is a Gobo...  smile

Excellent suggestion, Jonathanpb! We'll try to do it for one of the next releases.


Jens Mönig

Offline

 

#165 2010-04-27 04:19:54

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

Re: BYOB 3 - Discussion Thread

To BHarvey

It took me some time to see the difference between "Moving" Commands and Reporters.

When I pass a simple moving Command function to Map it does not work.
The same script defined as a Reporter function works with Map, but not anymore as a direct command.

Do I need to build two functions to do exactly the same job ? The answer is not ! I You pass the reporter function into the Run command, and then the Reporter acts like a Command.

By the way I've had several severe crashes when trying to fix this problem by mixing in the same block reporter and command movie functions.

Offline

 

#166 2010-04-27 09:08:36

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

Re: BYOB 3 - Discussion Thread

If you add something to a block's name and set it to text, you can still click on the black arrow that brings up the advanced settings for variables.


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

Offline

 

#167 2010-04-27 10:22:30

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

Re: BYOB 3 - Discussion Thread

xly wrote:

When I pass a simple moving Command function to Map it does not work.
The same script defined as a Reporter function works with Map, but not anymore as a direct command.

This is another idea inherited from Logo, which also has commands and reporters (a/k/a operations).

In my tools.sb is a very simple tool command called IGNORE that takes an input and does nothing.  That's how you treat a reporter as a command: wrap an IGNORE around it.

There isn't a tool in the opposite direction because it's not clear in general what value to report.  But of course you could write a two-line script (using THE SCRIPT, so you don't have to putz with the block editor) to run your command and then report anything you like.

Finally, tools.sb includes a FOR EACH block that's like MAP but without collecting values into a list; that may be what you want for your command.

I'm glad you like BYOB!  Indeed, one of my motivations was missing some things I could do in Logo.  smile


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

Offline

 

#168 2010-04-27 10:25:53

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

Re: BYOB 3 - Discussion Thread

MathWizz wrote:

If you add something to a block's name and set it to text, you can still click on the black arrow that brings up the advanced settings for variables.

OMG.  I didn't believe this one, because the arrow /disappears/, so how can you click it?  But if you click where it used to be, even though the arrow is gone, you still get the long dialog.  That's hilarious!  Thanks for being so diligent in looking for flaws!  smile


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

Offline

 

#169 2010-04-27 10:31:20

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

Re: BYOB 3 - Discussion Thread

xly wrote:

By the way I've had several severe crashes when trying to fix this problem by mixing in the same block reporter and command movie functions.

Could you please post a specific example?  That'll help us debug.  Thanks!


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

Offline

 

#170 2010-04-27 10:46:42

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

Re: BYOB 3 - Discussion Thread

xly wrote:

Do I need to build two functions to do exactly the same job ? The answer is not ! I You pass the reporter function into the Run command, and then the Reporter acts like a Command.

Sorry for answering this message in pieces, but I keep finding more in it that needs saying.

Besides Scratch itself, the design of BYOB has two main precursors: Logo and Scheme.  That's because my own history as a teacher has revolved around those two languages.

In Scheme (God's programming language -- http://xkcd.com/224/), there is no command vs. reporter distinction.  Every procedure returns a value.  This makes life /much/ simpler, in many ways, both for developers and for users.  But it does carry a heavier cognitive load:

Logo> PRINT 3
3
Logo>

Scheme> (PRINT 3)
3
OKAY
Scheme>

(or whatever the PRINT function returns in your implementation of Scheme).  This confuses beginners.

The design decision to separate commands and reporters was made by Scratch, long ago.  In general, we tried very hard not to undo any Scratch design decisions unless it was absolutely necessary.  In this case, since there are arguments on both sides, I think it was right for us to maintain the distinction that Scratch makes.


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

Offline

 

#171 2010-04-27 11:28:03

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

MathWizz wrote:

If you add something to a block's name and set it to text, you can still click on the black arrow that brings up the advanced settings for variables.

OMG.  I didn't believe this one, because the arrow /disappears/, so how can you click it?  But if you click where it used to be, even though the arrow is gone, you still get the long dialog.  That's hilarious!  Thanks for being so diligent in looking for flaws!  smile

LOL! I just found another one! Make a block, then add the reporter block to the script. Now put a repeat block between the hat block and the report block. Their position will mess up!


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

Offline

 

#172 2010-04-27 12:24:10

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

Re: BYOB 3 - Discussion Thread

MathWizz wrote:

If you add something to a block's name and set it to text, you can still click on the black arrow that brings up the advanced settings for variables.

Haha! That's a good one, thanks for reporting it (I fixed it for the next version).


Jens Mönig

Offline

 

#173 2010-04-27 14:57:12

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

MathWizz wrote:

If you add something to a block's name and set it to text, you can still click on the black arrow that brings up the advanced settings for variables.

Haha! That's a good one, thanks for reporting it (I fixed it for the next version).

Did you see the one directly above?


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

Offline

 

#174 2010-04-27 16:56:43

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

Re: BYOB 3 - Discussion Thread

xly wrote:

    Do I need to build two functions to do exactly the same job ? The answer is not ! I You pass the reporter function into the Run command, and then the Reporter acts like a Command.
----------------------------------------------------------------------------------------------------------------------
    I've found an interesting workaround ! I create a "mirror" Motion Reporter function (move# 80 ) copying the same Motion Command (move 80),and then this "mirror" function can be used into a list of motion commands (For each Item of ...list (move# 80)(turn# 90)(move# 80)(turn# 90)(move# 80)(turn# 90)(move# 80)(turn# 90)...run with Inputs))

If this can help !

Offline

 

#175 2010-04-27 17:53:47

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

Re: BYOB 3 - Discussion Thread

When I try to rename a variable, I get another error. Am I doing something wrong?
Just to repeat, in case it got lost in previous posts, the think and say bubbles can go off the stage (even when you uncheck Allow Sprites off Stage). It isn't a huge deal but it is kind of irritating.

Offline

 

Board footer