Recursion

Your browser needs java to view projects. Click here to install Java.

user_icon Jens* shared it 1 year, 2 months ago
568 views, 3 taggers, 12 people love it, 80 downloads, in 1 gallery
Add to my favorites?
Flag as inappropriate?

Comments

You need to be logged in to post comments

Add a Comment

 
rdococ rdococ 3 days, 23 hours ago

Any way, how did you make the "make a block" in scratch and not BYOB?

fishergirl2 fishergirl2 1 week, 1 day ago

this looks like a teacher chat page!

Jens Jens* 1 week ago

You know, in a way it is, because some teachters are using this experimental feature in their classes

fishergirl2 fishergirl2 1 week, 1 day ago

why is the flaag and red stop sign in circles like that? How did you get thta?

sparks sparks 1 week, 1 day ago

it's an old version of scratch. they looked like that from before around V 1.3

RHY3756547 RHY3756547 1 month ago

I'd be great if this was included in actual scratch.

RHY3756547 RHY3756547 1 month ago

*It'd

Rotation Rotation 2 months, 2 weeks ago

hey, deine spiele und animationen sind echt toll. aber ich habe ned frage: wenn ich eigene musik hochladen will, steht immer das format ist ungültig. wie kann ich das ändern?

sparks sparks 1 week, 1 day ago

a translation into english: "hey, your games and animations are really great. But I have a question: when I try to load my own music, it always says that the format is not supported. how can I change this?" alle formats sind nicht gultig fur Scratch, es verwandelt sie alle in mp3, aber alle formats kann es nich verwandeln also mussen sie ein software selber finden das dein lied format in mp3 verwandelt.

(view all replies)
bharvey bharvey 4 months ago

Oops I see the newlines in my message became spaces. //// to vee / lt 45 / fd 50 / run pick [square star hex] / bk 50 / rt 90 / etc. /////// WHEN I RECEIVE SQUARE / SQUARE ///// :-)

bharvey bharvey 4 months ago

.... when you get more than one level of recursion, the sprite gets lost and doesn't manage to return to its starting point, and the picture is weird. So there's something about BROADCAST AND WAIT that doesn't play well with recursion, is my guess. A single level of recursion (i.e., two levels of VEE) works fine. Thanks. PS The ATOMIC box should be unchecked by default. My students keep getting hung irretrievably. And if the argument gets small enough, a Squeak debugging console appears

bharvey bharvey 4 months ago

I tried this classic (Paul Goldenberg) Logo recursion: to vee left 45 forward 50 run pick [square star hexagon] back 50 right 90 forward 50 run pick [square star hexagon] back 50 left 45 end except that since Scratch doesn't have RUN, I had to say BROADCAST (ITEM ANY OF SHAPES) AND WAIT where SHAPES is a list containing the elements SQUARE STAR HEXAGON and the sprite has scripts like WHEN I RECEIVE SQUARE SQUARE and so on. This works fine, but when you add VEE to the list of shapes,[cont.]

bharvey bharvey 4 months ago

Hi, can you say when the next release will be out? I have a summer class right now that's eager to build blocks that include ask/answer. Thanks!

Jens Jens* 4 months ago

Hi, it's already done. I'll ask John if it's okay to post it now/sometime next week (because the official source code for Scrath 1.4 is not yet posted)

rubiks_cube_guy238 rubiks_cube_guy238 4 months ago

If you can't make it so that you can create a block with boolean inputs in BYOB, why not make a reporter block for BYOB that has a boolean input? The block could report 1 if the boolean is true, and 0 if the boolean is false.

Jens Jens* 4 months ago

The next version of BYOB will take any input, including text and boolean reporter blocks in every argument field. You'll be able to access the booleans within the block definition using the (round) parameter blocks from the block template

(view all replies)
ActionCat210 ActionCat210 4 months, 1 week ago

I read your reply on the comment below...so...its kinda like a hack if I'm following right?And how did you get the screen shot?

Adamman715 Adamman715 4 months, 1 week ago

Here's half the question: How to Take A Screen Shot: go to the page you want to take a screen shot of, and hit Print Screen on the keyboard (Windows)

