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

#4051 2011-11-16 10:00:32

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

MathWizz wrote:

What kind of save format will you use? BYOB's' format or a new format just for Snap! ?

It'll be similar to Scratch 2.0, probably JSON based. But we'll also provide ways to read and convert old projects.

Ah, I say that because I am working on a JavaScript Scratch player that can read .sb files. The thread is here. Is there any advantage of the JSON format?


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#4052 2011-11-16 10:12:18

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

Re: BYOB 3 - Discussion Thread

@ Jens
"optimizing list watchers in the past days (err, nights  smile  )."
I imagine that these watchers with kind of russian dolls , boxes in boxes in boxes + sliders + format changes + were a nightmare for you. But the result is very impressive to me. Your Snap! is very quiet, stable, the script area, even very crowded like in my example works finely. May I understand that having succeeded to overcome a very difficult task, now everything will be simple,  smooth and straightforward ? (I'm kidding of course )

Offline

 

#4053 2011-11-16 10:47:35

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

Re: BYOB 3 - Discussion Thread

@Jens
Arrggghhhhh !§§?!!§§?? I wanted to test the conversion of the Snap! shape relative path to x/y coordinates. A good test as it is horribly long with Byob. I have used the "Make a variable" instruction to create a, new global  variable "coord"...and Snap! hardly blocked without any possibility to unblock it ! The crash comes just after having filled the input box with the name, before clicking on OK. I have already had this same bug several times before ! The square box for Var Name entry keeps white. I've made a screen copy, but not very useful.
Good luck !

Offline

 

#4054 2011-11-16 10:53:04

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

Re: BYOB 3 - Discussion Thread

@ Jens
I've also saved the nasciturus_fichiers files if it can help you.

Offline

 

#4055 2011-11-16 10:59:44

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

Re: BYOB 3 - Discussion Thread

Hmm, so it crashed when it tries to display the variable name input box? Which browser are you using? Oh, and as I'm updating the page frequently it's usually a good idea to empty the browser cache before starting a "project", because otherwise some modules may have wrong versions (this often happens to me...).


Jens Mönig

Offline

 

#4056 2011-11-16 11:41:33

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

Re: BYOB 3 - Discussion Thread

@Jens
It crashes just after having filled the input box with the new var name, and before clicking on OK. I am currently using last Firefox 9 Update named Aurora. It could be the guilty !
(How can I empty the browser cache with Firefox ?

Offline

 

#4057 2011-11-16 11:50:53

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: BYOB 3 - Discussion Thread

MathWizz wrote:

Is there any advantage of the JSON format?


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#4058 2011-11-16 12:03:40

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

Re: BYOB 3 - Discussion Thread

@ xly: Shift-click on "refresh" empties the browser cache for Firefox. I've never experienced this crash myself, could you perhaps install Firebug and keep the error console open while doing what you do? Maybe that'll give us a hint what's happening.

@ MathWizz: JSON is a fairly standard format that's easy to use, Besides we're following Scratch's example


Jens Mönig

Offline

 

#4059 2011-11-16 12:19:16

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

@ MathWizz: JSON is a fairly standard format that's easy to use, Besides we're following Scratch's example

What I don't understand is that Scratch 2.0's format is still binary and JSON is "easy for humans to read and write."
?


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#4060 2011-11-16 12:27:43

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: BYOB 3 - Discussion Thread

MathWizz wrote:

Jens wrote:

@ MathWizz: JSON is a fairly standard format that's easy to use, Besides we're following Scratch's example

What I don't understand is that Scratch 2.0's format is still binary and JSON is "easy for humans to read and write."
?

From what i have seen :
Binary is easy for computers and saves space  tongue  also scratch requires to compress audio and sound for playin the project in runtime now it compresses this all in 1 small package  tongue  so that it can simply open and execute it ,

JSON is mostly a differnt thing then SCRATCH's file format  tongue  there is no way to save a media file in JSON (the only way is to use the web-Audio API by Google or MozAudio by Mozzilla and make sound in realtime via parsing a huge thread in JSON which will increase ur pagesize heavily)

What i suggest is to use something which is called SERVER SIDE JAVASCRIPT[Like Node.js] for the server side to process and send files to client .

Benifit ?
It can open a .sb file via using low level API as if it was C++ , Parse ur file write different files or streams of ur media and code and send it to the client  tongue 


If u dont want to learn NODE php can do the same thing but the Optimization would be low , further as Node.js and Ur client will both work on JavaScript u can pretty much combine them  tongue  (u wont have to pack it from one language and open it in something else)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#4061 2011-11-16 12:30:43

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: BYOB 3 - Discussion Thread

fanofcena wrote:

Benifit ?
It can open a .sb file via using low level API as if it was C++ , Parse ur file write different files or streams of ur media and code and send it to the client  tongue 


If u dont want to learn NODE php can do the same thing but the Optimization would be low , further as Node.js and Ur client will both work on JavaScript u can pretty much combine them  tongue  (u wont have to pack it from one language and open it in something else)

http://jsscratch.site50.net/viewer/ <- Completely JavaScript.


http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

#4062 2011-11-16 12:37:24

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

Re: BYOB 3 - Discussion Thread

@xly, works for me, ff7  hmm

edit: tried disabling add-ons?

Last edited by roijac (2011-11-16 12:38:03)

Offline

 

#4063 2011-11-16 12:38:57

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

Re: BYOB 3 - Discussion Thread

Don't get too excited about file formats. We're just going to make it work.  smile   And no, Scratch 2.0 doesn't use binary, they're switching to JSON, too.

JS-Scratch looks very interesting (I see Morphic.js in the sources there, and some interesting extensions), but it really just shows the Flash player, right? JS doesn't seem to get used at all.


Jens Mönig

Offline

 

#4064 2011-11-16 12:48:17

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

Re: BYOB 3 - Discussion Thread

MathWizz wrote:

What I don't understand is that Scratch 2.0's format is still binary and JSON is "easy for humans to read and write."
?

As I understand it, the Scratch 2.0 save format will be a zip file in which media (e.g. sounds) are in their usual binary format, but the project itself -- the scripts, in other words -- are in human-readable JSON.


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

Offline

 

#4065 2011-11-16 13:45:28

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

MathWizz wrote:

What I don't understand is that Scratch 2.0's format is still binary and JSON is "easy for humans to read and write."
?

As I understand it, the Scratch 2.0 save format will be a zip file in which media (e.g. sounds) are in their usual binary format, but the project itself -- the scripts, in other words -- are in human-readable JSON.

THAT'S why I get gibberish when I open an .sb2 file.  big_smile


http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

#4066 2011-11-16 19:03:12

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

Re: BYOB 3 - Discussion Thread

@Jens
I've worked extensively yesterday with no problem as you can chech with the 3 uploaded applications. But today the system was totally instable, whichever the browser used. Many crashes occurred when trying to Make a new variable.
In addition I've made a test, by filling with random numbers a list of coordinates. It's quite impossible to get 100 items. At this number the system becomes very sensible. For example I can't display the list box (it is hidden during the filing step).
Good luck !

Offline

 

#4067 2011-11-16 19:14:45

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

Re: BYOB 3 - Discussion Thread

Hi Xavier,
last night's version did indeed have an occasional bug in the list box rendering mechanism which I, too, discovered tonight when I was playing with list watchers on lists of a hundred items. I've now found and fixed this problem and for the last hours continuously pumped up to a thousand items into watched lists and removed / reshuffled them without having the browser crash on me once. This makes me fell confident that I've indeed found and and fixed the issue that was causing your crashes. Thanks again for your invaluable testing and problem reports. I really appreciate your help!


Jens Mönig

Offline

 

#4068 2011-11-16 23:46:49

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

MathWizz wrote:

What I don't understand is that Scratch 2.0's format is still binary and JSON is "easy for humans to read and write."
?

As I understand it, the Scratch 2.0 save format will be a zip file in which media (e.g. sounds) are in their usual binary format, but the project itself -- the scripts, in other words -- are in human-readable JSON.

well in that case i might make a compiler in C for scratch programs


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#4069 2011-11-17 01:04:39

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: BYOB 3 - Discussion Thread

MathWizz wrote:

fanofcena wrote:

Benifit ?
It can open a .sb file via using low level API as if it was C++ , Parse ur file write different files or streams of ur media and code and send it to the client  tongue 


If u dont want to learn NODE php can do the same thing but the Optimization would be low , further as Node.js and Ur client will both work on JavaScript u can pretty much combine them  tongue  (u wont have to pack it from one language and open it in something else)

http://jsscratch.site50.net/viewer/ <- Completely JavaScript.

<object height="387" width="483" data="PlayerOnly.swf" type="application/x-shockwave-flash"><param value="sameDomain" name="allowScriptAccess"><param value="true" name="allowFullScreen"><param value="project=getproject.php?project=./projects/Hello World.sb" name="flashvars"></object>

Why is there flash ?? (just wondering) a complete JS page dosnt has any flash (ATALL)

error:[SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048"]
projec...orld.sb
error:[SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048"]
projec...orld.sb
error:[SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048"]


also it threw a bunch of this

Last edited by fanofcena (2011-11-17 01:05:47)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#4070 2011-11-17 01:07:11

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: BYOB 3 - Discussion Thread

MathWizz wrote:

bharvey wrote:

MathWizz wrote:

What I don't understand is that Scratch 2.0's format is still binary and JSON is "easy for humans to read and write."
?

As I understand it, the Scratch 2.0 save format will be a zip file in which media (e.g. sounds) are in their usual binary format, but the project itself -- the scripts, in other words -- are in human-readable JSON.

THAT'S why I get gibberish when I open an .sb2 file.  big_smile

tongue


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#4071 2011-11-17 01:10:11

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

Don't get too excited about file formats. We're just going to make it work.  smile   And no, Scratch 2.0 doesn't use binary, they're switching to JSON, too.

JS-Scratch looks very interesting (I see Morphic.js in the sources there, and some interesting extensions), but it really just shows the Flash player, right? JS doesn't seem to get used at all.

i am also forking your morphic.js :3 but not using canvas , rather going the HTML 5 side (div div and more div and SVG/VML for pen with some experimental features like socket connection of server and client protocols its in very very early alpha a public version will be uploaded soon ^^.

Here is a small idea of features init

1. Allows to use database via server side scripting
2. Programmer can write a server side version of program (keeping in mind it wont have any graphics) [only 10% of what i want is implemented basically cause it requires thinking on how to make it more readable]
3. Uses Div's and CSS for layout

Oh by the way jens , i need ur advice for second point,

Shall i remove the need of 2 files to be written totally ?
i mean something like blocks saying
[BroadCast to ALL connected]
might just do the required features  tongue  (Mesh idea)

Or is it worth to write a server side file ?
as it would be better and faster way of doing broadcast to all with some processing for all ^^

Last edited by fanofcena (2011-11-17 02:02:13)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#4072 2011-11-17 03:53:18

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

Re: BYOB 3 - Discussion Thread

@ Jens
OK its seems fixed. I have succeeded to fill a list of 500 randoms items very quickly , with its box hidden. When I tried to un-hide the list to see its content I had a severe crash

Offline

 

#4073 2011-11-17 04:13:23

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: BYOB 3 - Discussion Thread

xly wrote:

@ Jens
OK its seems fixed. I have succeeded to fill a list of 500 randoms items very quickly , with its box hidden. When I tried to un-hide the list to see its content I had a severe crash

did ur browser froze ? or did ur browser Crash ?

If thats browser froze then the canvas might trying to render the huge list .


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#4074 2011-11-17 04:14:07

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

Re: BYOB 3 - Discussion Thread

@Jens
Wonderful ! One can now fill a list of 500 items like a charm.
To display this list of 500 coordinates is very fast too ! Jens you are on the good path !!

http://www.xleroy.net/ByobTuto/New/Snap!/biglist.gif

Offline

 

#4075 2011-11-17 04:20:42

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

Re: BYOB 3 - Discussion Thread

@Jens The issue for long lists screen display is probably to show part of the list, 10 by 10 for example (anyhow this can be achieved  directly by the user with a couple of instructions )

Offline

 

Board footer