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

#301 2010-05-02 13:58:40

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Lucario621 wrote:

What type of input types should the different inputs be? They could be any, or possibly text, I really don't know.

I'm not Jens, and not a musician, so I'm going to leave most of this for him to answer.  But I can respond to this part.  There is actually no difference between Any and Text except for the shape of the slot, so just use whatever looks right to you.  smile

Oh ok - thanks!

bharvey wrote:

Lucario621 wrote:

In addition (to my previous post), by looking at my script on page 3, within each of the else part of the if else blocks, should I have a stop block afterwards? Or is it not necessary?

Not necessary, unless there's more code below the whole thing that you want to avoid.

We should, by the way, have a multiway test block so people don't have to nest IFs like that.  I'm waiting for Jens to invent the notation to make a /group/ of inputs variadic, so I can write a block like

Code:

IF <boolean> THEN <C-slot> 
     { ELSE IF <boolean> THEN <C-slot> }...
     ELSE <C-slot>

Oh cool! Maybe you would just click another black arrow to add more and more slots  tongue


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

Offline

 

#302 2010-05-02 14:15:05

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

Re: BYOB 3 - Discussion Thread

New glitch: when I double clicked your tools.sprite custom blocks in the pallet, BYOB froze up. It is still responding (I can minimize it, close it, etc.), but it is no longer functioning. Just so you know, it was the pigl block with nothing in it.

