xly wrote:
I wonder if this would not be an issue linked to Chrome bufferization?
There is a known issue in Chrome about saving projects with lots of costumes. The problem, says Jens, has to do with overflowing some size limit when serializing. My tree project, with only two costumes, ends up at about 57K characters when serialized, most of which is the picture on the stage. That would explain why you can save it after deleting the picture. Maybe the limit is smaller in Windows than in MacOS?
@nXIII: The picture on the stage is always either the same image as a background or else the result of a series of vector (i.e. MOVE) commands, or maybe the latter superimposed on the former. Can/should we take advantage of that to avoid creating a separate bitmap for what's on the stage?
(Jens says this whole problem will go away when his server is ready.)
Offline
Could you use a compression algorithm for long urls?
Last edited by joefarebrother (2012-11-21 14:45:13)
Offline
joefarebrother wrote:
Could you use a compression algorithm for long urls?
I wouldn't want to compress the (relatively tiny) human-readable XML part. It's the embedded media (eg costumes) that should be compressed, individually. But aren't PNGs already compressed?
Offline
MathWizz wrote:
I had to look up "FTW," which meant something very different in my day. But without having seen the beginning of the conversation, I can't tell if your sig is meant sarcastically or not. Especially since it didn't appear until after the election.
Offline
henley wrote:
Although, FTW could always mean "For The Win", which is what I was taught it meant.
I'm assuming that's what it does mean, but that still doesn't settle whether it's meant sarcastically. (Although on second thought, given that the election is over, and there's no way the Republicans will nominate Romney again, I guess it has to be.)
I understand the six-years-no-repeat part, but why the two presidents? Is NAFTA, for example, domestic or foreign policy?
EDIT: Nobody is going to understand this conversation after you two change your sigs.
Last edited by bharvey (2012-11-21 17:44:45)
Offline
@bharvey & Jens
If I consider the size of my "hundred" byob (ypr extension) projects, the size 98% of them is under 3 000 000 b, the size of a "standard" digital picture of today.
One project can be much larger if it includes media files like audio mp3 for example.
Is the size of a Snap! project very different from its equivalent Byob ? (I shall check that) ?
We could have projects with large data files (3d volumes coordinates for example) which stay embedded inside the Snap! project code.. In such situation the size of the project can be very large.
Question 3 : Including large media files (audio or video) should not prevent saving of a Snap!
Offline
xly wrote:
Is the size of a Snap! project very different from its equivalent Byob?
They should be comparable. I'm not sure how efficiently each format compresses media files, but we should do a good job of that.
Question 3 : Including large media files (audio or video) should not prevent saving of a Snap!
That's not a question.
Right, Jens says he's going to invent a format that allows saving the media separately. Especially if you're using library costumes (e.g., Alonzo!) there's no reason to save that in your project.
All of this saving business is working around the limitations of localstore. Once we have the server going, life will be perfect. Well, closer anyway.
Offline
MathWizz wrote:
@about my sig - I put that there before the election, but since I have been using custom CSS with these forums, I haven't seen a signature for a few months now. I forgot I had one.
![]()
Ah, so it isn't meant sarcastically? Pity. (<- meant with the utmost of respect and politeness, of course!)
EDIT: Wait, I swear I've seen posts by you since the election but with a different sig. Am I getting senile?
Last edited by bharvey (2012-11-21 20:10:40)
Offline
hello snap dragons
I have been admiring Snap recently, and would be fascinated to hear any comments on the following
1. Is Snap more like...
a) A scheme-ish interpreter/evaluator implemented on top of javascript.
or
b) A translator of scheme-ish constructs to javascript?
2. I suspect that old-fashioned text coding is very like black and white photography (has its strengths but why would you bother these days unless you were an artist or a wanna-be artist) but...
Do snap cognoscenti secretly whip up blocks in some secret text based syntax -just to save their mouse-hands of course. I was wondering what such a language might look like (esp cw scheme) if it existed or if you imagine it. [I note the instructions on scratchblocks below where I am typing -would it simply be like that??]
any comments appreciated
-kiwi29
Dad, code-artist-wannabe, occasional lay-teacher
BTW: Just a comment: The BYOB 3 tutorials work pretty well as audio only (for me anyway). Its fun to listen to Brian's careful intonation -you can almost see the parenthesis :-)
Offline
kiwi29 wrote:
1. Is Snap more like...
a) A scheme-ish interpreter/evaluator implemented on top of javascript.
or
b) A translator of scheme-ish constructs to javascript?
It's (a), although we're thinking about (b) later, for efficiency -- but as with most compilers, the resulting JS code won't look anything like what a human JS programmer would write. (Mostly just procedure calls!)
2. I suspect that old-fashioned text coding is very like black and white photography (has its strengths but why would you bother these days unless you were an artist or a wanna-be artist) but...
Do snap cognoscenti secretly whip up blocks in some secret text based syntax -just to save their mouse-hands of course. I was wondering what such a language might look like (esp cw scheme) if it existed or if you imagine it. [I note the instructions on scratchblocks below where I am typing -would it simply be like that??]
You'll get different answers from me and from Jens. He's a tremendous blocks enthusiast, to the point that in BYOB he built a block notation for (the underlying) Smalltalk. I think that blocks are an amazingly brilliant idea for introducing people (not just kids) to programming, and I think that a beautiful software artifact such as treemap is even more beautiful in block form than in Scheme, but for serious programming I find text programming way faster and easier, partly because emacs can expand abbreviations for procedure names faster than I can switch between palettes, and even more because text is searchable! And blocks are just more bulky on the screen than text.
But by "text programming" I mean in a text-based language, not in some secret keyboard version of Snap!.
But also, I still remember, when BYOB3 was young, showing an experienced Scratcher a list of blocks and getting an instant gasp; she just got it without any explanation. You can't do that in text.
BTW: Just a comment: The BYOB 3 tutorials work pretty well as audio only (for me anyway). Its fun to listen to Brian's careful intonation -you can almost see the parenthesis :-)
Thanks! But, oh yeah, that reminds me, you can get your computer to read text out loud, and you can learn to be able to type text without seeing the keyboard, but I don't have a clue where to begin making blocks programming accessible to blind people.
Last edited by bharvey (2012-11-22 01:47:48)
Offline
@bharvey says "Right, Jens says he's going to invent a format that allows saving the media separately"
I was just going to mention the example of Processing language where media file are stored separetely in one "data" directory.
Offline
Where is the make list button?
Offline
@bharvey & kiwi29
The beauty of drag-and-drop is that you get rid of typing errors. When writing one Processing program for example , I spend most of my time to correct typing errors (brackets, parenthesis, double commas etc). With Byob/Snap! you get rid of typing errors programs, variable types and/or compiler blocking and throwing insane error message. Programming with Snap! is like a charm. You need just to concentrate on "logical" aspects of your application. Put altogether I'm not sure that programming a complex application with the drag-and-drop paradigm takes a longer time than with "hand-typed" languages.
The disadvantages of Snap! for the time being is that it is not YET opened to external Javascript libraries, and then we will have to go typing again.
Snap! audience aimed at is probably not the experimented high level programmer typing as quickly as he speaks.
Offline
bharvey wrote:
jji7skyline wrote:
Where is the make list button?
Gone! Use "make a variable" and assign it a list value.
So variables act a lists? Could you please explain how this would work?
Offline
jji7skyline wrote:
bharvey wrote:
jji7skyline wrote:
Where is the make list button?
Gone! Use "make a variable" and assign it a list value.
So variables act a lists? Could you please explain how this would work?
Something like this, I believe:
set [my list v] to <list [apples] [pears] [oranges]> add [thing] to (my list) delete (1 v) of (my list) insert [thing] at (1 v) of (my list) replace item (1 v) of (my list) with [some other thing][source]
add (my list) to (my list)
Last edited by blob8108 (2012-11-22 07:15:29)
Offline
Maybe you could make a "scheme -> snap!" compiler? There could be an "import scheme code" button that automatically defines blocks from scheme code. Maybe even "export to scheme" so you could use it with other scheme applications?
Offline
blob8108 wrote:
EDIT: this is rather interesting...
add (my list) to (my list)
Circular lists work perfectly well:
... provided you have the variable watcher checkbox unchecked. (@Jens: This should work! It should look like the serialization for saving.)
Circular lists are, in fact, sometimes really useful. Example: In writing a Scheme (or Snap!) interpreter, you need a data structure called an environment that keeps track of variables in the current scope. The value of a variable can be a custom block (made with lambda, say). But the block itself is a data structure that remembers not only the text of the block but also the environment in which it was created (so that it has access to the local variables of the enclosing block). This is a circularity: the environment points to the block, and the block points to the environment.
Offline
joefarebrother wrote:
Maybe you could make a "scheme -> snap!" compiler? There could be an "import scheme code" button that automatically defines blocks from scheme code. Maybe even "export to scheme" so you could use it with other scheme applications?
In one sense, the translation would be trivial. Although the surface notations are different, the internal representation of a Scheme program is basically the same as the internal representation of a Snap! program. And it would work pretty straightforwardly as long as you restrict yourself to writing reporters that don't lean on the user interface much.
But a practical Snap! program does rely heavily on the Morphic infrastructure. And a practical Scheme program is likely to use text interaction (more than the one-liner ASK AND WAIT), or macros, or data files, or something that isn't part of the Snap! runtime environment. So it would be more a pedagogic tool than a practical feature.
But, hey, at least we have call⁄cc!
Offline
bharvey wrote:
blob8108 wrote:
EDIT: this is rather interesting...
add (my list) to (my list)Circular lists work perfectly well:
http://snap.berkeley.edu/circular.png
... provided you have the variable watcher checkbox unchecked.
Yes, that was my mistake. Can't the watcher somehow detect the recursion and, uh, not recurse?
Offline
bharvey wrote:
joefarebrother wrote:
Maybe you could make a "scheme -> snap!" compiler? There could be an "import scheme code" button that automatically defines blocks from scheme code. Maybe even "export to scheme" so you could use it with other scheme applications?
In one sense, the translation would be trivial...
You could have a text representation as discussed above — perhaps something more like the scratchblocks syntax? It would be nice to be able to switch between the two, perhaps. (People have asked for this at least for Scratch many times, I know...)
Offline