OMG My conference is this coming week! Somehow I convinced myself it was the week after. I don't think we'll have the final 3.1 ready after all. Oh well, we can use 3.0 for the workshop and give them a sneak preview of 3.1 alpha.
P.S. Have a good vacation, Shadow!
Offline
Thanks! I'm having fun, but I'm still pretty disappointed I don't get to go to the conference.
Too bad about 3.1. However, Jens is a miracle worker when it comes to meeting (and beating) deadlines, so who knows?
Offline
bharvey wrote:
nXIII wrote:
I want a closure which can be called with a variable number of arguments and which knows the amount of arguments it was called with. The solution: a list of the arguments. This is not the same thing as an argument which is a list, which could be checked with an IF statement at the beginning of the closure.
I'm sorry, I'm short on sleep, maybe I'm being dense, but I don't see the distinction you're making. If the procedure can be called with a variable number of arguments, then either it has a variable number of formal parameters, which I can't envision at all, or else it has one formal parameter bound -- somehow -- to all the arguments. The easiest "somehow" I can see is to make a list of the arguments. You want to know how many there are? Call LENGTH on the list!
Also, are you using "closure" and "procedure" to mean two different things? I was brought up with the understanding that in a lexically scoped language a procedure is the closure of a lambda expression -- in other words, the procedure provides bindings for all the free variables in the lambda expression.
Sorry. I did mean formal parameters.
call (the script. Input names args [for each (args) [say ()]]) with inputs (list "foo "bar "baz)
vs.
call (the script [for each (inputs) [say ()]]) with inputs "foo "bar "baz
Last edited by nXIII (2011-03-05 11:12:29)
Offline
bharvey wrote:
nXIII wrote:
call (the script. Input names args [for each (args) [say ()]]) with inputs (list "foo "bar "baz)
Just use "with input list" instead of "with inputs"!
That's not the same thing, though.
Offline
bharvey wrote:
nXIII wrote:
call (the script. Input names args [for each (args) [say ()]]) with inputs (list "foo "bar "baz)
Just use "with input list" instead of "with inputs"!
I think what nXIII wants is the complete opposite of "with inputs list": to have the option to accept a single formal parameter that is a list of all the arguments passed to it, or to have a dedicated (arguments) reporter that returns a list of the arguments passed to the function that is currently being evaluated.
Offline
fullmoon wrote:
bharvey wrote:
nXIII wrote:
call (the script. Input names args [for each (args) [say ()]]) with inputs (list "foo "bar "baz)
Just use "with input list" instead of "with inputs"!
I think what nXIII wants is the complete opposite of "with inputs list": to have the option to accept a single formal parameter that is a list of all the arguments passed to it, or to have a dedicated (arguments) reporter that returns a list of the arguments passed to the function that is currently being evaluated.
The latter.
Offline
nXIII wrote:
fullmoon wrote:
or to have a dedicated (arguments) reporter that returns a list of the arguments passed to the function that is currently being evaluated.
The latter.
Then just use the multiple inputs option in the long input dialog!
I am so not getting what you two want that we don't already have.
Offline
bharvey wrote:
nXIII wrote:
fullmoon wrote:
or to have a dedicated (arguments) reporter that returns a list of the arguments passed to the function that is currently being evaluated.
The latter.
Then just use the multiple inputs option in the long input dialog!
I am so not getting what you two want that we don't already have.
I totally forgot about that feature...I was thinking in terms of THE SCRIPT, which doesn't share this capability. IMO the block editor provides this well enough that it shouldn't be an issue that you can't do it with anonymous functions.
Offline
fullmoon wrote:
I totally forgot about that feature...I was thinking in terms of THE SCRIPT, which doesn't share this capability.
Which is why, long ago, at the dawn of time, my first comment on this topic was
bharvey wrote:
IMHO what you really want is the ability to right-click an input name orange blob and have a "set type" option that opens the same dialog as the long form Block Editor input name/type one. Then you could just choose the multiple inputs option.
EDIT: Wouldn't it be cool if, when you drag a typed-input lambda into a RUN or CALL block, it automatically gave you a WITH INPUTS with the right input slot shapes?
Last edited by bharvey (2011-03-06 01:54:37)
Offline
bharvey wrote:
EDIT: Wouldn't it be cool if, when you drag a typed-input lambda into a RUN or CALL block, it automatically gave you a WITH INPUTS with the right input slot shapes?
Whoa, now we're talking. You know, we could actually do this!
Offline
Jens wrote:
Whoa, now we're talking. You know, we could actually do this!
Don't get too excited. Although very cool, it'd rarely be really useful, because when you drag an explicit lambda into a RUN or CALL it's because you're going to use an argument to the enclosing procedure as the argument to the RUN/CALL.
But the first half, the part about giving anonymous procedures access to the long form input dialog, is useful.
Offline
bharvey wrote:
nXIII wrote:
fullmoon wrote:
or to have a dedicated (arguments) reporter that returns a list of the arguments passed to the function that is currently being evaluated.
The latter.
Then just use the multiple inputs option in the long input dialog!
I am so not getting what you two want that we don't already have.
That is a single formal parameter which accepts a list. I want a local variable which contains a list of the arguments the function was called with.
Offline
nXIII wrote:
That is a single formal parameter which accepts a list. I want a local variable which contains a list of the arguments the function was called with.
It's a formal parameter bound to a list of all the arguments the function was called with. I don't see the difference.
Is it that you want also to have individual formal parameters for the individual arguments? If so, just set a variable to (LIST arg1 arg2 ... argn). But it sounds like you want a variadic function, and that's what "multiple inputs" gives you!
Offline
bharvey wrote:
nXIII wrote:
That is a single formal parameter which accepts a list. I want a local variable which contains a list of the arguments the function was called with.
It's a formal parameter bound to a list of all the arguments the function was called with. I don't see the difference.
Is it that you want also to have individual formal parameters for the individual arguments? If so, just set a variable to (LIST arg1 arg2 ... argn). But it sounds like you want a variadic function, and that's what "multiple inputs" gives you!
I think what is wanted is the insert is a list. Probably do THE BLOCK with the list inside, and CALL it in the block. That right?
Offline
Hi from Dallas! Here's today's 3.1 alpha release:
Jens wrote:
Tonight's build tries to improve navigation among sprites' children in the sprite corral (the area beneath the staged that's called "sprite library" in Scratch):
Right clicking on the stage icon pops up a menu with all non-cloned sprites in the project. Selecting one of these both selects it in the corral and pops up another menu with all of its children, if any. Clicking anywhere else (not on a menu item) just closes the menu.
Right clicking an a sprite icon in the corral now also gives you the same "children..." option (but only if the target sprite in fact has children) that you get when selecting a sprite from the stage icon's context menu in the corral.
Enjoy!
--Jens
Offline
ahmedb wrote:
can anyone make a block in which you can read or a write a file (.txt)
Someone would have to mess with the elements editor 4 that...
Offline
Today's alpha release and breakout.ypr:
Jens wrote:
Tonight's build speeds up yesterday's navigation feature. It also
significantly speeds up deleting objects through the DELETE block.
I'm attaching an updated version of the breakout.ypr example which now
actually deletes broken bricks rather than just hiding them. I also
revamped the example by throwing in a dose of dynamic value inheritance
imitating a class variable.
Enjoy!
--Jens
Offline
bharvey wrote:
Today's alpha release and breakout.ypr:
Wow, Jens just keeps delivering
Last edited by 14God (2011-03-10 13:45:55)
Offline
I'm so frustrated! I've been wanting to run the latest BYOB dev releases, but I kind of limited in the fact that I'm now running Ubuntu. Windows was giving me huge problems, so I wiped the computer, intending to reinstall 7. Unfortunately, the installer wouldn't work. So I got stuck with Ubuntu (not that it's all THAT bad).
I'm running the 64-bit version, however. And that means an alternate Scratch version which means NO Scratch image to replace!
Oh well.
Offline
I like the new object insert!
Offline
Taneb wrote:
If you go to the Add/Remove Software thing and search for Squeak, you can use that to open the image.
Works like a charm. Thanks!
EDIT: Except presentation mode doesn't work.
Last edited by shadow_7283 (2011-03-12 21:24:39)
Offline