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

#3476 2011-07-21 01:36:18

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

Re: BYOB 3 - Discussion Thread

LiquidMetal wrote:

In scratch, the blank red area that serves as a backround behind the items in a list extends to the right of the list (graphically).  In BYOB, it ends right after the data in the item of the list.

Hmm, interesting.  What you said isn't quite true; if you put in a BYOB list the same kinds of data (numbers and text) that can go in a Scratch list, then the result looks like a Scratch list.  But if you put a block or a script in the list, its red background is just wide enough for it and a slight margin.

Sounds like a bug, but the list display stuff all has to be redesigned anyway, so it'll probably be consistent in 4.0.


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

Offline

 

#3477 2011-07-21 01:48:19

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

Re: BYOB 3 - Discussion Thread

LiquidMetal wrote:

If you make variables work the way panther has them, it would increase first classiness.

Agreed, first class variables would be a great addition.  Scheme (in most ways a champion among languages for making everything first class) doesn't have first class variables mostly for efficiency reasons; you can compile a program much more efficiently if the compiler knows in advance exactly what variable will be used when the program runs.  That clearly isn't the case if, e.g., you can have a variable whose value is the name of the variable you really want.  But I think we'll get there pretty soon in Snap.

Even more so; what if all blocks were potentially everything?  For example, the clone block, it is a stack block, but if you put it in a place where a (blocklikethis) goes, it can switch for that instance of the block.  Some blocks might not work like this, those you just couldn't put in those spaces, but it would be good for some blocks.

In certain circumstances this makes sense, and we try to handle those cases.  But there's nothing in the idea of first class data types that says we have to try to shoehorn some value into a role it can't fill; for example, you can't take the square root of a text string!

And when do you think 4.0 will come out?

We've been talking about this.  Ideally, /some/ usable (but alpha) version will be out in time for Berkeley's fall semester (mid-August).  But I don't think that first version will be close to ready for release; it'll have a zillion missing features, all the things we spent a year adding to 3.0 and now have to reimplement.  About a month into the semester is when they start using recursion, so they can, if necessary, start the semester with 3.1 and then switch later to 4.0 in some hopefully stable form.

So, what this means is that we hope to have something posted here in the forum for y'all to poke at in August, but it may be January before we have something we'd want to release officially.

OTOH, Jens is famous for delivering code in a fifth the time he thinks it's going to take, so you never know.  big_smile


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

Offline

 

#3478 2011-07-21 04:13:54

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

Re: BYOB 3 - Discussion Thread

First class variables are and interesting suggestion - you're really understanding first-class-ness now! -

As Brian pointed out, not even Scheme has them, neither does Smalltalk, for good reasons. What BYOB 3 does have, instead, are lexically scoped temporary variables (called script variables), which should take care of most issues in which you need to dynamically introduce a variable.


Jens Mönig

Offline

 

#3479 2011-07-21 10:28:29

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

What BYOB 3 does have, instead, are lexically scoped temporary variables (called script variables), which should take care of most issues in which you need to dynamically introduce a variable.

Yeah, but that doesn't let you do indirect addressing: a variable whose value is the variable you want to get/set.

EDIT: And BYOB3 actually has more than that, something closer to Pantheresque variables:  If (e.g. because a script is copied to another sprite) a variable reference loses sight of the variable to which it refers, we look around for a variable of the same name in the current scope.  So the mechanism to look up variable names at runtime is already in place.

Last edited by bharvey (2011-07-21 11:29:18)


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

Offline

 

#3480 2011-07-21 11:32:37

LiquidMetal
Scratcher
Registered: 2011-06-15
Posts: 500+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Yeah, but that doesn't let you do indirect addressing: a variable whose value is the variable you want to get/set.

Wow, that is exactly what I was thinking! In panther, I once used that to set variables a-z to something, and it was much more efficient.

Will 4.0 have the dropdowns in the block maker?

Could you explain the edit elements thing?

In scratch, you can't put stuff into the list place (item (any) of [list]) .  Does adding that functionality require extra code to the block, or just allowing it?

Offline

 

#3481 2011-07-21 12:03:22

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

The list dropdown needs one word changed to allow block drops. I forgot which, but it was under uncoloredargmorph...


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#3482 2011-07-21 12:12:45

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

