This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1376 2011-06-28 12:29:36

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

That's pretty cool Sci, We haven't actually decided on what competition we're doing or what the guidelines are yet, I also don't think it's fair for any librarians to enter whatever competition we do have either because if one of them is chosen it could look like favouritism  smile

Could you take me off the list for just that day then re add me then? JK LOL XD  tongue


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#1377 2011-06-28 12:34:46

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

ProgrammingFreak wrote:

sparks wrote:

We're not sure. Some sort of competition to celebrate a year of the library. A project is a nice idea because it might draw in new users whilst a special library header is always fun and we've done it before!

Hmm, maybe like Scratch and Google. A season thing.  smile
But you could also have a block contest. Maybe harder for newer people.  hmm

The block idea would be hard... because most blocks anyone could think of are already in the library!!! I keep trying to think of one making it and then i see it is shared already.  tongue  If the library workers aren't allowed to enter, maybe we could have a contest for them! (just a thought)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#1378 2011-06-28 12:36:22

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

Pecola1 wrote:

scimonster wrote:

TuragaTreeko wrote:

Would %(number), %(shift value), or %(alt value) work for new dropdowns? Like, %ø, %9, or %@?

Hmm, I wonder! I'll try that out later, when I'm back on my own comp.  smile


Yeah, title competition! Do something with 1 year anniversary.  tongue  I might upload one in a project because I can't upload images to hosting sites.  sad

IDK, I know ' would ALMOST work, but the blockspec didn't allow it.

