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

#6901 2013-02-15 07:35:45

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

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>?

That's right.
Thanks!


Jens Mönig

Offline

 

#6902 2013-02-15 08:31:28

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

Re: BYOB 3 - Discussion Thread

Wow, those typos are embarrassing—I typed that in a rush.  tongue

Now to figure out how to fix that… my code is very functional and recursive, so it's almost hard to reference outer levels from the inside. bharvey would be proud—I think my code could be copied almost line-for-line into Scheme.


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

Offline

 

#6903 2013-02-15 08:45:24

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

my code is very functional and recursive, so it's almost hard to reference outer levels from the inside

Hehe, "In theory, there is no difference between theory and practice. In practice, there is."  smile


Jens Mönig

Offline

 

#6904 2013-02-15 09:37:08

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

Re: BYOB 3 - Discussion Thread

That's borderline incomprehensible…  tongue

I figured it out now (ugly hack, but I don't have a choice). Now I'm, testing every block to see if it works. It fails for sprite inputs.


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

Offline

 

#6905 2013-02-15 09:38:25

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

Re: BYOB 3 - Discussion Thread

error handling (and some other things) has been fixed. Please flush your caches and let me know, if those "crashes" still happen. Instead of showing a red outline and a bubble with an error message recent versions of Snap just went into an infinite loop. Now everything should be nice and stable again.


Jens Mönig

Offline

 

#6906 2013-02-15 11:02:45

cabennet
New Scratcher
Registered: 2011-09-14
Posts: 4

Re: BYOB 3 - Discussion Thread

Just getting up to speed with BYOB, so I can teach the building of blocks to my GR 11 class. How does one "save" or export blocks such as the FOR loop created in the BYOB tutorial so that you can use them in other projects without having to re-create them? thanks

Offline

 

#6907 2013-02-15 11:37:20

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

Re: BYOB 3 - Discussion Thread

I assume you're using BYOB 3.1. Save the project with the block. When you want to use the block in another project, click File>Import… and select the project with the block.

In Snap! (the online version), simply click File>Export blocks…


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

Offline

 

#6908 2013-02-15 12:51:36

cabennet
New Scratcher
Registered: 2011-09-14
Posts: 4

Re: BYOB 3 - Discussion Thread

super , thanks for the quick response  smile

Offline

 

#6909 2013-02-15 13:03:20

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

Re: BYOB 3 - Discussion Thread

OldCodger wrote:

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

Ah, interesting!  I didn't know the problem came from Halmos; I read it in a puzzle column in some random magazine (long ago).

I think the "symmetry breaking" part of the program is sort of cheating, because you really have to know the solution already to know how far to require increasing values in the array.  Really in a constraint language I'd like a way to say "only show isomorphically distinct solutions."

Now I'll have to see if I can translate that into my Logo logic puzzle program... probably not...


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

Offline

 

#6910 2013-02-15 13:06:19

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

Any preferences (10? 0? Empty?)

I vote for empty.  Tnx.


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

Offline

 

#6911 2013-02-15 13:11:59

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

It shouldn't use the “stop” block with the input “all but this script”

OMG Jens if we're going to copy Scratch 2.0 features I want this one!!!  I've always wanted that since forever!


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

Offline

 

#6912 2013-02-15 13:16:20

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

my code is very functional and recursive, so it's almost hard to reference outer levels from the inside. bharvey would be proud—I think my code could be copied almost line-for-line into Scheme.

I'm totally proud of you, for all sorts of reasons!

I don't understand the part about levels, though.  Oh, you mean you want to use a variable from an outer scope that's shadowed by the same name in an inner scope?


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

Offline

 

#6913 2013-02-15 13:19:25

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

Save the project with the block. When you want to use the block in another project, click File>Import… and select the project with the block.

Wait, you can import a project into another project?

I think a cleaner way to do this is export a sprite from the original project, which will carry with it all the custom blocks accessible to that sprite.  Then import the sprite into your new project with the middle of the three "new sprite" buttons.


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

Offline

 

#6914 2013-02-15 14:07:54

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

Re: BYOB 3 - Discussion Thread

You can't import one project into another. But you absolutely can import a sprite or a blocks module into another project.

@Brian: I've got all of those stop variations from Scratch ready, just not yet in the palette. But I love the red stop sign  smile

Last edited by Jens (2013-02-15 14:09:16)


Jens Mönig

Offline

 

#6915 2013-02-15 14:29:34

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

You can't import one project into another. But you absolutely can import a sprite or a blocks module into another project.

No, this was a BYOB 3.1 question, so no blocks module.


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

Offline

 

#6916 2013-02-15 16:50:46

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

Re: BYOB 3 - Discussion Thread

@Jens & bharvey
For 2 days I have had SAVE problems.
This is probably (certainly ?) due to my using of *.svg Costumes "stolen" from Scratch 2.0 examples.
Your application can use them , but it can't be saved !!
Everything seems OK now !

Offline

 

#6917 2013-02-15 18:35:20

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

nXIII wrote:

Why not <translate> or <message>?

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

I don't understand—the <l> element already has a distinct meaning. <t> would be fine, but I don't think this use is frequent enough to merit a one-letter name.

Hardmath123 wrote:

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

For good  big_smile

Last edited by nXIII (2013-02-15 19:40:02)


nXIII

Offline

 

#6918 2013-02-15 20:02:10

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

OldCodger wrote:

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

Ah, interesting!  I didn't know the problem came from Halmos; I read it in a puzzle column in some random magazine (long ago).

I think the "symmetry breaking" part of the program is sort of cheating, because you really have to know the solution already to know how far to require increasing values in the array.  Really in a constraint language I'd like a way to say "only show isomorphically distinct solutions."

Now I'll have to see if I can translate that into my Logo logic puzzle program... probably not...

Hakank has a lot of good stuff. The symmetry breaking trick is widely used in solving pattern type problems in logic programming anyway. I think it requires a particular way of thinking to see where symmetry breaking can reduce the search or simplify the problem.

Constraint programming still seems to be out on a limb in the programming world though I find analysing problems in terms of their constraints is a useful approach to finding a functional solution. Plus I like solving these kind of puzzles.

Offline

 

#6919 2013-02-15 20:53:57

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

Re: BYOB 3 - Discussion Thread

OldCodger wrote:

bharvey wrote:

OldCodger wrote:

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

Ah, interesting!  I didn't know the problem came from Halmos; I read it in a puzzle column in some random magazine (long ago).

I think the "symmetry breaking" part of the program is sort of cheating, because you really have to know the solution already to know how far to require increasing values in the array.  Really in a constraint language I'd like a way to say "only show isomorphically distinct solutions."

Now I'll have to see if I can translate that into my Logo logic puzzle program... probably not...

Hakank has a lot of good stuff. The symmetry breaking trick is widely used in solving pattern type problems in logic programming anyway. I think it requires a particular way of thinking to see where symmetry breaking can reduce the search or simplify the problem.

Constraint programming still seems to be out on a limb in the programming world though I find analysing problems in terms of their constraints is a useful approach to finding a functional solution. Plus I like solving these kind of puzzles.

Here is a link to a paper on symmetry in constraint programming

http://www.confounded.org/~ipg/papers/GentPetriePugetFinalDraft.pdf

Offline

 

#6920 2013-02-15 20:59:57

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Hardmath123 wrote:

Save the project with the block. When you want to use the block in another project, click File>Import… and select the project with the block.

Wait, you can import a project into another project?

More like "onto": it dumps all the sprites (and thus blocks) onto your current project. That feature was used back when 08jackt made his SynOS in Scratch which could have imported apps created by third-party Scratchers (cool, eh?).

@nXIII: Congratulations!  smile

Last edited by Hardmath123 (2013-02-15 21:07:42)


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

Offline

 

#6921 2013-02-15 21:01:53

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

Re: BYOB 3 - Discussion Thread

I'm going to maintain a to-do list on this thread now:

To-Do List for Snapin8r
(No specific order. Red means urgent. Tilde means I'm currently working on that feature and asterisk means I'm done.)
* Fix sprite inputs
• Ignore default value in custom blocks
Truly global blocks/lists/variables
• Color inputs are iffy—using native hex support in Python
~ Comments!
• Support raster images
• Better help text/easier usage?
* Warp atomic blocks
• Variable watchers are iffy
• Empty boolean slots cause errors

Testing
• blob8108's Nodes puzzle
- Issue with SVG collision-checking
• blob8108's project with every single block (thanks, BTW, it's really helpful)
- Keeps failing due to bad block specs… my fault
• Jens' clone explosion project
- No idea why it fails
• nXIII's 3D world
- Issue with color conversion

Last edited by Hardmath123 (2013-02-18 08:29:35)


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

Offline

 

#6922 2013-02-15 21:33:02

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

@nXIII: Congratulations!  smile

Thanks!  big_smile

If you have any more issues with the converter, I'm in the process of fixing some bugs in my own, so I might be able to help.

PS: You have two "done" indicators in your TODO list (gray and asterisk). Was that intentional?

Last edited by nXIII (2013-02-15 21:34:11)


nXIII

Offline

 

#6923 2013-02-16 00:18:38

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

Re: BYOB 3 - Discussion Thread

You own? You mean BYOB3.1 to Snap, right?

And yeah, I should probably stick with asterisk.  tongue


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

Offline

 

#6924 2013-02-16 01:08:40

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

You own? You mean BYOB3.1 to Snap, right?

Yeah.


nXIII

Offline

 

#6925 2013-02-16 01:26:06

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

Re: BYOB 3 - Discussion Thread

Fixed the sprite input issue.


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

Offline

 

Board footer