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

#576 2010-05-27 07:35:22

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

Re: BYOB 3 - Discussion Thread

I know this kind of limits it but what about a [pause until clicked] block?


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

Offline

 

#577 2010-05-27 07:38:49

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

soupoftomato wrote:

... Harry Scratcher ...

Fwiw, some of us set our browsers to always use a black background no matter what the page says.  Your sig doesn't look very legible against black!

When did I say that in this forum . . .  neutral

And about the forum, I was bored.  tongue  So, I'll just let it wait until August.  neutral


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

 

#578 2010-05-27 07:48:07

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

The-Whiz wrote:

does BYOB 2.99.013 support connections with computers that aren't in your network?

I've never actually used the mesh network feature!  But I should think that's more up to whoever administers your network than up to BYOB.  The problem would be firewalls in the way, right?

You should try it, it can be handy.  tongue

But back to my question: Usually when I host a mesh, I get an option that says "Accept incoming connections?" When I click OK, it asks for the admin name and pass, and since I don't know them I can't do anything about the Firewall.

Offline

 

#579 2010-05-27 10:05:51

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

Re: BYOB 3 - Discussion Thread

xly wrote:

But, on top of that, Byob would develop the idea (or the concept , or the technology ? ) of function-sharing.

You can do that by exporting a sprite that carries the functions with it, just like our tools sprite.  The sprite serves as a package mechanism.


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

Offline

 

#580 2010-05-27 10:07:11

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

Re: BYOB 3 - Discussion Thread

soupoftomato wrote:

When did I say that in this forum . . .  neutral

In your signature file!


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

Offline

 

#581 2010-05-27 17:13:35

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

Re: BYOB 3 - Discussion Thread

shamrocker wrote:

bharvey wrote:

shadow_7283 wrote:

Will BYOB 3 include any improvments in speed?