New question: After seeing your second tutorial (or atleast part of it) I decided I wanted to make a script that solved for exponents and reported the numbers a user entered in a list. But I came to an obstacle. Although it may not be the most efficient method for exponents, I decided I would use the method displayed in the tutorial (using ( (#) map () over () <- -> ) ), and since BYOB fills in the blanks in reporter blocks, I would create a variable thats value was the exponents in blank multiplication blocks (ex. exponent = 3 variable value = (  ( )*( ( )*( ) )   ) if you can visualize that). It occured to me however, that you can't use the (join [] []) string block for "the block" values. Does anyone know how I can accomplish this task without completely rewriting my script?

Last edited by shadow_7283 (2010-05-02 14:15:25)

Offline

 

#303 2010-05-02 15:39:54

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

Re: BYOB 3 - Discussion Thread

markyparky56 wrote:

If you put a rounded reporter block into a boolean block, such as the ones in the picture, then take it out it makes it only allow you to enter numbers (Or intergers) and no text (Or strings)

I believe you, but I can't reproduce it.  So, more details please.  For example, which reporter was it?  Tnx.


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

Offline

 

#304 2010-05-02 15:45:50

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

Re: BYOB 3 - Discussion Thread

Lucario621 wrote:

Should I replace the picture of Gobo on the first post with this new one?

Sure.  While you're editing you can take out "unofficial"!  smile


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

Offline

 

#305 2010-05-02 15:51:45

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Lucario621 wrote:

Should I replace the picture of Gobo on the first post with this new one?

Sure.  While you're editing you can take out "unofficial"!  smile

Yay!  tongue

If there's anything else, you want to add, or any other links, just tell me  tongue

Last edited by Lucario621 (2010-05-02 15:54:02)


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

Offline

 

#306 2010-05-02 16:21:29

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

when I double clicked [PIGL] BYOB froze up.

Yeah, that's what happens when a recursive function never reaches its base case -- it keeps running forever, and if you have "Atomic" checked it never lets the scheduler run, so you can't stop-sign it.  If you're on a Windows machine you can hold down the ESC key and click the mouse to stop it.  (This is supposed to work on the Mac too BUT IT STILL DOESN'T, JENS!  sad  )

shadow_7283 wrote:

create a variable thats value was the exponents in blank multiplication blocks (ex. exponent = 3 variable value = (  ( )*( ( )*( ) )   )

Well first of all here's the official correct way to use the TOOLS tools to write exponentiation by repeated multiplication:
http://cs.berkeley.edu/~bh/expt.gif
It uses a block, CASCADE, that's not in the tutorial because it's not about lists.  Maybe /next/ tutorial.  smile

As for doing it the way you suggest, alas, as you noted, a problem with visual programming is that it's hard to write "introspective" programs -- ones that look inside of the text of programs.  In Logo the thing you're trying to do would be much easier.

We can build up a block that multiplies a number by itself a given number of times, but it won't look like what you want.  This is going to be a little messy, but I bet nXIII likes it.  smile   As you're reading it, be alert for blocks that don't have grey borders around them where you'd expect it.  Those are reporters that report blocks, which is what you're trying to do:
http://cs.berkeley.edu/~bh/exptblock.gif
And here's how you use it -- note no grey border around the exptblock call nor around the cube reporter:
http://cs.berkeley.edu/~bh/exptblockuse.BMP


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

Offline

 

#307 2010-05-02 16:22:39

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Lucario621 wrote:

markyparky56 wrote:

I think iv got it now!

What doy uo think of my one?

http://img99.imageshack.us/img99/6070/gobobyob.gif

That's cool markyparky56 - but do you understand why in Gobo's image, Gobo looked that way? It's not just for decoration - it's because it's supposed to look like this:
http://upload.wikimedia.org/wikipedia/c … da.svg.png
meaning you can make your own blocks and use lambda programming.

Yours doesn't look like that at all, so that would ruin the purpose of the new gobo  wink

Ohh... i thought it was because it was version 3


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#308 2010-05-02 16:34:33

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

New glitch: when I double clicked your tools.sprite custom blocks in the pallet, BYOB froze up. It is still responding (I can minimize it, close it, etc.), but it is no longer functioning. Just so you know, it was the pigl block with nothing in it.

That's called a low space error. Squeak runs out of memory and cannot respond to user input because a method was called synchronously from the caller, meaning that the caller is waiting for the method to finish evaluating and the method is stuck in an infinite loop. Or something like that....
______________________

Has anyone made a switch block? because as far as I can tell, it's impossib-- Oh wait, never mind. MUHUHAHAHA!
______________________

Does no one use the 'the script. Input names #1 < >' block? Because one would think that whoever used it would realize that when the user deletes an input name, it stays there when reported?!
I guess I'm the only OOP programmer among all you functional people....

MathWizz wrote:

I'm making a way of making instances without a clone block!

AHA! Except for MathWizz!
@MathWizz: are you talking about the block coded OOP in the tutorial?

Last edited by nXIII (2010-05-02 16:36:18)


nXIII

Offline

 

#309 2010-05-02 17:39:53

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

Does no one use the 'the script. Input names #1 < >' block? Because one would think that whoever used it would realize that when the user deletes an input name, it stays there when reported?!
I guess I'm the only OOP programmer among all you functional people....

Nah, we all do OOP, it's just that the rest of us never change our minds about anything.  smile

Seriously, Jens is kind of incommunicado on weekends, but he's working on your bug, and I'm hoping for news at any moment.


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

Offline

 

#310 2010-05-02 18:42:05

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

Re: BYOB 3 - Discussion Thread

Thanks for the explanation, Brian. I guess I was thinking about the problem the wrong way. I was just trying to find a use for all those new blocks I'm trying to learn.  smile

Also thanks for the escape tip, and nXIII for the plain english translation.  big_smile 
I just realized what pigl does.

Oorhay igpay atinlay!

Offline

 

#311 2010-05-02 19:51:16

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

Has anyone made a switch block? because as far as I can tell, it's impossib-- Oh wait, never mind. MUHUHAHAHA!

Yes...

nXIII wrote:

Does no one use the 'the script. Input names #1 < >' block? Because one would think that whoever used it would realize that when the user deletes an input name, it stays there when reported?!

I noticed that...

nXIII wrote:

I guess I'm the only OOP programmer among all you functional people....

MathWizz wrote:

I'm making a way of making instances without a clone block!

AHA! Except for MathWizz!
@MathWizz: are you talking about the block coded OOP in the tutorial?

No, it stamps the instances on the screen.


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

Offline

 

#312 2010-05-02 20:01:57

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

MathWizz wrote:

No, it stamps the instances on the screen.

Oh... well, that can be accomplished with a bit nasty flashiness in normal Scratch


nXIII

Offline

 

#313 2010-05-02 20:34:13

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

Has anyone made a switch block? because as far as I can tell, it's impossib-- Oh wait, never mind. MUHUHAHAHA!

OK, what am I missing here?  It's possible to make multi-C-slot blocks, but not afaik with predicate slots on the arms.


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

Offline

 

#314 2010-05-02 20:51:16

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

nXIII wrote:

Has anyone made a switch block? because as far as I can tell, it's impossib-- Oh wait, never mind. MUHUHAHAHA!

OK, what am I missing here?  It's possible to make multi-C-slot blocks, but not afaik with predicate slots on the arms.

You make it have command arguments that accept custom blocks that are a single case. For example:
switch (a)
   case (3)                    <---- this is another custom block
      do something
   case (foo)
      do something else
   case (bar)
      do something else besides doing something else
default                         <---- this is part of the outer block
   do the default thing

Last edited by nXIII (2010-05-02 20:53:44)


nXIII

Offline

 

#315 2010-05-02 23:16:18

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

You make it have command arguments that accept custom blocks that are a single case.

Oh, that's brilliant!  Awesome.

Do the CASE things set a global variable to prevent later cases or default from running?  Or are they nestable?  I guess each SWITCH could fluid-let the global variable (I mean, save it and restore it when done).

Last edited by bharvey (2010-05-02 23:19:57)


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

Offline

 

#316 2010-05-03 01:18:25

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

Re: BYOB 3 - Discussion Thread

The trouble with the new lambda-Gobo is that, although the decoration looks more like a lambda, as attached to the rest of the figure it looks less like a new hairdo and more like a tiara or something.  In the old version, the backslash-oriented part was just an extension of a spike that Gobo already had.  This time the curvature changes abruptly.  We sorely need a real artist to attack this problem!
http://cs.berkeley.edu/~bh/gobo4.gif

Last edited by bharvey (2010-05-03 01:33:42)


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

Offline

 

#317 2010-05-03 05:45:29

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: BYOB 3 - Discussion Thread

markyparky56 wrote:

I found another glitch.

http://img101.imageshack.us/img101/2558/glitch2.gif
If you put a rounded reporter block into a boolean block, such as the ones in the picture, then take it out it makes it only allow you to enter numbers (Or intergers) and no text (Or strings)

Did anyone see this?


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#318 2010-05-03 05:51:14

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: BYOB 3 - Discussion Thread

(Double posting)
How hard would it be to make a BYOB2jar? then we would be able to have the BYOB programs online.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#319 2010-05-03 07:04:48

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

Re: BYOB 3 - Discussion Thread

markyparky56 wrote:

markyparky56 wrote:

I found another glitch.

http://img101.imageshack.us/img101/2558/glitch2.gif
If you put a rounded reporter block into a boolean block, such as the ones in the picture, then take it out it makes it only allow you to enter numbers (Or intergers) and no text (Or strings)

Did anyone see this?

Hi, markyparky56.

Thanks for this detailed bug report! The screenshot is really helpful, but I'm still having problems reproducing this obvious bug. Can you tell me if this is happening in the Block Editor or in the regular scripting area? Is there perhaps any way you can post it somewhere on the web?

Thanks again for all the awesome bug reports, guys!


Jens Mönig

Offline

 

#320 2010-05-03 07:30:21

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

Does anybody know why the 'the script. Input names' block is so messed up? I mean, I'm calling it and getting scripts with input names I have deleted in the past! I am trying to do a bit of OOP but I can't get anywhere when my zero-argument methods are demanding two arguments!
(bharvey, any suggestions?)

Hi nXIII,,

Whoa, this took me a while to figure out, sorry for taking so long to respond. I did look at that totally awesome project called "Squeak-OOP" and we'll post a version that should fix some, if not all, of the probems you've been describing. Did I mention that you're really pushing the envelope for BYOB?! I'm shocked at the complexity and brilliance of the projects I'm seeing in BYOB from you gang! This is much more than we ever expected. I mean, how cool is this: You guys are actually experimenting with a Smalltalk virtual machine done in - BYOB - (?!) Wow! Unbelievable! Can we hire you (only half-kidding!).

We'll announce it when the version with the fixes gets posted (it should be 005). As far as I can tell there are two sets of problems occurring in dispatch-method based OOP projects:

1) "zombie" variables

if you first create a variable and then delete it again, some variable setter blocks still "know" to the deleted variable, even if their drop-down-menus are set to a different one. Then if you save the project, the deleted variables suddenly reappear, Does that just about describe it right?

Here's a kludgy workaround for this that you can try:

After you delete a variable click on every variable setter block's drop-down menu and again choose the variable you want it to manipulate, even if the correct one is already shown. I'll try to come up with something automatic for this workaround in one of the next versions.

2) input number mismatches

currently, if the number of actual arguments don't exactly match the number of defined formal parameters, BYOB will raise an error. I changed this for the upcoming version. Then you will be able to pass fewer inputs than are defined without getting an exception. This should solve most of the problems in that über-awesome Squeak-OOP project I've been examining from you guys.


Jens Mönig

Offline

 

#321 2010-05-03 07:34:51

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

Re: BYOB 3 - Discussion Thread

markyparky56 wrote:

How hard would it be to make a BYOB2jar? then we would be able to have the BYOB programs online.

Yeah, that would be something, wouldn't it? I think it's feasible, but it's not currently on our radar (not before August anyway), and not while we're still discussing these BYOB 3 features with the Scratch Team for future versions of Scratch.


Jens Mönig

Offline

 

#322 2010-05-03 10:07:46

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

Re: BYOB 3 - Discussion Thread

markyparky56 wrote:

Did anyone see this?

Yeah!  See #303.


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

Offline

 

#323 2010-05-03 10:19:25

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

Re: BYOB 3 - Discussion Thread

To bharvey & Jens Möning

After two weeks of Scratch & Byop exploration please find my first impressions.

1 - Your first idea of a Scratch4cs seems too restrictive. Byop can be highly profitable not only for Computer students but also for children, teenagers, teachers, retired men like me (70 yrs)...Scratch 4 All would be a more adapted motto.

2 - Byop benefits of an impressive inheritance of experience, research, developments and intelligence in the field of computer science : grand-grand-father Lisp (thanks to John Mc Carthy), grand-father Logo (thanks to Seymourt Papert), Scratch (thanks to Michael Resnick and MIT team), and now the new baby Byop (thanks to Brian Harvey ans Jens Möning).

Byop benefits of the +++ of this inheritance leaving away the ---

No need to say that the functional principles added by Byop to Scratch boost its capabilities, without losing anything of its capabilities.

I've set on-line examples of my first steps with Byop :

http://www.xleroy.net/Byop/Thumbnails.html

Offline

 

#324 2010-05-03 15:28:23

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

nXIII wrote:

Does anybody know why the 'the script. Input names' block is so messed up? I mean, I'm calling it and getting scripts with input names I have deleted in the past! I am trying to do a bit of OOP but I can't get anywhere when my zero-argument methods are demanding two arguments!
(bharvey, any suggestions?)

Hi nXIII,,

Whoa, this took me a while to figure out, sorry for taking so long to respond. I did look at that totally awesome project called "Squeak-OOP" and we'll post a version that should fix some, if not all, of the probems you've been describing. Did I mention that you're really pushing the envelope for BYOB?! I'm shocked at the complexity and brilliance of the projects I'm seeing in BYOB from you gang! This is much more than we ever expected. I mean, how cool is this: You guys are actually experimenting with a Smalltalk virtual machine done in - BYOB - (?!) Wow! Unbelievable! Can we hire you (only half-kidding!).

We'll announce it when the version with the fixes gets posted (it should be 005). As far as I can tell there are two sets of problems occurring in dispatch-method based OOP projects:

1) "zombie" variables

