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

#3151 2011-04-20 15:04:20

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

Re: BYOB 3 - Discussion Thread

ProgrammingFreak wrote:

Taneb wrote:

bharvey wrote:


No, the congratulations come (maybe) around September or October when they decide who gets funded.  It's going to be very competitive; they'll probably have about 100 times as many proposals as they can fund.  Stay tuned.

Haha, I thought you meant like a proposal with a ring and a girlfriend.

big_smile

tongue  lol

Offline

 

#3152 2011-04-20 15:52:34

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

ProgrammingFreak wrote:

Jens wrote:

I think the paint editor, like in Scratch, should open in a separate window or dialog box, same as the blocks editor. That way it can be moved around, in case you want to look at what's otherwise hidden underneath it. But I'm open to suggestions. What do you think?

Yeah, thats what I thought. I think that is a great idea!  big_smile  The reason I was wondering was because I thought I might just fiddle around with it.  tongue

Oh, and would you have a new type of MenuMorph?

Offline

 

#3153 2011-04-20 22:11:12

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

Re: BYOB 3 - Discussion Thread

Taneb wrote:

Haha, I thought you meant like a proposal with a ring and a girlfriend.

Yeah, Jens explained to me that that was probably what you meant.  I always need for Jens to explain things to me that I don't get the first time.  hmm

At age 61 the ring-and-girlfriend thing, while not completely impossible, is not of high probability!


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

Offline

 

#3154 2011-04-20 22:15:15

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

Re: BYOB 3 - Discussion Thread

ProgrammingFreak wrote:

The reason I was wondering was because I thought I might just fiddle around with it.  tongue

Go for it!  To a first approximation, all the UI components will have the same programming interface (methods etc) in JS as in the Smalltalk version.


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

Offline

 

#3155 2011-04-20 22:20:43

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

Re: BYOB 3 - Discussion Thread

14God wrote:

How will you take over the world if they don't fund CS 10?   wink

If they don't fund us, maybe we won't take over the world.

Don't hold your breath, by the way; funding decisions will probably be in August or September, with no actual money until January or thereabouts.  This is the government, don't forget.  smile


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

Offline

 

#3156 2011-04-21 12:03:33

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

If they don't fund us, maybe we won't take over the world.

Don't hold your breath, by the way; funding decisions will probably be in August or September, with no actual money until January or thereabouts.  This is the government, don't forget.  smile

Fingers crossed, but still breathing  wink


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

Offline

 

#3157 2011-04-22 21:55:40

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

Re: BYOB 3 - Discussion Thread

I stopped trying to understand you, like, 100 pages ago. Lol.

I understand none of this technical stuff. How do you make a recursive function is what I really want to know, it spazzes out on me when I put the block I'm making in the that blocks script.


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

 

#3158 2011-04-23 00:09:20

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

Re: BYOB 3 - Discussion Thread

soupoftomato wrote:

I stopped trying to understand you, like, 100 pages ago. Lol.

Yeah, this has sort of turned into the BYOB developers' thread rather than the BYOB users' thread.  But, please, keep asking questions; we don't want it to be just for developers!

How do you make a recursive function is what I really want to know, it spazzes out on me when I put the block I'm making in the that blocks script.

A picture would help, but my guess from your description is that your recursive function doesn't have a base case.  You have to single out a particular input value that you can compute non-recursively, and then have each recursive call get closer to that.

Here's an example.  The factorial of 5 is 5*4*3*2*1, or in other words it's 5 * (factorial of 4).  That's a recursive function.   Wrong way:

Code:

FACTORIAL <NUM>
REPORT [<NUM> * [FACTORIAL [<NUM> - <1>]]]

Right way:

Code:

FACTORIAL <NUM>
IF [<NUM> = <1>]
   REPORT <1>
ELSE
   REPORT [<NUM> * [FACTORIAL [<NUM> - <1>]]]

Does that help?  If not, please post an example that doesn't work for you.


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

Offline

 

#3159 2011-04-23 23:26:07

DarthPickley
Scratcher
Registered: 2008-06-13
Posts: 100+

Re: BYOB 3 - Discussion Thread

14God wrote:

JTxt wrote:

And it passed 65536 views!  smile
.

Funny... 65536 is the exact number of degrees in a circle on the Unreal Engine.

this is old, but I have to point out...
65536 is equal to 2^16.
It pops up in a lot of places. Like on my calculator (TI-NSpire with TI-84 keyboard) the Omnicalc program has functions like factorization that only work for integers less than 65536.

It is not able to be stored as 2 bytes, so you can't store it as a short int (2 bytes)

