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

#6876 2013-02-14 09:24:03

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

Re: BYOB 3 - Discussion Thread

"Storytelling with recursion: how cool izzat?!"  smile  Not perfect, but it's pretty good.


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

Offline

 

#6877 2013-02-14 09:40:42

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

Re: BYOB 3 - Discussion Thread

AMAZING!!! You're a genius!!

Okay, what's with the cross-origin-tainting. Did you create the XML directly from an online query to the Scratch site, or did you export the Scratch project to your local disk before converting it?


Jens Mönig

Offline

 

#6878 2013-02-14 09:50:33

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

Re: BYOB 3 - Discussion Thread

Wait, I remember reading something about using SVG toSource somewhere, and how using canvas  drawImage with SVG's taints the resulting canvas. Let me look into this...


Jens Mönig

Offline

 

#6879 2013-02-14 10:19:18

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

AMAZING!!! You're a genius!!

Thanks!  big_smile  It means a lot to me, coming from you.

Okay, what's with the cross-origin-tainting. Did you create the XML directly from an online query to the Scratch site, or did you export the Scratch project to your local disk before converting it?

I download everything directly from the site in each run.


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

Offline

 

#6880 2013-02-14 10:50:00

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

"Storytelling with recursion: how cool izzat?!"  smile  Not perfect, but it's pretty good.

Very cool indeed.

Are the input default values of 1 that way in the Scratch project?  Or an artifact of conversion?

Also, on my stage there's a variable watcher named "none."

EDIT:  And Renderer's script is way way over on the right, so I have to scroll sideways to see it; is that intentional?

@Jens:  And when I run this project, I then can't click on the stage or the other sprite in the sprite corral to switch to them.  I get a visible effect when I hover over them, but nothing happens when I click.

Last edited by bharvey (2013-02-14 10:54:04)


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

Offline

 

#6881 2013-02-14 11:04:33

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

Perfect for a new Snap! topic *hint* *hint*.  wink

No hinting needed.  We are, as we speak, in a huge flurry of last minute bug fixing and GUI tweaking, in preparation for a beta release probably next week.  Next next at the latest.


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

Offline

 

#6882 2013-02-14 11:17:14

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

@Jens:  And when I run this project, I then can't click on the stage or the other sprite in the sprite corral to switch to them.  I get a visible effect when I hover over them, but nothing happens when I click.

Yes, that happens because the project is using SVGs, and because of browsers agreeing to treat a rasterized SVG as persona non grata, even though there is no technical reason whatsoever for this, probably some lawyer's invention  sad  . I'm looking into this issue right now.


Jens Mönig

Offline

 

#6883 2013-02-14 11:39:25

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

Re: BYOB 3 - Discussion Thread

@Hardmath123 ""Storytelling with recursion: how cool izzat?!"  smile  Not perfect, but it's pretty good."
Loaded  in Snap!+Chrome, it works fine. No Save (but it is not related to the converter)

Offline

 

#6884 2013-02-14 11:47:28

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

Re: BYOB 3 - Discussion Thread

@Jens & bharvey
I've tested the "long-waited" OF.
It does not recognizes local Custom Blocks.
But it recognizes local variables.
Thus by loading one Custom Block into a local variable , it can be executed.

Offline

 

#6885 2013-02-14 11:51:15

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

Re: BYOB 3 - Discussion Thread

xly wrote:

@Jens & bharvey
I've tested the "long-waited" OF.
It does not recognizes local Custom Blocks.
But it recognizes local variables.
Thus by loading one Custom Block into a local variable , it can be executed.

Cool, isn't it?  big_smile

Actually, that's most of what we need for OOP. Now we can define real methods for sprites, by assigning scripts to local variables, and we can send real messages to other sprites by using the OF block. That way we do have direct inter-sprite messaging.

Be careful, though, because when saving and re-loading projects, the calling sprite will be the one handling the code stored in the called sprite's local variable. The OF block as of now is only ready to be used in a Scratch-ly way, but I'm working on it.

Last edited by Jens (2013-02-14 12:04:43)


Jens Mönig

Offline

 

#6886 2013-02-14 12:20:28

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

Re: BYOB 3 - Discussion Thread

hang on, I've just fixed the save / reloading issue regarding "methods" (i.e. local variables pointing to reified scripts). It'll be online shortly.


Jens Mönig

Offline

 

#6887 2013-02-14 12:43:52

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

Re: BYOB 3 - Discussion Thread

fixed and online now. Flush your cache  smile


Jens Mönig

Offline

 

#6888 2013-02-14 15:36:00

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

I've added the drop-down menu to the clone block. If you convert the "myself" option don't forget to put it into <option> tags.

Why is it called "option?" They're all options in the menu (even the non-translatable ones!). Why not <translate> or <message>?

Hardmath123 wrote:

undefined is not an object (evaluating input.setcontents).  hmm

You're specifying an extra argument, using an obsolete selector, or specifying an argument for a special slot type. The deserializer is really bad at recovering from errors like that.

