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

#751 2010-07-25 17:35:39

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: ITopic: Build Your Own Blocks (BYOB)

Jens wrote:

Hi Billybob-Mario,

it's great that you're trying to incorporate BYOB in your Scratch mod! That's exactly why we made it easy to switch into development mode. Unfortunately, it's not just importing a file (like the .changes file) that will make it work. Also, the comments shouldn't be the problem. What you need is the changesets in their correct order. But these aren't really  well kept in BYOB, because mostly I've been hacking away under great time pressure, often switching back and forth between changesets, and sometimes not creating new ones when I should have. Also, BYOB fundamentally changes almost everything internal in Scratch, even the most simply code like moving a Sprite forward by 10 steps, because of the nested sprites feature. Therefore my advice would be to do it the other way round: Why not file out your changes file them into BYOB and make the adjustments you need. I'm pretty sure that this would be way easier and might just work.

Good luck!

The comments are a problem because they cause errors. It goes in alphabetical order, and right now I'm on F.

Update: only a couple of minutes later, I'm on H, but it's usually slower, and it took me a while to get to the point where I could get anywhere.

Now it all blew up.

After damage control, I'm back at C.

Now I'm back at F.

Now I'm on M.

I'm on R.

Also, it makes an error when I save: does not understand isHorizontal. It does save, though.

Last edited by Billybob-Mario (2010-07-26 06:59:25)

Offline

 

#752 2010-07-26 04:53:38

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

Re: ITopic: Build Your Own Blocks (BYOB)

okay, maybe I did not make this really clear: You cannot import the .changes file. You can export / import classes, methods, categories and changesets. The .changes file is part of Squeak's code database, it only works with the particular image for which it is maintained and is not a stand-alone repository. The thing to do is to export your features as .cs files and integrate them one by one into the BYOB development image  smile

Last edited by Jens (2010-07-26 04:54:13)


Jens Mönig

Offline

 

#753 2010-07-26 18:59:51

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: ITopic: Build Your Own Blocks (BYOB)

Jens wrote:

okay, maybe I did not make this really clear: You cannot import the .changes file. You can export / import classes, methods, categories and changesets. The .changes file is part of Squeak's code database, it only works with the particular image for which it is maintained and is not a stand-alone repository. The thing to do is to export your features as .cs files and integrate them one by one into the BYOB development image  smile

I tried to do that and got an error when editing the first existing method.

Offline

 

