Namespaces, Packages: Image available for download, screencast.

Hi all.

For anybody that's interested, I've uploaded a premade Namespaced image at:

http://sourceforge.net/projects/securesqueak/

Caveat emptor; there are bugs, but it does work. To prove it works, I've managed to make a screencast under
Linux in beautiful high resolution, which Google video managed to munge into a pixellated mess:

http://video.google.com/videoplay?docid=771491032612949488&hl=en

(Excuse my heavy breathing.)

A note for others: I made this screencast using a program under Ubuntu Linux called "recordmydesktop". It
works pretty well! Google video also managed to read the .ogg file fine without conversion. I recorded
this at 480p (i.e. 720x480, which for reasons unexplained IceWM decided was actually 180x480). Next time
I might keep the same resolution, but use larger fonts.

Gulik.

--

-- 
Michael van der Gulik <mikevdg <at> gmail.com>

Randal L. Schwartz | 15 Jul 17:17

Re: Namespaces, Packages: Image available for download, screencast.

>>>>> "Michael" == Michael van der Gulik <mikevdg <at> gmail.com> writes:

Michael> Caveat emptor; there are bugs, but it does work. To prove it works,
Michael> I've managed to make a screencast under Linux in beautiful high
Michael> resolution, which Google video managed to munge into a pixellated
Michael> mess:

Michael> http://video.google.com/videoplay?docid=771491032612949488&hl=en

Michael> (Excuse my heavy breathing.)

Get a free vimeo.com account.  They allow HD uploads and playback now.
Limited in uploads per week, but hey, if you're producing that much video, you
don't need free any more. :)

--

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn <at> stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

Re: Namespaces, Packages: Image available for download, screencast.

On Tue, 15 Jul 2008 08:17:20 -0700
merlyn <at> stonehenge.com (Randal L. Schwartz) wrote:

> >>>>> "Michael" == Michael van der Gulik <mikevdg <at> gmail.com> writes:
> 
> Michael> Caveat emptor; there are bugs, but it does work. To prove it works,
> Michael> I've managed to make a screencast under Linux in beautiful high
> Michael> resolution, which Google video managed to munge into a pixellated
> Michael> mess:
> 
> Michael> http://video.google.com/videoplay?docid=771491032612949488&hl=en
> 
> Michael> (Excuse my heavy breathing.)
> 
> Get a free vimeo.com account.  They allow HD uploads and playback now.
> Limited in uploads per week, but hey, if you're producing that much video, you
> don't need free any more. :)

Yes, that's much better; the ogg file uploaded fine as well, and you can download the original ogg from that site:

http://www.vimeo.com/1346927

They let you upload 500MB a week! Wow...

Okay, so here's a challenge to everybody else: make a better screencast of some aspect of Squeak and post it
up there! 

Gulik.

--

-- 
(Continue reading)

Igor Stasenko | 16 Jul 02:24

Re: Namespaces, Packages: Image available for download, screencast.

Cool screencast Michael! :)

I have played with it few minutes to look how it doing things.

One thing, which i don't like is how looks a class declaration:

self inNamespace: 'Kernel.Classes'
	createClass: 'ClassCommentReader'
	ofType: 'normal'
	superclass: 'ClassCategoryReader'
	instanceVariableNames: ''
	classVariableNames: ''

to what 'self' refers to?

Do you plan to allow creating classes by subclassing existing ones,
e.g. by sending a messages to them, like in regular smalltalk?

To my understanding, the above should look like:

Kernel.Classes addClass: (
   Kernel.Classes.ClassCategoryReader subclass: #ClassCommentReader
   type: 'normal'
   instanceVariableNames: ''
   classVariableNames: ''
).

This indicates two separate concepts involved here: namespaces
(Kernel.Classes) and subclassing by sending message to existing class.
And #addClass: here is just a convenience method, which can look like:
(Continue reading)

Igor Stasenko | 16 Jul 02:33

Re: Namespaces, Packages: Image available for download, screencast.

Oh, and also, i'm missing a code for a namespace definition. E.g. in
same way as browser shows a code how to define new classes, it should
show a code how namespaces are defined, like:

