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

#726 2011-04-30 19:54:15

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

Re: ITopic: Welcome to your local block library!

Pecola1 wrote:

ProgrammingFreak wrote:

Pecola1 wrote:

sparks wrote:

Non-librarians are welcome to add help with the library by working on new ideas - librarians are just there to keep the library updated  wink

What we need is an online program that can edit the contents of the Scratch smalltalk browser. The program would be able to give a user a list of blocks with checkbox options as to which blocks they want - then add the code for those blocks to the correct section of that copy of Scratch before providing a download link to it. No idea if that's possible. If a patches system is possible to easily use with normal Scratch that will be very cool, I've wanted to find a way to make Scratch blocks downloadable too for ages!

YAY! BTW yall, I have been sick, so I just got a 2-3 hour nap. That felt good, I wonder if i can do my SAT tomorrow? I feel better. [/offTopicness] Let me tell you a problem we will run into and a way too solve it. By making a patch, you cannot simply add to a method, only overwrite it, so for the blockspec, we cannot do. UNLESS we make a dialog which would tell you, "This will over right any block you have made beside ones you download, is that okay?" How do we fix it, we simply make it so each block has its own blockspec, for example the say nothing would be:

sayNothingBlockspec
^( 'looks' ('say nothing' #- #sayNothing) )

And we could simply have a beginning patch for you to download which would have at the end
This it will also make all the blockspecs, but they will all be blank, until you download that block.

Hope you feel better!  big_smile
SAT? What grade are you in?
So it reports a block. Cool!

I am in 7th, LOL, in break time I started writing squeak for the new download feature and my friend next to me (who was also done) was like, "What the..." I WROTE ON THE PAPER I'll tell you later... its a programming code called Squeak Smalltalk. Later he thought i had said squeaky talk, and I told him what it really was and...[/offTOPIC]
I thought about what we can do, we could simply make a place named findCustomDropdown: and it would go at the end of uncoloredArgMorphFor:. The method would be like uncolored arg morph for only it would contain only the custom ones, it would on the first download (THE ORIGINAL PATCH) make all the drop-downs and at the end it would have report the default number drop-down. I have some questions, should we make a remove custom block option? Also an export block?

BUMP!


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

 

#727 2011-04-30 20:10:56

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

Re: ITopic: Welcome to your local block library!

Pecola1 wrote:

ProgrammingFreak wrote:

Pecola1 wrote:

YAY! BTW yall, I have been sick, so I just got a 2-3 hour nap. That felt good, I wonder if i can do my SAT tomorrow? I feel better. [/offTopicness] Let me tell you a problem we will run into and a way too solve it. By making a patch, you cannot simply add to a method, only overwrite it, so for the blockspec, we cannot do. UNLESS we make a dialog which would tell you, "This will over right any block you have made beside ones you download, is that okay?" How do we fix it, we simply make it so each block has its own blockspec, for example the say nothing would be:

And we could simply have a beginning patch for you to download which would have at the end
This it will also make all the blockspecs, but they will all be blank, until you download that block.

Hope you feel better!  big_smile
SAT? What grade are you in?
So it reports a block. Cool!

I am in 7th, LOL, in break time I started writing squeak for the new download feature and my friend next to me (who was also done) was like, "What the..." I WROTE ON THE PAPER I'll tell you later... its a programming code called Squeak Smalltalk. Later he thought i had said squeaky talk, and I told him what it really was and...[/offTOPIC]
I thought about what we can do, we could simply make a place named findCustomDropdown: and it would go at the end of uncoloredArgMorphFor:. The method would be like uncolored arg morph for only it would contain only the custom ones, it would on the first download (THE ORIGINAL PATCH) make all the drop-downs and at the end it would have report the default number drop-down. I have some questions, should we make a remove custom block option? Also an export block?

BUMP!


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

 

#728 2011-05-01 01:05:12

YourLocalBlockLib
Scratcher
Registered: 2011-03-10
Posts: 100+

Re: ITopic: Welcome to your local block library!

777w wrote:

YourLocalBlockLib wrote:

The downloadable Scratch blocks post.

..........

Step 9: File in the selection by right-clicking (Mac option+click) the selection and clicking "more..." then "file it in"

.....

^Back to Scratch blocks

It appears that this doesn't work... hmm

I figured it out.  You misunderstood; so did I.  I changed the wording to be more comfortable.
~~Scimonster

Last edited by YourLocalBlockLib (2011-05-01 01:05:30)


http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png

Offline

 

#729 2011-05-01 01:09:18

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

Re: ITopic: Welcome to your local block library!

Oh, I didn't have time to add any blocks right now, sorry.  hmm

Offline

 

#730 2011-05-01 02:47:52

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: ITopic: Welcome to your local block library!

You guys never to seem to consider my blocks...

Offline

 

#731 2011-05-01 05:07:00

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

Re: ITopic: Welcome to your local block library!

ProgrammingFreak wrote:

You guys never to seem to consider my blocks...

What blocks have you shared that we have not added? It may be that we missed them! We're not being discriminative, don't worry, we just miss things sometimes!

@pecola1, the new feature for Scratch blocks looks great and the option is there, but I can't see any blocks in the library that can be downloaded using this feature. We should create some working .block files for the library so people can experiment with the feature. Also, for people having trouble adding the code, why not have a download link to a copy of the Scratch 1.4 image that has this feature already installed? Something like

"Click here to download the block library patch. Once it is downloaded, paste it into your Scratch folder (probably in your program files folder) and replace the existing .image file there with this one"

The replacement .image can still be called scratch 1.4.image (I hope) and it would be exactly the same as the normal copy of Scratch, just with the block download menu added!


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

Offline

 

#732 2011-05-01 16:52:52

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

Re: ITopic: Welcome to your local block library!

sparks wrote:

ProgrammingFreak wrote:

You guys never to seem to consider my blocks...

What blocks have you shared that we have not added? It may be that we missed them! We're not being discriminative, don't worry, we just miss things sometimes!

@pecola1, the new feature for Scratch blocks looks great and the option is there, but I can't see any blocks in the library that can be downloaded using this feature. We should create some working .block files for the library so people can experiment with the feature. Also, for people having trouble adding the code, why not have a download link to a copy of the Scratch 1.4 image that has this feature already installed? Something like

"Click here to download the block library patch. Once it is downloaded, paste it into your Scratch folder (probably in your program files folder) and replace thi cant get the .block workinge existing .image file there with this one"

The replacement .image can still be called scratch 1.4.image (I hope) and it would be exactly the same as the normal copy of Scratch, just with the block download menu added!

I tried making a test .block, but it didn't work at all! I kept getting errors, I was hoping someone else could help.

Last edited by Pecola1 (2011-05-01 17:51:40)


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

 

#733 2011-05-01 18:08:05

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: ITopic: Welcome to your local block library!

SSBBM wrote:

Here are somethings that were forgotten.

SSBBM wrote:

What do you think of a page for the librarians and/or the history of the library.

sparks wrote:

Oh yes, I forgot to add the updates archive!

I'm thinking, what are people's thoughts on rather than having a link back to the block home at the bottom of each pallet catagory, we put small images too? Here, I'll mockup:
______________________________
^back to Scratch blocks
^back to contents
 

We still want these right?

BUMP


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#734 2011-05-01 18:13:50

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

Re: ITopic: Welcome to your local block library!

SSBBM wrote:

SSBBM wrote:

Here are somethings that were forgotten.

SSBBM wrote:

What do you think of a page for the librarians and/or the history of the library.

sparks wrote:

Oh yes, I forgot to add the updates archive!

I'm thinking, what are people's thoughts on rather than having a link back to the block home at the bottom of each pallet catagory, we put small images too? Here, I'll mockup:
______________________________
^back to Scratch blocks
^back to contents
 

We still want these right?

BUMP

I think we do. I do.


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

 

#735 2011-05-01 18:16:59

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

Re: ITopic: Welcome to your local block library!

Yes, I like them!


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

Offline

 

#736 2011-05-01 18:59:53

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

Re: ITopic: Welcome to your local block library!

New panther block
box1
number of projects $String$ has uploaded
color can be any
code:

Code:

^getUrl: 'http://scratch.mit.edu/api/getnumprojectsbyuser/', t1

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

 

#737 2011-05-02 03:08:23

DarthPickley
Scratcher
Registered: 2008-06-13
Posts: 100+

Re: ITopic: Welcome to your local block library!

uh, you know that block for panther in sensing called < password for [user] is [password] > ? wouldn't that be able to be used by hackers or something? although I suppose it would be difficult to use that to hack into people's accounts, versus confirming things, but also:
I remember that in the terms of use of the source code you're not supposed to interact with the scratch web site much with the mods. although I think it said only don't share projects.

Offline

 

#738 2011-05-02 03:19:49

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

Re: ITopic: Welcome to your local block library!

DarthPickley wrote:

uh, you know that block for panther in sensing called < password for [user] is [password] > ? wouldn't that be able to be used by hackers or something? although I suppose it would be difficult to use that to hack into people's accounts, versus confirming things, but also:
I remember that in the terms of use of the source code you're not supposed to interact with the scratch web site much with the mods. although I think it said only don't share projects.

That might be a problem...  hmm
Yeah, I think it's just not uploading.  smile

Offline

 

#739 2011-05-02 04:49:29

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

Re: ITopic: Welcome to your local block library!

scimonster wrote:

Hardmath123 wrote:

ProgrammingFreak wrote:

New Block!
Goto Url
By ProgrammingFreak

Code:

Code:

gotourl: t1
| url |
url _ 'http://', t1.
Cursor wait showWhile: [ScratchPlugin primOpenURL: url]

BlockSpec:

Code:

('goto url %s' #- #gotourl:)

Won't work if you input http://{address}, which most people do (because they copy the url from the address bar). I'll optimize it:

Code:

gotourl: t1 httpIncluded: t2 
    | url |
    url _ t1.
    t2 = true ifFalse: [url _ 'http://' , t1].
    Cursor wait showWhile: [ScratchPlugin primOpenURL: url]

Code:

('Go to url %s . Http prefix included? %b' #- #gotourl:httpIncluded: 'scratch.mit.edu')

•••••••••••••••••••••••••••••••••••••••



Hardmath123 wrote:

Blockspec:

Code:

('Set the list blocks color to %c' #- #setListBlockColorSelf:)

Code:

Code:

setListBlockColorSelf: t1 
    ListBlockColor _ t1

Anybody?
•••••••••••••••••••••••••••••••••••••••




Code:

openForum: url 
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/forums/viewtopic.php?id=' , url asString]

Code:

('Open the %n th forum page' #- #openForum: 58790)

Default value is the block library.
•••••••••••••••••••••••••••••••••••••




Code:

('Post on the %nth forum topic' #- #postForum: 58790)

Code:

postForum: t1 
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/forums/post.php?tid=' , t1 asString]

I really like those, Hardmath!  smile
WYB I didn't need you to tell me the default value for the [open the ()th forum page]?  yikes  I think I've been spending too much time here.  tongue

So... Will you add them?  tongue


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

Offline

 

#740 2011-05-02 05:20:50

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

Re: ITopic: Welcome to your local block library!

DarthPickley wrote:

uh, you know that block for panther in sensing called < password for [user] is [password] > ? wouldn't that be able to be used by hackers or something? although I suppose it would be difficult to use that to hack into people's accounts, versus confirming things, but also:
I remember that in the terms of use of the source code you're not supposed to interact with the scratch web site much with the mods. although I think it said only don't share projects.

A valid point. I can see that it might be a problem but it was the Scratch team who released the URL this block uses. The Scratch site does not have a cut-out limit if too many incorrect passwords are given so guessing the password in Scratch is as time-consuming and fruitless as doing it on the Site. An MD5 dictionary onslaught will be just as easy to do with Panther as some other program such as C++ and probably even python.

My main worry is that someone might release a project containing this block and then use Panther's URL connection blocks to send the user name and password that someone enters in the project to a MySQL database of their own, this is unlikely to happen though as I thoroughly check all Panther projects before I upload them. I will report my post to the Scratch team and see what they think. If they want me to remove it from the library I am more than happy to do so  smile


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

Offline

 

#741 2011-05-02 05:29:27

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

Re: ITopic: Welcome to your local block library!

sparks wrote:

DarthPickley wrote:

uh, you know that block for panther in sensing called < password for [user] is [password] > ? wouldn't that be able to be used by hackers or something? although I suppose it would be difficult to use that to hack into people's accounts, versus confirming things, but also:
I remember that in the terms of use of the source code you're not supposed to interact with the scratch web site much with the mods. although I think it said only don't share projects.

A valid point. I can see that it might be a problem but it was the Scratch team who released the URL this block uses. The Scratch site does not have a cut-out limit if too many incorrect passwords are given so guessing the password in Scratch is as time-consuming and fruitless as doing it on the Site. An MD5 dictionary onslaught will be just as easy to do with Panther as some other program such as C++ and probably even python.

My main worry is that someone might release a project containing this block and then use Panther's URL connection blocks to send the user name and password that someone enters in the project to a MySQL database of their own, this is unlikely to happen though as I thoroughly check all Panther projects before I upload them. I will report my post to the Scratch team and see what they think. If they want me to remove it from the library I am more than happy to do so  smile

I completely agree. I could conjure up something to test each string made from all standard ASCII characters in about 30 minutes. It'd take over an hour to check them all, though. I'm not going to do it, but I could, and I'm sure quite a few others could, too.


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

Offline

 

#742 2011-05-02 05:36:36

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

Re: ITopic: Welcome to your local block library!

Pecola1 wrote:

New panther block
box1
number of projects $String$ has uploaded
color can be any
code:

Code:

^getUrl: 'http://scratch.mit.edu/api/getnumprojectsbyuser/', t1

Thanks Pecola1, the URL is useful, but getURL isn't a smalltalk command. I've fixed your block like so:

^ self readLine: 2 FromUrl: 'http://scratch.mit.edu/api/getnumprojectsbyuser/', t1

and added it to the library  smile


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

Offline

 

#743 2011-05-02 06:05:57

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

Re: ITopic: Welcome to your local block library!

Hardmath123 wrote:

scimonster wrote:

Hardmath123 wrote:

ProgrammingFreak wrote:

New Block!
Goto Url
By ProgrammingFreak

Code:

Code:

gotourl: t1
| url |
url _ 'http://', t1.
Cursor wait showWhile: [ScratchPlugin primOpenURL: url]

BlockSpec:

Code:

('goto url %s' #- #gotourl:)

Won't work if you input http://{address}, which most people do (because they copy the url from the address bar). I'll optimize it:

Code:

gotourl: t1 httpIncluded: t2 
    | url |
    url _ t1.
    t2 = true ifFalse: [url _ 'http://' , t1].
    Cursor wait showWhile: [ScratchPlugin primOpenURL: url]

Code:

('Go to url %s . Http prefix included? %b' #- #gotourl:httpIncluded: 'scratch.mit.edu')

•••••••••••••••••••••••••••••••••••••••




Anybody?
•••••••••••••••••••••••••••••••••••••••




Code:

openForum: url 
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/forums/viewtopic.php?id=' , url asString]

Code:

('Open the %n th forum page' #- #openForum: 58790)

Default value is the block library.
•••••••••••••••••••••••••••••••••••••




Code:

('Post on the %nth forum topic' #- #postForum: 58790)

Code:

postForum: t1 
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/forums/post.php?tid=' , t1 asString]

I really like those, Hardmath!  smile
WYB I didn't need you to tell me the default value for the [open the ()th forum page]?  yikes  I think I've been spending too much time here.  tongue

So... Will you add them?  tongue

When I have a little while.  tongue

Offline

 

#744 2011-05-02 06:20:34

YourLocalBlockLib
Scratcher
Registered: 2011-03-10
Posts: 100+

Re: ITopic: Welcome to your local block library!

.                              http://welcometoyourlocalblocklibrary.weebly.com/uploads/7/1/1/0/7110842/292223741.gif

Panther blocks added: [1]
http://welcometoyourlocalblocklibrary.weebly.com/uploads/7/1/1/0/7110842/6823528.gif by Pecola1, edited by Sparks

Other updates[2]
New Panther block contributor: Pecola1
Added new links to categories

Update carried out by block librarians: Sparks and SSBBM
________________________________________________________________________________
^home
^updates archive

Last edited by YourLocalBlockLib (2011-05-02 12:51:35)


http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png

Offline

 

#745 2011-05-02 08:19:06

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

Re: ITopic: Welcome to your local block library!

YourLocalBlockLib wrote:

http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png
^Back to Scratch blocks

How to download a Scratch block

Code:

'From MIT Squeak 0.9.4 (June 1, 2003) [No updates present.] on 18 June 2010 at 5:06:17 pm'!

!ScratchFileChooserDialog methodsFor: 'initialization'!
createBlockFileChooserFor: t1 
    scratchFrame _ nil.
    readingScratchFile _ true.
    list _ ScratchFilePicker new extensions: #(#block ).
    self removeAllMorphs.
    bottomSpacer delete.
    bottomSpacer _ nil.
    mainColumn addMorphBack: list.
    self title: 'Import Block'.
    list scratchInfoClient: nil.
    mainColumn addMorphBack: (Morph new extent: 5 @ 9;
         color: Color transparent);
     addMorphBack: newTitleBin.
    fileInfoColumn addMorphBack: buttonRow.
    self addMorphBack: shortcutColumn;
     addMorphBack: mainColumn;
     addMorphBack: fileInfoColumn! !


!ScratchFrameMorph methodsFor: 'menu/button actions'!
addBlock
    | t1 t2 t3 t4 |
    t1 _ ScratchFileChooserDialog new createBlockFileChooserFor: self;
             type: #block.
    t2 _ t1 getUserResponse.
    t2 = #cancelled ifTrue: [^ self].
    t3 _ (FileDirectory forFileName: t2)
                oldFileNamed: t2.
    t4 _ t3 contentsOfEntireFile.
    (ReadWriteStream
        on: t4
        from: 1
        to: t4 size) fileIn! !

!ScratchFrameMorph methodsFor: 'menu/button actions'!
fileMenu: t1 
    | t2 |
    t2 _ CustomMenu new.
    t2 add: 'New' action: #newScratchProject.
    t2 add: 'Open' action: #openScratchProject.
    t2 add: 'Save' action: #saveScratchProjectNoDialog.
    t2 add: 'Save As' action: #saveScratchProject.
    t2 addLine.
    t2 add: 'Import Project' action: #importScratchProject.
    t2 add: 'Export Sprite' action: #exportSprite.
    t2 addLine.
    t2 add: 'Import Block' action: #addBlock.
    t2 addLine.
    t2 add: 'Project Notes' action: #editNotes.
    Sensor shiftPressed
        ifTrue: 
            [t2 addLine.
            t2 add: 'Write Project Summary' action: #writeSummaryFile.
            t2 add: 'Write Multiple Project Summaries' action: #writeMultipleSummaries].
    t2 addLine.
    t2 add: 'Quit' action: #quitScratch.
    t2 localize.
    #(2 4 5 6 7 8 ) do: [:t3 | t2 labels at: t3 put: ((t2 labels at: t3)
                copyFrom: 1 to: (t2 labels at: t3) size - 1)
                , ScratchTranslator ellipsesSuffix].
    t2 invokeOn: self at: t1 bottomLeft + (0 @ 10)! !

http://dl.dropbox.com/u/6273449/BlockLibDiv2.png

^Back to Scratch blocks

I looked at this code to try and work out what the contents of the .block file has to be. I was hoping it would be similar to the block files I have created for Panther, but I can't see anything in that code that tells me what the file needs to contain...


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

Offline

 

#746 2011-05-02 10:07:03

YourLocalBlockLib
Scratcher
Registered: 2011-03-10
Posts: 100+

Re: ITopic: Welcome to your local block library!

BYOB Test:
 

Do all the links work?

~SSBBM

Last edited by YourLocalBlockLib (2011-05-02 10:12:08)


http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png

Offline

 

#747 2011-05-02 10:08:55

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

Re: ITopic: Welcome to your local block library!

Yes.
~~sci  tongue

Offline

 

#748 2011-05-02 10:12:49

YourLocalBlockLib
Scratcher
Registered: 2011-03-10
Posts: 100+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

Yes.
~~sci  tongue

Great, I forgot other. Adding it now...


http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png

Offline

 

#749 2011-05-02 10:16:16

YourLocalBlockLib
Scratcher
Registered: 2011-03-10
Posts: 100+

Re: ITopic: Welcome to your local block library!

Ok, BYOB is done
~SSBBM


http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png

Offline

 

#750 2011-05-02 10:19:21

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

Re: ITopic: Welcome to your local block library!

Scratch now? Panther?

Offline

 

Board footer