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

#401 2010-05-09 01:29:47

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

Re: BYOB 3 - Discussion Thread

fullmoon wrote:

This mod is <font size="eleventyseven">ABSOLUTELY AMAZING!</font>

smile  Thanks!

It's super slow, but I get the feeling that's my fault, not BYOB's.

Alas, it's probably BYOB's.  All my projects run slow as molasses, too.  We'll try hard to get that fixed by summer.  That's the top priority along with debugging support.  Which brings us to...

have you considered implementing some sort of socket functionality?

We do want better networking, somehow or other, but imho it'll be better if we leave that for 3.1 than if we leave debugging for 3.1.  For one thing, all those other modders will be creative in attacking networking, so we don't have to.  smile   At some point we should have technology cross-licensing treaties, just like IBM and Microsoft.  smile
OTOH, Jens enjoys playing with the network, so it might be higher on his list than mine, and he's the programmer of this team.


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

Offline

 

#402 2010-05-09 09:28:00

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

Re: BYOB 3 - Discussion Thread

fullmoon wrote:

This mod is <font size="eleventyseven">ABSOLUTELY AMAZING!</font> I love being able to use anonymous functions, I love the input lists with the arrows, and the new BYOB palette is beautiful. This is everything Scratch should be and more. I've been playing with this for a while, and I wrote an library for hash functionality. It's super slow, but I get the feeling that's my fault, not BYOB's. I'll see if I can find a place to upload it.

Oh, and I don't want to bombard you with feature suggestions for the summer release, but...have you considered implementing some sort of socket functionality? That would pretty much take care of all the mesh requests, and we'd get access to Port 80 to boot!

FULLMOON'S BACK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Offline

 

#403 2010-05-09 19:55:45

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

@Jens: do you mind if I use your (awesome!) scrolling-by-dragging technique in Panther? I will give credit  big_smile

Thanks, nXIII, coming from you I feel very honored! Please take anything you need from BYOB, including zebra coloring. Do you want changesets or can you figure out how these work yourself?

BTW: There's a bug report in the BYOB mailbox about "very large 'the script' issues" we're assuming is coming from you. If that's the case (and you agree) I can send you the changeset(s) to that e-mail address.

Last edited by Jens (2010-05-09 20:21:54)


Jens Mönig

Offline

 

#404 2010-05-09 20:25:30

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

Re: BYOB 3 - Discussion Thread