Morphic addNamespace: #Kernel

or, with predefined list of imports:

Morphic addNamespace: #Kernel
imports:  'Kernel.Objects Collections'

or:
Morphic addNamespace: #Kernel
imports:  'Kernel.Objects<xx> Collections<yy>'

--

-- 
Best regards,
Igor Stasenko AKA sig.

Re: Namespaces, Packages: Image available for download, screencast.

On Wed, 16 Jul 2008 03:33:09 +0300
"Igor Stasenko" <siguctua <at> gmail.com> wrote:

> Oh, and also, i'm missing a code for a namespace definition. E.g. in
> same way as browser shows a code how to define new classes, it should
> show a code how namespaces are defined, like:
> 
> Morphic addNamespace: #Kernel
> 
> or, with predefined list of imports:
> 
> Morphic addNamespace: #Kernel
> imports:  'Kernel.Objects Collections'
> 
> or:
> Morphic addNamespace: #Kernel
> imports:  'Kernel.Objects<xx> Collections<yy>'

...assuming that Morphic is a namespace here.

To add a Namespace in the NamespaceBrowser, you just right-click on it's parent and select "new". The
functionality above to textually define a Namespace could be implemented. That's an interesting idea.

Namespace>>addNamespace: already exists, as does Namespace>>addImport:.

There are also methods in CodeBuilder which are used when filing in to define Namespace structure and imports.

Gulik.

--

-- 
(Continue reading)

Re: Namespaces, Packages: Image available for download, screencast.

On Wed, 16 Jul 2008 03:24:17 +0300
"Igor Stasenko" <siguctua <at> gmail.com> wrote:

> Cool screencast Michael! :)

Thanks. It was actually more difficult than I thought; thinking and talking at the same time is hard!

> I have played with it few minutes to look how it doing things.
> 
> One thing, which i don't like is how looks a class declaration:
> 
> self inNamespace: 'Kernel.Classes'
> 	createClass: 'ClassCommentReader'
> 	ofType: 'normal'
> 	superclass: 'ClassCategoryReader'
> 	instanceVariableNames: ''
> 	classVariableNames: ''
> 
> to what 'self' refers to?

Er... usually an instance of CodeBuilder.

> Do you plan to allow creating classes by subclassing existing ones,
> e.g. by sending a messages to them, like in regular smalltalk?

That could be done; I'm not particularly happy with the syntax myself. It is not very Smalltalkish.

I think my original idea was to put an absolute minimum of functionality in Class, ClassDescription and
Behavior for <waves hands in air> security. I think that may have been a bit misguided, because being able
to make a subclass is possibly a benign operation.
(Continue reading)

Igor Stasenko | 16 Jul 15:40

Re: Namespaces, Packages: Image available for download, screencast.

2008/7/16 Michael van der Gulik <mikevdg <at> gmail.com>:
> On Wed, 16 Jul 2008 03:24:17 +0300
> "Igor Stasenko" <siguctua <at> gmail.com> wrote:
>
>> Cool screencast Michael! :)
>
> Thanks. It was actually more difficult than I thought; thinking and talking at the same time is hard!
>
>> I have played with it few minutes to look how it doing things.
>>
>> One thing, which i don't like is how looks a class declaration:
>>
>> self inNamespace: 'Kernel.Classes'
>>       createClass: 'ClassCommentReader'
>>       ofType: 'normal'
>>       superclass: 'ClassCategoryReader'
>>       instanceVariableNames: ''
>>       classVariableNames: ''
>>
>> to what 'self' refers to?
>
> Er... usually an instance of CodeBuilder.
>
>> Do you plan to allow creating classes by subclassing existing ones,
>> e.g. by sending a messages to them, like in regular smalltalk?
>
> That could be done; I'm not particularly happy with the syntax myself. It is not very Smalltalkish.
>
> I think my original idea was to put an absolute minimum of functionality in Class, ClassDescription and
Behavior for <waves hands in air> security. I think that may have been a bit misguided, because being able
(Continue reading)

