bharvey wrote:
Don't be speechless. You're fantastic. You've taken the BYOB ideas to heart faster and more deeply than anyone else, especially the OOP parts, and you're listed as "main programmer" on the Panther wiki to boot.
Wait, no, now I'm even more speechless!
new glitch:
EDIT: I would love if you could do this...
Last edited by nXIII (2010-05-05 18:34:10)
Offline
nXIII wrote:
Okay, Jens, explain again about how a block is really just a script.
There's some sense in which a block is reducible to a script, but pedagogically that block and that script are very different things.
I would love if you could do this...
Whoa, what do you want it to do? The AND block takes Boolean inputs (those grey hexagons, a bad choice of color I guess since grey in other contexts means procedures -- I think we could just make them white, but Jens wants to emphasize that you can't type text into them, and I see his point), and you're giving it Predicate inputs. Did you want the result of all this to be a procedure with four inputs? Of course you can build such a procedure by wrapping a THE BLOCK around the whole thing with four named parameters.
Offline
Hey, that's not a glitch, that's an optimization
(I know Brian insists it's a kludge, but it's elegant, because this lets us get away with a single apply/eval method for everything)
So, you'd like to assemble scripts programmatically. Cool idea! But in your example why not just use the normal inputs?
Offline
Jens wrote:
Hey, that's not a glitch, that's an optimization
(I know Brian insists it's a kludge, but it's elegant, because this lets us get away with a single apply/eval method for everything)
It's not elegant if the users don't understand it. And in this case it made the result longer than it should be, namely, just a grey-bordered THE SCRIPT.
Offline
SWITCH
I've tested this feature.
For a bug see my :
http://www.xleroy.net/Byop/Thumbnails.html
I'm not too satisfied with this feature : you have to fight with the case greyed or not, it takes a large space on the desk (*) , and it can be easily workarounded by a list of IF THEN or/and a list of c-shape commands embedded into a list of commands as I've experimented it in my Robot (see at the same address).
(*) it is not anymore the case when the SWITCH+CASE command is embedded into one Function + some parameters to pass.
The same comment applies the Counter method (page 19 of tutorial) that I've replaced by a LIST of 3 items, two for the 2 methods, and one to store the counter. ( see XL-ByobMet-parab3.html) in the above mentioned thumbnails.
Anyway the switch example has given me the opportunity to learn how to use ASK and ANSWER commands.
Thanks for all !
Offline
bharvey wrote:
nXIII wrote:
I would love if you could do this...
Whoa, what do you want it to do? The AND block takes Boolean inputs (those grey hexagons, a bad choice of color I guess since grey in other contexts means procedures -- I think we could just make them white, but Jens wants to emphasize that you can't type text into them, and I see his point), and you're giving it Predicate inputs. Did you want the result of all this to be a procedure with four inputs? Of course you can build such a procedure by wrapping a THE BLOCK around the whole thing with four named parameters.
Well, that was just wishful thinking... I know how to do it with a stack, and I will make a simple Scratch in BYOB 3!
Offline
Offline
New tool sprite v. 1.2 at http://byob.berkeley.edu with SWITCH!
(Use the sprite, not the project, for now, because 006 doesn't seem to like to import .ypr projects, although it opens them fine.)
Offline
Xavier, I'm sorry that you're encountering what seems to be a compatibility issue with a previous BYOB version. I'd really like to investigate this, is there any chance you could post the project that causes this problem to a website so I can download it, or send it to me: jens at moenig dot org ? Thanks!
Offline
To Jens :BYOP.2.99.006 Bug report
Curiously when I load my last file, at 50% of the intialization process, it blocks with the message as given in the path.
But if I push the error window outside of BYOP window, it can work as usual.
It seems that it is more a question of bad message than bad loading.
Please find my application to :
www.xleroy.net/Byop/Project/XL6ByopMet2.sb
In the meantime I've tested the switch function. Now; it works, but I have still from time to time error windows, but not blocking once I close the error window.
We'll see that more in detail later.
Offline
To JM an BH :
I've discovered Scratch 2 weeks ago, and Byop one week later.
Please find my (definitive) comments :
Scratch is an extraordinary programming tool, I would say programming GAME.
For me it is largely similar to the 35 years old Logo (turtle, basic commands, double graphic&command window, graphic applications).
The brilliant idea of Logo inventors was to add a graphics layer to a comprehensive and high-level programming language, Lisp, which is a smart incentive to push kids to develop their own creativity and applications, WHILE learning the basic principles of algorithms, geometry, algebra, physics,etc
The same remark applies to Scratch, which brings upon the Logo layer, 3 major improvements, simple, but efficient to increase its attractivity and efficiency.
1 - the pick-and-stick style
2 - the multi features (window, sprite, costume)
3 - the reliability much higher than Logo whose "infinite loop and garbage collecting" was far from being safe.
Byop extension brings back into Scratch what was left back like functions and lists features, block editor, customized functions, methods etc
In the meantime, you prove the movement by walking !
Offline
nXIII wrote:
Jens wrote:
Hey, that's not a glitch, that's an optimization
No, actually, even given your (strange) theory about uglification of blocks, this is a glitch. Your theory is that
THE [FOO] BLOCK
is equivalent to
THE SCRIPT[REPORT[FOO]]
but that doesn't make sense if you don't have that outer THE SCRIPT there. And there is no THE BLOCK in the desired output anyway! Consider:
THE [ROUND <>] BLOCK -> [ROUND <>] with grey border
THE [THE <> BLOCK] BLOCK -> [THE <> BLOCK] with grey border
THE [THE SCRIPT] BLOCK ->should-> [THE SCRIPT] with grey border.
Offline
Block Editor bug !!
Very often I've the bug message "A block with that label already exists"
The circumstances are :
I open one block to create a new function , add some instructions, and for any reason (retrieve somewhere useful instructions), I close it with OK to keep this first project.
Later on , I can start to edit this function,but if I want to add a new variable I've this message, then it is impossible to add any instructions. OK I close it. I decide to delete it to create a new one with the same name. Then the Block Editor ...blocks, giving I allways the same message.
So, It is impossible to recreate a new function with the same name after having create one which is corrupted !
My problem was that I intended to create a serie of 9 similar functions ldir1, dir2, ....dir9. I was blocked at the 9th. I don't want to delete the first 8th, in order to re-create 9 new functions with a different prefix !
My idea was to test the functionality existing in Logo, allowing to call a function whose name is created inside a function, depending of the context, for example :
if i=2 run function dir2...and so one.
I wanted to explore this feature which is probably explained in the tutorial (but I'm still blocked by my limits to understand such high-level topic written in english language..I've to learn by experience ...)
Offline
I am trying to make an E shaped block in which if a certain script is performed, another script is performed.
I can't figure out how to make it read if the script is performed.
Here is a mock-up image with an unscripted block that demonstrates a use for it:
Offline
Jens wrote:
Hey dav09, I'm curious which advanced mesh functions you'd be interested in. Is there anything special you'd like to do that requires mesh?
Hey Jens, i know its build your own blocks, but there are other blocks in byob
I suggest blocks such as:
[Join mesh ip()]
[Stop hosting mesh] stop hosting mesh connection
[Transfer[]to ip] this is to transfer/ share sprite
[All mesh users start] auto click the green flag for all connected
[set user() to broadscast] very advanced, it means only leave user 1 or whatever broadcast it
[if host lost set host to()] if the host quits the games still continues
Thanks for listening, i think these would be hard to program but great if they were added
others might have better ideas!
Offline
i like dav09's ideas, in an ideal world it would be great if mesh worked without having to type in an ip address and instead their were lobbies to join.
Offline
soupoftomato wrote:
I am trying to make an E shaped block in which if a certain script is performed, another script is performed.
I can't figure out how to make it read if the script is performed.
Here is a mock-up image with an unscripted block that demonstrates a use for it:
http://img16.imageshack.us/img16/8052/b … perfor.gif
that's pretty much an if block. why not make it so that it says
if (blank) happens then
and then it would perform it here. you could make the blank accept blocks our groups of blocks.
Offline
PlayWithFire wrote:
soupoftomato wrote:
I am trying to make an E shaped block in which if a certain script is performed, another script is performed.
I can't figure out how to make it read if the script is performed.
Here is a mock-up image with an unscripted block that demonstrates a use for it:
http://img16.imageshack.us/img16/8052/b … perfor.gifthat's pretty much an if block. why not make it so that it says
if (blank) happens then
and then it would perform it here. you could make the blank accept blocks our groups of blocks.
Easy from making the block point of view, but I want it to be easy from using the block point of view.
Offline
to my knowledge i'm not sure if it is possible to make it so that it detects what's within the block. your going to have to ask someone who knows more about the program.
Offline
soupoftomato wrote:
I am trying to make an E shaped block in which if a certain script is performed, another script is performed.
I'm not sure I understand exactly what you want. You mean, if some other script does a pen down, you want this script notified? And you want it also to work for multi-block scripts, so I could say "if some script puts the pen down, sets the pen color to green, and draws a square, then do this"?
That would make everything soooo slow! Any time any script does anything, it would have to check whether what it's doing -- or just a subset of what it's doing! -- matches a request by some user of your block.
Why can't you solve the problem by making a block MY-PEN-DOWN that does PEN DOWN and then does BROADCAST <pendown>?
Offline
This mod is <font size="eleventyseven">ABSOLUTELY AMAZING!</font> I love being able to use anonymous functions, I love the input lists with the arrows, and the new BYOB palette is beautiful. This is everything Scratch should be and more. I've been playing with this for a while, and I wrote an library for hash functionality. It's super slow, but I get the feeling that's my fault, not BYOB's. I'll see if I can find a place to upload it.
Oh, and I don't want to bombard you with feature suggestions for the summer release, but...have you considered implementing some sort of socket functionality? That would pretty much take care of all the mesh requests, and we'd get access to Port 80 to boot!
Offline