look here: http://www.chirp.scratchr.org/blog
BYOB it's a prototype of a possible future of Scratch, made by Jens Mönig, where you can build own blocks that contain sub-programs. The source code of BYOB it is based on Squeak-Smalltalk, the development environment Scratch is built on.
Offline
Hi wordMan,
I didn't publish the BYOB changeset yet, because BYOB is still very much in prototype stadium. Is there anything particular that you're interested in? I'll be glad to help out and share...
Offline
Jens wrote:
Hi wordMan,
I didn't publish the BYOB changeset yet, because BYOB is still very much in prototype stadium. Is there anything particular that you're interested in? I'll be glad to help out and share...
yeah i want to know how you made it able to create blocks in usermode.

Offline
Hi wordMan,
thanks for your interest in BYOB. It's great that you're trying to understand how Scratch is made. So, how did I do BYOB:
I created new subclasses of CommandBlockMorph and ReporterBlockMorph for customizable blocks, some other new classes (CustomBlockDefinition, BlockEditorMorph, NewCustomBlockDialog, ...), added some instance variables (for the block definitions) to classes ScriptableScratchMorph, ScratchFrameMorph and ScratchProcess and did a *lot* off fiddling with ScratchProcess, enhancing it to execute custom blocks atomically and recursively, which involves - among other things - allocating a separate memory space for each execution instance of each custom block.
This probably doesn't answer you question in a way which lets you implement something similar yourself without further explanation, but you have to understand that BYOB is actually one of my more complex programming projects. That's why I'm afraid that the Squeak changeset for BYOB itself won't be of much help.
If you'd like to learn Smalltalk programming I'd recommend the http://www.squeak.org/ website. Another very cool programming environment built on top of Squeak is Etoys, which you can download here: http://www.squeakland.org/ . Etoys and Scratch have similar roots, so you might enjoy Etoys, too.
Of course, I'm also very interested in your impressions and experiences of BYOB. So if there's anything you'd like to comment on, please let me know.
Thanks!
Offline
Jens wrote:
Hi wordMan,
I didn't publish the BYOB changeset yet, because BYOB is still very much in prototype stadium. Is there anything particular that you're interested in? I'll be glad to help out and share...
can you make lists in b.y.o.b.?
that would help me out a lot I'm making a BYOB project that requires lists
Offline
Jens wrote:
Hi wordMan,
thanks for your interest in BYOB. It's great that you're trying to understand how Scratch is made. So, how did I do BYOB:
I created new subclasses of CommandBlockMorph and ReporterBlockMorph for customizable blocks, some other new classes (CustomBlockDefinition, BlockEditorMorph, NewCustomBlockDialog, ...), added some instance variables (for the block definitions) to classes ScriptableScratchMorph, ScratchFrameMorph and ScratchProcess and did a *lot* off fiddling with ScratchProcess, enhancing it to execute custom blocks atomically and recursively, which involves - among other things - allocating a separate memory space for each execution instance of each custom block.
This probably doesn't answer you question in a way which lets you implement something similar yourself without further explanation, but you have to understand that BYOB is actually one of my more complex programming projects. That's why I'm afraid that the Squeak changeset for BYOB itself won't be of much help.
If you'd like to learn Smalltalk programming I'd recommend the http://www.squeak.org/ website. Another very cool programming environment built on top of Squeak is Etoys, which you can download here: http://www.squeakland.org/ . Etoys and Scratch have similar roots, so you might enjoy Etoys, too.
Of course, I'm also very interested in your impressions and experiences of BYOB. So if there's anything you'd like to comment on, please let me know.
Thanks!
I like etoys too and we have several computers but my computer is too slow
Offline
butheadrecoverdwpa wrote:
Jens wrote:
Hi wordMan,
I didn't publish the BYOB changeset yet, because BYOB is still very much in prototype stadium. Is there anything particular that you're interested in? I'll be glad to help out and share...can you make lists in b.y.o.b.?
that would help me out a lot I'm making a BYOB project that requires lists![]()
well actually it already has lists but i want lists inside the blocks you make
Last edited by butheadrecoverdwpa (2009-08-03 10:34:43)
Offline
sccar3 wrote:
Bring your own bombs.
Or Bring your own Bag. Or Beer. XD
This one however, means "Build your Own Block".
Offline
The new version of BYOB is now very easy to hack.
All you have to to is this:
1. Right click on any non-starting and non-custom block and select 'edit elements'
2. Make random changes. DONT SAVE THE CHANGES!!!!!
3. Although I just said don't save the changes, press the save button.
4. When it asks you to enter in your initials, type in
Preferences enableProgrammerFacilities
and press alt+a folowed by alt+d.
5. Now, alt+click or middle-click on the 'please type in your initials' box and x out of it.
You should now be able to easily get into the BYOB source code by alt-clicking or middle-clicking and pressing the yellow button.
There are other ways to do it, but this is the simplest.
Offline
Yeah, but sometimes you can't find a certain elements block, so having access to the direct source code might sometimes be handy.
Offline
Elements has so many blocks to look through, I can't understand anything. xD I need an Elements tutorial.
Offline
So can we use it to make our own program?
Offline
Darksonn wrote:
What whit <%Diamond_Box1 that gives acees to making a place for diamond blocks
BYOB 2.99 has that, you enter it as normal, with normal input name, e.g. %example, you then click the input variable, you click the arrow pointing right, and you can edit the type of input.
Offline
rubiks_cube_guy238 wrote:
The new version of BYOB is now very easy to hack.
All you have to to is this:
1. Right click on any non-starting and non-custom block and select 'edit elements'
2. Make random changes. DONT SAVE THE CHANGES!!!!!
3. Although I just said don't save the changes, press the save button.
4. When it asks you to enter in your initials, type inCode:
Preferences enableProgrammerFacilitiesand press alt+a folowed by alt+d.
5. Now, alt+click or middle-click on the 'please type in your initials' box and x out of it.
You should now be able to easily get into the BYOB source code by alt-clicking or middle-clicking and pressing the yellow button.
There are other ways to do it, but this is the simplest.
That's not the only way to do it...
Offline
There's a weird application along with BYOB. If you run it, it opens BYPB with the dev menu (shift-click edit)
Offline