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

#4826 2012-03-17 06:25:22

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

Re: BYOB 3 - Discussion Thread

what did you try to save, an empty custom block?


Jens Mönig

Offline

 

#4827 2012-03-17 06:53:01

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

Re: BYOB 3 - Discussion Thread

COSTUMES

SOUNDS

AWESOME

Now if only it worked.  tongue  Really excited, Jens, keep it up!


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

Offline

 

#4828 2012-03-17 07:03:47

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

Re: BYOB 3 - Discussion Thread

@bharvey
"They use this complicated system so that if a web page downloads a virus or other malware, the encryption will turn it into gibberish that can't harm your system, and you can't accidentally copy it to someplace else where it might make trouble.  "

You are correct. I suspected something like that.

I confirm that , as far as I am concerned, Copy the *htm file or the "complicated project link" does not work, neither with Chrome, nor Firefox.

Maybe the solution could be for Snap! to have an Import feature allowing to import into the Snap! Project list any project *.htm file (project sharing ). Probably that this is already in the pipeline.

Anyway in the meantime I've understood Chrome Downloads management and I've changed accordingly its parameters as to set up Chrome.exe and its Downloads folder onto a removable disk, as to save and "move" my Snap! projects (from one Pc to another)

Offline

 

#4829 2012-03-17 09:49:31

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

what did you try to save, an empty custom block?

yes, one of the custum blocks was empty. I pressed save again and it saved but i copied the xml into notepad and got this:

Code:

<project name="streams" version="1">
  <notes></notes>
  <thumbnail>
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAADKUlEQVR4Xu3XsU2jYRAE0J8+HBKQuBMSyF0DxbgHJwQkboTMkQM34jsscdKdLuF3MCvNc4j4vLszT0I8XH9/Fh8JhBJ4ADCUvLG3BAAEIZoAgNH4DQeQgWgCAEbjNxxABqIJABiN33AAGYgmAGA0fsMBZCCaAIDR+A0HkIFoAgBG4zccQAaiCQAYjd9wABmIJgBgNH7DAWQgmgCA0fgNB5CBaAIARuM3HEAGogkAGI3fcAAZiCYAYDR+wwFkIJoAgNH4DQeQgWgCAEbjNxxABqIJABiN33AAGYgmAGA0fsMBZCCaAIDR+A0HkIFoAgBG4zccQAaiCQAYjd9wABmIJgBgNH7DAWQgmgCA0fgNB5CBaAIARuM3HEAGogkAGI3fcAAZiCYAYDR+wwFkIJoAgNH4DQeQgWgCAEbjNxxABqIJABiN33AAGYgmAGA0fsMBZCCaAIDR+A0HkIFoAgDeEf/z8/Pt9fF4vONbup8CeEf/r6+vy/V6XT4+Pu74lu6nAN7R/8vLy+01gOtDBHBldpfLZXl7e7u93u/3y2azWflN3c8AXNn/drtdHh8fb6/P5/Py+fm58pu6nwG4sv/vP7/fz/0ZXhckgOtyWwBcGdw/zwBckeP7+/tyOBz+/PPxhXG32y1f/xX7/CwBAH+W1+23n56eltPp9NfL//1sxVfXPQGwrvJZBwM4q4+6bQCsq3zWwQDO6qNuGwDrKp91MICz+qjbBsC6ymcdDOCsPuq2AbCu8lkHAzirj7ptAKyrfNbBAM7qo24bAOsqn3UwgLP6qNsGwLrKZx0M4Kw+6rYBsK7yWQcDOKuPum0ArKt81sEAzuqjbhsA6yqfdTCAs/qo2wbAuspnHQzgrD7qtgGwrvJZBwM4q4+6bQCsq3zWwQDO6qNuGwDrKp91MICz+qjbBsC6ymcdDOCsPuq2AbCu8lkHAzirj7ptAKyrfNbBAM7qo24bAOsqn3UwgLP6qNsGwLrKZx0M4Kw+6rYBsK7yWQcDOKuPum0ArKt81sEAzuqjbhsA6yqfdTCAs/qo2wbAuspnHQzgrD7qtgGwrvJZBwM4q4+6bX4BUCoLt5Kt9+4AAAAASUVORK5CYII=
  </thumbnail>
  <stage costume="0" id="0">
    <variables>
      <ref id="1"></ref>
    </variables>
    <media></media>
    <blocks>
      <ref id="2"></ref>
    </blocks>
    <scripts>
      <ref id="3"></ref>
    </scripts>
    <sprites>
      <ref id="4"></ref>
    </sprites>
  </stage>
  <variables></variables>
</project>

Only a bunch of references to other objects which don't exist, and opening it gave me nothing but a blank stage.


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

 

#4830 2012-03-17 12:35:51

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

xly wrote:

Maybe the solution could be for Snap! to have an Import feature allowing to import into the Snap! Project list any project *.htm file (project sharing ). Probably that this is already in the pipeline.