The list dropdown needs one word changed to allow block drops. I forgot which, but it was under uncoloredargmorph...

ChoiceArgMorph to ChoiceOrExpressionArgMorph.  wink

Offline

 

#3483 2011-07-21 12:13:30

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Ah.

Last edited by Hardmath123 (2011-07-21 12:13:49)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#3484 2011-07-21 14:25:34

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

Re: BYOB 3 - Discussion Thread

LiquidMetal wrote:

Wow, that is exactly what I was thinking! In panther, I once used that to set variables a-z to something, and it was much more efficient.

Yeah, that's the sort of application I had in mind.  Were you making a letter frequency distribution histogram?  I did that in a Logo program, long ago, to help the user solve cryptograms.

Will 4.0 have the dropdowns in the block maker?

Yes.  Jens has started on that already.  I think we still need some discussion about what can be put in a dropdown (e.g., some of the Scratch ones have fixed options, but others have all the available variable names, etc.) and about whether we can generalize the ability to change the rest of the prototype based on a dropdown choice, the way RUN, CALL, and LAUNCH do.

Could you explain the edit elements thing?

It's a Scratch-notation-like representation of the Smalltalk code that implements each primitive block.  Jens wants you to be able to write arbitrary Smalltalk programs using drag and drop.  (I guess it'll be arbitrary Javascript programs in 4.0.  smile  )  If you want more than that, I'll leave this question for Jens, except to say that there's a documentation file in the BYOB distribution.


In scratch, you can't put stuff into the list place (item (any) of [list]) .  Does adding that functionality require extra code to the block, or just allowing it?

As others have said, it doesn't take that much in the block itself.  But, you guys, Jens had to invent the ChoiceOrExpressionArgMorph class!  There's nothing like that in Scratch.

A lot of these details should be much easier to do in 4.0 because they'll be designed in from the beginning rather than pasted on top of an existing language without those features.  There's a lot in BYOB3 that just barely works.  My favorite example is that as you're dragging a reporter onto a Reporter-type slot, you should see the grey border first, and have to keep getting closer to see the white halo.  We were agreed about that back in 3.0, but Jens said it was too hard for reasons I never knew -- adding this on top of the Scratch white-halo code was much easier if you see the white halo first.


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

Offline

 

#3485 2011-07-21 16:26:05

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

Re: BYOB 3 - Discussion Thread

I wrote a lot of new classes, but ChoiceOrExpressionArgMorph wasn't among them. I did have to make deep changes to virtually every Scratch class, though...


Jens Mönig

Offline

 

#3486 2011-07-21 19:47:26

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

I wrote a lot of new classes, but ChoiceOrExpressionArgMorph wasn't among them.

Oh!  Sorry...  Where is there one of those in Scratch?


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

Offline

 

#3487 2011-07-21 20:26:55

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Jens wrote:

I wrote a lot of new classes, but ChoiceOrExpressionArgMorph wasn't among them.

Oh!  Sorry...  Where is there one of those in Scratch?

"switch to costume <costume>" for example, uses a ChoiceOrExpressionArgMorph to represent the costumes' names.
"play sound <sound>" does the same thing with the sounds.

Offline

 

#3488 2011-07-21 20:57:03

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

Re: BYOB 3 - Discussion Thread

Baderous wrote:

"switch to costume <costume>" for example, uses a ChoiceOrExpressionArgMorph to represent the costumes' names.
"play sound <sound>" does the same thing with the sounds.

Oh yeah!  I forgot about that.  Mea culpa.


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

Offline

 

#3489 2011-07-23 04:44:36

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

Re: BYOB 3 - Discussion Thread

Brian/Jens, Know of any good resources on reinforcement learning? I plan to specialize in AI. I hope to someday make an learning(!) AI engine for games so that you don't get bored of the familiar feeling when playing against bots.


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

Offline

 

#3490 2011-07-23 14:07:21

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

Re: BYOB 3 - Discussion Thread

14God wrote:

Know of any good resources on reinforcement learning?

This is the textbook we use in the AI course at Berkeley.


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

Offline

 

#3491 2011-07-26 15:51:40

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

This is the textbook we use in the AI course at Berkeley.

thanks


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

Offline

 

#3492 2011-07-29 13:24:42

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

Re: BYOB 3 - Discussion Thread