if you first create a variable and then delete it again, some variable setter blocks still "know" to the deleted variable, even if their drop-down-menus are set to a different one. Then if you save the project, the deleted variables suddenly reappear, Does that just about describe it right?

Here's a kludgy workaround for this that you can try:

After you delete a variable click on every variable setter block's drop-down menu and again choose the variable you want it to manipulate, even if the correct one is already shown. I'll try to come up with something automatic for this workaround in one of the next versions.

2) input number mismatches

currently, if the number of actual arguments don't exactly match the number of defined formal parameters, BYOB will raise an error. I changed this for the upcoming version. Then you will be able to pass fewer inputs than are defined without getting an exception. This should solve most of the problems in that über-awesome Squeak-OOP project I've been examining from you guys.

While searching for a different glitch to take a picture of, I got this:
http://i40.tinypic.com/24ymuc7.png
Is that supposed to happen?

Last edited by nXIII (2010-05-03 15:28:41)


nXIII

Offline

 

#325 2010-05-03 17:23:18

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

Re: BYOB 3 - Discussion Thread

Well bug testing some programs and blocks, I realized that we REALLY need a display for variables in blocks and variables created using the script variables (a) -> block.

It is so difficult to find errors in a program when the value variables equal is hidden.
Can this be fixed in future versions?

Offline

 

Board footer