#754 2010-07-26 21:32:02

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hey guys, guess what, in my collapsable scripts suggestion thread, (I'm pretty sure) Lightnin just said that they are implementing something like BYOB in Scratch 2.0!  big_smile


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#755 2010-07-27 03:20:08

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

Re: ITopic: Build Your Own Blocks (BYOB)

ScratchReallyROCKS wrote:

Hey guys, guess what, in my collapsable scripts suggestion thread, (I'm pretty sure) Lightnin just said that they are implementing something like BYOB in Scratch 2.0!  big_smile

"Something like" are the key words here.  At one point they were talking about procedures without inputs or reports -- basically, the functionality of BROADCAST AND WAIT with a different notation.  When I was there I made an impassioned plea for all of BYOB, but I don't know whether it will be successful.

EDIT: But even commands without inputs would indeed solve the clutter problem you're trying to solve with collapsable scripts, so it was right for Lightnin to say it in that context.

Last edited by bharvey (2010-07-27 03:22:29)


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

Offline

 

#756 2010-07-27 07:30:40

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

bharvey wrote:

ScratchReallyROCKS wrote:

Hey guys, guess what, in my collapsable scripts suggestion thread, (I'm pretty sure) Lightnin just said that they are implementing something like BYOB in Scratch 2.0!  big_smile

"Something like" are the key words here.  At one point they were talking about procedures without inputs or reports -- basically, the functionality of BROADCAST AND WAIT with a different notation.  When I was there I made an impassioned plea for all of BYOB, but I don't know whether it will be successful.

EDIT: But even commands without inputs would indeed solve the clutter problem you're trying to solve with collapsable scripts, so it was right for Lightnin to say it in that context.

This is what he said:


Lightnin wrote:

.......We are committed to having Procedures / Functions in the next version of Scratch (basically - you can make your own block that does what you tell it). It's not clear if that would reduce the need for collapsible scripts or not. It's definitely something to think about though...great suggestion!


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#757 2010-07-27 11:04:06

pheasant49
Scratcher
Registered: 2009-11-30
Posts: 4

Re: ITopic: Build Your Own Blocks (BYOB)

sad  i hav a mac

Offline

 

#758 2010-07-27 11:36:23

jackrulez
Scratcher
Registered: 2009-08-01
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Suggestion for BYOB 3.0's block editor:
Make the [stop block] and [report [ ]] blocks only available inside the block editor (they're useless anywhere else), and get rid of the report text field (that's what the [report [ ]] block is for) and the Make A Variable button (you can use the [script variables ((a))] block).

Last edited by jackrulez (2010-07-27 11:36:57)


Yawn, another boring text signature. I should really make something better.

Offline

 

#759 2010-07-27 11:36:56

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

pheasant49 wrote:

sad  i hav a mac

You can run it on a Mac! A much more recent, beta version, which is also compatible with Macs, can be found here.

Offline

 

#760 2010-07-27 12:00:54

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

Re: ITopic: Build Your Own Blocks (BYOB)

jackrulez wrote:

Suggestion for BYOB 3.0's block editor:
Make the [stop block] and [report [ ]] blocks only available inside the block editor (they're useless anywhere else), and get rid of the report text field (that's what the [report [ ]] block is for) and the Make A Variable button (you can use the [script variables ((a))] block).

Good suggestions!

You're right in that the variables pane in the block editor is now obsolete, because you can do (almost) everything with the SCRIPT VARIABLES block. Currently we're mainly keeping this pane for backwards compatibility with existing older BYOB (v.1  and v.2) projects, but we do have plans to get rid of it altogether at some time.

You're wrong, however, that REPORT and STOP BLOCK are useless anywhere outside of the block editor. Think about THE SCRIPT! Instead of creating a named block you can just as well create an anonymous one and assign it to a variable. And if you want to make an anonymous function (reporter) you absoutely need REPORT, and STOP BLOCK might be usesul. Also, if you're playing with closures and dispatch procedures you definitely need the REPORT block in regular scripts, too.


Jens Mönig

Offline

 

#761 2010-07-27 12:50:09

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

Re: ITopic: Build Your Own Blocks (BYOB)

ScratchReallyROCKS wrote:

This is what he said:


Lightnin wrote:

.......We are committed to having Procedures / Functions in the next version of Scratch

Yeah I know, but unless things have changed in the three weeks or so since I visited the Scratch Team at the Media Lab, what they mean by adding procedures is still unclear.  I agree that the fact that Lightnin used the word "functions" is a good sign; that's more than they were committing to when we met!

But we'll win them over.


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

Offline

 

#762 2010-07-27 12:52:34

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

Re: ITopic: Build Your Own Blocks (BYOB)

Jens wrote:

You're wrong, however, that REPORT and STOP BLOCK are useless anywhere outside of the block editor.

Also, the object of the exercise is to get rid of that mini-palette on the left edge of the Block Editor, and have only the scripting area, so there isn't going to be anyplace in there to put REPORT and STOP BLOCK!  smile


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

Offline

 

#763 2010-07-27 13:50:35

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: ITopic: Build Your Own Blocks (BYOB)

Billybob-Mario wrote:

Jens wrote:

okay, maybe I did not make this really clear: You cannot import the .changes file. You can export / import classes, methods, categories and changesets. The .changes file is part of Squeak's code database, it only works with the particular image for which it is maintained and is not a stand-alone repository. The thing to do is to export your features as .cs files and integrate them one by one into the BYOB development image  smile

I tried to do that and got an error when editing the first existing method.

How can I do it?

Offline

 

#764 2010-07-28 09:21:24

mherma
New Scratcher
Registered: 2010-07-14
Posts: 8

Re: ITopic: Build Your Own Blocks (BYOB)

Hi,
I want to control a second WeDo motor with scratch or byob. In the elements editor I found the menu "motor ops" with the entry "motor names". How can I build a own block to start and stop a motor separately?
can I do it with byob?
Thanks a lot
Michael

Offline

 

#765 2010-07-28 10:18:20

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

Re: ITopic: Build Your Own Blocks (BYOB)

Hi mherma,

I'm not really familiar with the WeDo set (last time I checked it was kinda hard to purchase one in Germany), but I suspect that you can only connect a single motor to each Scratch / BYOB session

   hey gang, can anybody confirm this? thanks!

I guess you could use a second computer and the mesh network, though. In this case each computer would be connected to a single motor, but both BYOB sessions would be joined in a (local) mesh network. Then you could set up your own broadcasts and events....

What do you think?

Last edited by Jens (2010-07-28 10:18:34)


Jens Mönig

Offline

 

#766 2010-07-28 11:44:53

mherma
New Scratcher
Registered: 2010-07-14
Posts: 8

Re: ITopic: Build Your Own Blocks (BYOB)

Thank you Jens. I'm from Germany too. you can order a wedo - set in this shop:
http://www.shop.lego-in-der-schule.de/Uebersicht?plinie=1&suche=

abee wrote:
"Scratch has basic capability of controlling two motors. If you browse the class named WeDoPlugin of ScratchSourceCode1.4.image, you find the methods about motorA and motorB. So it's possible to make blocks for them."

http://scratch.mit.edu/forums/viewtopic.php?id=40467

Can somebody help me?
Michael

Offline

 

#767 2010-07-28 19:35:21

EvilGenius
Scratcher
Registered: 2010-01-02
Posts: 14

Re: ITopic: Build Your Own Blocks (BYOB)

Hello. I was making a custom block in BYOB 2.99.007. When I clicked on it, it said, "Call me." I put it in a call block. It said, "Wow, you're a smart one. Now call ME!" I put it in another call block. It asked me to input please. It asked me to run it. It asked me to run it with my name. Then it said, It was nice talking to you. Congratulations for figuring out this little riddle. You are now a certified lambdaist. Does anyone know about this? Does lambdaist refer to lambda caluclus?

Offline

 

#768 2010-07-29 02:16:22

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

Re: ITopic: Build Your Own Blocks (BYOB)

Hi EvilGenius,

congrats for figuring out or little "easter egg"! Unfortunately I had to take it out in the newer versions, because in certain constellation it was interfering with other code. But we'll come up with something else  big_smile


Jens Mönig

Offline

 

#769 2010-07-29 10:30:22

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Jens wrote:

Hi EvilGenius,

congrats for figuring out or little "easter egg"! Unfortunately I had to take it out in the newer versions, because in certain constellation it was interfering with other code. But we'll come up with something else  big_smile

I did that too! Too bad you had to take it out in later versions.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#770 2010-07-29 10:33:49

JeanTheFox
Scratcher
Registered: 2010-06-14
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi, I'm Jean M. and I'd like to learn more about BYOB. I've made several blocks already, but they are simple ones like a costume changer that lets you go to a previous costume and and some blocks that just combine two blocks. Can somebody tell me where I can get to the raw source code and actually  put in my own block codes?


http://i51.tinypic.com/20gcn5j.png

Offline

 

#771 2010-07-29 11:08:42

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

JeanTheFox wrote:

Hi, I'm Jean M. and I'd like to learn more about BYOB. I've made several blocks already, but they are simple ones like a costume changer that lets you go to a previous costume and and some blocks that just combine two blocks. Can somebody tell me where I can get to the raw source code and actually  put in my own block codes?

There are ways to hack BYOB, but I think the best is to us the built in Elements editor. It's basically a visual Squeak browser, which lets you make or edit anything you want. To access it, right click on any block and and click 'edit elements' and you're in. Using it is just like using Scratch. Well, the graphics are a little different, and you need to know Squeak to use it, but It's easier than having to type everything.


PS: Jens/bharvey, Elements is broken in the newest BYOB image, you may want to fix that.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#772 2010-07-29 11:22:03

Zoomreddin
Scratcher
Registered: 2009-03-27
Posts: 100+

Re: ITopic: Build Your Own Blocks (BYOB)

I finally got BYOB to work!  smile


http://mag.racked.eu/image/46.1/Bombs+Away%21/mca.png

Offline

 

#773 2010-07-29 12:25:49

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

Re: ITopic: Build Your Own Blocks (BYOB)

@ JeanTheFox: I'd recommend going through some of the tutorials and then trying some more complex blocks, especially ones using recursion or higher order functions (these are two of the major themes for BYOB). You should be able to create these in BYOB itself, without using Smalltalk.

@ ScratchReallyROCKS: Thanks for the bug report. I'll post the .changes file together with new versions, so you'll be able to Elements and Squeak again.


Jens Mönig

Offline

 

#774 2010-07-29 12:35:44

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Jens wrote:

@ ScratchReallyROCKS: Thanks for the bug report. I'll post the .changes file together with new versions, so you'll be able to Elements and Squeak again.

Thanks!  smile


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#775 2010-07-29 17:50:52

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: ITopic: Build Your Own Blocks (BYOB)

It always causes an error when I open an existing method.

Offline

 

Board footer