@ xly: Thanks for the reports! I got to fix some, but not all of them. I downloaded the project which you cannot open in newer versions of BYOB. Can you tell me which version you last saved it in? (I tried 2.99.000-005 and could not open it with any of these recent ones, so I'm a bit at loss here, sorry!).


Jens Mönig

Offline

 

#405 2010-05-09 20:57:15

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

nXIII wrote:

@Jens: do you mind if I use your (awesome!) scrolling-by-dragging technique in Panther? I will give credit  big_smile

Thanks, nXIII, coming from you I feel very honored! Please take anything you need from BYOB, including zebra coloring. Do you want changesets or can you figure out how these work yourself?

BTW: There's a bug report in the BYOB mailbox about "very large 'the script' issues" we're assuming is coming from you. If that's the case (and you agree) I can send you the changeset(s) to that e-mail address.

Yes, the bug report is me...
I think I can just figure out how you did it (I opened a few browsers in BYOB)
one question: I believe that the ScratchScriptsMorph is harvesting all the clicks so they are not sent to the ScrollFrameMorph2... how can I fix this? (I will probably find this in a browser about a minute in the future, sorry...)


nXIII

Offline

 

#406 2010-05-09 21:14:03

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

Re: BYOB 3 - Discussion Thread

New BYOB 2.99.007 (licensed to kill) at http://byob.berkeley.edu

Fixes, among other things, nXIII's deleted-variables-return bug!  smile


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

Offline

 

#407 2010-05-09 21:15:53

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

New BYOB 2.99.007 (licensed to kill) at http://byob.berkeley.edu

Fixes, among other things, nXIII's deleted-variables-return bug!  smile

YOU FIXED IT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! YAY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!anti-caps-lock-filter

Last edited by nXIII (2010-05-09 21:26:59)


nXIII

Offline

 

#408 2010-05-09 21:16:16

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

Re: BYOB 3 - Discussion Thread

I just sent you an e-mail...


Jens Mönig

Offline

 

#409 2010-05-09 22:12:21

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Whoa, I can hardly keep up with all these releases! I was about to submit a bug report for .006, too, but it appears to have been fixed (at least for now) in 007. The problem was when I tried to drag custom blocks (usually the # repeat {} loop) from the Tools sprite into a block editor pane and then mouse over them, I would get some sort of runtime error. I'm not going to submit a report unless I find the same problem with 7, though.

Also, is it just me, or is Gobo's head mutation getting bigger with each subsequent release? It looks like there's a coral reef sprouting up.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#410 2010-05-10 02:14:25

PlayWithFire
Scratcher
Registered: 2010-01-20
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Like the 007 reference XD


http://scratch.mit.edu/static/projects/PlayWithFire/1610180_sm.png
Check out the DG Games Website For the latest news on games like Infected

Offline

 

#411 2010-05-10 03:11:24

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

Re: BYOB 3 - Discussion Thread

fullmoon wrote:

Whoa, I can hardly keep up with all these releases! I was about to submit a bug report for .006, too, but it appears to have been fixed (at least for now) in 007. The problem was when I tried to drag custom blocks (usually the # repeat {} loop) from the Tools sprite into a block editor pane and then mouse over them, I would get some sort of runtime error. I'm not going to submit a report unless I find the same problem with 7, though.

Also, is it just me, or is Gobo's head mutation getting bigger with each subsequent release? It looks like there's a coral reef sprouting up.

Hi fullmoon,

yes, I fixed two situations in which the error message you're been observing popped up recently, one for 007.

Lambda-Gobo's (Lobo(?)) hair underwent some community-driven styling in recent versions to make its meaning more obvious, but I didn't change it from 006 to 007.

Nice to see you again  smile


Jens Mönig

Offline

 

#412 2010-05-10 12:17:12

dav09
Scratcher
Registered: 2009-03-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

dav09 wrote:

Jens wrote:

Hey dav09, I'm curious which advanced mesh functions you'd be interested in. Is there anything special you'd like to do that requires mesh?

Hey Jens, i know its build your own blocks, but there are  other blocks in byob
I suggest blocks such as:
[Join mesh ip()]
[Stop hosting mesh] stop hosting mesh connection
[Transfer[]to ip] this is to transfer/ share sprite
[All mesh users start] auto click the green flag for all connected
[set user() to broadscast] very advanced, it means only leave user 1 or whatever broadcast it
[if host lost set host to()] if the host quits the games still continues
Thanks for listening, i think these would be hard to program but great if they were added  smile
others might have better ideas!

I Jens has read this  big_smile

Last edited by dav09 (2010-05-10 12:31:52)

Offline

 

#413 2010-05-10 13:21:54

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

I built a library that includes hash functionality and JSON encoding/decoding. You can download it in the form of a BYOB sprite here.

This library basically allows you to create lists whose indices are objects rather than just numbers. So instead of having a items at 1,2,3 and so on, you can access them through string keys. That way you can have values at "name","password","email", etc. This is what the library looks like:
http://i302.photobucket.com/albums/nn100/fullmoon32/hashlib.jpg

To create a new hash, you need two lists, one with the keys and one with the values for the new hash. These can be empty if you like:
http://i302.photobucket.com/albums/nn100/fullmoon32/hash.gif

Once you have a hash, you can put all sorts of things inside of it (including other hashes):

http://i302.photobucket.com/albums/nn100/fullmoon32/hashcreation.gif

You can also:

- Add something to the hash
- Find the value at a specified key (returns a reference, not a duplicate, so you can modify this directly)
- Find the key of a specified value (careful, doesn't check for duplicates)
- Get a list of keys
- Get a list of values
- Test if a reporter returns a hash object

But my favorite feature allows you to encode or decode data as JSON. This is a lightweight data format used for sending data back and forth across the web. It stands for JavaScript Object Notation, so named because it looks like the code for creating objects in JavaScript. You can encode any hash, list, string, or boolean as JSON:
http://i302.photobucket.com/albums/nn100/fullmoon32/jsonencode.gif

You can also create a Scratch object from a JSON string. This block has the added bonus of being so slow that it gives you time to go make a sandwich while it runs:
http://i302.photobucket.com/albums/nn100/fullmoon32/jsondecode2.gif

Don't try this at home, kids: http://i302.photobucket.com/albums/nn100/fullmoon32/jsondecode1.gif

The encode/decode function is basically useless now, but I had a lot of fun building it. I imagine that a future, HTTP-connected Scratch would probably need some sort of functionality like this.

To use this library, just  import the hash library.ysp sprite into your BYOB .007 project. You'll also get every other block I had imported while creating the library (including a duplicate of the Tool Sprite's blocks, as well as some of my own).

Last edited by fullmoon (2010-05-10 13:22:26)


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#414 2010-05-10 14:05:36

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

Re: BYOB 3 - Discussion Thread

fullmoon wrote:

I built a library that includes hash functionality and JSON encoding/decoding. You can download it in the form of a BYOB sprite here.

This library basically allows you to create lists whose indices are objects rather than just numbers. So instead of having a items at 1,2,3 and so on, you can access them through string keys. That way you can have values at "name","password","email", etc. This is what the library looks like:
http://i302.photobucket.com/albums/nn10 … ashlib.jpg

To create a new hash, you need two lists, one with the keys and one with the values for the new hash. These can be empty if you like:
http://i302.photobucket.com/albums/nn10 … 2/hash.gif

Once you have a hash, you can put all sorts of things inside of it (including other hashes):

http://i302.photobucket.com/albums/nn10 … eation.gif

You can also:

- Add something to the hash
- Find the value at a specified key (returns a reference, not a duplicate, so you can modify this directly)
- Find the key of a specified value (careful, doesn't check for duplicates)
- Get a list of keys
- Get a list of values
- Test if a reporter returns a hash object

But my favorite feature allows you to encode or decode data as JSON. This is a lightweight data format used for sending data back and forth across the web. It stands for JavaScript Object Notation, so named because it looks like the code for creating objects in JavaScript. You can encode any hash, list, string, or boolean as JSON:
http://i302.photobucket.com/albums/nn10 … encode.gif

You can also create a Scratch object from a JSON string. This block has the added bonus of being so slow that it gives you time to go make a sandwich while it runs:
http://i302.photobucket.com/albums/nn10 … ecode2.gif

Don't try this at home, kids: http://i302.photobucket.com/albums/nn10 … ecode1.gif

The encode/decode function is basically useless now, but I had a lot of fun building it. I imagine that a future, HTTP-connected Scratch would probably need some sort of functionality like this.

To use this library, just  import the hash library.ysp sprite into your BYOB .007 project. You'll also get every other block I had imported while creating the library (including a duplicate of the Tool Sprite's blocks, as well as some of my own).

Wow... thats all I can say...


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

 

#415 2010-05-10 19:09:12

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

Re: BYOB 3 - Discussion Thread

fullmoon wrote:

I built a library that includes hash functionality and JSON encoding/decoding.

Very cool project.

Want us to put a link to it in the user-contributed section of the web page?


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

Offline

 

#416 2010-05-10 19:10:21

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

fullmoon wrote:

I built a library that includes hash functionality and JSON encoding/decoding.

Very cool project.

Want us to put a link to it in the user-contributed section of the web page?

Hey, that would be great!


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#417 2010-05-10 19:55:48

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

Re: BYOB 3 - Discussion Thread

fullmoon wrote:

Hey, that would be great!

Done!

PS Why do you make copies of the x and y inputs in your POINT block?  I think you could just use the input variables themselves.

PPS It's great that you're adopting dispatch procedure style OOP!  I'm waiting to see the first contributed project with delegation.  smile


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

Offline

 

#418 2010-05-10 19:59:45

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

Re: BYOB 3 - Discussion Thread

On http://byob.berkeley.edu near the bottom there's a pointer to a writeup and skeleton project file for an exploration of Church numerals (how to do arithmetic with nothing but THE BLOCK as a starting point -- kind of like starting a fire by rubbing two Boy Scouts together) that the mathematicians in the crowd (MathWizz?) will enjoy.  No fair looking it up on Wikipedia or Google.


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

Offline

 

#419 2010-05-10 20:58:46

soupoftomato
Scratcher
Registered: 2009-07-18
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Doesn't Scratch already use OOP?

I mean, it has sprites which are different objects, and it's oriented around programming them. Sorry if I am sounding stupid, but I am confused.


I'm glad to think that the community will always be kind and helpful, the language will always be a fun and easy way to be introduced into programming, the motto will always be: Imagine, Program, Share - Nomolos

Offline

 

#420 2010-05-10 21:26:58

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

soupoftomato wrote:

Doesn't Scratch already use OOP?

I mean, it has sprites which are different objects, and it's oriented around programming them. Sorry if I am sounding stupid, but I am confused.

I read somewhere that Scratch is considered an "object-featuring" language. I think the problem with calling it OOP is that there's no way to create new data structures or extend existing ones. Oh, and the small matter of there being no way to define procedures. So, yeah, Scratch is sort of object-oriented, but it's missing many of the features that mainstream OOP languages have.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#421 2010-05-10 21:33:19

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

Re: BYOB 3 - Discussion Thread

soupoftomato wrote:

Doesn't Scratch already use OOP?

I mean, it has sprites which are different objects, and it's oriented around programming them. Sorry if I am sounding stupid, but I am confused.

No, not stupid at all.

You're quite right, Scratch's sprites are objects.  But they're only semi-objects.

Object oriented programming rests on three legs.  (There's a slide about this in the movie; the ideas are part of the SICP course I teach.)  They are message passing, local state, and inheritance.

Sprites sort of have message passing; they get 1/2 credit for this one.  You can send a message with BROADCAST, but you can't direct it to a single sprite, and you can't include program-generated arguments with the message. (Edit: And BROADCAST-receiving scripts can't report values to the sender.)

Sprites do have persistent local variables; full marks (sorry, comes from hanging out with all those UK Panther people) for that one.

And they don't have inheritance at all.  There's no way to say "I want a sprite just like that one, except for these things" and have changes to the parent reflected in the child.  And no way even to say "I want a sprite just like that one" within a program!

Part of the long-term BYOB plan for taking over the world is to bring sprites up to full OOP status.  We've already solved the message-passing problem; you can use the Sensing-palette [<var> OF <sprite>] block to get access to another sprite's methods; you can call them with arguments, you can get return values from them, you can launch one in a separate thread.  We haven't made sprite inheritance a priority because so many other people are already thinking about that, including the Scratch Team and the Panther gang.  (Maybe we'll just steal their code without attribution --- JUST KIDDING!)

So, why have this other OOP mechanism?  Three reasons I can think of offhand (although based on past performance I'll either forget one or think of another one by the time I get to the end of the list).

1.  Sprites are kind of heavyweight.  They have costumes and collision detection and all kinds of time-and-space-consuming bells and whistles.  If all you want is a counter, you shouldn't need all that other stuff cluttering up your project.

2.  Dispatch-procedure OOP comes free if you have a lexically scoped language and you add lambda.  A visually programmed language in which you physically drag a variable from its point of definition to where you want to use it can't help but be lexically scoped!  [Actually this is a lie; OOP didn't work for a while in pre-alpha BYOB3 versions, because someone, either the Scratch Team or Jens, I'm not sure, thought it was okay to allocate frames on a stack like Those Other Languages.  But since I knew it should have been true, I made Jens fix it.  smile ]  Of course the tutorial I'm going to have to write about this eventually isn't free.  sad

3.  As a teacher, I think it's valuable for people learning about OOP to be able to look under the hood --- to see that OOP isn't some magic property you sprinkle on a language, but a fairly simple thing anyone can implement.  Sprites are opaque (no puns about the ghost effect please) but dispatch procedure OOP is transparent.

(Edit) 4. nXIII and fullmoon are finding it useful!

Last edited by bharvey (2010-05-11 10:24:19)


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

Offline

 

#422 2010-05-10 23:21:21

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

Re: BYOB 3 - Discussion Thread

The 2.99.007 release has been promoted to "latest stable"; if you already have it running, you don't have to re-download it even though the link on the web page looks different.  But you might want to download the new full installer anyway, because it will help clarify which extensions belong to Scratch and which to BYOB.  (Not to mention using the up-to-the-minute Gobo!  smile  )


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

Offline

 

#423 2010-05-11 19:29:20

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

On http://byob.berkeley.edu near the bottom there's a pointer to a writeup and skeleton project file for an exploration of Church numerals (how to do arithmetic with nothing but THE BLOCK as a starting point -- kind of like starting a fire by rubbing two Boy Scouts together) that the mathematicians in the crowd (MathWizz?) will enjoy.  No fair looking it up on Wikipedia or Google.

I accidentally built POWER while trying to build SUM  big_smile . I need to do my homework...

Last edited by fullmoon (2010-05-11 19:34:35)


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#424 2010-05-11 20:53:11

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

Re: BYOB 3 - Discussion Thread

fullmoon wrote:

I accidentally built POWER while trying to build SUM  big_smile . I need to do my homework...

Yeah, that's the easiest, then times, then plus -- quite counterintuitive!


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

Offline

 

#425 2010-05-11 21:43:34

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

Re: BYOB 3 - Discussion Thread

BYOB 2.99.008 now at http://byob.berkeley.edu, fixes some bugs, especially about non-English versions.


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

Offline

 

Board footer