(view all replies)
StBernard17 StBernard17 4 months, 2 weeks ago

I downloaded BOYB awhile ago, and I also went to your website and downloaded Elements. What exactly is Elements?

Jens Jens* 4 months, 2 weeks ago

Thanks for you interest in my little experiments! Elements is the beginning of a new graphical programming language - or rather a graphical drag'n'drop user interface for Smalltalk. It lets you manipulate the Scratch source code almost like it was written in Scratch itself

scratchycat625625 scratchycat625625 4 months, 2 weeks ago

Hi, since your on the Scratch team, I want say that dragging the scratch source into Scratch doesnt open the Squeak workspace.

StBernard17 StBernard17 4 months, 2 weeks ago

Squeak is a whole different program. If you don't have it, you can't open Scratch in it!

bharvey bharvey 5 months, 4 weeks ago

Breaking out of a runaway recursion isn't working for me on my MacBook Pro. I *didn't* click on "atomic," so the stop sign should work, but it doesn't, and neither does esc-mouseclick.

Jens Jens* 5 months, 3 weeks ago

Thanks for this bug-report. I'm just now adjusting BYOB to the upcoming Scratch release, and will try to figure out what's causing this (the esc-mouseclick really came as an afterthought and is somewhat kludgy). Could be related to Scratch not yielding to other processes until the innermost loop is completed, so stacking code in deeply nested loops seems to cause more hang-ups. You could try filling in some "timed" blocks (waits) and see what happens (I'd like to know). Thanks again!

mirror-rorrim mirror-rorrim 6 months, 1 week ago

I'm using it right now, its awesome. Wish I could share though! :)

piko_12 piko_12 7 months, 2 weeks ago

But BYOB stucked, I pressed stop, but it doesn't :( .

Jens Jens* 7 months, 2 weeks ago

Hi piko_12. It is very unlikely tht BYOB actually gets stuck, but BYOB does feature "atomic" recursion, which lets you program infinite recursive loops. Such infinite loops may appear to "hang" BYOB when you're specifying them to be "atomic" (=running as a single block). There's a section in the pdf-manual about this (Escaping out of infinite atomic recursion). To sum it up: Press and hold the Esc-key while clicking with the mouse (anywhere). This should do it.

(view all replies)
piko_12 piko_12 7 months, 2 weeks ago

Yes!!!!!!!!!!!!!!!!!!!!!!!!!! I did it!!!!!!!! Congratsulations (sorry if I misplelled "congratsulations"), you are a good programmer!

keghani keghani 7 months, 3 weeks ago

wow, are u a computer scientist!!??

Jens Jens* 7 months, 3 weeks ago

Not really, I'm a Smalltalk programmer turned lawyer and turned Smalltalk programmer-lawyer, lol!

(view all replies)
music_man music_man 8 months, 3 weeks ago

Thanks for your help. I found a book about squeak and how to use it. Do you know of a book that starts explaining some of the code? I'll need it after I read the first book. Do you think the book I am reading now is a good start? Here is the link to it: http://www.squeakbyexample.org/

Jens Jens* 8 months, 3 weeks ago

SBE is an excellent book to refer to, besides it's free, and I believe it comes with it's own environment in which to check out the examples. There's also an excllent and much shorter bank account tutorial somewhere on the Squeak site written by John Maloney, who's now the lead programmer for Scratch, and who invented and introduced the Morphic user interface paradigm to Squeak (which is central part of Scratch)

music_man music_man 8 months, 3 weeks ago

How did you learn how to do all of this stuff? I would like to learn how to do things like this but where do I start? Do you know of a web page that tells you how to do stuff like this in scratch?

Jens Jens* 8 months, 3 weeks ago

Hi music_man, thanks for you interest in BYOB, Scratch, and programming in general! I love programming, and I guess whenever you truly love doing something it will eventually become easier. Scratch is programmed in Squeak, which is an open source variant of the Smalltlk programming language, and rather well documented (check squeak.org) Smalltalk is generally considered to be easy. However, there's a learning curve to Smalltalk, so be prepared to not immediately master super-complex stuff...

(view all replies)
Magnie Magnie 9 months, 4 weeks ago

I'm Going To Try To Make A Block In BYOB thats <Pointing Towards | Sprite | > If Thats Possible..I'm Going To Try Though.

Bentheneighbor Bentheneighbor 10 months, 1 week ago

This looks cool, but it doesn't work on 's.

SpaceManSpif SpaceManSpif 10 months, 3 weeks ago

I dom't know if i should download BYOB it might couse virisis.

mathguy mathguy 8 months, 3 weeks ago

no it won't i didn't. did you get that idea by a warning on your browser?

yoda432 yoda432 11 months ago

1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1.3.1 very stange image file

yoda432 yoda432 11 months ago

image file "1.3.1" its strange if i do 1.3.1.3.1.3.1

Auron Auron 11 months, 2 weeks ago

My mum's Vista ( which I'm on now ) won't work when I do the % thing. It says Subscript is out of bounds even when I I just do in the create your own block with the block name of "%"

