Hi Sohpie,
in fact, yes I did implement a prototype for making custom reporters as well as other things accessible by other objects, but I did not post it (yet), and the design turned out differently from what I first had in mind. What I've come up with is a call-response mechansim comprising of two new blocks:
ask (message)
this is a round yellow reporter block which behaves more or less the same as a broadcast (message) and wait block. It shares the broadcast block's list of messages, i.e. you can either broadcast a message, or ask it. Once an object asks a message it waits until all recepients have concluded their receiving stack and reports an arbitrary element which has been answered.
answer (thing)
this is a yellow command block with a flat bottom (like a stop script block). It can be used in any script to stop script execution. If it is used in a script topped by a when I receive (message) hat it passes its value to the sending object, if the message has been sent from an ask block.
What do you think of this?
Technically a prototype of these new blocks works fine. It also came out as an alternative (and maybe easier) way to "build your own procedures and functions" (albeit lacking recursion), but could still be combined with my "big BYOB" approach. I'm still undecided about this design, but would like to give it a try in the next version of BYOB (which I plan to build when the next version of Scratch is out). There will have to be other labels for the ask and answer blocks, though, because these will have a different meaning in the next Scratch version...
(btw thanks for checking out Elements!)
Offline
that sounds cool! I'v always thought it was a pain to make a ton of global variable to acheive the same functionality.
Offline
Hi Jens,
If I understand you right, if two objects implement custom reporter #foo, this will give a non-deterministic reply to a broadcast #ask:
In most places I would use broadcast (outside Scratch), I don't think I would use the reply. In most places I would want a reply, I would want it to be point-to-point, not broadcast. I'm sure there are different usages but think they may be unusual.
It's amazing how you churn through this stuff!
- Sophie
Offline
Jens wrote:
Hi jeffy24, thanks for noticing this and pointing this out!
Scratch lets you copy blocks addressing backgrounds from the stage to a sprite simply by dragging and dropping them (and the other way round). In the version of Scratch from which I built BYOB (Scratch 1.3) a "costume" block dragged from a sprite to the stage will work correctly, but a "background" block dragged from the stage to a sprite will produce a red outline indicating an error. This looks like a Scratch-bug to me, and I'm adding this to our list. Thanks again!
You're welcome.
Offline
Hi mina,
If you're using a Mac: Uncompress the zip-file (byob.zip) into a new folder, and copy the file named scratch.app from your scratch folder into the folder containing the extracted files from the byop.zip archive. Then drop the file named BYOB.image onto the copy of SCRATCH.APP in the BYOB folder to start the application.
Offline
When I open BYOB, Squeak asked for an Image File, so i Download the Scratch Source
but when Squeak opened the Scratch SOURCE it showed Scratch but Where the Scratch Cat Sprite was Instead it showed a sideways cat (not the Scratch Cat) and where their was the Scratch
Logo IN White instead there was "Based on Scratch From Mit Media Lab"?
Is that what BYOB is ?
Offline
hmmm, byob will not let me open a regular scratch project...I really don't want to do all of that coding again, and BYOB will not import the sprite that I exported from scratch(the sprite had the scripts with it)...it gets almost done, then just gets stuck....
Offline
Hi lefeleaf,
from your description it sounds as if you downloaded the Scratch Source code instead of BYOB. Notice that BYOB is a separate standalone application based on Scratch but it does *not* require the Scratch Source Code.
Hi NXTGeek,
you're right, I made the first version of BYOB incompatible with Scratch on purpose, so as to not confuse users. I agree that it would be nice to prep up existing Scratch projects with custom blocks, so I'm considering leaving out the incompatibility code in the next BYOB version (which I plan to post sometime after the next Scratch version)
Offline
we will be able to open old BYOB projects, correct?
Offline
I hve a problem, when I hit the compile button with BYOB it just flashes the command prompt like window for a split second..then does nothing....
Offline
lifeleaf wrote:
Hi Jens
What are the best blocks you have made?
is it possible to send them to me?
Gobi,
I'll tell you how. Click open in BYOB, then double-click projects. Then select one. By the way, SEE YOU ON MONDAY!
Offline
I'm trying to figure out how to compile it. It doesn't seem to do anything when I hit the Compile button.
Offline
Hi Jens, I've tried this a long while ago, and had some fun with it. I have two questions:
1) Is it possible to translate BYOB to other languages? The original Scratch uses several files for it's languages, is it possible to do this with BYOB?
2) What about a feature to use typed Squeak scripts on the blocks, rather than using pre-existing blocks? This way, begginers could make procedures using the pre-existing blocks, and advanced Squeak users could just type the commands (and other stuff such as the assigned class) for it, allowing for blocks such as Flip.
Also, it could be nice if someone created a website/forum to share BYOB projects, since we can't upload them to the official site.
Offline
Hi technoguyx,
it's great that you're having fun with my prototype of a custom Scratch Blocks extension! BYOB is just that - an experimental prototype - where I wanted to find out, if and how procedures, parameter passing and recursion could be integrated into Scratch, and how this would affect the rest of Scratch. I'm actually quite pleased with the results and astonished by the almost overwhelming feedback I've been getting through various channels of communication.
At the moment there are no plans to include such features in official Scratch. However, many people are actively using BYOB, some apparently even in schools and colleges. Therefore I plan to continue "supporting" BYOB and perhaps even add some more experimental features, once Scratch 1.4 will be released. I'm also planning to make the next BYOB-version Scratch compatible, so that it will read regular Scratch projects and allow you to "boost them up" with custom blocks.
What do you think about that?
Currently you can use the translation files that come with Scratch 1.3.1 with BYOB. Those should take care of most of the user-interface, although there are some strings which cannot yet be translated.
The cool thing about BYOB is that it is completely integrated into Scratch, providing a mechanism to build real new blocks without having to modify the application itself through Squeak. The downside to this clearly is that there is a "fence" which you cannot cross by just accumulating the existing Scratch blocks. For instance, BYOB does not let you extend Scratch with fundamentally new functionality, such as printing, pixel-based image manipulation, external file support etc.
I love Scratch because it sports such a nifty graphical drag-n-drop interface, and wish more applications were like that. That's why I'm experimenting with altering Squeak itself to be more Scratch-like (see Elements) rather than extending Scratch to be textually scriptable.
Would something like this cater to your programming preferences?
Offline
Jens wrote:
Hi technoguyx,
it's great that you're having fun with my prototype of a custom Scratch Blocks extension! BYOB is just that - an experimental prototype - where I wanted to find out, if and how procedures, parameter passing and recursion could be integrated into Scratch, and how this would affect the rest of Scratch. I'm actually quite pleased with the results and astonished by the almost overwhelming feedback I've been getting through various channels of communication.
At the moment there are no plans to include such features in official Scratch. However, many people are actively using BYOB, some apparently even in schools and colleges. Therefore I plan to continue "supporting" BYOB and perhaps even add some more experimental features, once Scratch 1.4 will be released. I'm also planning to make the next BYOB-version Scratch compatible, so that it will read regular Scratch projects and allow you to "boost them up" with custom blocks.
What do you think about that?
Hehe, I never noticed you couldn't load "official" Scratch projects using BYOB. But of course, adding compability for this is a great idea.
Jens wrote:
Currently you can use the translation files that come with Scratch 1.3.1 with BYOB. Those should take care of most of the user-interface, although there are some strings which cannot yet be translated.
Oh, ok. I just copied the whole "locale" folder of Scratch, to BYOB's locale. That worked well, only the "make a block" sections ended up un-translated. Thanks.
Jens wrote:
The cool thing about BYOB is that it is completely integrated into Scratch, providing a mechanism to build real new blocks without having to modify the application itself through Squeak. The downside to this clearly is that there is a "fence" which you cannot cross by just accumulating the existing Scratch blocks. For instance, BYOB does not let you extend Scratch with fundamentally new functionality, such as printing, pixel-based image manipulation, external file support etc.
I love Scratch because it sports such a nifty graphical drag-n-drop interface, and wish more applications were like that. That's why I'm experimenting with altering Squeak itself to be more Scratch-like (see Elements) rather than extending Scratch to be textually scriptable.
Would something like this cater to your programming preferences?
I understand Scratch has to be kept simple, although I probably asked this, because the Squeak interface keeps me confused ¬_¬ I'll check out Elements, although as I've said on the comment, I know nothing about Squeak Smalltalk. I guess I'll have to learn
Thanks for your help.
EDIT: Ok, I checked out Elements. What's the difference between the original version, and the "For Scratch" version?
Last edited by technoguyx (2009-04-02 10:50:06)
Offline
technoguyx wrote:
I checked out Elements. What's the difference between the original version, and the "For Scratch" version?
The "For Scratch" version includes all of the Scratch Source Code for you to browse / edit in Elements.
Offline
Jens wrote:
technoguyx wrote:
I checked out Elements. What's the difference between the original version, and the "For Scratch" version?
The "For Scratch" version includes all of the Scratch Source Code for you to browse / edit in Elements.
Ok, thanks.
Offline