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

#2076 2010-10-30 22:28:04

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

Scratch seems to be slipping away from the emphasis on programming it once had.

As of right now, the Scratch home page says "643,922 registered members, 182,259 project creators."  About a quarter of the users are programmers.  I don't think that's anything new; it's always been a minority of Scratchers who actually create projects.  And a lot of Scratch projects have always been light on programming; they're "add your name to this" or they're slideshows with one FOREVER [NEXT COSTUME] script.

This shouldn't surprise you.  Programming is hard -- not impossibly hard, not out of reach, but way harder than letting someone else do the programming and just playing the games other people upload.  In my Scratch class for 4th and 5th graders, when I leave them to their own devices, some spend a lot of time in the sprite painting window, or recording themselves making silly noises, or taking pictures of each other; very few really buckle down to writing interesting scripts if I don't insist.

And, even though I'd rather every kid be a terrific programmer, I think this is actually okay.  They're all being creative in their own ways.  (Some of the people painting stuff are more creative than the boys whose programs are always about blood-spattered cats and exploding people.  It's always boys.  smile  )

On the other hand, it's more than okay, it's terrific, that some kids really get it about how empowering programming can be, and push themselves to learn how to do everything.  We absolutely should give kids like you the best tools we can.

BYOB development isn't going to stop!  The pace will be a little slower than last year. (You guys saw about half of the string of daily releases that went into getting the 3.0 design exactly right; before the public alpha release there were many versions used by only a handful of people.)  Three things are different now: (1) Last year we lived and breathed BYOB full time; this year Jens and I have each had to pay some attention to the rest of our lives.  (2) There's a pretty decent BYOB for people to use, so the pressure is lessened.  (3) We are now working in two directions at once: the completely rewritten BYOB 4.0 that'll run at a reasonable speed, and the interim BYOB 3.1 that'll still be slow, but will add things like first class sprites.  Only the 3.1 effort will be immediately visible, but the 4.0 effort will pay off more in the long run, I think.


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

Offline

 

#2077 2010-10-30 22:43:44

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

Re: BYOB 3 - Discussion Thread

I know, I know. That's pretty much the default adult-Scratcher answer to my complaints.  tongue  (Not trying to make your reply sound cliché; it was a very good post  smile  ).

The thing is, I'm pretty comfortable with Scratch and I like it a lot. I keep telling myself to learn a programming language like C# and just can't be bothered. Do you remember how a long time ago (probably 72 pages or so back) I told you the problem with my generation was a lack of patience? Well here's proof.  tongue

I REALLY appreciate all the time you and Jens have spent with BYOB development. It would be unfair to ask that of you period, much less for a complete rewrite of BYOB.

I was just indirectly expressing my displeasure at the slow pace of development. Whether it is programming-oriented or not, Scratch 2.0 WILL be improvement on the current version, yet the release of that is easily half a year away. And it seems like the making of BYOB3 and 4 and beyond has stopped. It was really tactless and selfish of me to post:

That's why I'm turning to BYOB3. Jens and bharvey, don't let me down!

Sorry.  sad

Last edited by shadow_7283 (2010-10-30 22:47:00)

Offline

 

#2078 2010-10-31 00:30:49

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

I keep telling myself to learn a programming language like C#

If you're seriously interested in programming, of course you have to expand beyond Scratch.  (That doesn't mean you have to abandon Scratch; you can do both.)  I wouldn't pick a Microsoft-spawned language like C#, though; if you want to learn that kind of language it might as well be Java, so you can talk to the rest of the world.  But of course what I really want you to learn is Scheme!  (Mainly so you can read SICP, which really is by far the best CS book ever written.)

It was really tactless and selfish of me to post:

That's why I'm turning to BYOB3. Jens and bharvey, don't let me down!

Sorry.  sad

Not at all!  Having users who care is what keeps us going.  And I heard the compliment that was inside what you said.  smile  But, you know, the step from first class procedures and lists to first class procedures, lists, and sprites isn't going to be half as exciting as the jump from not thinking about first classness to having first class procedures and lists.  BYOB (I hope this doesn't sound smug) is probably right now about 80% as good as it'll ever be.  The rest is details.  Important, but not earth-shaking.

Meanwhile I haven't had a spare hour in three months to spend on getting the tutorials to match the actual 3.0 behavior -- mainly getting rid of the variables area at the left of the block editor.  But next semester I won't be teaching three classes, so I should make some progress starting in January.


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

