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

#26 2013-04-08 03:38:09

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

Let me explain my overall intentions. GLOOP stands for General Language Object Orientated Programming. It (hopefully) will eventually end up with a reasonably comprehensize dictionary of blocks for each language. I'm hoping to get someone who knows each of the popular languages (c++, VB, python, java e.t.c.) and get each one to make a plugin that scratch calls upon whenever a block different language is called. People could then (in theory) combine languages, and the simpler but slower languages could be used for the bits that don't need as much speed and would take up too much time to make whereas the more complex, faster languages would be used for the bits that require speed. This is probably way harder than I can imagine but I think that it should be possible. What do you think of the overall plan and do you know any programming languages other than squeak?

I didn't see this post before, but a few months ago, I started making a Scratch mod for Python programming. I have only made a few blocks because I am too lazy to do the rest.  tongue  Here is a screenshot: https://dl.dropbox.com/u/37687009/Scree … 5%20PM.png
I think something I should add is "zebra colouring" for the blocks to make it easier to see the blocks.

Last edited by nathanprocks (2013-04-08 03:39:47)


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#27 2013-04-08 05:07:00

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

That's amazing! If machinespray and caakitty agree to make a themed version of the source code and share it, could you add the features you've added to that (but in new categories) then re-share it?

Offline

 

#28 2013-04-08 06:50:58

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

That's amazing! If machinespray and caakitty agree to make a themed version of the source code and share it, could you add the features you've added to that (but in new categories) then re-share it?

I might be able to. My mod currently only works on Mac, but I can make it work for Windows and possibly Linux too. It depends if I have enough time though. You also have to have Python installed to run the code. Since your mod will support different programming languages, it should also detect if you have the supported programming languages before trying to run a program that doesn't exist on the computer it is installed on. Visual Basic would be possible to include in the mod, but that is only on Windows. C++ would work if the user has a compiler (the user would have to configure the compiler in the mod before running a C++ program).
I am not saying I would do all of this, but I might do parts of it.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#29 2013-04-08 07:16:48

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

Thanks, is it possible to have a menu at the start in which you choose which language(s) to use and that then changes which categories are shown and which are hidden. The only way that I can think of doing this is making a menu which changs rebuildCategorySelectors and blockSpecs depending on what is picked. i.e. blockspecs could be made up of several sections, each one in square brackets, which basically says if python is selected run the python blockspecs else leave them out, if squeak is selected...

Offline

 

#30 2013-04-08 09:47:38

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

Just so you know, I only have windows and i read something on the internet about FFIs which appear to be the answer to the multiple languges in one problem. I don't know that much about this sort of stuff (I've taught myself all I know about programming in just a few months) but if we had an FFI for each language could scratch call upon the appropriate one whenever a 'foreign language' block is used. Or could gloop include a C++ compiler e.t.c. either in a folder or actually in gloop.exe?

Offline

 

#31 2013-04-09 03:11:17

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

Thanks, is it possible to have a menu at the start in which you choose which language(s) to use and that then changes which categories are shown and which are hidden. The only way that I can think of doing this is making a menu which changs rebuildCategorySelectors and blockSpecs depending on what is picked. i.e. blockspecs could be made up of several sections, each one in square brackets, which basically says if python is selected run the python blockspecs else leave them out, if squeak is selected...

Although I have never had a reason to do anything like that before, it is definitely possible to do.

shadowmouse wrote:

Just so you know, I only have windows and i read something on the internet about FFIs which appear to be the answer to the multiple languges in one problem. I don't know that much about this sort of stuff (I've taught myself all I know about programming in just a few months) but if we had an FFI for each language could scratch call upon the appropriate one whenever a 'foreign language' block is used. Or could gloop include a C++ compiler e.t.c. either in a folder or actually in gloop.exe?

I'm sure there is a portable C++ compiler somewhere. I prefer to use the GCC compiler, if it is possible to get a portable version... It should be because it is open source.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#32 2013-04-09 05:21:50

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

