Minimal Squeak Project

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Minimal Squeak Project

marcel.taeumel
Hi, there!

Please find attached some code for a minimal Squeak project. For my opinion, we should detach the UserInputEvent class tree from Morphic to have some more object-orented event handling code available (for other projects).

Squeash-mt.mcz



Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

Karl Ramberg
Seems cool.
Loads without problems.
What kind of projects do you have in mind for Squeach?



Best,
Karl

On Fri, Feb 12, 2016 at 4:24 PM, marcel.taeumel <[hidden email]> wrote:
Hi, there!

Please find attached some code for a minimal Squeak project. For my opinion,
we should detach the UserInputEvent class tree from Morphic to have some
more object-orented event handling code available (for other projects).

Squeash-mt.mcz <http://forum.world.st/file/n4877272/Squeash-mt.mcz>

<http://forum.world.st/file/n4877272/minimal-squeak-project-1.gif>

Best,
Marcel



--
View this message in context: http://forum.world.st/Minimal-Squeak-Project-tp4877272.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

David T. Lewis
In reply to this post by marcel.taeumel
On Fri, Feb 12, 2016 at 07:24:58AM -0800, marcel.taeumel wrote:

> Hi, there!
>
> Please find attached some code for a minimal Squeak project. For my opinion,
> we should detach the UserInputEvent class tree from Morphic to have some
> more object-orented event handling code available (for other projects).
>
> Squeash-mt.mcz <http://forum.world.st/file/n4877272/Squeash-mt.mcz>  
>
> <http://forum.world.st/file/n4877272/minimal-squeak-project-1.gif>
>
> Best,
> Marcel

+1

I definitely like the idea of structuring this as a kind of Project.

Assuming that both MVC and Morphic should be unloadable (and hopefully
also reloadable), then a SqueashProject could represent a minimal environment
when both MVC and Morphic are removed. That seems to provide a lot of
flexibility in scaling down the image. If you need a small image with
a working GUI, then remove everything except MVC. If you do not need
a GUI at all, then scale it all the way down to Squeash.

I have not looked carefully at the UserInputEvent class tree, but it
does look like something that does not need to be part of Morphic. It
is a subclass of MorphicEvent, which has other subclasses that seem
to be specific to Morphic, so I am not sure how that might be refactored.

Class SqueashProject really needs a good class comment :-)

What is a "squeash"? Is it a squeak that has been squashed?

Dave


Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

marcel.taeumel
In reply to this post by Karl Ramberg
Hi Karl, hi David,

"SqueaSH" was just an idea to have a small Squeak Shell. Last summer, we hat a students' project that involved nice ideas about talking to a Squeak image from a command line (outside the VM).

Once I figure out the best way of quickly rendering text, we could just reuse the students' results to actually create a small Squeak Shell. The students also thought about more a convenient input language for quick do-its etc. If it is not that much work, I could make use of that project.

As a prompt/pwd we could use the current "self" like this:

>cd Morph
Morph>cd self new
Morph new>self
aMorph(123456)
Morph new>self color
Color blue
Morph new>cd self color
Morph new color>self
Color blue
Morph new color>_

And some bindings:

Morph new color>col := self.
Morph new color>ls
self -> Color blue.
col -> Color blue.
Morph new color>_

And a shortcuts (CMD+1...9) to provide multiple "terminals" (i.e. workspaces). Not sure.

If there are Morphic projects open, we might want to "start" applications in there:

