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

#2651 2011-02-07 11:21:49

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

Re: BYOB 3 - Discussion Thread

scimonster wrote:

You know, I have no idea what you and Brian are saying in the replies?

Sorry!  Since xly is an adult, we have been using the Secret Language of Adults, the one parents use to discuss where Santa hid the presents.  tongue

So.  Philosophy of OOP 101:

There are basically two points of view about what OOP is for.  (Like all such divisions, this one has fuzzy edges, of course.)  The point of view most prevalent in the Real World is that OOP is about information hiding.  That is, you're Microsoft, and you've hired 5000 mediocre programmers to work on a project (you can't just hire one good programmer instead because they're all working for Google), and you're worried that they're going to step on each others' toes.  So you make sure that each programmer writes an object class that keeps all its important information in private variables that nobody else can look at, and only accepts a small number of messages from other objects.

But BYOB isn't for huge teams of programmers; it's for kids messing around.  So our take on OOP focuses on simulation: If you're trying to tell a story with several different characters, it makes sense to write a program for each character rather than one big program that tries to keep them all straight.

As a result, nothing is really hidden in BYOB.  Sprites can have private variables, but some other sprite can use the OF block to get at this sprite's data -- even to modify it!

So, even though we have a particular programming style in mind, BYOB gives you the flexibility to invent other styles.  That's what xly is doing: inventing ways to use BYOB that aren't what we had in mind.

And what Jens and I are doing is pointing out possible pitfalls, mainly.  So for example xly suggested that an object need not have exactly one parent, that more complicated arrangements are possible.  And I replied that you'd better not have a situation in which A inherits from B and B inherits from A (a "cycle").  And also that what does have a more complicated arrangement isn't inheritance, but rather a variable in A whose value is (or contains) B, and a variable in B whose value is (or contains) A.  And you have to make sure to handle that situation somehow when you try to export sprite A.

Does that help?


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

Offline

 

#2652 2011-02-07 11:39:21

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

scimonster wrote:

You know, I have no idea what you and Brian are saying in the replies?

Sorry!  Since xly is an adult, we have been using the Secret Language of Adults, the one parents use to discuss where Santa hid the presents.  tongue

So.  Philosophy of OOP 101:

There are basically two points of view about what OOP is for.  (Like all such divisions, this one has fuzzy edges, of course.)  The point of view most prevalent in the Real World is that OOP is about information hiding.  That is, you're Microsoft, and you've hired 5000 mediocre programmers to work on a project (you can't just hire one good programmer instead because they're all working for Google), and you're worried that they're going to step on each others' toes.  So you make sure that each programmer writes an object class that keeps all its important information in private variables that nobody else can look at, and only accepts a small number of messages from other objects.

But BYOB isn't for huge teams of programmers; it's for kids messing around.  So our take on OOP focuses on simulation: If you're trying to tell a story with several different characters, it makes sense to write a program for each character rather than one big program that tries to keep them all straight.

As a result, nothing is really hidden in BYOB.  Sprites can have private variables, but some other sprite can use the OF block to get at this sprite's data -- even to modify it!

So, even though we have a particular programming style in mind, BYOB gives you the flexibility to invent other styles.  That's what xly is doing: inventing ways to use BYOB that aren't what we had in mind.

And what Jens and I are doing is pointing out possible pitfalls, mainly.  So for example xly suggested that an object need not have exactly one parent, that more complicated arrangements are possible.  And I replied that you'd better not have a situation in which A inherits from B and B inherits from A (a "cycle").  And also that what does have a more complicated arrangement isn't inheritance, but rather a variable in A whose value is (or contains) B, and a variable in B whose value is (or contains) A.  And you have to make sure to handle that situation somehow when you try to export sprite A.

Does that help?

No, and I don't really care for messing around with BYOB. I'm just using it to make blocks and use some of the first-class lists. And as I said before, I don't even have the experimental versions.

Offline

 

#2653 2011-02-07 12:50:52

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

Re: BYOB 3 - Discussion Thread

scimonster wrote:

No, and I don't really care for messing around with BYOB.

Okay, I'll shut up now...  I hope you didn't take that as an insult!  I value messing around highly.


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

Offline

 

#2654 2011-02-07 12:57:53

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

scimonster wrote:

No, and I don't really care for messing around with BYOB.

Okay, I'll shut up now...  I hope you didn't take that as an insult!  I value messing around highly.

Not insulted. You can still talk to people who understand!  wink

Offline

 

#2655 2011-02-07 15:03:20

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