Last edited by nXIII (2013-02-14 15:44:38)


nXIII

Offline

 

#6889 2013-02-14 18:26:59

OldCodger
New Scratcher
Registered: 2012-05-16
Posts: 54

Re: BYOB 3 - Discussion Thread

Brian, did you find the constraint programming site?

Offline

 

#6890 2013-02-14 20:47:23

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

Re: BYOB 3 - Discussion Thread

OldCodger wrote:

Brian, did you find the constraint programming site?

I found the site, but not that example.


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

Offline

 

#6891 2013-02-15 01:07:48

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

Why is it called "option?"

It's originally from the list item input, where you can either type in a number, or select an option (hence the name) from the drop-down.

nXIII wrote:

Why not <translate> or <message>?

Yeah, or why not <l> or <t>?  big_smile


Jens Mönig

Offline

 

#6892 2013-02-15 03:27:30

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

Re: BYOB 3 - Discussion Thread

@Jens
The combination of RUN + ...OF...is very, very touchy.
I have got severe crashes (whichever the browser) as never before with Snap!if I don't click exactly on the small triangle to expand the variabl slots.

Offline

 

#6893 2013-02-15 03:35:09

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

Re: BYOB 3 - Discussion Thread

Yes. RUN + OF is actually more than I intended to provide for 4.0. I really planned to enable only "Scratch-style" usage of OF, but then I've realized that this opens up Pandora's box (and made me painfully realize why I was trying to avoid it until really touching OOP). I'm right now catching up some tails which might cause occasional errors. Although, you know, crashes shouldn't exactly happen, even now...


Jens Mönig

Offline

 

#6894 2013-02-15 03:39:23

OldCodger
New Scratcher
Registered: 2012-05-16
Posts: 54

Re: BYOB 3 - Discussion Thread

bharvey wrote:

OldCodger wrote:

Brian, did you find the constraint programming site?

I found the site, but not that example.

Here is the link.

http://www.hakank.org/minizinc/handshaking.mzn

Offline

 

#6895 2013-02-15 05:23:03

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

Yes. RUN + OF is actually more than I intended to provide for 4.0. I really planned to enable only "Scratch-style" usage of OF, but then I've realized that this opens up Pandora's box (and made me painfully realize why I was trying to avoid it until really touching OOP). I'm right now catching up some tails which might cause occasional errors. Although, you know, crashes shouldn't exactly happen, even now...

Never mind. We have enough "grain to grind" with the new three CLONE instructions.

Offline

 

#6896 2013-02-15 05:32:01

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

Although, you know, crashes shouldn't exactly happen, even now...

Ah. They happen every few runs for me. For example, referencing an out-of-scope list goes crazy.

bharvey wrote:

Very cool indeed.

I was quoting Jens' comment on my project on the 2.0 site.  wink

Are the input default values of 1 that way in the Scratch project?  Or an artifact of conversion?

Yep, Scratch 2.0 custom blocks default number inputs to 1. I can change that really easily, though. Any preferences (10? 0? Empty?)

Also, on my stage there's a variable watcher named "none."

No idea why—I'll look at that.  hmm

EDIT:  And Renderer's script is way way over on the right, so I have to scroll sideways to see it; is that intentional?

Yes, kind of. In Scratch 2.0, procedure definitions are scripts visible on the scripting area. They disappear when I run the conversion.

@Jens:  And when I run this project, I then can't click on the stage or the other sprite in the sprite corral to switch to them.  I get a visible effect when I hover over them, but nothing happens when I click.

Try clicking on the sprite's name (the text).

nXIII wrote:

You're specifying an extra argument, using an obsolete selector, or specifying an argument for a special slot type. The deserializer is really bad at recovering from errors like that.

Ah, must be a typo in the dictionary…  sad

Since when are you a mod? Is it just for testing 2.0, or for good?  smile


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

Offline

 

#6897 2013-02-15 05:41:01

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

referencing an out-of-scope list goes crazy.

Hmm. Can you give me an example? What do mean with "out-of-scope list"? Once you have gotten back a list from a variable, it can't be out of scope, right? Do you mean when you reference a list index that doesn't exist? I'd like to fix this, thanks!


Jens Mönig

Offline

 

#6898 2013-02-15 05:49:26

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

Re: BYOB 3 - Discussion Thread

Oh, I get it. Error messages are broken. Fixing....


Jens Mönig

Offline

 

#6899 2013-02-15 06:20:24

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

Re: BYOB 3 - Discussion Thread

So to get this straight, lists that in Scratch are dumped on teh stage to maek global should now be in the <variables> part of the <project> element in Snap! rather than that of the <stage>? I need to fix that, then.

P.S. Added in the OF block.  smile


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

Offline

 

#6900 2013-02-15 06:22:40

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

Re: BYOB 3 - Discussion Thread

@everyone: Can you make/suggest some projects for me to try to convert now?
http://beta.scratch.mit.edu/forums/topi … post-12339

Last edited by Hardmath123 (2013-02-15 06:32:59)


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

Offline

 

Board footer