>TetrisGame new &
Morph added to project "Unnamed Morphic Project" (#someId). To enter that project, type "enter someId".
>_

Something like that. That basic idea is to minimize drawing/layouting/graphics. Support tiny displays. Optimized keyboard input; no mouse required at best.

The biggest challenge right now seems to be the object-oriented event handling and rendering of Text instances. Both should be independent from Morphic. Well, there is the class DisplayText and Paragraph (ST80) inherits from that. Hmm... NewParagraph is just an Object subclass.

Any ideas? I know that tODE (from Dale) has a (more interactive) command line interface with mouse support.

Any volunteers? :-D

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

Edgar J. De Cleene-3
In reply to this post by marcel.taeumel
Very nice !

I create my initialize as no idea how you launch this

See in FunSqueak 4.6

https://youtu.be/3YpDXLNaHyw



On 2/12/16, 12:24 PM, "marcel.taeumel" <[hidden email]> wrote:

> Hi, there!
>
> Please find attached some code for a minimal Squeak project. For my opinion,
> we should detach the UserInputEvent class tree from Morphic to have some
> more object-orented event handling code available (for other projects).
>
> Squeash-mt.mcz <http://forum.world.st/file/n4877272/Squeash-mt.mcz>
>
> <http://forum.world.st/file/n4877272/minimal-squeak-project-1.gif>
>
> Best,
> Marcel
>
>
>
> --
> View this message in context:
> http://forum.world.st/Minimal-Squeak-Project-tp4877272.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.



SqueashProject-initialize.st (296 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

marcel.taeumel
Hi Edgar,

you can launch it via "SqueashProject new enter."

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

marcel.taeumel
It also works via the "Projects" menu in the world main docking bar.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

David T. Lewis
In reply to this post by marcel.taeumel
Hi Marcel,

The idea of using the current self as prompt and pwd seems intuitive
to me. It suggests a mental model of navigating around the objects in
the image.

If you have a Linux or OS X box handy (*), there are a couple of things
in OSProcess/CommandShell that may provide some ideas. If you run Squeak
from a console in the foreground (no '&' on the command line), and then
evaluate 'ExternalCommmandShell start', a "Squeak shell" will be running
in the console, and the prompt will be 'sqsh> '. In this case, pwd
refers to the shell working directory in the file system (like Unix).

>From the tool bar you also have Apps -> Squeak Shell, which opens a
Squeak shell in the image. Again, this is more of a unix model in
which the user navigates the file system and enters command on the
command line (which may be Smalltalk or unix commands). BTW this works
in MVC too, so we have a unix style shell for Morphic, MVC and external
console.

I do like the idea of a shell in which you are navigating through
objects in the image, as opposed to navigating the external file
system. This seems like a more object oriented model, and there is
no reason that it could not be extended to also execute operating
system functions like in CommandShell.

It also seems like the SqueakshProject shell could be easily mapped
to an external console so it would work as an external REPL too,
and the user interaction would be the same in either case.

If we can make Morphic be reloadable, then a good exercise would be
to enter a new SqueakshProject, unload MVC and Morphic, reload them,
and end up with a working image that still allows new Morphic and
MVC projects to be opened.

Dave

(*) Some of this will work on Windows but you really need a unix
platform to do anything useful with CommandShell.


On Sat, Feb 13, 2016 at 02:43:41AM -0800, marcel.taeumel wrote:

> Hi Karl, hi David,
>
> "SqueaSH" was just an idea to have a small Squeak Shell. Last summer, we hat
> a students' project that involved nice ideas about talking to a Squeak image
> from a command line (outside the VM).
>
> Once I figure out the best way of quickly rendering text, we could just
> reuse the students' results to actually create a small Squeak Shell. The
> students also thought about more a convenient input language for quick
> do-its etc. If it is not that much work, I could make use of that project.
>
> As a prompt/pwd we could use the current "self" like this:
>
> >cd Morph
> Morph>cd self new
> Morph new>self
> aMorph(123456)
> Morph new>self color
> Color blue
> Morph new>cd self color
> Morph new color>self
> Color blue
> Morph new color>_
>
> And some bindings:
>
> Morph new color>col := self.
> Morph new color>ls
> self -> Color blue.
> col -> Color blue.
> Morph new color>_
>
> And a shortcuts (CMD+1...9) to provide multiple "terminals" (i.e.
> workspaces). Not sure.
>
> If there are Morphic projects open, we might want to "start" applications in
> there:
>
> >TetrisGame new &
> Morph added to project "Unnamed Morphic Project" (#someId). To enter that
> project, type "enter someId".
> >_
>
> Something like that. That basic idea is to minimize
> drawing/layouting/graphics. Support tiny displays. Optimized keyboard input;
> no mouse required at best.
>
> The biggest challenge right now seems to be the object-oriented event
> handling and rendering of Text instances. Both should be independent from
> Morphic. Well, there is the class DisplayText and Paragraph (ST80) inherits
> from that. Hmm... NewParagraph is just an Object subclass.
>
> Any ideas? I know that tODE (from Dale) has a (more interactive) command
> line interface with mouse support.
>
> Any volunteers? :-D
>
> Best,
> Marcel
>
>
>
> --
> View this message in context: http://forum.world.st/Minimal-Squeak-Project-tp4877272p4877382.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

David T. Lewis
In reply to this post by marcel.taeumel
On Sat, Feb 13, 2016 at 07:15:54AM -0800, marcel.taeumel wrote:
> Hi Edgar,
>
> you can launch it via "SqueashProject new enter."
>
> Best,
> Marcel
>

I know that this is just an early prototype, but whenever it is ready
I think that we should consider including it in trunk.

Why?

I think that Projects are one of the most important and most easily
overlooked parts of Squeak. SqueashProject will require only a small
addition to the system, but it will make it much easier for new users
to understand the concepts behind Projects.

Right now I suspect that many people think of Projects as just a way
to switch to a legacy MVC interface (that they do not care about anyway),
or maybe a way to organize work spaces (which is important). But they
are also a fundamental organizing principle in the system.

If someone wants to invent a new model of interacting with the system,
it is not necessary to convince everyone else to do things your way,
or to completely rewrite Morphic. All you need to do is invent a new
kind of Project and make it work.

That is why I think that having something like SqueashProject can
help. It is like a "Hello world!" program for Projects. If someone
wants to do something new and different, they would have that
example available as a starting point and a working example.

Dave


Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

Karl Ramberg
I use projects all the time. It's very handy to keep all the browsers and stuff open and just switch between projects for the different stuff I'm working on. 

Best,
Karl

On Sat, Feb 13, 2016 at 6:11 PM, David T. Lewis <[hidden email]> wrote:
On Sat, Feb 13, 2016 at 07:15:54AM -0800, marcel.taeumel wrote:
> Hi Edgar,
>
> you can launch it via "SqueashProject new enter."
>
> Best,
> Marcel
>

I know that this is just an early prototype, but whenever it is ready
I think that we should consider including it in trunk.

Why?

I think that Projects are one of the most important and most easily
overlooked parts of Squeak. SqueashProject will require only a small
addition to the system, but it will make it much easier for new users
to understand the concepts behind Projects.

Right now I suspect that many people think of Projects as just a way
to switch to a legacy MVC interface (that they do not care about anyway),
or maybe a way to organize work spaces (which is important). But they
are also a fundamental organizing principle in the system.

If someone wants to invent a new model of interacting with the system,
it is not necessary to convince everyone else to do things your way,
or to completely rewrite Morphic. All you need to do is invent a new
kind of Project and make it work.

That is why I think that having something like SqueashProject can
help. It is like a "Hello world!" program for Projects. If someone
wants to do something new and different, they would have that
example available as a starting point and a working example.

Dave





Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

Herbert König


Am 13.02.2016 um 19:44 schrieb karl ramberg:
I use projects all the time. It's very handy to keep all the browsers and stuff open and just switch between projects for the different stuff I'm working on.

Right now I get paid to work in Python but I create all classes, instvars and method categories in Squeak and use it as a notebook or to test some code snippets. Projects inside projects.
https://imgur.com/p4WAPyu

For Squeak work I use projects like Karl. I never thought of them in the way Dave points out. Learnt something again.

Cheers,

Herbert

Best,
Karl

On Sat, Feb 13, 2016 at 6:11 PM, David T. Lewis <[hidden email]> wrote:
On Sat, Feb 13, 2016 at 07:15:54AM -0800, marcel.taeumel wrote:
> Hi Edgar,
>
> you can launch it via "SqueashProject new enter."
>
> Best,
> Marcel
>

I know that this is just an early prototype, but whenever it is ready
I think that we should consider including it in trunk.

Why?

I think that Projects are one of the most important and most easily
overlooked parts of Squeak. SqueashProject will require only a small
addition to the system, but it will make it much easier for new users
to understand the concepts behind Projects.

Right now I suspect that many people think of Projects as just a way
to switch to a legacy MVC interface (that they do not care about anyway),
or maybe a way to organize work spaces (which is important). But they
are also a fundamental organizing principle in the system.

If someone wants to invent a new model of interacting with the system,
it is not necessary to convince everyone else to do things your way,
or to completely rewrite Morphic. All you need to do is invent a new
kind of Project and make it work.

That is why I think that having something like SqueashProject can
help. It is like a "Hello world!" program for Projects. If someone
wants to do something new and different, they would have that
example available as a starting point and a working example.

Dave






    



Reply | Threaded
Open this post in threaded view
|

PySquik (was: Re: [squeak-dev] Re: Minimal Squeak Project)

timrowledge

> On 13-02-2016, at 12:41 PM, Herbert König <[hidden email]> wrote:
>
> Right now I get paid to work in Python but I create all classes, instvars and method categories in Squeak and use it as a notebook or to test some code snippets. Projects inside projects.

Like it!

So does anyone remember the old pseudo-BASIC syntax read/write capability DanI added a loooong time ago? Maybe there’s an interesting project to make a Python development system within Squeak? And maybe execute it too? Since we have a good jit available, perhaps it would even make it run decently.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
How come it's 'Java One' every year? Aren't they making any progress?



Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

Karl Ramberg
In reply to this post by Herbert König
Would we be able to use Environments to isolate each project so we could run different versions of code in each project ?

That would be cool


Best,
Karl

On Sat, Feb 13, 2016 at 9:41 PM, Herbert König <[hidden email]> wrote:


Am 13.02.2016 um 19:44 schrieb karl ramberg:
I use projects all the time. It's very handy to keep all the browsers and stuff open and just switch between projects for the different stuff I'm working on.

Right now I get paid to work in Python but I create all classes, instvars and method categories in Squeak and use it as a notebook or to test some code snippets. Projects inside projects.
https://imgur.com/p4WAPyu

For Squeak work I use projects like Karl. I never thought of them in the way Dave points out. Learnt something again.

Cheers,

Herbert


Best,
Karl

On Sat, Feb 13, 2016 at 6:11 PM, David T. Lewis <[hidden email]> wrote:
On Sat, Feb 13, 2016 at 07:15:54AM -0800, marcel.taeumel wrote:
> Hi Edgar,
>
> you can launch it via "SqueashProject new enter."
>
> Best,
> Marcel
>

I know that this is just an early prototype, but whenever it is ready
I think that we should consider including it in trunk.

Why?

I think that Projects are one of the most important and most easily
overlooked parts of Squeak. SqueashProject will require only a small
addition to the system, but it will make it much easier for new users
to understand the concepts behind Projects.

Right now I suspect that many people think of Projects as just a way
to switch to a legacy MVC interface (that they do not care about anyway),
or maybe a way to organize work spaces (which is important). But they
are also a fundamental organizing principle in the system.

If someone wants to invent a new model of interacting with the system,
it is not necessary to convince everyone else to do things your way,
or to completely rewrite Morphic. All you need to do is invent a new
kind of Project and make it work.

That is why I think that having something like SqueashProject can
help. It is like a "Hello world!" program for Projects. If someone
wants to do something new and different, they would have that
example available as a starting point and a working example.

Dave






    







Reply | Threaded
Open this post in threaded view
|

Re: PySquik (was: Re: [squeak-dev] Re: Minimal Squeak Project)

David T. Lewis
In reply to this post by timrowledge
On Sat, Feb 13, 2016 at 12:57:10PM -0800, tim Rowledge wrote:
>
> > On 13-02-2016, at 12:41 PM, Herbert K?nig <[hidden email]> wrote:
> >
> > Right now I get paid to work in Python but I create all classes, instvars and method categories in Squeak and use it as a notebook or to test some code snippets. Projects inside projects.
>
> Like it!
>
> So does anyone remember the old pseudo-BASIC syntax read/write capability DanI added a loooong time ago? Maybe there?s an interesting project to make a Python development system within Squeak? And maybe execute it too? Since we have a good jit available, perhaps it would even make it run decently.
>

Do you mean the altSyntax that was integrated into browsers? That
survived through at least Squeak 3.8. I thought it was a nice thing
to have because it was a way to help a new user to grok that Smalltalk
is not about syntax, it's all about the messages and objects.

Dave
 

Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

David T. Lewis
In reply to this post by Karl Ramberg
On Sat, Feb 13, 2016 at 11:15:34PM +0100, karl ramberg wrote:
> Would we be able to use Environments to isolate each project so we could
> run different versions of code in each project ?
>

It certains seems like it would make sense to use Environments to
isolate different kinds of projects. I do not really know how to do
that, but I think it would be great if someone could come up with a
small working example to get us started.

A few years ago (with help from Edgar and others) I did an experimental
port of SimpleMorphic to Squeak, implemented as SMxMorphicProject (a
kind of project):

   http://www.squeaksource.com/SimpleMorphicSqueak

This worked well enough to prove out the concept, but it was a lot of
work to maintain two flavors of Morphic in the same image, relying only
on naming conventions to separate the two. If we could have done the
same thing using Environments, it would have been much easier.

The only problem is that I do not actually know /how/ to use Environments
to do this. I find this quite frustrating, because I think that Environments
is well designed and cleanly implemented, but I do not quite understand
how to take that first step to actually use it. Can anyone help with this?


FWIW, here is the project description from SimpleMorphicSqueak, with our
conclusions as of about 2013:

>  SimpleMorphic is created by Juan Vuletich, with initial release for Pharo
>  (and Squeak) supported by ESUG. For the latest versions of Juan's work,
>  refer to Cuis Smalltalk, available at http://www.jvuletich.org/Cuis/Index.html.
>  
>  This project started with the original SimpleMorphic release for Pharo,
>  adapted to Squeak's project structure. The focus here is to make
>  SimpleMorphic runnable within its own type of project such that classic
>  Morphic, SimpleMorphic, and MVC can coexist within a Squeak image.
>  
>  This project as of March 2011 is intended for distribution of working
>  development snapshots and will hopefully become obsolete in the not too
>  distant future.
>  
>  dtl 11-Dec-2013: This project achieved success to the extent of
>  demonstrating feasibility of hosting an alternative Morphic environment
>  in the Squeak project structure, but is no longer in active development.
>  Considerable progress has since been made both in Cuis and Morphic3,
>  which represents a major advance over the current Morphic implementation.

Dave


Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

marcel.taeumel
In reply to this post by David T. Lewis
Hi Dave!

Sure, we can include it into trunk :-)

Here is the latest version: Squeash-mt.mcz

And here is a video: http://i.giphy.com/3o6gbdvakUXrmgi7F6.gif

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

timrowledge

> On 14-02-2016, at 9:55 AM, marcel.taeumel <[hidden email]> wrote:
>
> And here is a video: http://i.giphy.com/3o6gbdvakUXrmgi7F6.gif

Congratulations - we now have a system that can be used to run a terminal in the next SF movie needing a geeky backdrop :-)

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Change is inevitable....except from vending machines.



Reply | Threaded
Open this post in threaded view
|

Re: Minimal Squeak Project

marcel.taeumel
Hey Tim,

a new Matrix? :-)

Best,
Marcel