As I understand it, if you go "Save page" in Firefox or Chrome, the resulting .htm file will not contain any of the project files, seeing as they're in localStorage and so stored with the rest of the browser's files.  smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#4831 2012-03-17 16:15:57

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

what about making a ff extension and ship snap! with firefox in some presentation mode or whatever, like the tor guys do?

Offline

 

#4832 2012-03-17 18:29:06

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

Re: BYOB 3 - Discussion Thread

joefarebrother wrote:

yes, one of the custum blocks was empty.

I promise, this will work before the official release.  I couldn't live without the IGNORE block!  smile


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

Offline

 

#4833 2012-03-17 18:32:37

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

Re: BYOB 3 - Discussion Thread

roijac wrote:

what about making a ff extension and ship snap! with firefox in some presentation mode or whatever, like the tor guys do?

Sounds like a huge download.  sad   But we have several ideas in the pipeline, including waiting for all the browsers to implement the HTML5 extension that allows storing to the real filesystem.  (Another is an upload-based solution... no details yet, but stay tuned.)


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

Offline

 

#4834 2012-03-18 04:26:32

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

actually not that huge - about 20-30mb  smile

Offline

 

#4835 2012-03-18 05:09:48

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

Re: BYOB 3 - Discussion Thread

Saving/Loading issues.

For the time being, using Chrome It is possible to Save/Reload/Carry projects using Download feature on a "removable folder". But Snap! *.htm files not saved directly by Chrome "Downloads" itself can't be reloaded any.
When one current project is saved by Chrome, when reloaded all the Snap! projects "registered" by Snap! are still available.
I've noticed that Chrome  owns one "chirp" cookie. What for ? I've noticed in the past that if you clean all Chrome cookies your Snap! projects are lost !!
I have no doubt that one reliable Save/Load/Import feature will be set up. It's nothing compared to what has already been achieved by Snap! (very small) team !

Offline

 

#4836 2012-03-18 11:30:46

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

Re: BYOB 3 - Discussion Thread

xly wrote:

I've noticed in the past that if you clean all Chrome cookies your Snap! projects are lost !!

When you tell your browser to clear cookies it also clears local storage,
which is considered just like a cookie but without the size limitation of cookies.

I don't think the chirp cookie has anything to do with Snap! projects.  You probably once left a comment on Jens's blog.


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

Offline

 

#4837 2012-03-19 06:58:56

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

Re: BYOB 3 - Discussion Thread

@bharvey
"When you tell your browser to clear cookies it also clears local storage,
which is considered just like a cookie but without the size limitation of cookies."

What I've understood and not understood !
I have a dozen of projects registered by Snap!. Then I create a simple new one with only one block, say "square". I save this project with Chrome. I get into Chrome Downloads folder one *htm page which gives the javascript transcription of this project only + js libraries.

Later on, still using Chrome I reload this square.htm page. The "square" project is immediately loaded ... OK . But surprisingly all other registered Snap! projects are still available. It means that each individual project htm page has a link to all Snap! existing projects !!

My question is : "Where and how does the browser store the js structure of all Snap projects ? "

Offline

 

#4838 2012-03-19 09:24:36

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

Re: BYOB 3 - Discussion Thread

Chrome - Project Management
Many Chrome Folder/files are related to Snap! See for example ..\Chrome\User Data\Default\Cache where you can find Jens JS libraries + one file dealing with Snap! projects.See also Loacal Storage, Last Tabs and many others ! It's a mess !!

Offline

 

#4839 2012-03-19 09:51:48

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Offline

 

#4840 2012-03-19 12:29:20

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

Re: BYOB 3 - Discussion Thread

xly wrote:

I save this project with Chrome. I get into Chrome Downloads folder one *htm page which gives the javascript transcription of this project only + js libraries.

No, there is no .htm page that contains the project.  There's just nasciturus.html which is the same for everyone.  The URL encodes your project.

All your projects are stored in Chrome's "local storage" which is, by design, not visible to you outside of the browser, or on any web page other than the one where you made it.


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

Offline

 

#4841 2012-03-19 12:37:24

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

Re: BYOB 3 - Discussion Thread

roijac wrote:

Hey guys, why not try to make the ST believe in first-class lists?

Ah, you think we haven't tried?  One problem is that it's not that useful a feature unless you also have custom reporters.  Another is that you have to deal with the possibility of circular data structures.


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

Offline

 

#4842 2012-03-19 14:42:29

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

One problem is that it's not that useful a feature unless you also have custom reporters.

I thought they were adding BYOB, weren't they?

bharvey wrote:

Another is that you have to deal with the possibility of circular data structures.

That's only true if you use references and not objects. If it automatically copies the the list when embedding it and only passes by reference as argument, (like BYOB/Snap! does...) it works just fine.

Offline

 

#4843 2012-03-19 16:48:31

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