Offline

 

#2079 2010-10-31 00:42:06

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

Re: BYOB 3 - Discussion Thread

P.S.:

shadow_7283 wrote:

Do you remember how a long time ago (probably 72 pages or so back) I told you the problem with my generation was a lack of patience? Well here's proof.  tongue

Is this the same kid talking who won't settle for anything but MIT?  smile  If you do go there, you're going to work your butt off!  And wherever you go to college, you're going to learn a few more programming languages.  It's not a good idea to tell yourself stuff like this about yourself; it can be self-fulfilling.


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

Offline

 

#2080 2010-10-31 01:16:36

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

I have to say, Scratch Suggestions has really frustrated me...
It seems like people want Scratch to evolve in to a YouTube-type website.

If I had time, I'd like to go through all the (600-odd, I think) suggestions and categorize them as being about the web site, about the forums, or about Scratch itself, and then in the latter category further subdivide them into ones that would be doable by the user in BYOB and ones that wouldn't.  smile   It'd be interesting to see what the ratio is.


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

Offline

 

#2081 2010-10-31 05:28:44

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

Re: BYOB 3 - Discussion Thread

@bharvey

"look at Scheme"

I just followed your recommendation, but it seems now that Scheme is not anymore Scheme, but Racket. Is "Racket" same as Scheme or not ?

Thanks

Offline

 

#2082 2010-10-31 11:37:43

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

Re: BYOB 3 - Discussion Thread

I don't like Java much; Java exploits are half the viruses I get on this computer.  tongue
But Scheme sounds interesting. Maybe I'll try it. I was thinking C# though, because it would help me out with Unity 3D, and it is somewhat of a standard for software development.

bharvey wrote:

Is this the same kid talking who won't settle for anything but MIT?    If you do go there, you're going to work your butt off!  And wherever you go to college, you're going to learn a few more programming languages.  It's not a good idea to tell yourself stuff like this about yourself; it can be self-fulfilling.

I'm not sure exactly what you mean. But you can bet that I'll be working as hard as I can for MIT (come to think of it, I already am).  big_smile

Last edited by shadow_7283 (2010-10-31 11:38:09)

Offline

 

#2083 2010-10-31 12:08:15

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

Re: BYOB 3 - Discussion Thread

My idea for 3.1: move zero-argument reporters to the "variables" pane.
Basically, all those zero-argument reporters (size, x position, direction, etc.) would be moved to the variables pane and be treated as variables. This means one would be able to set them with the SET () TO () primitive, and all the other SET primitives would become obsolete. One could also override the default behavior of these variables, such as transforming (e.g. scaling or rotating) the x/y position variables from their values.

Oh. I just realized that wouldn't work.... If you can override the behavior of the SET (x position) TO () block, how would you set the x position in your function? I mean, for x/y position it's obvious, but what about size? Hm. Any suggestions?

Last edited by nXIII (2010-10-31 12:08:25)


nXIII

Offline

 

#2084 2010-10-31 14:41:54

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

Re: BYOB 3 - Discussion Thread

xly wrote:

Is "Racket" same as Scheme or not?

A particular well-known group of Scheme implementors have decided that Scheme isn't quite the language they want to work in, and so they've invented a new language, Racket, that has a large intersection with Scheme but is different in certain ways.  It remains close enough to Scheme so that their implementation allows Scheme compatibility as a mode you can select.

If you're reading SICP I think your best bet is to get our package from http://inst.eecs.berkeley.edu/~scheme and run the stk-simply version from inside Emacs.


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

Offline

 

#2085 2010-10-31 14:45:14

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

I'm not sure exactly what you mean.

I meant to suggest that this story you tell about "I don't have the patience to learn another programming language" is incompatible with your other story about "I want to go to the best engineering school in the world."  And that I believe the latter, not the former.


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

Offline

 

#2086 2010-10-31 15:03:05

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

My idea for 3.1: move zero-argument reporters to the "variables" pane.
Basically, all those zero-argument reporters (size, x position, direction, etc.) would be moved to the variables pane and be treated as variables. This means one would be able to set them with the SET () TO () primitive, and all the other SET primitives would become obsolete. One could also override the default behavior of these variables, such as transforming (e.g. scaling or rotating) the x/y position variables from their values.