Summer will soon be over, can't wait for Snap. Whats the current ETA?


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

Offline

 

#3493 2011-07-30 00:12:29

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

Re: BYOB 3 - Discussion Thread

14God wrote:

Summer will soon be over, can't wait for Snap. Whats the current ETA?

We'll release something in late August, I'm pretty sure, but it's likely not to be complete, more a proof of concept.  It'll probably take another month for the full official 4.0 to be finished.  But this is what I've been saying all along...  You'll be the first to know if anything changes.  smile


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

Offline

 

#3494 2011-07-30 01:01:20

Sidharth
Scratcher
Registered: 2007-12-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

(I guess it'll be arbitrary Javascript programs in 4.0.   smile   )

That's really nice to hear: Javascript is MUCH easier to learn than smalltalk in my opinion; it's structured like most other programming language families like C, C++, and C#, Java, and BASIC.


http://www.danasoft.com/citysign.jpg

Offline

 

#3495 2011-07-30 14:39:53

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

Re: BYOB 3 - Discussion Thread

You know, I was working on
http://goo.gl/RrVw8
And I suddenly understood 3.0: Recursion and lambada!
(You might remember I was having a hard time with those.  tongue )

Offline

 

#3496 2011-07-30 16:59:32

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

Re: BYOB 3 - Discussion Thread

scimonster wrote:

You know, I was working on
http://goo.gl/RrVw8
And I suddenly understood 3.0: Recursion and lambada!

Yay!  big_smile   big_smile 

Now, how are you on higher order functions?  And sprite inheritance?   smile


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

Offline

 

#3497 2011-07-30 17:03:06

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

Re: BYOB 3 - Discussion Thread

Sidharth wrote:

Javascript is MUCH easier to learn than smalltalk in my opinion; it's structured like most other programming language families like C, C++, and C#, Java, and BASIC.

If you're like me, it's not really the language structure that gets in the way; it's the fact that there's no plain text file of the whole program, and instead you have to find your way around in the browser.  All those other languages (except C and BASIC, which make no pretense of being object oriented) (and I guess except Javascript, which uses prototyping OOP like BYOB instead of class/instance OOP like the others) are just half-hearted approximations to Smalltalk, which really takes OOP seriously.


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

Offline

 

#3498 2011-07-31 00:13:00

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

scimonster wrote:

You know, I was working on
http://goo.gl/RrVw8
And I suddenly understood 3.0: Recursion and lambada!

Yay!  big_smile   big_smile 

Now, how are you on higher order functions?  And sprite inheritance?   smile

Well, I'm going to have to read the manual. ;P

Offline

 

#3499 2011-07-31 10:03:59

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

Re: BYOB 3 - Discussion Thread

Once again I must say Python and Javascript FTW!  big_smile

Offline

 

#3500 2011-07-31 16:23:30

Sidharth
Scratcher
Registered: 2007-12-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Sidharth wrote:

Javascript is MUCH easier to learn than smalltalk in my opinion; it's structured like most other programming language families like C, C++, and C#, Java, and BASIC.

If you're like me, it's not really the language structure that gets in the way; it's the fact that there's no plain text file of the whole program, and instead you have to find your way around in the browser.  All those other languages (except C and BASIC, which make no pretense of being object oriented) (and I guess except Javascript, which uses prototyping OOP like BYOB instead of class/instance OOP like the others) are just half-hearted approximations to Smalltalk, which really takes OOP seriously.

Then I guess I'm not like you  smile  I am still trying to learn Smalltalk and understand what all those words mean  smile  BUT, I also don't like the browser, but can you imagine fitting all of Scratch into ONE text file?

What I meant was that making certain things in all those programming languages is similar:

Code:

Function MyFunction(Arguments) {

} (or something else to indicate end of function)

And in Smalltalk, the syntax is completely different. In my opinion, Smalltalk is not the perfect language for a beginner because it is not like most "mainstream" programming languages (Again, that's my opinion). I started out with BASIC (Just BASIC) and Javascript, so I learned the difference between Object-Oriented programming languages and non-Object-Oriented programming languages.

Not ripping on Smalltalk or anything, but Javascript will make coding blocks MUCH easier (for me).


http://www.danasoft.com/citysign.jpg

Offline

 

Board footer