Anyways, I would like to know whether it would be possible to use BYOB to create classes with their own methods (like java) in the future.
Although I know that scratch itself is extremely loose about defining what type of thing an object is (variables can be made numbers, strings, and in BYOB3, since things are first class, its completely loose and almost no limitations.
I guess you would have to have blocks that assume that the input (in the form of a list I guess) is of a certain type. So you use variables for ANY class type, because it is first class, and then you don't need to worry about input, you just have to make different constructor blocks that take various forms (lists, another instance of the same class, a primitive / instance of super class (like for a Complex class, you'd be able to set a Complex object equal to something in the form of a real number, a primitive real). ) and maybe the constructor is just a reporter block... I'm going to try this.

UPDATE:
apparently, BYOB3 doesn't allow me to make overloaded reporter constructers (it doesn't allow blocks with the same name)
So, even if the inputs are different, It won't support it.

To get around this, I will have to have text labels on my inputs or just abbreviated

Last edited by DarthPickley (2011-04-23 23:32:36)

Offline

 

#3160 2011-04-24 00:14:42

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

Re: BYOB 3 - Discussion Thread

DarthPickley wrote:

Anyways, I would like to know whether it would be possible to use BYOB to create classes with their own methods (like java) in the future.

Yes, in two ways.  First, since 3.0, you can use first class procedures to build an object system with dispatch procedures.  The reference manual explains that.  Second, as of 3.1, sprites are true objects with method inheritance.  We use prototyping rather than class/instance, but we do basically what you want.  The 3.1 manual explains that too.

I guess you would have to have blocks that assume that the input (in the form of a list I guess) is of a certain type. So you use variables for ANY class type, because it is first class, and then you don't need to worry about input, you just have to make different constructor blocks that take various forms (lists, another instance of the same class, a primitive / instance of super class (like for a Complex class, you'd be able to set a Complex object equal to something in the form of a real number, a primitive real). ) and maybe the constructor is just a reporter block... I'm going to try this.

You lost me here -- I don't get the part about "in the form of a list" but certainly you can make complex numbers with a two-input constructor and with selectors for real, imaginary, magnitude, angle, whatever.

UPDATE:
apparently, BYOB3 doesn't allow me to make overloaded reporter constructers (it doesn't allow blocks with the same name)
So, even if the inputs are different, It won't support it.

Ah, you want to overload + etc.

Actually you can overload blocks, as long as your new block is "for this sprite only."  And then it can be inherited by clones of that sprite.

The trouble is that the global block with the same name is still in the palette.  (I tried it with +.)  This is probably a design flaw; it's really confusing having two identical-looking blocks in the same palette.

But the BYOB official right way to make a class like Complex is to use dispatch procedures and message passing, so you'd say ASK <c1> (+) <c2> where c1 and c2 are instances of the class.

Last edited by bharvey (2011-04-24 00:15:46)


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

Offline

 

#3161 2011-04-24 00:35:20

DarthPickley
Scratcher
Registered: 2008-06-13
Posts: 100+

Re: BYOB 3 - Discussion Thread