I'm more nervous about the precedent of inputs to hat blocks altogether.  This sort of blurs the distinction between custom blocks and script-area scripts.  As I recall nXIII was arguing for that a while ago, but all else being equal it makes me nervous when a language provides two tools for the same task; I never know which I'm supposed to use when.

You're going to tell me about the pulldown menu in WHEN < > KEY PRESSED but that's not really an input; it doesn't bind a variable to whichever key you pressed.  (Maybe I shouldn't be giving nXIII ideas.  smile  )

I saw my name more than once in a post and had to respond  smile

I think BYOB should use event listeners. Hat blocks (which must be modified) would provide a way of statically adding listeners, and (sorry...) a block would provide a method for adding them dynamically. The problem with this is, I guess, that it would be a fair amount more complex than the hat blocks and harder for new users to understand. However, it provides a lot of opportunities for advanced users.

I suppose I'm just trying to turn BYOB into JS, though....

EDIT:
Well, what I said was that there should be no reason to have two completely separate mechanisms for creating a sprite's blocks and its variables. One can use a variable with a closure as its value and there is no difference aside from invoking it. This also allows for users to dynamically alter a sprite's methods (I don't really see why you would want to do this, though...)

Last edited by nXIII (2011-02-07 15:09:45)


nXIII

Offline

 

#2656 2011-02-07 15:22:34

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

nXIII wrote:

bharvey wrote:

I'm more nervous about the precedent of inputs to hat blocks altogether.  This sort of blurs the distinction between custom blocks and script-area scripts.  As I recall nXIII was arguing for that a while ago, but all else being equal it makes me nervous when a language provides two tools for the same task; I never know which I'm supposed to use when.

You're going to tell me about the pulldown menu in WHEN < > KEY PRESSED but that's not really an input; it doesn't bind a variable to whichever key you pressed.  (Maybe I shouldn't be giving nXIII ideas.  smile  )

I saw my name more than once in a post and had to respond  smile

I think BYOB should use event listeners. Hat blocks (which must be modified) would provide a way of statically adding listeners, and (sorry...) a block would provide a method for adding them dynamically. The problem with this is, I guess, that it would be a fair amount more complex than the hat blocks and harder for new users to understand. However, it provides a lot of opportunities for advanced users.

I suppose I'm just trying to turn BYOB into JS, though....

