i clicked on it and it only makes the reporter form of the variable.
Offline
PlayWithFire wrote:
i clicked on it and it only makes the reporter form of the variable.
Hmm! Good point. I didn't notice that.
Offline
did it do this in previous versions? i've used older versions before but i don't remember.
Offline
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.
Offline
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)
Offline
Lucario621 wrote:
I don't really get what the scripts variable script does
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.
Offline
oh i see, i have to have it in the script as opposed to just in the build a block window.
Offline
Lucario621 wrote:
http://i993.photobucket.com/albums/af54 … lolwut.png
Do I have to explain? XD
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
Offline
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?
Offline
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.
Critiques happily accepted.
Last edited by bharvey (2010-04-27 03:31:51)
Offline
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
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") 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
Offline
At bharvey - great, I'll check the trailer out!
Just a thought - maybe the icon for BYOB could be a Gobo? After all, the start sprite is a Gobo...
Last edited by Jonathanpb (2010-04-27 04:12:00)
Offline
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
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.
Offline
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!
Offline
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!
Offline
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.
Offline
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!
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!
Offline
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).
Offline
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?
Offline
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
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