okay then... except I called my + block "( cx [list] + [list] ) ".
why "ASK" ? (I'd probably figure it out if I just went through the thread... but I wont)
It is coming along well. I have blocks:
( Real [ ] )
( Imag [ ] )
( complex R: ( ) )
( complex R: ( ) I: ( ) )
( complex mag: ( ) arg: ( ) )
( cplx conj [ ] )
( cx [ ] + [ ] )
( toString Cplx [ ] )
as well as
( toRads ( ) )
( e )
( pi )
( i ) ## returns complex type

I think that I just need to define complex multiplication, then a function for getting the argument and one for getting the magnitude / modulus, then I will have abilities to create an ( e^[ ] ) function. then, I could do euler's identity.

I wish I were able to sort my blocks on my own, instead of automatic alphabetizing.

Offline

 

#3162 2011-04-24 01:18:41

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

Re: BYOB 3 - Discussion Thread

DarthPickley wrote:

why "ASK" ? (I'd probably figure it out if I just went through the thread... but I wont)

You don't have to read the whole thread, just the manual!  At least the section on OOP.

It is coming along well. I have blocks:
( Real [ ] )
[...]
I think that I just need to define complex multiplication, then a function for getting the argument and one for getting the magnitude / modulus, then I will have abilities to create an ( e^[ ] ) function. then, I could do euler's identity.

Umm, aren't you going to use Euler's identity to define e^x?  Anyway, sounds great!

I wish I were able to sort my blocks on my own, instead of automatic alphabetizing.

Me too.  Once 4.0 is done, we can start working our way through all the bazillion UI improvements we keep putting off because we're in a rush to get the core features done.  (My own pet peeve is that the return/enter key sometimes is and sometimes isn't equivalent to clicking OK.)


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

Offline

 

#3163 2011-04-24 16:51:35

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: BYOB 3 - Discussion Thread

When I try to export a sprite in BYOB 3.0.8 I get a popup saying: Could not write file: Export failed. Why? It seems to only happen when I have a custom block.


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#3164 2011-04-24 21:05:15

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

Re: BYOB 3 - Discussion Thread

SSBBM wrote:

When I try to export a sprite in BYOB 3.0.8 I get a popup saying: Could not write file: Export failed. Why? It seems to only happen when I have a custom block.

I'm not sure specifically -- maybe Jens will understand it from this description -- but most saving problems have been about self-referential structures, e.g., a sprite variable whose value is or includes that sprite.

Also, there was a saving problem in 3.1 that was fixed in the latest release.


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

Offline

 

#3165 2011-04-25 10:38:16

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

Re: BYOB 3 - Discussion Thread

SSBBM wrote:

When I try to export a sprite in BYOB 3.0.8 I get a popup saying: Could not write file: Export failed. Why? It seems to only happen when I have a custom block.

Most generally Sprite export does not work.

Try this walk around : make a simplified project with your library blocks, export it as a normal project, and when working on a new project, import this project-library (File->Import Project). Generally this method works.

Offline

 

#3166 2011-04-25 10:42:55

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: BYOB 3 - Discussion Thread

xly wrote:

Most generally Sprite export does not work.

Try this walk around : make a simplified project with your library blocks, export it as a normal project, and when working on a new project, import this project-library (File->Import Project). Generally this method works.

So your saying to import the project with the sprite to a new project and export the sprite from that project? I already tried to make a new sprite with the same things and export that. It didn't work which means it's not a glitch in the project, right?


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#3167 2011-04-25 11:01:23

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

Re: BYOB 3 - Discussion Thread

xly wrote:

Try this walk around : make a simplified project with your library blocks, export it as a normal project, and when working on a new project, import this project-library (File->Import Project). Generally this method works.

I think he wants the sprite's costumes, scripts (not just custom blocks), etc.

We'll have to wait for an update from Jens on when this problem will be totally addressed.

But one thing that prevents saving is circular structures in sprite variables.  You could try the "Clear all variables" option in the Edit menu prior to saving.  (You'd have to add initialization code to restore the correct values after loading the project.)


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

Offline

 

#3168 2011-04-25 13:56:17

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

I think he wants the sprite's costumes, scripts (not just custom blocks), etc.

We'll have to wait for an update from Jens on when this problem will be totally addressed.

Yes, but you could still stick a sprite in the project before you export it.


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

Offline

 

#3169 2011-04-26 04:58:43

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

Re: BYOB 3 - Discussion Thread

@ SSBBM

Look at one application whose all sprite are "exportable" :
http://www.xleroy.net/ByobTuto/New/Thumbnails.html

Offline

 

#3170 2011-04-27 10:05:34

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

Re: BYOB 3 - Discussion Thread

xly wrote:

@ SSBBM

Look at one application whose all sprite are "exportable" :
http://www.xleroy.net/ByobTuto/New/Thumbnails.html

The link above is wrong. Make instead :
http://www.xleroy.net/ByobTuto/thumbnails.html

Offline

 

#3171 2011-04-28 16:19:19

Rick3137
Scratcher
Registered: 2010-01-22
Posts: 57

Re: BYOB 3 - Discussion Thread

I have a problem for you. How do you make a compiled BYOB program run in turbo mode.

Offline

 

#3172 2011-04-28 16:26:38

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

Re: BYOB 3 - Discussion Thread

Hi Rick3137,

Scratch's turbo mode is essentially the same thing as declaring BYOB's custom block definition scripts to be "atomic".

Last edited by Jens (2011-04-28 16:27:03)


Jens Mönig

Offline

 

#3173 2011-04-29 23:24:30

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

Re: BYOB 3 - Discussion Thread

BUMP!!!
I think we should have a competition or collaborative project, this thread is becoming stagnate.


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

Offline

 

#3174 2011-05-01 18:09:58

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: BYOB 3 - Discussion Thread

SSBBM wrote:

When I try to export a sprite in BYOB 3.0.8 I get a popup saying: Could not write file: Export failed. Why? It seems to only happen when I have a custom block.

Bump


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#3175 2011-05-01 18:46:41

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

Re: BYOB 3 - Discussion Thread

SSBBM wrote:

SSBBM wrote:

When I try to export a sprite in BYOB 3.0.8 I get a popup saying: Could not write file: Export failed. Why? It seems to only happen when I have a custom block.

Bump

Try clicking "clear all variables" in the edit menu before saving.  Does that fix it?


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

Offline

 

Board footer