Oh. I just realized that wouldn't work.... If you can override the behavior of the SET (x position) TO () block, how would you set the x position in your function? I mean, for x/y position it's obvious, but what about size? Hm. Any suggestions?

Why would you want to override the blocks' default behaviors? That doesn't really make any sense. If you were to set  the "X Position" reporter to function as the size reporter, it wouldn't do anything that the size block couldn't. It would just create confusion as to which variable does what.

The other problem with your idea of having "zero-argument reporters" in the variable pane is that they would be treated like other variables. That might work in Scratch, but with first-class everything in BYOB that would create a major issue. How would a sprite go to the x position (set x to [say "Hi!"])?

Lastly, I don't want more clutter in the variable pane. I usually have TONS of variables there, and I'm perfectly happy with the zero-argument's current location.

Offline

 

#2087 2010-10-31 15:06:32

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

shadow_7283 wrote:

I'm not sure exactly what you mean.

I meant to suggest that this story you tell about "I don't have the patience to learn another programming language" is incompatible with your other story about "I want to go to the best engineering school in the world."  And that I believe the latter, not the former.

You're right. I guess I should say I don't have the patience right now. I'm too busy with school to devote my energy to learning a new programming language. If I had more spare time, I definitely would. I just have this constant feeling of busyness, even when I have nothing to do.

Offline

 

#2088 2010-10-31 15:09:31

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

If you can override the behavior of the SET (x position) TO () block, how would you set the x position in your function?

Much as I love the elegant spirit of this proposal, I see a bunch of difficulties with actually doing it.  For one thing, with the pen down, GO TO X:Y: doesn't decompose into SET X and SET Y.  So if you really want to maintain that these sprite properties are modelable as just variables with side effects, then the right thing is to make POSITION (a list of length 2) be the variable, and still consider X POSITION to be a niladic function reporting ITEM 1 OF <POSITION>.

But also, even if you think of them as variables (as do the Scratch Team -- I asked John about this once), they still don't go in the Variables tab.  Otherwise pretty soon you'll find that Variables is the only tab, which sort of defeats the object of tabs.  Your model has to allow for variables of all colors, just as we let you write custom blocks of all colors.

Some niladic functions can't reasonably be viewed as variables; the paradigmatic example is a RANDOM DIGIT block that chooses a random value from [0,9].

But the particular problem you're stumped by seems easy enough to me.  You just subclass sprites to create transformable-sprites, then you use SUPER (a variant of RUN/CALL) to get at the underlying mutator.  Of course this assumes that we work sprites into a serious object oriented framework.

As a matter of learnability, though, I don't think we should turn BYOB into a dialect of Smalltalk.  It should remain a dialect of Scratch, which is to say a dialect of Logo, which is to say a dialect of Lisp.  Operator first; ASK <obj> <message> (or RUN [<method> OF <obj>] -- we really should work out how sprites-as-objects can coexist gracefully with dispatch-procedure-as-object) rather than just <obj> <message> to talk to another object.  Etc.  So don't be fooled about syntax by my use of SUPER above.  In Object Logo we used names like USUAL.FOO to mean "run FOO in this object, but using my parent's method."


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

Offline

 

#2089 2010-10-31 15:14:05

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

ScratchReallyROCKS wrote:

You know? I've been using BYOB for a long time, and I'm really good with it, but I still don't understand what makes something first class.

Okay, first, let's reiterate the official definition:  A data type is first class in a language if an instance of that type can be

* the value of a variable;

* an input to a procedure (Scratch: block);

* the value returned (Scratch: reported) by a procedure;

* an element of a data aggregate (Scratch: list).

So now, as an example, let's look at lists.  In Scratch, make a list.  You have to give it a name, let's say FOO.  Now put some items into FOO, like ABC and DEF and 23.  Now make a variable, ZOT, and run the block SET <ZOT> TO <FOO> (dragging the red FOO oval into the SET block).  The new value of ZOT will not be a list of three items ABC, DEF, and 23; instead, it'll be the string "ABC DEF 23".  Scratch doesn't let a list be the value of a variable.

Now do the same thing in BYOB.  This time, the value of ZOT will actually be the list FOO!  You can see it in the monitor that displays ZOT on the stage.  Thus we see that a list can be the value of a variable.