Jens Jens* 11 months, 2 weeks ago

just '%' doesn't work (yet) in BYOB, because I fixed that bug in Scratch 1.3 only later (for 1.3.1). Use "%parameter" instead.

(view all replies)
InfernoFalcon InfernoFalcon 11 months, 2 weeks ago

Seems fairly limited to be, because you can only use blocks already in scratch to build your block, am I wrong? Also, when is chirp going to be able to play 1.3 projects in screensavers!?

FoxDur FoxDur 11 months, 4 weeks ago

Is there a way to add drop down lists to blocks?

Jens Jens* 11 months, 4 weeks ago

not yet, FoxDur. Which drop down lists would you be interested in?

(view all replies)
FoxDur FoxDur 11 months, 4 weeks ago

Yay I just made my own block! I'm so excited! Thank you! :D

music_man music_man 1 year ago

Do you think you could try to make a block that can save or load games? All you need to save is the variables and lists. Also, how do you do this stuff in scratch? Your like the master at making code for it.

Jens Jens* 1 year ago

actually, music_man, my prototype for lists (before they were introduced to Scratch)included file-access blocks for lists: http://www.chirp.scratchr.org/blog/?p=16

buddha108 buddha108 1 year ago

oh, wait i get it!

buddha108 buddha108 1 year ago

I know how this works but in a custom block how do you get a block like this; [Dragon__order__turn]? all I an get is one big block of [Dragon order turn] Please reply!

buddha108 buddha108 1 year ago

Spelling error; not an, get.

(view all replies)
music_man music_man 1 year ago

Ok now I understand. Thank you for telling me how to make it work on the iMac. Can you tell me some tips of how you can use this? Also, like the variables, can you make it have a drop down menu? If so, can you tell me how?

Jens Jens* 1 year ago

Why don't you have a look at the sample projects that come with this. You can look at how each is done by right clicking on it and selecting edit. This will give you some ideas how to get going. Also, there's a (too long, I know) pdf with a sort of user manual

music_man music_man 1 year ago

That sounds cool. Do you think you could try to make it compatible with the iMac? Or is that o hard to do? I tried to download it to see what it dose, but it is an .exe.

likegames likegames 1 year ago

double-click the image file

Jens Jens* 1 year ago

Hi music_man, you can use BYOB on a Mac, just copy the file 'scratch.app' into the folder in which you extracted the download archive. Then drop the file named "byob.image" on "scratch.app", and you should be all set to go!

(view all replies)
music_man music_man 1 year ago

Can you explain what this dose? I'm still confused.

Jens Jens* 1 year ago

Hi music_man. This project shows what the "BYOB"-prototype does, which lets you build your own custom blocks in Scratch (rather than having to use Smalltalk), and how you can use a custom block within its own definition

likegames likegames 1 year ago

*so it is scratch-legal.

Jens Jens* 1 year ago

let's rather try to maybe incorporate something like this into real Scratch...

(view all replies)
likegames likegames 1 year ago

