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

#4751 2012-03-05 10:43:01

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

Re: BYOB 3 - Discussion Thread

roijac wrote:

any chance of regex features?  smile

Nah, this is a perfect example of something you should be able to write for yourself in Snap!  But of course we should have a library repository so that when you implement regexps other people can use your code.

Edit:  ... and of course the same argument applies to my word-and-sentence suggestion earlier.  So we should just do strings, like Scratch, and I should provide a sentence library.

Last edited by bharvey (2012-03-05 11:36:26)


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

Offline

 

#4752 2012-03-05 11:56:01

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: BYOB 3 - Discussion Thread

roijac wrote:

any chance of regex features?  smile

mm that would be nice


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

Offline

 

#4753 2012-03-05 12:06:49

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

bharvey wrote:

joefarebrother wrote:

If you drag a reporter that reports a list onto the left/right arrows of a variadic input slot, it should evaluate the list as the inputs it takes.

Oh, that is a cool idea!  Then we wouldn't need a special case for call and run.  Jens?  What do you think?

Ummm..., well..., you know that's exactly what my first version did,and I still believe it's the right thing, but you didn't like it so I disabled it. The good thing is that I only need to take out a single line of code to re-enable this feature  smile

But you're right, and now I remember that's the reason why, in fact, both of us wound up not liking it, that this also removes the variadic slot's label which makes the resulting block non-obvious to understand. And that's why we decided to turn the "... WITH INPUT LIST" variations into separate blocks. But if we come up with a better, more concise solution, I'm perfectly willing to reconsider.

maybe it could look different to distinguish a single input from a list acting as the input to the varadic slot (sorta like the grey border system)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#4754 2012-03-05 12:10:17

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

Re: BYOB 3 - Discussion Thread

Lol I was just thinking maybe I should make a RegExp project for Scratch. I could probably make a Snap! version too when my project and Snap! are done.

Offline

 

#4755 2012-03-05 12:15:10

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: BYOB 3 - Discussion Thread

scimonster wrote:

Lol I was just thinking maybe I should make a RegExp project for Scratch. I could probably make a Snap! version too when my project and Snap! are done.

i was thinking this too a couple of weeks ago but delayed it for scratch since , after doing some tests, it would probaly be to slow to work properly but Snap! may be fast enough...


http://i.imgur.com/1QqnHxQ.png

Offline

 

#4756 2012-03-05 12:37:54

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

Re: BYOB 3 - Discussion Thread

joefarebrother wrote:

maybe it could look different to distinguish a single input from a list acting as the input to the varadic slot (sorta like the grey border system)

Yeah.  The list-valued expression replaces the input slot, but the arrows remain, but they're greyed out and attached to the expression somehow:

http://byob.berkeley.edu/variadic.png

There is a small voice in the back of my head saying "Overengineered!"  I can't decide if this will really be understandable or not.  We sure want to make it hard to do by accident.

Last edited by bharvey (2012-03-05 12:39:03)


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

Offline

 

#4757 2012-03-05 16:07:27

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

joefarebrother wrote:

maybe it could look different to distinguish a single input from a list acting as the input to the varadic slot (sorta like the grey border system)

Yeah.  The list-valued expression replaces the input slot, but the arrows remain, but they're greyed out and attached to the expression somehow:

http://byob.berkeley.edu/variadic.png

There is a small voice in the back of my head saying "Overengineered!"  I can't decide if this will really be understandable or not.  We sure want to make it hard to do by accident.

Maybe we should redesign the way the multiple-input slot looks. Since it's really just a convenience for constructing a list and immediately passing it as an argument, I think it should actually look like an embedded list block (minus the word "list"). That way, it would be very clear when you replace it with a block that you're passing the block instead of the list, rather than as one item of the list.

http://i42.tinypic.com/ejd8yg.jpg


nXIII

Offline

 

#4758 2012-03-05 16:29:51

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

Since it's really just a convenience for constructing a list and immediately passing it as an argument