EDIT:
Well, what I said was that there should be no reason to have two completely separate mechanisms for creating a sprite's blocks and its variables. One can use a variable with a closure as its value and there is no difference aside from invoking it. This also allows for users to dynamically alter a sprite's methods (I don't really see why you would want to do this, though...)

nXIII, are you going to add that to Panther?

Offline

 

#2657 2011-02-07 15:24:04

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

Re: BYOB 3 - Discussion Thread

scimonster wrote:

nXIII, are you going to add that to Panther?

Event listeners? Nah... just learn JavaScript (trust me, you'll like it).

Last edited by nXIII (2011-02-07 15:24:19)


nXIII

Offline

 

#2658 2011-02-07 16:04:29

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

@ bharvey
I think you should hold a competition for BYOB... that would be pretty cool.


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#2659 2011-02-07 18:42:08

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

[This also allows for users to dynamically alter a sprite's methods (I don't really see why you would want to do this, though...)

Oh, I used to do it all the time in Logo!  For example, you could write a TRACE procedure that takes a procedure as argument and modifies its definition to print messages on the way in and out.  Like the DEBUG blocks but for one specific procedure.


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

Offline

 

#2660 2011-02-07 18:44:22

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

Re: BYOB 3 - Discussion Thread

14God wrote:

I think you should hold a competition for BYOB... that would be pretty cool.

That would be cool, but I'm the wrong person; I hate competitions and especially picking winners and losers.

But, didn't you suggest this already and not get any takers?  Why do you think it'd be different if I suggested it instead?


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

Offline

 

#2661 2011-02-07 19:42:34

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

That would be cool, but I'm the wrong person; I hate competitions and especially picking winners and losers.

But, didn't you suggest this already and not get any takers?  Why do you think it'd be different if I suggested it instead?

ic (I see)


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#2662 2011-02-07 21:14:46

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Does that help?

Yes, it did! (I've been secretly tracing this thread and all the adult-talk  tongue ). I guess I really need to learn JS. I'll start over the upcoming 4 day weekend. Does anyone know a good GUI for JavaScript? Any good tutorials for (semi-)beginners?

Offline

 

#2663 2011-02-07 21:17:36

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

Re: BYOB 3 - Discussion Thread

14God wrote:

bharvey wrote:

That would be cool, but I'm the wrong person; I hate competitions and especially picking winners and losers.

But, didn't you suggest this already and not get any takers?  Why do you think it'd be different if I suggested it instead?

ic (I see)

Rather than a competition, I think we should try something similar to the Scratch design studio. Instead of having projects based on themes, I think we should make projects that take advantage of BYOB3's features. Of course, that would only be if people have time to make projects, which I'm not sure we do...

Offline

 

#2664 2011-02-08 00:44:06

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

I think we should try something similar to the Scratch design studio.

Or we could just do the actual Scratch Design Studio projects in BYOB!  tongue


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

Offline

 

#2665 2011-02-08 00:46:00

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

shadow_7283 wrote:

I think we should try something similar to the Scratch design studio.

Or we could just do the actual Scratch Design Studio projects in BYOB!  tongue

But BYOB can't upload to the Scratch site.  hmm

Offline

 

#2666 2011-02-08 03:37:13

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

Re: BYOB 3 - Discussion Thread

@ bharvey & Jens

Having changed my computer I had to download Byob, it is a new version dated 07.02.2011 without the experimental features of last weeks. I suppose that they will provided as optional additional libraries.

This is good opening for one remark I had prepared before that : one could imagine a 3-stairs Byob : 1 - use Byob more or less in the Scratch way 2 - use Byob with its powerful 1st-class capabilities (lists of lists, C-shape, methods , .. OF.., etc,3 - use additional optional OOP capabilities. For example : at the second level you can duplicate sprites like now, with few control but with easiness and flexibility. At the 3rd level you opt for programming in a pure OOP way controlling by software (like the CLONE instruction) the process of creation/duplication/extension of new objects (sprites, blocks, methods ...).

I was starting to test this : "make a "library sprite" , create a functional variable libvar containing a motion script. Then create a new sprite "bumper", make a copy new.libvar, ( dot is accepted) ...and try to use with ATTRIBUTE.... which had disappeared. ! was not too surprised as Jens wanted to discontinue these too "heretic" features. Am I right ?

Offline

 

#2667 2011-02-08 05:08:05

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

Re: BYOB 3 - Discussion Thread

Hi Xavier,

the BYOB version 3.0.9  that's linked to on the http://byob.berkeley.edu site is the current official version. Brian and I are in the process of designing and implementing new features for v.3.1, which will sport first class sprites and prototype based inheritance. We are frequently sharing internal experimental builds over a non-public mailing list which we're not making public on the website. However, since there is apparently a great deal of interest about this here, Brian has decided to share links to those experimental builds in this forum. So, after you download and install the currently official BYOB release you can download the latest experimental build and run either.


Jens Mönig

Offline

 

#2668 2011-02-08 07:20:23

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Will the ability to read other sprite's personal lists be included?

Offline

 

#2669 2011-02-08 10:56:36

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

Re: BYOB 3 - Discussion Thread

scimonster wrote:

Will the ability to read other sprite's personal lists be included?

Yup.  You can't do it by accident -- you have to use the OF block to ask for it.  But, yeah, nothing is really hidden.

But BYOB can't upload to the Scratch site.

Yeah, I was thinking we'd just mail them to the Scratch Team.  In plain unmarked wrappers.  smile


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

Offline

 

#2670 2011-02-08 11:01:08

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

scimonster wrote:

Will the ability to read other sprite's personal lists be included?

Yup.  You can't do it by accident -- you have to use the OF block to ask for it.  But, yeah, nothing is really hidden.

Yeah, that's what I wanted.

Offline

 

#2671 2011-02-08 12:09:34

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

Re: BYOB 3 - Discussion Thread

xly wrote:

one could imagine a 3-stairs Byob

This idea has come up before, in conversation with the Scratch Team.  They point out, correctly, that people would be confused if they downloaded a project that used blocks that didn't work under their settings.


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

Offline

 

#2672 2011-02-08 13:53:21

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

Re: BYOB 3 - Discussion Thread

scimonster wrote:

[please keep your signature under 150 pixels vertical height]   Why does it keep growing?

No, the question is, what other kind of height is there, besides vertical?  tongue


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

Offline

 

#2673 2011-02-08 13:59:45

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

scimonster wrote:

[please keep your signature under 150 pixels vertical height]   Why does it keep growing?

No, the question is, what other kind of height is there, besides vertical?  tongue

That's a good question.  tongue

Offline

 

#2674 2011-02-08 14:25:42

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

scimonster wrote:

Will the ability to read other sprite's personal lists be included?

You can just use local variables as lists.


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#2675 2011-02-08 14:37:24

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

14God wrote:

scimonster wrote:

Will the ability to read other sprite's personal lists be included?

You can just use local variables as lists.

That's what I did, but that isn't first class.  wink

Offline

 

Board footer