P.S I know it is scratch-illegal, make the share button make it upload it to a "BYOB projects" page of the chirp website.

likegames likegames 1 year ago

Make a share button and a hat block feature and ability to put your blocks in categories also % options (like %n for numbers). Hope 1.1 is made soon!

Lightnin Lightnin* 1 year ago

Wow, that is really cool. Will BYOB be added into future version of main Scratch app?

Jens Jens* 1 year ago

Thanks for trying it, Lightnin! BYOB is as of now just an experimental prototype, nothing official

likegames likegames 1 year ago

how do you share projects with it?

Jens Jens* 1 year ago

You can't share these projects on the website, but I embedded a compiler, so you can share them as .exe

(view all replies)
kimmy123 kimmy123 1 year ago

i was trying to make that but i made a background/costume block.

likegames likegames 1 year ago

p.s pleeeeeez make BYOB 1.1 with my ideaz PLUS more sample projectz

Jens Jens* 1 year ago

Thanks for you ideas, likegames! Drop down lists for sprite names would be great, but how to handle these within the block-definition code? Let me think some more about this...

(view all replies)
likegames likegames 1 year ago

make it able 2 do special things 4 example %i is that lists drop-down block (1, last, uhh i don't know the other one, %m (text (or is it?)))

henley henley 1 year ago

how would you make a [ ^] part in a block such as point to [ ^]

likegames likegames 1 year ago

in the future there might be BYOB 1.1

likegames likegames 1 year ago

U maybe able in BYOB 1.1

(view all replies)
likegames likegames 1 year ago

you can't

(view all replies)
likegames likegames 1 year ago

SOOOOOOOOOO COOL JENS! GOOD WORK! U R A SQUEAK MASTER!!!!!!!

bart9032 bart9032 1 year ago

Hey Jens, I found A cool hack to play tetris in the world menu on scratch 1.3!

BWOG BWOG 1 year ago

lol

likegames likegames 1 year ago

on the mac to do it click BYOB.image

henley henley 1 year ago

what /where will i find a custom block?

(view all replies)
likegames likegames 1 year, 1 month ago

love it!

henley henley 1 year, 1 month ago

WHERE/WHAT IS A CUSTOM BLOCK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!??????????????????????!!!!!!!!!!!!!!??????????????!!!!!!!!!!!!????????????!!!!!!??!??!?!?!

tcb tcb 1 year, 1 month ago

Imagine it-0sprites, 2 blocks (one for when green flag clicked)

henley henley 1 year, 1 month ago

HOW DO YOU OPEN BLOCK EDITOR?

Jens Jens* 1 year, 1 month ago

right-click on a custom block and select "edit"

likegames likegames 1 year, 1 month ago

PLEASE POST PROTOTYPE .IMAGE!

Spenfen Spenfen 1 year ago

he already has. on chirp.scratchr.org/blog.

Yelmo Yelmo 1 year, 1 month ago

I have not seen tha function in Scratch, is there?

Yelmo Yelmo 1 year, 1 month ago

Jens, I always see projects from you that are very interesting, I´d like more info about that, is there a site, a forum post or anything where I could read about that or other custom block?, the posibility of doing this expand Scratch in an inamiginable way :)

(view all replies)
Jens Jens* 1 year, 1 month ago

Hi Yelmo, it's a prototype

(view all replies)
likegames likegames 1 year, 1 month ago

PLEASE post .image file!

illusionist illusionist 3 months, 2 weeks ago

he did.

buddha108 buddha108 1 year, 1 month ago

and if its true post a project that has these blocks in them! (no offence)

buddha108 buddha108 1 year, 1 month ago

your scaring me!

Jens Jens* 1 year, 1 month ago

How so, buddha108?

(view all replies)
likegames likegames 1 year, 1 month ago

please give link!

gadgetman gadgetman 1 year, 1 month ago

byob in forums

keroro645 keroro645 1 year, 1 month ago

How does it work?

Moonfalcon Moonfalcon 1 year, 1 month ago

Wait this isn't real is it?

gadgetman gadgetman 1 year, 1 month ago

it is,byob in forums

Please Wait...