Re: BYOB 3 - Discussion Thread

roijac wrote:

I thought they were adding BYOB, weren't they?

They are adding custom commands, not custom reporters.  They have a reason for this distinction, having to do with maintaining their concurrency model, which relies on bounded-time behavior of expressions.

If it automatically copies the the list when embedding it and only passes by reference as argument, (like BYOB/Snap! does...) it works just fine.

Your parenthetical comment isn't true.  Try making a BYOB list called FOO,
then say

ADD "thing" TO FOO
ADD (FOO) TO FOO

ITEM (1) OF (ITEM (2) OF (ITEM (2) OF (ITEM (2) OF (FOO))))

You'll get the answer "thing" because the second item of FOO is FOO itself, not a copy of it.  If it were a copy, the second ADD above would run forever.

But note that BYOB can't display FOO!  That would also run forever, unless we invented an explicit notation for circular pointers.

Last edited by bharvey (2012-03-19 16:49:33)


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

Offline

 

#4844 2012-03-19 16:58:35

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

If it were a copy, the second ADD above would run forever.

Not if it copies what is in foo into a list and then adds that to foo so foo would be
list(
  (thing)
  (list(
    (thing)
  )
)


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

 

#4845 2012-03-19 18:29:34

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

Re: BYOB 3 - Discussion Thread

joefarebrother wrote:

Not if it copies what is in foo into a list and then adds that to foo so foo would be
list( (thing) (list( (thing) ) )

But it's not just two levels deep!  You can say

ITEM (1) OF (ITEM (2) OF (ITEM (2) OF (ITEM (2) OF (ITEM (2) OF (ITEM (2) OF (ITEM (2) OF (ITEM (2) OF (ITEM (2) OF (ITEM (2) OF (FOO))))))))))

and you'll still get the (correct) answer "thing"!


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

Offline

 

#4846 2012-03-20 03:24:47

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

roijac wrote:

I thought they were adding BYOB, weren't they?

They are adding custom commands, not custom reporters.  They have a reason for this distinction, having to do with maintaining their concurrency model, which relies on bounded-time behavior of expressions.

If it automatically copies the the list when embedding it and only passes by reference as argument, (like BYOB/Snap! does...) it works just fine.

Your parenthetical comment isn't true.  Try making a BYOB list called FOO,
then say

ADD "thing" TO FOO
ADD (FOO) TO FOO

ITEM (1) OF (ITEM (2) OF (ITEM (2) OF (ITEM (2) OF (FOO))))

You'll get the answer "thing" because the second item of FOO is FOO itself, not a copy of it.  If it were a copy, the second ADD above would run forever.

But note that BYOB can't display FOO!  That would also run forever, unless we invented an explicit notation for circular pointers.

didn't actually notice it...
anyway, what's so bad about three dots?

edit: after some thinking, i think the most elegant solution is to make nested lists more explicit 'referenced': make the name of the list and a plus sign by the side, and make blocks like 'decollapse item %n of %list', so you can explicit see its referencing and not storing the list  smile
of course they are some garbage collecting problems, though  hmm

Last edited by roijac (2012-03-20 09:11:57)

Offline

 

#4847 2012-03-20 09:48:02

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

Re: BYOB 3 - Discussion Thread

Hey guys, check this out! It's a simple Scratch implementation which does use the DOM stuff for text boxes, etc. (I thought you might want to check it out considering your reluctance towards the local DOM widgets).

Also, I was thinking about making sounds first-class while you're at it. Suddenly you open the gates to blocks (reporters) like:

Code:

(rewind [sound])
(():() to ():() of [sound])
[play [sound]]
[play [sound] and wait]
[join [sound] [sound]]
(sound []) // sound dropdown from Sounds tab

The sound inserter could be like the Gobo (object), but a musical not on top of it.
Just a thought.

PS Excuse typos, please, I'm typing with one hand with a drink in the other.


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

Offline

 

#4848 2012-03-20 11:18:51

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

It's a simple Scratch implementation which does use the DOM stuff for text boxes, etc.

It's Jens who's reluctant to use the DOM, so I'll leave this part for him.

Also, I was thinking about making sounds first-class while you're at it.

Yes, of course, probably not in 4.0 but when we have first class costumes we'll have first class sounds too.

PS Excuse typos, please, I'm typing with one hand with a drink in the other.

Oh, no, someone who does think "BYOB" means "bring your own..."  smile


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

Offline

 

#4849 2012-03-20 12:06:50

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

PS Excuse typos, please, I'm typing with one hand with a drink in the other.

Oh, no, someone who does think "BYOB" means "bring your own..."  smile

xD

Offline

 

#4850 2012-03-20 12:13:03

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

ProgrammingFreak wrote:

bharvey wrote:

PS Excuse typos, please, I'm typing with one hand with a drink in the other.

Oh, no, someone who does think "BYOB" means "bring your own..."  smile

xD

xD

Offline

 

Board footer