Would there have to be a morph when gloop is opened that has (basically) several checkboxes, each of which sets a global variable to either 1 or 0? Different parts of gloop (i.e. blockSpecs) could then use these variables to determine which blocks to show. Also with Visual basic I know that there is (Smalltalk isMacOSX) ifTrue: [  ] ifFalse: [  ] so I'm sure that could be changed to see if the user is running windows and therefore can use visual basic.

Offline

 

#33 2013-04-09 08:07:42

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

Would there have to be a morph when gloop is opened that has (basically) several checkboxes, each of which sets a global variable to either 1 or 0? Different parts of gloop (i.e. blockSpecs) could then use these variables to determine which blocks to show. Also with Visual basic I know that there is (Smalltalk isMacOSX) ifTrue: [  ] ifFalse: [  ] so I'm sure that could be changed to see if the user is running windows and therefore can use visual basic.

That is something similar to what I was thinking. Maybe there should be a settings morph that allows the user to select which languages they want to use, and the path to the compiler.

EDIT: I forgot about the local turbo block... It should be possible with a bit of tweaking. I don't know how to do that though.

Last edited by nathanprocks (2013-04-09 08:09:39)


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#34 2013-04-09 12:14:30

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

nathanprocks wrote:

and the path to the compiler.

I was hoping that gloop could contain compilers for all the languages that it uses that need them (it's meant to be a simple way to use all languages. I don't think machinespray's going to do a themed version so could you add your extra python features to a scratch source code (so that you have both languages) and put it on a sharing website please.

Offline

 

#35 2013-04-09 12:17:43

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: Mod development recruiting now!

It would be hard to compile Squeak into most normal languages.

First, you would need a way of turning things into the equivalent of the other language.

That's probably hard just for that.


I'm back.
Maybe.

Offline

 

#36 2013-04-09 12:25:04

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

I was hoping to get a program that runs in C++ (for example) that squeak calls upon to run C++ or have an FFI if that would work. And nathanprocks, I tried putting Smalltalk isWindows ifTrue: [before the blockspecs (and a ] after) and it worked fine on my windows machine, but when I changed it to Smalltalk isMacOSX it said that ScratchSpriteMorph classes are not indexable. What does that mean and how can we get around it (so that VB blocks would only come up on windows)?

Offline

 

#37 2013-04-10 06:10:18

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

I was hoping to get a program that runs in C++ (for example) that squeak calls upon to run C++ or have an FFI if that would work. And nathanprocks, I tried putting Smalltalk isWindows ifTrue: [before the blockspecs (and a ] after) and it worked fine on my windows machine, but when I changed it to Smalltalk isMacOSX it said that ScratchSpriteMorph classes are not indexable. What does that mean and how can we get around it (so that VB blocks would only come up on windows)?

What code are you using? I ran "Smalltalk isWindows" and it printed "false" into the workspace. Then I ran "Smalltalk isMacOSX" and it printed "true". I tried to make a category of blocks (the control category in Scratch) only appear if Smalltalk isMacOSX returned true/false, but I couldn't figure out how to do it.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#38 2013-04-10 09:14:31

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

I put (Smalltalk isMacOSX) ifTrue: ["the blockspecs"]. As in I put the ...ifTrue: [ before all the blockspecs and the ] after the rest of the code. But it came up with an error when it returned false.. Though that may be becaues it cut off the entire code, it may need the ^t1, self obsolete blockspecs or whatever to be outside of the square brackets. I'll experiment more soon but I've got a lot of homework to do now.

Offline

 

#39 2013-04-10 13:00:37

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

I just changed rebuildCategorySelectors so that it's different on Mac than on Windows but I've just had a thought, can I convert the GLOOP.exe into GLOOP.app so that it runs on Mac or do I have to make two separate copies?

Offline

 

#40 2013-04-10 13:20:03

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: Mod development recruiting now!

You could have a look at how BYOB compiles into .exe and .app


I'm back.
Maybe.

Offline

 

#41 2013-04-10 14:03:30

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

DigiTechs wrote:

You could have a look at how BYOB compiles into .exe and .app

That's not what I mean. Converting .ypr to .exe or .app is different from converting .exe to .app.

Offline

 

#42 2013-04-11 03:19:56

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

DigiTechs wrote:

You could have a look at how BYOB compiles into .exe and .app

That's not what I mean. Converting .ypr to .exe or .app is different from converting .exe to .app.

If you want the mod to run on Mac, download and unzip this file (I changed a few file names and stuff in Info.plist), make sure the name of your .image file is GLOOP.image and put it in GLOOP.app\Contents\Resources\. If you want to change the icons for GLOOP.app, you need a program that can edit .icns files. The icons are in GLOOP.app\Contents\Resources\.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#43 2013-04-11 09:03:54

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

I'll have a link soon so that you can see if it works. I've put the changes file in there as well. If it works could you add the python blocks and categories and post a link to the edited image and changes file?  Do you have any idea about how to go about making the settingsMorph? I presume we would have to make images in the scratchskin that make up a menu, but I've got no idea how to organise them or do anything after that.  sad

Offline

 

#44 2013-04-11 11:25:51

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

I'm not allowed to use dropbox at the moment but I probably will be able to in a few hours. In the meantime can you please explain how you made squeak able to execute python.

Offline

 

#45 2013-04-11 16:09:21

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

This is the windows version: https://www.dropbox.com/sh/4w4hjudzz51lgco/wXglmNEfCr. I thought that you could get whatever files are needed (scratchskin, .image, .changes, squeakV2sources e.t.c.) out of it and put them in the gloop.app resources. Can you see if that works please.

Offline

 

#46 2013-04-11 19:45:39

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

I'm not allowed to use dropbox at the moment but I probably will be able to in a few hours. In the meantime can you please explain how you made squeak able to execute python.

I made an app with Automator called ".run.app". The "." at the start of the file name tells Mac to hide it in Finder and Launchpad. The app opens Terminal.app and runs "cd /Applications/Pytch && python3 temp.py".

shadowmouse wrote:

This is the windows version: https://www.dropbox.com/sh/4w4hjudzz51lgco/wXglmNEfCr. I thought that you could get whatever files are needed (scratchskin, .image, .changes, squeakV2sources e.t.c.) out of it and put them in the gloop.app resources. Can you see if that works please.

I can't get on Dropbox right now because I am at school using my school laptop and it is blocked. I can do it later though.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#47 2013-04-12 05:04:42

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

nathanprocks wrote:

shadowmouse wrote:

I'm not allowed to use dropbox at the moment but I probably will be able to in a few hours. In the meantime can you please explain how you made squeak able to execute python.

I made an app with Automator called ".run.app". The "." at the start of the file name tells Mac to hide it in Finder and Launchpad. The app opens Terminal.app and runs "cd /Applications/Pytch && python3 temp.py".

Would you be able to convert it so that it runs on windows, and having jut looked on wikipedia at Terminal.app, does that mean that it only does text (console application) as opposed to moving sprites?

Offline

 

#48 2013-04-12 06:00:35

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

nathanprocks wrote:

shadowmouse wrote:

I'm not allowed to use dropbox at the moment but I probably will be able to in a few hours. In the meantime can you please explain how you made squeak able to execute python.

I made an app with Automator called ".run.app". The "." at the start of the file name tells Mac to hide it in Finder and Launchpad. The app opens Terminal.app and runs "cd /Applications/Pytch && python3 temp.py".

Would you be able to convert it so that it runs on windows, and having jut looked on wikipedia at Terminal.app, does that mean that it only does text (console application) as opposed to moving sprites?

It runs the Python code in the console. Although I haven't made a GUI program in Python before, it should be possible to do in the mod. Yes, I am able to make a Windows version of it, but I need to install Python in a virtual machine because I don't have a working charger for my other laptop.

BTW, are you planning to have different programming languages in a single script, because that would be very difficult (at least from my knowledge).

EDIT: I put GLOOP in GLOOP.app and it runs fine. I am more confused now because I don't entirely understand how this mod will work. Do you want the mod to call scripts written in another programming language from GLOOP, while having all the usual Scratch blocks + extra blocks included in GLOOP?

Last edited by nathanprocks (2013-04-12 06:46:11)


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#49 2013-04-12 07:40:14

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

nathanprocks wrote:

shadowmouse wrote:

nathanprocks wrote:


I made an app with Automator called ".run.app". The "." at the start of the file name tells Mac to hide it in Finder and Launchpad. The app opens Terminal.app and runs "cd /Applications/Pytch && python3 temp.py".

Would you be able to convert it so that it runs on windows, and having jut looked on wikipedia at Terminal.app, does that mean that it only does text (console application) as opposed to moving sprites?

It runs the Python code in the console. Although I haven't made a GUI program in Python before, it should be possible to do in the mod. Yes, I am able to make a Windows version of it, but I need to install Python in a virtual machine because I don't have a working charger for my other laptop.

BTW, are you planning to have different programming languages in a single script, because that would be very difficult (at least from my knowledge).

EDIT: I put GLOOP in GLOOP.app and it runs fine. I am more confused now because I don't entirely understand how this mod will work. Do you want the mod to call scripts written in another programming language from GLOOP, while having all the usual Scratch blocks + extra blocks included in GLOOP?

Yes. The idea is, when you open GLOOP, there is a menu where you select programming language(s)*.This by the time it gets finished may include C++, python, squeak, scratch, VB and java. If it is possible, the C++ blocks would looks slightly different from the java blocks (because it is also intended for learning programming languages) and from the other languages e.t.c. I am intending to have different programming languages in one script, but they wouldn't be able to interact with each otherthey would just go one after another.
e.g.

when gf clicked
cout < hello >

but if you wanted

if <Smalltalk isMacOSX>
cout < hello >
end

you would have to use
Smalltalk isMacOSX ifTrue: [cout < hello >]

*However if it is not possible to have multiple languages at once, you would choose a language, only the blocks from that language would show and the project would be saved as the appropriate type of file.

Offline

 

#50 2013-04-12 08:43:42

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

nathanprocks wrote:

shadowmouse wrote:


Would you be able to convert it so that it runs on windows, and having jut looked on wikipedia at Terminal.app, does that mean that it only does text (console application) as opposed to moving sprites?

It runs the Python code in the console. Although I haven't made a GUI program in Python before, it should be possible to do in the mod. Yes, I am able to make a Windows version of it, but I need to install Python in a virtual machine because I don't have a working charger for my other laptop.

BTW, are you planning to have different programming languages in a single script, because that would be very difficult (at least from my knowledge).

EDIT: I put GLOOP in GLOOP.app and it runs fine. I am more confused now because I don't entirely understand how this mod will work. Do you want the mod to call scripts written in another programming language from GLOOP, while having all the usual Scratch blocks + extra blocks included in GLOOP?

Yes. The idea is, when you open GLOOP, there is a menu where you select programming language(s)*.This by the time it gets finished may include C++, python, squeak, scratch, VB and java. If it is possible, the C++ blocks would looks slightly different from the java blocks (because it is also intended for learning programming languages) and from the other languages e.t.c. I am intending to have different programming languages in one script, but they wouldn't be able to interact with each otherthey would just go one after another.
e.g.

when gf clicked
cout < hello >

but if you wanted

if <Smalltalk isMacOSX>
cout < hello >
end

you would have to use
Smalltalk isMacOSX ifTrue: [cout < hello >]

*However if it is not possible to have multiple languages at once, you would choose a language, only the blocks from that language would show and the project would be saved as the appropriate type of file.

Ok, I think I understand now.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

Board footer