Re: Namespaces, Packages: Image available for download, screencast.

On Wed, 16 Jul 2008 16:40:42 +0300
"Igor Stasenko" <siguctua <at> gmail.com> wrote:

> >> To my understanding, the above should look like:
> >>
> >> Kernel.Classes addClass: (
> >>    Kernel.Classes.ClassCategoryReader subclass: #ClassCommentReader
> >>    type: 'normal'
> >>    instanceVariableNames: ''
> >>    classVariableNames: ''
> >> ).
> >
> > This looks much more logical, but the problem here is that all globals need a context, meaning that any
packages, namespaces, classes and shared variables that you refer to need to be included in the import
list of the importer. That could be done, but it is less elegant than what I did above.
> >
> 
> Sure, but in SecureSqueak, you always compiling code in some context -
> some instance of Namespace, which is first which will be asked for
> returning a symbol's associated value.
> So, for a file-ins you have to work out (if you don't have it already)
> the model, how to switch to different namespace, before compiling some
> code.
> In same manner, as you open 'Scoped workspace' , all fileins should be
> scoped as well.
> And since browser is scoped already, the code above should be
> interpreted just fine by compiler.

Umm... thinking...

(Continue reading)

Igor Stasenko | 26 Jul 09:24

Re: Namespaces, Packages: Image available for download, screencast.

2008/7/26 Michael van der Gulik <mikevdg <at> gmail.com>:
> On Wed, 16 Jul 2008 16:40:42 +0300
> "Igor Stasenko" <siguctua <at> gmail.com> wrote:
>
>> >> To my understanding, the above should look like:
>> >>
>> >> Kernel.Classes addClass: (
>> >>    Kernel.Classes.ClassCategoryReader subclass: #ClassCommentReader
>> >>    type: 'normal'
>> >>    instanceVariableNames: ''
>> >>    classVariableNames: ''
>> >> ).
>> >
>> > This looks much more logical, but the problem here is that all globals need a context, meaning that any
packages, namespaces, classes and shared variables that you refer to need to be included in the import
list of the importer. That could be done, but it is less elegant than what I did above.
>> >
>>
>> Sure, but in SecureSqueak, you always compiling code in some context -
>> some instance of Namespace, which is first which will be asked for
>> returning a symbol's associated value.
>> So, for a file-ins you have to work out (if you don't have it already)
>> the model, how to switch to different namespace, before compiling some
>> code.
>> In same manner, as you open 'Scoped workspace' , all fileins should be
>> scoped as well.
>> And since browser is scoped already, the code above should be
>> interpreted just fine by compiler.
>
> Umm... thinking...
(Continue reading)

Igor Stasenko | 26 Jul 09:32

Re: Namespaces, Packages: Image available for download, screencast.

Oh, and similar to above, the .changes record should look like following:

!Packages.PackageName&version.Fully.Qualified.Name.Space beDefaultScope!

Here comes arbitrary chunk of code.

!

--

-- 
Best regards,
Igor Stasenko AKA sig.

Igor Stasenko | 26 Jul 09:51

Re: Namespaces, Packages: Image available for download, screencast.

A small correction.

The following is unsafe, because #Universe can be already defined
within local environment:

Packages addPackage: #Universe !   " a "
Universe addNamespace: #Earth !  " b "

So, it should be done differently, like following:

!(Packages addPackage: #Universe) beDefaultScope!
   .. here the subchunk with properly set scope.

!

--

-- 
Best regards,
Igor Stasenko AKA sig.

Re: Namespaces, Packages: Image available for download, screencast.

On Sat, 26 Jul 2008 10:24:54 +0300
"Igor Stasenko" <siguctua <at> gmail.com> wrote:

<snip - techy Namespaces stuff>

> Compiler should always known in which environment it compiles a method.
> Then, it is up to environment to install and run the above code
> snippet in proper class/namespace.
> And you mistaken (or mislead) here: the above code should not use
> Kenel.Classes namespace.
> 
> Lets imagine a following code chunk:
> 
> -----------
> Packages addPackage: #Universe !   " a "
> Universe addNamespace: #Earth !  " b "
> 
> !Universe beDefaultScope!  " c "
> 
> Earth addClass: (  "d"
>    Kernel.Classes subclass: #House
>    type: 'normal'
>    instanceVariableNames: ''
>    classVariableNames: ''
> ).
> !
> 
> !Earth beDefaultScope!  " e "
> 
> !House methodsFor:.... blabla!  " f "
(Continue reading)

Igor Stasenko | 27 Jul 08:01

Re: Namespaces, Packages: Image available for download, screencast.

2008/7/27 Michael van der Gulik <mikevdg <at> gmail.com>:
> On Sat, 26 Jul 2008 10:24:54 +0300
> "Igor Stasenko" <siguctua <at> gmail.com> wrote:
>
> <snip - techy Namespaces stuff>
>
>> Compiler should always known in which environment it compiles a method.
>> Then, it is up to environment to install and run the above code
>> snippet in proper class/namespace.
>> And you mistaken (or mislead) here: the above code should not use
>> Kenel.Classes namespace.
>>
>> Lets imagine a following code chunk:
>>
>> -----------
>> Packages addPackage: #Universe !   " a "
>> Universe addNamespace: #Earth !  " b "
>>
>> !Universe beDefaultScope!  " c "
>>
>> Earth addClass: (  "d"
>>    Kernel.Classes subclass: #House
>>    type: 'normal'
>>    instanceVariableNames: ''
>>    classVariableNames: ''
>> ).
>> !
>>
>> !Earth beDefaultScope!  " e "
>>
(Continue reading)

Edgar J. De Cleene | 27 Jul 13:18

Re: Namespaces, Packages: Image available for download, screencast.


El 7/26/08 11:33 PM, "Michael van der Gulik" <mikevdg <at> gmail.com> escribió:

> Code should be a bunch of objects in images that can be passed, as objects, to
> other images. Computers should have persistent object stores, not
> filesystems!lopp is a well-developed squeak-based image app

+ 1.

Sure you have your own , but just in case here is the attached small
utilities for save  and read objects and gz compressed objects.

I using .obj and .obz more and more

Edgar

'From SqueakLight|II of 31 May 2008 [latest update: #7198] on 27 July 2008 at 8:13:54 am'!

!Object
methodsFor: 'evaluating' stamp: 'edc 7/18/2005 10:51'!
ancestors
|  nonMetaClass  classList
|

	nonMetaClass := self theNonMetaClass.
	
	
	classList := OrderedCollection
new.
	
	nonMetaClass allSuperclasses reverseDo: 
		[:aClass | 
		classList add: aClass
name.
		].
	^ classList! !

!Object methodsFor: 'evaluating' stamp: 'edc 7/18/2005
10:51'!
othersClassList
|classList metodosSospechosos |
 classList := Set
new.
metodosSospechosos := self  methodDict .
metodosSospechosos isEmpty
		ifFalse:
[metodosSospechosos
				collect: [:cm | cm literals
						select: [:any | any
isVariableBinding]
						thenCollect: [:each | (Smalltalk at: each key
ifAbsent:[])
								ifNotNil: [  classList add: each key]]]].
					
metodosSospechosos := self
class methodDict .
metodosSospechosos isEmpty
		ifFalse: [metodosSospechosos
				collect: [:cm
| cm literals
						select: [:any | any isVariableBinding]
						thenCollect: [:each | (Smalltalk
(Continue reading)

Randal L. Schwartz | 16 Jul 05:32

Re: Namespaces, Packages: Image available for download, screencast.

>>>>> "Michael" == Michael van der Gulik <mikevdg <at> gmail.com> writes:

Michael> Okay, so here's a challenge to everybody else: make a better
Michael> screencast of some aspect of Squeak and post it up there!

And to encourage that, I've created a Squeak Vimeo group, at
<http://www.vimeo.com/groups/squeak>.  I've set membership to moderated for
the moment just to see what shows up on the first wave, but I'll approve
anyone I can even distantly relate as a non-spammer. :)

--

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn <at> stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


Gmane