Similarly, in BYOB you can make a block that takes a list as input, and/or reports a list.  (Of course in Scratch you can't make blocks at all, but it's worth noting that none of the built-in blocks take lists as inputs or report a list.)  And you can use a list as an item in another list.

Another point that I've seen in some books as part of the definition of first class, but not others, is that the data can exist without having a name.  In Scratch, you click Make a list, and the first thing that happens is that you're asked what to name it.  You can do that in BYOB, too, if you want, but you can also use the LIST block to make a list by saying what its contents should be, but not giving it a name, e.g., [SAY [LIST <1> <2> <3>]].  You create a list and use it as input to the SAY block, and it never has a name.

So this is why we say that lists are first class in BYOB but not in Scratch.  (The data types that are first class in Scratch are just numbers and text strings.  Booleans would be included, too, but in Scratch there really isn't a separate Boolean type; instead sometimes they use the text strings "true" and "false" and sometimes they use the numbers 1 and 0 respectively.)

The other data type that's first class in BYOB but not in Scratch is procedures (blocks and scripts).  But this post is long enough already.  smile

Ah, I see. Thanks! I guess that's why I love BYOB.


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

Offline

 

#2090 2010-10-31 15:49:23

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

Why would you want to override the blocks' default behaviors? That doesn't really make any sense. If you were to set  the "X Position" reporter to function as the size reporter, it wouldn't do anything that the size block couldn't. It would just create confusion as to which variable does what.

As in any object inheritance system, a sensible programmer will override methods in subclasses not with arbitrary different methods, but with specializations of the parent methods -- things that have the same basic purpose, but do it differently.  The classic example in Logo circles is to create a turtle (sprite) subclass whose pen draws dashed lines instead of solid lines.  nXIII's example is a subclass of sprite that moves in a coordinate system other than the conventional one in which the axes are perpendicular and have equal-sized steps.

It may not be obvious why you'd want this, so I'll give two simple examples.  (1) In the early days of PCs, moving one pixel up or down the screen was a different distance from one pixel sideways.  So trying to draw a square with a REPEAT 4 [...] would instead get a rectangle wider than tall or vice versa.  We'd fix this by changing the scale of the Y axis.  (2) It's pretty easy to draw (a close approximation to) a circle with a REPEAT 360 [...].  But it's quite a difficult challenge to draw a non-circular ellipse with turtle motions.  It becomes easy if you can scale the axes.  And if you make them non-perpendicular you can tilt the ellipse.

The other problem with your idea of having "zero-argument reporters" in the variable pane is that they would be treated like other variables. That might work in Scratch, but with first-class everything in BYOB that would create a major issue. How would a sprite go to the x position (set x to [say "Hi!"])?

Even in Scratch it wouldn't make much sense to put a text string into the x position.  You'd have to have the idea of "active variables."  Any variable could have a "setter function" associated with it, and [SET <var> TO <val>] would really do [SET <var> TO [CALL [SETTER FUNCTION OF <var>] WITH <val>]].  The function could report the same value it was given (maybe after doing other things with it), report a different value (solving nXIII's coordinate transformation problem), or throw an error (solving your value-not-in-domain problem).

Lastly, I don't want more clutter in the variable pane. I usually have TONS of variables there, and I'm perfectly happy with the zero-argument's current location.

Here we agree.


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

Offline

 

#2091 2010-10-31 15:51:18

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

Re: BYOB 3 - Discussion Thread

I was thinking, what about taking away the "Make a variable" and "Make a list" buttons? It would definitely save space in the variables pallet.

Last edited by ScratchReallyROCKS (2010-10-31 15:51:33)


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

Offline

 

#2092 2010-10-31 16:01:34

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

I'm too busy with school.

Yeah I'm with you there!  hmm


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

Offline

 

#2093 2010-10-31 16:05:03

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

Re: BYOB 3 - Discussion Thread

ScratchReallyROCKS wrote:

I was thinking, what about taking away the "Make a variable" and "Make a list" buttons? It would definitely save space in the variables pallet.

"Make a list" is definitely redundant, since you can put lists into variables, but I'm not quite sure how you'd do without something like "Make a variable."  I suppose it could be a block instead of a special user interface feature.

We kept "Make a list" because we didn't want to have any unnecessary incompatibilities with Scratch.  I believe a Scratch user can run BYOB, ignore the new stuff, and work exactly as before.  We thought that mattered more than saving a little space.

But what did you mean about "Make a variable"?


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

Offline

 

#2094 2010-10-31 16:14:39

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

ScratchReallyROCKS wrote:

I was thinking, what about taking away the "Make a variable" and "Make a list" buttons? It would definitely save space in the variables pallet.

"Make a list" is definitely redundant, since you can put lists into variables, but I'm not quite sure how you'd do without something like "Make a variable."  I suppose it could be a block instead of a special user interface feature.

We kept "Make a list" because we didn't want to have any unnecessary incompatibilities with Scratch.  I believe a Scratch user can run BYOB, ignore the new stuff, and work exactly as before.  We thought that mattered more than saving a little space.

But what did you mean about "Make a variable"?

[script variables (a) (b) >]


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

Offline

 

#2095 2010-10-31 16:45:47

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

Re: BYOB 3 - Discussion Thread

ScratchReallyROCKS wrote:

bharvey wrote:

ScratchReallyROCKS wrote:

I was thinking, what about taking away the "Make a variable" and "Make a list" buttons? It would definitely save space in the variables pallet.

"Make a list" is definitely redundant, since you can put lists into variables, but I'm not quite sure how you'd do without something like "Make a variable."  I suppose it could be a block instead of a special user interface feature.

We kept "Make a list" because we didn't want to have any unnecessary incompatibilities with Scratch.  I believe a Scratch user can run BYOB, ignore the new stuff, and work exactly as before.  We thought that mattered more than saving a little space.

But what did you mean about "Make a variable"?

[script variables (a) (b) >]

Global variables?


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

Offline

 

#2096 2010-10-31 17:01:58

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

Re: BYOB 3 - Discussion Thread

MathWizz wrote:

ScratchReallyROCKS wrote:

[script variables (a) (b) >]

Global variables?

Exactly.  The SCRIPT VARIABLES block makes variables local to the script in which it appears, even if that script is in the sprite's scripting area rather than in the Block Editor.

P.S. You guys should learn to edit down long quoted previous posts!  sad


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

Offline

 

#2097 2010-10-31 17:06:14

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

As in any object inheritance system, a sensible programmer will override methods in subclasses not with arbitrary different methods, but with specializations of the parent methods -- things that have the same basic purpose, but do it differently...

Ah. That makes sense.

On another note, I'm still having trouble with the idea of lists in BYOB. For instance, if I had a list inside of a list, I can access the items of that secondary list with
(item () of item () of [list]).

But if I were to use <[list 1] contains []> it wouldn't find an item of that secondary list. This seems like a major drawback to me.

It seems like first-class data in BYOB3 isn't completely first class yet. Am I right in saying that?

Offline

 

#2098 2010-10-31 17:19:36

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

Re: BYOB 3 - Discussion Thread

I'm kind of running out of ideas for practical projects that really take advantage of BYOB3's features. Any ideas?

It'd be nice if it is entertaining...  smile

Last edited by shadow_7283 (2010-10-31 17:19:51)

Offline

 

#2099 2010-10-31 17:21:19

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: BYOB 3 - Discussion Thread

^ Maybe a game using a tile engine?


You can now reach me on Twitter @johnnydean1_

Offline

 

#2100 2010-10-31 18:14:50

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

But if I were to use <[list 1] contains []> it wouldn't find an item of that secondary list. This seems like a major drawback to me.

http://cs.berkeley.edu/~bh/deep-contains.gif

It seems like first-class data in BYOB3 isn't completely first class yet. Am I right in saying that?

No, I don't think so.  First, even if you were right about how CONTAINS should behave, that's got nothing to do with first-classness.  If CONTAINS wouldn't take a list of lists as input, that would be closer -- although you don't complain that [<> + <>] doesn't take lists as inputs.  Some functions have natural domains that don't include every data type.

But, second, I think you're wrong about what CONTAINS should do.  On your view, the list of lists

[[1 2 3] [a b c]]

would basically mean the same thing as the flat list

[1 2 3 a b c]

This would decrease, not increase, the usefulness of being able to construct lists of lists.

P.S.  But thanks for bringing up this example!  When I first wrote DEEP-CONTAINS I did it this slightly simpler way:

http://cs.berkeley.edu/~bh/deep-contains-bug.gif

which should have worked, but didn't, for the bizarre reason that when I closed the Block Editor, the grey-bordered function changed to [<item> DEEP-CONTAINS <>]!


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

Offline

 

Board footer