BYOB 2.99 will probably (there is a last-minute speed improvement coming, but since it's not here yet I don't know how much it'll help) be slow as molasses.  The reason is that Scratch lists are stored in a way that's tuned for iteration rather than recursion, which is the cleanest way to think about many problems once you can define procedures.  We should be back to at least traditional Scratch speed in the real release in August.  We have some ideas about how to make BYOB 4 a lot faster, but otoh we're hoping that there won't have to be a BYOB 4 because the Scratch Team will adopt the idea of first class data.

2.99.007 isn't slow at all.  smile  It's faster than Scratch!

Maybe. But the problem is that BYOB 3 allows you to do MORE. So with features like "atomic" BYOB is actually pretty slow.

Offline

 

#582 2010-05-27 17:57:32

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

Maybe. But the problem is that BYOB 3 allows you to do MORE. So with features like "atomic" BYOB is actually pretty slow.

"Atomic" actually should make it run faster, but it seems slow because you can't interrupt it during the atomic block.  And the display isn't being refreshed, either, so everything else seems to grind to a halt.  We sort of compromised about this; reporters are atomic by default but commands aren't.  The idea is that the blocks that just compute values run fast, but the ones that change the state of the stage get a chance to display their results.  I tend to write programs full of reporters that sit doing nothing visible for an hour and then finally SAY some value.  These are terribly slow, atomic or no atomic.  We'll work on it.
\


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

Offline

 

#583 2010-05-27 18:11:20

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

Re: BYOB 3 - Discussion Thread

Wouldn't the [blocks]<glide( 1 )secs to x sad  1 )y sad  1[/blocks] be an atomic block?

Last edited by ScratchReallyROCKS (2010-05-27 18:12:58)


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

Offline

 

#584 2010-05-27 18:45:59

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

xly wrote:

But, on top of that, Byob would develop the idea (or the concept , or the technology ? ) of function-sharing.

You can do that by exporting a sprite that carries the functions with it, just like our tools sprite.  The sprite serves as a package mechanism.

I had noticed that, and it is already feasible, but it still needs a long homework.For example my exportable MYFUNCTION calls FOREACH, which call MAP which call ...nothing else from Byob toolbox.  To export it I should export bundled together FOREACH + MAP. After all, this russian doll system is the nature of the functional programming,

At a later stage, the system of function-sharing could use one feature " install/desinstall functions " according the needs. (similary to Firefox Add-ons).

Offline

 

#585 2010-05-27 19:31:08

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: BYOB 3 - Discussion Thread

The-Whiz wrote:

bharvey wrote:

The-Whiz wrote:

does BYOB 2.99.013 support connections with computers that aren't in your network?

I've never actually used the mesh network feature!  But I should think that's more up to whoever administers your network than up to BYOB.  The problem would be firewalls in the way, right?

You should try it, it can be handy.  tongue

But back to my question: Usually when I host a mesh, I get an option that says "Accept incoming connections?" When I click OK, it asks for the admin name and pass, and since I don't know them I can't do anything about the Firewall.

Offline

 

#586 2010-05-27 22:43:03

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

Re: BYOB 3 - Discussion Thread

ScratchReallyROCKS wrote:

Wouldn't the [blocks]<glide( 1 )secs to x sad  1 )y sad  1[/blocks] be an atomic block?

Good point.  All the built-in Scratch blocks are by definition "atomic."  But the ones that take a long time arrange to allow other things to happen meanwhile.  (You could have picked ASK <> AND WAIT as an even more dramatic example!)

In the case of GLIDE, my guess is that the only work that really happens as part of the atomic block time is computing the sprite's velocity -- speed and direction -- and setting up an asynchronous motion task that isn't part of the block's thread.  You can see this most clearly in the sound blocks that don't wait for the sound to finish; clearly the entire playing of the sound, which can last for minutes, doesn't stop everything, or even delay the thread with the PLAY block.

But really this atomic/non-atomic distinction applies only to custom blocks.


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

Offline

 

#587 2010-05-27 22:45:39

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

Re: BYOB 3 - Discussion Thread

xly wrote:

For example my exportable MYFUNCTION calls FOREACH, which call MAP which call ...nothing else from Byob toolbox.

Oh yeah, good point.  Okay, we'll try to invent libraries.


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

Offline

 

#588 2010-05-27 22:52:12

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

Re: BYOB 3 - Discussion Thread

The-Whiz wrote:

When I click OK, it asks for the admin name and pass, and since I don't know them I can't do anything about the Firewall.

Right, you can't, and neither can BYOB.  That's the whole idea of a firewall -- it protects you against Bad Programs reading a virus over the net, or sending your credit card numbers over the net, etc.  If you want BYOB to be declared a Good Program, you have to take it up with your sysadmin, not us!

(Sorry for not answering the first time, but I interpreted the above paragraph as indicating that you understood all this!  So I wasn't sure what to say...)


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

Offline

 

#589 2010-05-27 22:54:20

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

ScratchReallyROCKS wrote:

Wouldn't the [blocks]<glide( 1 )secs to x sad  1 )y sad  1[/blocks] be an atomic block?

Good point.  All the built-in Scratch blocks are by definition "atomic."  But the ones that take a long time arrange to allow other things to happen meanwhile.  (You could have picked ASK <> AND WAIT as an even more dramatic example!)

In the case of GLIDE, my guess is that the only work that really happens as part of the atomic block time is computing the sprite's velocity -- speed and direction -- and setting up an asynchronous motion task that isn't part of the block's thread.  You can see this most clearly in the sound blocks that don't wait for the sound to finish; clearly the entire playing of the sound, which can last for minutes, doesn't stop everything, or even delay the thread with the PLAY block.

But really this atomic/non-atomic distinction applies only to custom blocks.

Would it be different if you put it in a launch block?


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

Offline

 

#590 2010-05-28 00:22:08

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

Re: BYOB 3 - Discussion Thread

ScratchReallyROCKS wrote:

Would it be different if you put it in a launch block?

I don't think so.  A thread is a thread.  After all, you could say
LAUNCH [THE SCRIPT
                        GLIDE ...
                         something else...
                  ]
so there's no point special-casing the scheduling of threads created by LAUNCH.


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

Offline

 

#591 2010-05-28 07:56:05

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

The-Whiz wrote:

When I click OK, it asks for the admin name and pass, and since I don't know them I can't do anything about the Firewall.

Right, you can't, and neither can BYOB.  That's the whole idea of a firewall -- it protects you against Bad Programs reading a virus over the net, or sending your credit card numbers over the net, etc.  If you want BYOB to be declared a Good Program, you have to take it up with your sysadmin, not us!

(Sorry for not answering the first time, but I interpreted the above paragraph as indicating that you understood all this!  So I wasn't sure what to say...)

But if I DID declare BYOB as a good program, would it be able to connect with computers outside my network, if they had also declared BYOB as a good program?

Sorry I have to keep bothering you about this...  hmm

Offline

 

#592 2010-05-28 09:08:33

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

xly wrote:

For example my exportable MYFUNCTION calls FOREACH, which call MAP which call ...nothing else from Byob toolbox.

Oh yeah, good point.  Okay, we'll try to invent libraries.

It is not a priority, just a suggestion, in case of, because in fact this functionality exists already "as it is" . For example I have picked out of your toolbox, only 2 functions MAP and FOR ...EACH by export/import and that this is perfect to me at this stage.

Offline

 

#593 2010-05-28 23:22:47

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

Re: BYOB 3 - Discussion Thread

The-Whiz wrote:

But if I DID declare BYOB as a good program, would it be able to connect with computers outside my network, if they had also declared BYOB as a good program?

Sorry I have to keep bothering you about this...  hmm

No bother, it's great to know people are using BYOB!

I don't see any reason why it wouldn't work.  The whole point of the Internet Protocol is that you're supposed to be able to connect to anyone anywhere.  But I'm not really equipped to do an experiment, so let's wait for Jens to come home and answer this authoritatively.

EDIT:  One possible trouble: Not only your sysadmin, but your ISP's sysadmin, and your ISP's ISP's sysadmin, etc., all have to let the traffic through their firewalls.

Skype manages to finesse all this somehow, but it takes them enormous effort and probably violates the fine print of everyone's agreement with their ISPs.  If nothing else works they send the traffic over port 80 (http) -- i.e., they pretend to be a browser.  This is easy for traffic initiated by your computer but not so easy for incoming asynchronous traffic; my guess is that they just send a fake request every few seconds to a special URL set up just for you.

Last edited by bharvey (2010-05-28 23:29:21)


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

Offline

 

#594 2010-05-28 23:24:42

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

No bother, it's great to know people are using BYOB!

It was surprising how many people at Scratch Day had it. It is getting quite popular.


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#595 2010-05-29 05:31:01

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

Re: BYOB 3 - Discussion Thread

@bharvey

1 - The Koch functions, obviously, works if you create the serie of k1,k2,k3 functions, but not if the same function calls itself with the same names of arguments. I continue to explore. By the way does Byob provides the mechanism (Lisp Lambda ?) allowing to create the script of a function inside a function , according the contetx, (define koch1  as a list of instructions) and run it inside the same function ?

2 - Byob already provides the system of function-sharing which seems promising. Your toolbox is a good example of this. I had not clearly understood that a sprite ( this word is not in my dictionary) was a collection of "turtles" + a collection of (loose) instructions linked together by broadcast messages. Thus, a sprite can contain Byob functions as well + turtles if necessary...and can be exported/imported. Good point. A

Offline

 

#596 2010-05-29 11:26:06

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

Re: BYOB 3 - Discussion Thread

xly wrote:

By the way does Byob provides the mechanism (Lisp Lambda ?) allowing to create the script of a function inside a function , according the contetx, (define koch1  as a list of instructions) and run it inside the same function ?

If you mean, can you assemble a script by the action of your program, and then make a block of that assembled script, no.  Earlier Lisps made it common to look inside a procedure and rearrange its pieces, but Scheme has made that sort of introspection rare.  (It's still possible in Scheme via the macro mechanism.)  We followed Scheme's model, which achieves great expressiveness without constructing programs on the fly.

Lisp has the huge introspective advantage that a program is, syntactically, nothing but a list.  In Scratch, scripts and lists are quite different, even though abstractly they're both sequences.

We've talked about a SCRIPT->LIST block that would make programs available for introspection, but it's not high on the priority list.  Maybe BYOB4.

EDIT:  Rereading the original question, I'm not sure I've understood it correctly.  Because of course BYOB does include the Lisp LAMBDA; that's what THE BLOCK and THE SCRIPT are!  So you can have a block MAKE-ADDER <num> that says
REPORT [THE BLOCK [< > + <num>]]
and then you can say
SET <addthree> TO [MAKE-ADDER <3>]
and then you can say
CALL <addthree> WITH INPUTS <5>
and get the answer 8.

Last edited by bharvey (2010-05-29 12:19:17)


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

Offline

 

#597 2010-05-29 12:08:34

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

Re: BYOB 3 - Discussion Thread

The BYOB web site now has a link to the paper that Jens and I are presenting at Constructionism 2010 in Paris in August.  People who've been hanging out here won't learn anything new from it, but it's a reference that those of you who are academics can cite.


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

Offline

 

#598 2010-05-29 17:19:00

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

Re: BYOB 3 - Discussion Thread

is there a way to import a sprite from byob into a scratch game?  because i converted a project to byob with a sprite that has 289 costumes and i now realized i don't have it saved as a scratch sprite.
i then tried making the game using byob but it lagged so much that i couldn't do it.

please help!


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

 

#599 2010-05-29 17:49:54

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

Re: BYOB 3 - Discussion Thread

I implemented first-class timers with this project. You can pause and reset them, but the caveat is that you can't use the "reset timer" block. By the way, I am finding that BYOB struggles to detect keyboard input when a custom atomic block is continually being called. Try pressing the spacebar in the above project...it should pause the timer instance but it rarely does.

Last edited by fullmoon (2010-05-29 17:59:11)


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

Offline

 

#600 2010-05-29 17:53:33

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

Re: BYOB 3 - Discussion Thread

fullmoon wrote:

I implemented first-class timers with this project. You can pause and reset them, but the caveat is that you can't use the "reset timer" block.

Awesome1


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

Offline

 

Board footer