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?
Offline
@ 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
@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
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...).
Offline
@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
@ 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
Offline
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."
?
Offline
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 also scratch requires to compress audio and sound for playin the project in runtime now it compresses this all in 1 small package so that it can simply open and execute it ,
JSON is mostly a differnt thing then SCRATCH's file format 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
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 (u wont have to pack it from one language and open it in something else)
Offline
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
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 (u wont have to pack it from one language and open it in something else)
http://jsscratch.site50.net/viewer/ <- Completely JavaScript.
Offline
Don't get too excited about file formats. We're just going to make it work. 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.
Offline
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.
Offline
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.
Offline
@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
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!
Offline
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
Offline
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
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 (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)
Offline
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.
Offline
Jens wrote:
Don't get too excited about file formats. We're just going to make it work. 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 (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)
Offline
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 .
Offline