By accident I discovered how you can get to the Squeak core of Scratch. Since Scratch is supposed to be open source and distributed under the MIT license I composed a little tutorial project on how it is done:
http://scratch.mit.edu/projects/Jens/22355
The only two things that seem to be missing are comments and argument names (these are just numbered through), because these are usually maintained by Squeak in a separate sources file. The overall code is, however, very straightforward readable, and, in fact, you can build your own development image and try out some ideas (how about implementing all those 'missing features' yourself) pretty easily.
while this may be great for sensible people (like me), it may on the other hand pose a security issue for others. Therefore I would propose to the Scratch Team to disable Smalltalk walkbacks/debuggers in the deployment images altogether, so there would really be *no* way to get to the source.
Last edited by Jens (2007-07-17 16:47:39)
Offline
That's a cool hack.
Tripping the debugger seems to be a pretty common way to get into interpreted applications that have integrated debuggers. Though for the ones that I've done it wasn't such a lengthy process to get to the source code.
Offline
Canthiar, Smalltalk/Squeak is not really an 'interpreted language', but rather a 'living image', that usually contains the whole progamming IDE which lets you inspect/modify virtually everything anywhere. For an experienced Smalltalker there is actually a much quicker way to get to the Scratch source code without closing the ScratchFrameMorph and unlocking the programmer facilities first:
Once you get the walkback, just type 'Object' anywhere in it, highlight it and press Alt-b.
That will open the Smalltalk browser directly and let you look at the code. After you're done you can just close Scratch, and no harm is done.
In my tutorial I wanted to show non-Smalltalkers a 'safe' way to explore the 'guts' of Scratch, and that includes - for me - preventing the Squeak system windows from being hidden behind the ScratchFrameMorph. That's why I opted to demonstrate how to close and open Scratch from within Squeak, and how to unlock the programmer facilities (because this will let you use Squeak's halo-handles and interupt unwanted processes by pressing Alt-dot using Windows).
Plus, it's cool to have a sneak look at some of the advanced 'experimental' stuff that's hidden in the code...
Last edited by Jens (2007-07-19 04:46:44)
Offline
Is there any possibility to get a textual presentation about the source code instead of these "virtual mashine images"? Can someone convert it? It does not need to be any exact or functional code fragment, but just a overview to see how things are done.
Thanks!
Offline
Jens wrote:
Canthiar, Smalltalk/Squeak is not really an 'interpreted language', but rather a 'living image', that usually contains the whole progamming IDE which lets you inspect/modify virtually everything anywhere. For an experienced Smalltalker there is actually a much quicker way to get to the Scratch source code without closing the ScratchFrameMorph and unlocking the programmer facilities first:
Once you get the walkback, just type 'Object' anywhere in it, highlight it and press Alt-b.
That will open the Smalltalk browser directly and let you look at the code. After you're done you can just close Scratch, and no harm is done.
In my tutorial I wanted to show non-Smalltalkers a 'safe' way to explore the 'guts' of Scratch, and that includes - for me - preventing the Squeak system windows from being hidden behind the ScratchFrameMorph. That's why I opted to demonstrate how to close and open Scratch from within Squeak, and how to unlock the programmer facilities (because this will let you use Squeak's halo-handles and interupt unwanted processes by pressing Alt-dot using Windows).
Plus, it's cool to have a sneak look at some of the advanced 'experimental' stuff that's hidden in the code...
That's true. I tested it as 1.0.image on Scratch 1.2.1, even with fill screen on!
Offline
rdococ wrote:
Jens wrote:
Canthiar, Smalltalk/Squeak is not really an 'interpreted language', but rather a 'living image', that usually contains the whole progamming IDE which lets you inspect/modify virtually everything anywhere. For an experienced Smalltalker there is actually a much quicker way to get to the Scratch source code without closing the ScratchFrameMorph and unlocking the programmer facilities first:
Once you get the walkback, just type 'Object' anywhere in it, highlight it and press Alt-b.
That will open the Smalltalk browser directly and let you look at the code. After you're done you can just close Scratch, and no harm is done.
In my tutorial I wanted to show non-Smalltalkers a 'safe' way to explore the 'guts' of Scratch, and that includes - for me - preventing the Squeak system windows from being hidden behind the ScratchFrameMorph. That's why I opted to demonstrate how to close and open Scratch from within Squeak, and how to unlock the programmer facilities (because this will let you use Squeak's halo-handles and interupt unwanted processes by pressing Alt-dot using Windows).
Plus, it's cool to have a sneak look at some of the advanced 'experimental' stuff that's hidden in the code...That's true. I tested it as 1.0.image on Scratch 1.2.1, even with fill screen on!
Please don't bump old threads.
Offline
BWOG wrote:
rdococ wrote:
Jens wrote:
Canthiar, Smalltalk/Squeak is not really an 'interpreted language', but rather a 'living image', that usually contains the whole progamming IDE which lets you inspect/modify virtually everything anywhere. For an experienced Smalltalker there is actually a much quicker way to get to the Scratch source code without closing the ScratchFrameMorph and unlocking the programmer facilities first:
Once you get the walkback, just type 'Object' anywhere in it, highlight it and press Alt-b.
That will open the Smalltalk browser directly and let you look at the code. After you're done you can just close Scratch, and no harm is done.
In my tutorial I wanted to show non-Smalltalkers a 'safe' way to explore the 'guts' of Scratch, and that includes - for me - preventing the Squeak system windows from being hidden behind the ScratchFrameMorph. That's why I opted to demonstrate how to close and open Scratch from within Squeak, and how to unlock the programmer facilities (because this will let you use Squeak's halo-handles and interupt unwanted processes by pressing Alt-dot using Windows).
Plus, it's cool to have a sneak look at some of the advanced 'experimental' stuff that's hidden in the code...That's true. I tested it as 1.0.image on Scratch 1.2.1, even with fill screen on!
Please don't bump old threads.
I can't bump unless I say the word "bump". (but not in this post)
Offline
rdococ, you don't get the point. 'Bumping' is the term for bringing back old topics.
Please don't bring back old topics unless you have a good reason to.
Offline
I have a good reason to.
Because:
-It has a helpful link in the post #1.
-It's great.
-It has less than 100 pages and posts.
Offline
rdococ wrote:
I have a good reason to.
Because:
-It has a helpful link in the post #1.
-It's great.
-It has less than 100 pages and posts.
Yeah umm... not very good reasons
Offline
rdococ wrote:
I have a good reason to.
Because:
-It has a helpful link in the post #1.
-It's great.
-It has less than 100 pages and posts.
That's not my point. When I say "for a good reason", I'm not talking about the topic. I'm talking about your post.
Just bumping up a topic to agree with someone isn't a good idea. And anyway, judging from your bumping post, you didn't have a good reason at the time.
Last edited by Jonathanpb (2010-02-20 00:08:54)
Offline
BWOG wrote:
rdococ wrote:
Jens wrote:
Canthiar, Smalltalk/Squeak is not really an 'interpreted language', but rather a 'living image', that usually contains the whole progamming IDE which lets you inspect/modify virtually everything anywhere. For an experienced Smalltalker there is actually a much quicker way to get to the Scratch source code without closing the ScratchFrameMorph and unlocking the programmer facilities first:
Once you get the walkback, just type 'Object' anywhere in it, highlight it and press Alt-b.
That will open the Smalltalk browser directly and let you look at the code. After you're done you can just close Scratch, and no harm is done.
In my tutorial I wanted to show non-Smalltalkers a 'safe' way to explore the 'guts' of Scratch, and that includes - for me - preventing the Squeak system windows from being hidden behind the ScratchFrameMorph. That's why I opted to demonstrate how to close and open Scratch from within Squeak, and how to unlock the programmer facilities (because this will let you use Squeak's halo-handles and interupt unwanted processes by pressing Alt-dot using Windows).
Plus, it's cool to have a sneak look at some of the advanced 'experimental' stuff that's hidden in the code...That's true. I tested it as 1.0.image on Scratch 1.2.1, even with fill screen on!
Please don't bump old threads.
Because:
- I tested it, and I am telling that is true.
That's all why I bumped the thread.
Offline
Jonathanpb wrote:
rdococ wrote:
I have a good reason to.
Because:
-It has a helpful link in the post #1.
-It's great.
-It has less than 100 pages and posts.That's not my point. When I say "for a good reason", I'm not talking about the topic. I'm talking about your post.
Just bumping up a topic to agree with someone isn't a good idea. And anyway, judging from your bumping post, you didn't have a good reason at the time.
Stop being nasty.
Anyway, you're not a mod. So stop being like one.
Offline
Stop arguing... this thread hasn't been closed, so you might as well get on topic.
Offline
rdococ wrote:
Jonathanpb wrote:
rdococ wrote:
I have a good reason to.
Because:
-It has a helpful link in the post #1.
-It's great.
-It has less than 100 pages and posts.That's not my point. When I say "for a good reason", I'm not talking about the topic. I'm talking about your post.
Just bumping up a topic to agree with someone isn't a good idea. And anyway, judging from your bumping post, you didn't have a good reason at the time.Stop being nasty.
Anyway, you're not a mod. So stop being like one.
I may not be a moderator, but I can still teach etiquette.
Anyway - as Chrischb said, let's get back on topic.
Last edited by Jonathanpb (2010-02-21 23:36:34)
Offline
Jonathanpb wrote:
rdococ wrote:
Jonathanpb wrote:
That's not my point. When I say "for a good reason", I'm not talking about the topic. I'm talking about your post.
Just bumping up a topic to agree with someone isn't a good idea. And anyway, judging from your bumping post, you didn't have a good reason at the time.Stop being nasty.
Anyway, you're not a mod. So stop being like one.I may not be a moderator, but I can still teach etiquette.
Anyway - as Chrischb said, let's get back on topic.
No you can't. Only in TB game "Pretend to be a mod!".
Please stop 'hurassing' me.
I can still teach Jonthanpb not to bump this topic. It should be in Advanced Topics, not Troubleshooting.
Offline