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.
Offline
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! The reason I was wondering was because I thought I might just fiddle around with it.
Oh, and would you have a new type of MenuMorph?
Offline
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.
At age 61 the ring-and-girlfriend thing, while not completely impossible, is not of high probability!
Offline
ProgrammingFreak wrote:
The reason I was wondering was because I thought I might just fiddle around with it.
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.
Offline
14God wrote:
How will you take over the world if they don't fund CS 10?
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.
Offline
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.
Fingers crossed, but still breathing
Offline
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.
Offline
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:
FACTORIAL <NUM> REPORT [<NUM> * [FACTORIAL [<NUM> - <1>]]]
Right way:
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.
Offline
14God wrote:
JTxt wrote:
And it passed 65536 views!
.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
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)
Offline
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
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.)
Offline
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.
Offline
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
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?
Offline
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.)
Offline
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.
Offline
I have a problem for you. How do you make a compiled BYOB program run in turbo mode.
Offline
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?
Offline