nXIII wrote:
inject <start> as <value ^> into <list> using values <v ^ ...> <reporter>
script variables <i>
set <value> to <start>
set <i> to <0>
repeat <length of <v> > [
change <i> by <1>
replace item <i> of <v> with <item <1> of <list> >
]
set <i> to <0>
repeat <<length of <list>> - <length of <v> > > [
change <i> by <1>
delete <1> of <v>
add <item <i> of <list> > to <v>
set <value> to <call <reporter> >
]
Hmm. First of all, I don't see why you'd ever want any number of variables other than two in this situation. But, more important, I don't understand the semantics of your feature. What exactly are the elements of V? Names of variables? Variable getter blocks? Values of variables? And you seem to be losing the variable names and replacing them with values from the list.
VARS {a} {b} {c} [
SET <a> TO 1
SET <b> TO 2
SET <c> TO 3
INSPECT CONTEXT
]
Is this piece of code supposed to be part of the debugger? A call to the debugger? And what are A, B, and C? Do they already exist, or are you creating them here?
P.S. How did you get consecutive close brokets not to incite the Scratch blocks misfeature without spaces between them?
Last edited by bharvey (2011-08-02 19:12:34)
Offline
Will there be an easier way to access the source code in future versions of BYOB? I would love that, because the elements editor is just not enough, and I can't get the workaround with the Preferences enableProgrammerFacilities thing to work
Offline
Sidharth wrote:
Will there be an easier way to access the source code in future versions of BYOB?
In the BYOB folder is a file called "BYOB Development" (with extension .sh or .bat depending on your OS). Just double-click it.
As from 4.0, the source code is Javascript and will be provided as plain text files.
Offline
bharvey wrote:
Sidharth wrote:
Will there be an easier way to access the source code in future versions of BYOB?
In the BYOB folder is a file called "BYOB Development" (with extension .sh or .bat depending on your OS). Just double-click it.
As from 4.0, the source code is Javascript and will be provided as plain text files.
Thanks! That really helps
Offline
Snap! update
Folks, as you know we've been pretty busy getting started with the next version of BYOB. It will be a complete re-write entirely in JavaScript and HTML5, and it will be renamed to "Snap!". I'm very pleased to announce that as of yesterday we have the beginnings of a very first experimental interactive version up and running in the web browser. Don't expect much, as of right now it's basically a bunch of simple blocks that can be applied to a single LOGO turtle-like sprite thing, not more than a proof of concept, really. But hey, we're finally starting to get something Scratch-like right in our web-browsers.
Here's a screenshot that'll take you to our "nasciturus" (=unborn, pre-pre-pre-alpha) prototype:
Enjoy!
Offline
Jens wrote:
Snap! update
Folks, as you know we've been pretty busy getting started with the next version of BYOB. It will be a complete re-write entirely in JavaScript and HTML5, and it will be renamed to "Snap!". I'm very pleased to announce that as of yesterday we have the beginnings of a very first experimental interactive version up and running in the web browser. Don't expect much, as of right now it's basically a bunch of simple blocks that can be applied to a single LOGO turtle-like sprite thing, not more than a proof of concept, really. But hey, we're finally starting to get something Scratch-like right in our web-browsers.
Here's a screenshot that'll take you to our "nasciturus" (=unborn, pre-pre-pre-alpha) prototype:
http://chirp.scratchr.org/dl/experiment … iturus.png
Enjoy!
...Wow! That looks awesome!
Offline
Cool!
Offline
i have another idea for first classness: first class pictures. there would be blocks like:
(picture of costume ())
((picture input) rotated () degrees cw)
(screen region of rectangle x:() y:() to x:() y:())
([colour picker] < (left and right arrows) > with width() and height())
((picture input) scaled by ())
|add costume (picture input) with name()at ()th in costume list|
|delete costume()|
|stamp (picture input)|
and there should also be first class colours with panther blocks and also a CYOB function
Last edited by joefarebrother (2011-08-11 07:06:17)
Offline
SO cool.
Offline
joefarebrother wrote:
i have another idea for first classness: first class pictures. there would be blocks like:
(picture of costume ())
((picture input) rotated () degrees cw)
...
We definitely plan on first class costumes, probably in 4.1. (No major new features in 4.0; it'll be all we can do to recreate the old features!) I'm not sure it's necessary to have another level of abstraction to distinguish a costume from its picture; I know that costumes have other attributes but still I'm leaning toward an interface in which a costume just is its picture, so ITEM (#) OF (costume) returns a row of pixels, and ITEM of that returns a single pixel. But maybe not; some days I think you should say
[[ATTRIBUTE (BITMAP)] OF (costume)]
Picture modification blocks such as your ROTATED example should be able to be written in Snap!! [The first one is part of its name. ] If you have access to the individual pixels, and if we make the evaluator fast enough, you can do all that sort of algorithm yourself, which is not only more elegant (we don't want the Snap! palette to look like the Photoshop palette) but more of a learning experience. (And of course people will publish libraries of such blocks.)
P.S. On the third hand, someday we should move to representing pictures as vectors and splines!
Last edited by bharvey (2011-08-11 15:01:20)
Offline
Jens wrote:
Snap! update
Folks, as you know we've been pretty busy getting started with the next version of BYOB. It will be a complete re-write entirely in JavaScript and HTML5, and it will be renamed to "Snap!". I'm very pleased to announce that as of yesterday we have the beginnings of a very first experimental interactive version up and running in the web browser. Don't expect much, as of right now it's basically a bunch of simple blocks that can be applied to a single LOGO turtle-like sprite thing, not more than a proof of concept, really. But hey, we're finally starting to get something Scratch-like right in our web-browsers.
Here's a screenshot that'll take you to our "nasciturus" (=unborn, pre-pre-pre-alpha) prototype:
http://chirp.scratchr.org/dl/experiment … iturus.png
Enjoy!
Amazing.
So, when will hat blocks come?
Offline
@Jens
I'm starting to play with Snap.
It works finely. The blocks stick perfectly together.
One can start to play writing logo-like turtle applications.
For the time being you have succeeded to make the proof of YOUR concept.
At this stage the speed is roughly equivalent to Byob.
Good luck !!
Offline
roijac wrote:
a question-is there a way to store the block [say var] in the memory, so it will say what var is at the save time, and not at run time?
SAY-REMEMBERED (what-to-say)
REPORT [THE SCRIPT
SAY (what-to-say)]
To remember a value:
SET (sayer) TO [SAY-REMEMBERED (var)]
To say the remembered value:
RUN (sayer)
Was that what you wanted?
Offline
bharvey wrote:
roijac wrote:
a question-is there a way to store the block [say var] in the memory, so it will say what var is at the save time, and not at run time?
SAY-REMEMBERED (what-to-say)
REPORT [THE SCRIPT
SAY (what-to-say)]
To remember a value:
SET (sayer) TO [SAY-REMEMBERED (var)]
To say the remembered value:
RUN (sayer)
Was that what you wanted?
Thanks for the info, but this isn't what I meant to
I meant such a script:
it should say "Hello", and not "Don't say that"
Offline
roijac wrote:
I meant such a script:
Ah, I see what you want. But we carefully built THE BLOCK so that when you click on the right arrow it doesn't say THE BLOCK WITH INPUTS... but rather
THE BLOCK. INPUT NAMES: ...
The key word here is names. When you make a block, you don't say what values its inputs should have, just what their names are. They get values when you call the block. So, to provide an input value, you have to be calling something:
Then you can change the value of (say what) and it won't affect the remembered block, which you run with RUN (FOO).
Offline