This is true from an implementor's standpoint, but not necessarily from a user's standpoint.  I really like your picture for the case of CALL because of the "with inputs" in its name, but think about a case like SCRIPT VARIABLES.  The distinction between one variable name (which would have arrows after it) and a list of names of variables (which wouldn't) would be seriously non-obvious.  That's the most extreme example, but even for JOIN WORDS, say, it wouldn't be obvious whether an expression is providing one word or a list of words.


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

Offline

 

#4759 2012-03-05 17:23:01

asampal
New Scratcher
Registered: 2011-08-26
Posts: 9

Re: BYOB 3 - Discussion Thread

Brian, I'm guessing you and Jens are aware of how the other graphical dev environments handle block search and insertion. Just in case you're not, I'd like to recommend that you borrow from StarLogo TNG since, IMO, it has the smoothest workflow among the environments that I follow (Scratch, BYOB, Snap!, StencylWorks) when it comes to finding a block and placing it. I've made a quick screencast to demonstrate this for anyone caring to see. I realize that UI/usability is something that will be looked at when the project is closer to release, but it might help to keep this in mind.

http://www.scratch.mit.edu/ext/youtube/?v=Koh4ZYxmrAo

Offline

 

#4760 2012-03-05 18:20:02

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

Re: BYOB 3 - Discussion Thread

asampal wrote:

borrow from StarLogo TNG

That does look convenient.  I don't see why not, although it's not at the top of my list for Jens's time.  smile


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

Offline

 

#4761 2012-03-06 02:04:54

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

Re: BYOB 3 - Discussion Thread

I can see how such a features is convenient, but I'm not overly enthusiastic about the way it's implemented. In particular I don't like how when you type text into a combo box it shows you subsets of blocks's labels instead of the blocks themselves. But I'm sure this can be changed.


Jens Mönig

Offline

 

#4762 2012-03-06 05:46:11

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

Re: BYOB 3 - Discussion Thread

scimonster wrote:

Lol I was just thinking maybe I should make a RegExp project for Scratch. I could probably make a Snap! version too when my project and Snap! are done.

Really? I'm actually making one now... great minds think alike.  tongue


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

Offline

 

#4763 2012-03-06 06:58:45

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

Re: BYOB 3 - Discussion Thread

My first Snap! game (?)
When Turtle hits Turtle2, Turtle2 hides
Turtle is pivoted with brodcast dirleft and dirtir
Shoot wit Green Flag
http://www.xleroy.net/ByobTuto/New/HitTarget0102.jpg

Offline

 

#4764 2012-03-06 09:04:13

asampal
New Scratcher
Registered: 2011-08-26
Posts: 9

Re: BYOB 3 - Discussion Thread

Jens wrote:

I can see how such a features is convenient, but I'm not overly enthusiastic about the way it's implemented. In particular I don't like how when you type text into a combo box it shows you subsets of blocks's labels instead of the blocks themselves. But I'm sure this can be changed.

I agree, a visual list would be much better, especially if the search would take into account not just the block label, but maybe documentation or category strings as well. Having both text and a visual result would be ideal.

Offline

 

#4765 2012-03-06 11:22:33

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: BYOB 3 - Discussion Thread

xly wrote:

My first Snap! game (?)
When Turtle hits Turtle2, Turtle2 hides
Turtle is pivoted with brodcast dirleft and dirtir
Shoot wit Green Flag
http://www.xleroy.net/ByobTuto/New/HitTarget0102.jpg

Save game link please?


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

Offline

 

#4766 2012-03-06 18:48:27

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

Re: BYOB 3 - Discussion Thread

rookwood101 says "Save game link please?"
I don't know how to do that ! Please give me the method.

Offline

 

#4767 2012-03-06 19:02:03

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

Re: BYOB 3 - Discussion Thread

xly wrote:

rookwood101 says "Save game link please?"
I don't know how to do that ! Please give me the method.

Click on the little pencil thingy at the top and choose "save."  Then, look at the URL up above the browser window, and it should be this huge long thing, which you copy (select all, control/command A, then copy, control/command C), then paste it in here!

(Yes, this is a horrible kludge.  It'll get better.)


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

Offline

 

#4768 2012-03-07 03:33:01

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

xly wrote:

rookwood101 says "Save game link please?"
I don't know how to do that ! Please give me the method.

Click on the little pencil thingy at the top and choose "save."  Then, look at the URL up above the browser window, and it should be this huge long thing, which you copy (select all, control/command A, then copy, control/command C), then paste it in here!

(Yes, this is a horrible kludge.  It'll get better.)

Maybe you could have a "Copy URL to clipboard" option when saving. But that'll mean you have to use something like ZeroClipboard.

Offline

 

#4769 2012-03-07 04:10:18

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

Re: BYOB 3 - Discussion Thread

@bharvey

(Yes, this is a horrible kludge.  It'll get better.)
http://www.xleroy.net/ByobTuto/New/Thumbnails.html

Follow the link above, which displays 3 sceen copies.
Click on the first screen.
Then click on Download.
This zip file contains 1 - hitarget.txt which is copy of the project link, 2 - copy of the htm pages given by Chrome Save.

Offline

 

#4770 2012-03-07 11:37:44

Jutros
New Scratcher
Registered: 2011-01-24
Posts: 7

Re: BYOB 3 - Discussion Thread

I'm still looking for a way to save projects outside of cookies, and the discussions here gave me an idea.

I create a new file in Libre Office, name it MySnapProjects and save the URL of the project into it.

To open the project, I copy the URL back into my browser. It works ... in a way... The yellow and blue blocks I used transfer just fine, the project is runnable, but I get red "obsolete" blocks for "change ghost effect" and "clear graphic effects".

This is not because of copying to and from Libre Office, because exactly the same thing happens when using Notepad++.

I have not done any further testing, maybe there are more blocks for whom this method doesn't work (yet).

I would not mind having to use a text document for saving, actually I think it is a lot better / safer / more convenient than having my projects buried under a heap of cookies from websites all over the net. It would really be nice if it worked.

-- Jutros

Offline

 

#4771 2012-03-07 14:42:24

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

Re: BYOB 3 - Discussion Thread

@Jutros

You can actually just bookmark the URL (with the hash part) in your browser, and access your projects as bookmarks. The red "obsolete!" blocks you see are probably the result of the blocks dictionary not being updated properly, that should be fixed.


nXIII

Offline

 

#4772 2012-03-08 06:22:08

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

Re: BYOB 3 - Discussion Thread

xly wrote:

@bharvey

(Yes, this is a horrible kludge.  It'll get better.)
http://www.xleroy.net/ByobTuto/New/Thumbnails.html

I've proceeded to some cleaning of Chrome and all my Sanp! projects are lost. I've saved the *.htm definition of two of them ! I've tried to reload them by reading this *.htm, without success.

Offline

 

#4773 2012-03-08 06:50:22

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: BYOB 3 - Discussion Thread

I was able to create a (round (number) ) block for Snap.

I realized Snap has no round block, so I made it myself.

Who wants it?

Offline

 

#4774 2012-03-08 08:23:25

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

Re: BYOB 3 - Discussion Thread

Is it like this:
http://www.imgpaste.com/XIkR.png


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

Offline

 

#4775 2012-03-08 13:39:33

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

nXIII wrote:

Since it's really just a convenience for constructing a list and immediately passing it as an argument

This is true from an implementor's standpoint, but not necessarily from a user's standpoint.  I really like your picture for the case of CALL because of the "with inputs" in its name, but think about a case like SCRIPT VARIABLES.  The distinction between one variable name (which would have arrows after it) and a list of names of variables (which wouldn't) would be seriously non-obvious.  That's the most extreme example, but even for JOIN WORDS, say, it wouldn't be obvious whether an expression is providing one word or a list of words.

well script variables is a varadic [b]upvar[b/] not a varadic [b]input[b/]


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

Board footer