('%1' #- #thing:) showed as http://theblocklibrary.site11.com/inclu … or=control

Numbers don
't work.  sad  That's why i tried some characters, I think ` did work and maybe ~ did too... can't remember.  hmm


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#1379 2011-06-28 12:38:12

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

@SSBBM, What's wrong with the Scratch fora? Well by using a seperate page we can vote anonymously and also people won't know who made the image they voted for, meaning that personal feelings towards other Scratchers will not sway your vote!

Could you make it so a user cannot vote for their own?


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#1380 2011-06-28 12:54:52

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

Pecola1 wrote:

scimonster wrote:

Pecola1 wrote:

IDK, I know ' would ALMOST work, but the blockspec didn't allow it.

('%1' #- #thing:) showed as http://theblocklibrary.site11.com/inclu … or=control

Numbers don
't work.  sad  That's why i tried some characters, I think ` did work and maybe ~ did too... can't remember.  hmm

Mhm. Seems like my "brilliant" idea was an EPIC fail. Why do you think it won't allow %(not a letter)s? Maybe it takes some edits in the Translators. Hm. I think I'll go try that.

EDIT: Aaah... it's all REALLY technical. I can't make head or tail of it. I went to Primitives-C Translators, and I also tried Scratch-Translation.  roll  I just can't understand any of it.  hmm

Last edited by TuragaTreeko (2011-06-28 12:58:13)


http://goo.gl/RDqKF

Offline

 

#1381 2011-06-29 06:07:19

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Well now that the images for the competition could be shared anonymously we have removed any favouritism from the voting process, Librarians are welcome to enter. We COULD make it so that users cannot vote on their own project but that means users would have to enter their username and password to vote which may deter people, we could do IP based hosting, I'm not sure.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1382 2011-06-29 08:42:39

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

hey, is anyone gonna do that update?!


the the the the the

Offline

 

#1383 2011-06-29 08:49:16

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

jslomba wrote:

hey, is anyone gonna do that update?!

Oh, yeah, after I finish this project I'm almost done with...

Last edited by scimonster (2011-06-29 08:52:02)

Offline

 

#1384 2011-06-29 11:37:26

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

I made another new block!  (Note:  Did you guys even see the last one?  I think I've got a lot more coming...)
http://polyeztahpuppies.webs.com/factorial.gif

Blockspec:

Code:

('factorial of %n' #r #Factorial:)

Code:

Code:

Factorial: t1 
    | answer t1store |
    answer _ 1.
    t1store _ t1.
    t1 = 0 ifTrue: [^ 1].
    t1 < 0 ifTrue: [^ 0].
    t1 isInf ifTrue: [^ 0].
    t1 isNaN ifTrue: [^ 0].
    [t1store > 1]
        whileTrue: 
            [answer _ answer * t1store.
            t1store _ t1store - 1].
    ^ answer

Works best if you go to Scratch Blocks > CommandBlockMorph > all > canBecomeWatcher and add #Factorial: to the list of reporters.

Last edited by Greenatic (2011-06-29 11:39:27)

Offline

 

#1385 2011-06-29 13:22:13

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

I have a block. This is a good block to use for an answer/ask game, and they give the wrong answer.

('error!' #r #getError)

getError
     ^Error!


http://goo.gl/RDqKF

Offline

 

#1386 2011-06-29 13:26:15

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

TuragaTreeko wrote:

I have a block. This is a good block to use for an answer/ask game, and they give the wrong answer.

('error!' #r #getError)

getError
     ^Error!

too simple.


the the the the the

Offline

 

#1387 2011-06-29 13:27:45

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

TuragaTreeko wrote:

I have a block. This is a good block to use for an answer/ask game, and they give the wrong answer.

('error!' #r #getError)

getError
     ^Error!

Actually, it should report

^ self error

Offline

 

#1388 2011-06-29 14:33:19

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

I've got a question for the librarians:

I was getting ready to make << () is infinite?>> and << () is NaN?>> blocks, but it occured to me that these would be used for very similar purposes.  Would you prefer that I instead make a << () is infinite or NaN?>> block?

Last edited by Greenatic (2011-06-29 14:38:41)

Offline

 

#1389 2011-06-29 14:51:02

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

TuragaTreeko wrote:

I have a block. This is a good block to use for an answer/ask game, and they give the wrong answer.

('error!' #r #getError)

getError
     ^Error!

Actually, it should report

^ self error

um... it seems to work for me.  hmm  It reports error, so... ?


http://goo.gl/RDqKF

Offline

 

#1390 2011-06-29 15:22:31

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Could someone reply to my question?  Please?

Anyway, my third new block:

http://polyeztahpuppies.webs.com/isinteger.gif

Blockspec:

Code:

('%n is an integer?' #b #IsInteger:)

Code (there may have been an easier way, but I did it my way):

Code:

IsInteger: t1 
    | t1pos |
    t1 isInf ifTrue: [^ false].
    t1 isNaN ifTrue: [^ false].
    t1pos _ t1 abs.
    [t1pos > 0]
        whileTrue: [t1pos _ t1pos - 1].
    t1pos = 0 ifTrue: [^ true].
    t1pos = 0 ifFalse: [^ false]

Does anyone have anything to say about any of the blocks?

Offline

 

#1391 2011-06-29 15:29:21

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

Could someone reply to my question?  Please?

Anyway, my third new block:

http://polyeztahpuppies.webs.com/isinteger.gif

Blockspec:

Code:

('%n is an integer?' #b #IsInteger:)

Code (there may have been an easier way, but I did it my way):

Code:

IsInteger: t1 
    | t1pos |
    t1 isInf ifTrue: [^ false].
    t1 isNaN ifTrue: [^ false].
    t1pos _ t1 abs.
    [t1pos > 0]
        whileTrue: [t1pos _ t1pos - 1].
    t1pos = 0 ifTrue: [^ true].
    t1pos = 0 ifFalse: [^ false]

Does anyone have anything to say about any of the blocks?

Wouldn't it be easier to just do this?

isInteger: t1
    ^ t1 = t1 rounded

Offline

 

#1392 2011-06-29 15:36:26

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

Greenatic wrote:

Could someone reply to my question?  Please?

Anyway, my third new block:

http://polyeztahpuppies.webs.com/isinteger.gif

Blockspec:

Code:

('%n is an integer?' #b #IsInteger:)

Code (there may have been an easier way, but I did it my way):

Code:

IsInteger: t1 
    | t1pos |
    t1 isInf ifTrue: [^ false].
    t1 isNaN ifTrue: [^ false].
    t1pos _ t1 abs.
    [t1pos > 0]
        whileTrue: [t1pos _ t1pos - 1].
    t1pos = 0 ifTrue: [^ true].
    t1pos = 0 ifFalse: [^ false]

Does anyone have anything to say about any of the blocks?

Wouldn't it be easier to just do this?

isInteger: t1
    ^ t1 = t1 rounded

I knew there was an easier way  wink

I didn't try something like that because I know Scratch's rounding block sometimes glitches, and I didn't know if it used a script like that.  Does it?  I used my method because I knew it would work reliably.

Offline

 

#1393 2011-06-29 16:32:53

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

And another one!!!!

http://polyeztahpuppies.webs.com/isfibonacci.gif

Blockspec:

Code:

('%n is a Fibonacci number?' #b #IsFibonacci:)

Code:  (it's super long, I know)

Code:

IsFibonacci: t1 
    | fib1 fib2 oldfib2 fib3 oldfib3 |
                t1 isInf ifTrue:[^false].
                t1 isNaN ifTrue:[^false].
                t1 < 0 ifTrue: [^ false].
    t1 = 0 ifTrue: [^ true].
    t1 = 1 ifTrue: [^ true].
    fib1 _ 0.
    fib2 _ 1.
    oldfib2 _ fib2.
    fib3 _ fib1 + fib2.
    oldfib3 _ fib3.
    [t1 > fib3]
        whileTrue: 
            [fib3 _ fib1 + fib2.
            fib2 _ oldfib3.
            fib1 _ oldfib2.
            oldfib3 _ fib3.
            oldfib2 _ fib2].
    t1 = fib3 ifTrue: [^ true].
    t1 = fib3 ifFalse: [^ false]

For best results, go to Scratch Blocks > CommandBlockMorph > private > canBecomeWatcher and add #IsFibonacci: to the list.

EDIT:  Added code to prevent infinite or NaN values.

Last edited by Greenatic (2011-06-29 17:14:42)

Offline

 

#1394 2011-06-29 16:49:29

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

Re: ITopic: Welcome to your local block library!

spiral projects here we come!


I AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#1395 2011-06-29 18:02:59

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Another one!!!!   big_smile

http://polyeztahpuppies.webs.com/isprime.gif

Note:  This contains code similar to my http://polyeztahpuppies.webs.com/isinteger.gif block.  If that one is changed, this one should be changed as well.

Blockspec:

Code:

('%n is prime?' #b #IsPrime:)

Code:  (brace yourself!   big_smile )

Code:

IsPrime: t1 
    | divisor factor t1store |
    t1 isInf ifTrue: [^ false].
    t1 isNaN ifTrue: [^ false].
    t1 < 1 ifTrue: [^ false].
    t1 = 1 ifTrue: [^ false].
    t1store _ t1.
    [t1store > 0]
        whileTrue: [t1store _ t1store - 1].
    t1store = 0 ifFalse: [^ false].
    divisor _ 2.
    [divisor > (0.5 * t1)]
        whileFalse: 
            [factor _ t1 / divisor.
            [factor > 0]
                whileTrue: [factor _ factor - 1].
            factor = 0 ifTrue: [^ false].
            divisor _ divisor + 1].
    ^ true

Yeah, I've made a lot of blocks today.

Last edited by Greenatic (2011-07-20 14:31:42)

Offline

 

#1396 2011-06-30 09:21:51

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

jslomba wrote:

hey, is anyone gonna do that update?!

Oh, yeah, after I finish this project I'm almost done with...

you done yet?


the the the the the

Offline

 

#1397 2011-06-30 09:44:34

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

I've got a question for the librarians:

I was getting ready to make << () is infinite?>> and << () is NaN?>> blocks, but it occured to me that these would be used for very similar purposes.  Would you prefer that I instead make a << () is infinite or NaN?>> block?

Any opinions?

Offline

 

#1398 2011-06-30 10:25:41

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

jslomba wrote:

scimonster wrote:

jslomba wrote:

hey, is anyone gonna do that update?!

Oh, yeah, after I finish this project I'm almost done with...

you done yet?

Yeah, but I didn't have time to do an update. I'll try it soon.

Offline

 

#1399 2011-06-30 10:27:45

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Scramble 2.0 is out, and it needs a library. Any tips on making a library?
Thanks  smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#1400 2011-06-30 10:31:10

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Hardmath123 wrote:

Scramble 2.0 is out, and it needs a library. Any tips on making a library?
Thanks  smile

Well, I see you set up 6 posts, and so I would recommend, because there aren't enough posts by section:
1) Home
2) Stacks
3) Reporters
4) Booleans
5) FAQ
6) About Scramble

Offline

 

Board footer