[Cuis-dev] Source Code outside an image

Philip Bernhart philip.bernhart at posteo.de
Sat Jan 16 06:03:49 PST 2021


Hi,

fun fact: if you consider the Base of cuis to
be the 210 classes in the categories

  - Kernel-*
  - Collections-*
  - Compiler-*
  - Exceptions Kernel
  - Exceptions Extensions

then we have atleast 1717 references from that
"base" to other classes in the system.

So if someone want's to build a reduced image of
only these categories, these references need to
be considered.


Cheers,
Philip



Philip Bernhart <philip.bernhart at posteo.de> writes:

> Hi,
>
> I really don't understand why you want to do that. But anyway
> you could through the magic of introspection of Smalltalk
> do that yourself.
>
> 1. Create somewhere a directory for the source dump, remember the
>    absolute path to it (e.g with pwd).
>    
> 2. Open a Workspace
>
> 3. Copy this snippet into that workspace and exchange <sourcesDir>
>    with absolute directory path you should remember in point 1) :
>
> sourcesDir _ '<sourcesDir>' asDirectoryEntry.
>
> Smalltalk allClassesDo: [:cls |
> 	sourcesDir // (cls name, '.st') writeStreamDo: [ :stream |
> 		stream timeStamp.
> 		cls sharedPools size > 0 ifTrue: [
> 			cls shouldFileOutPools
> 				ifTrue: [ cls fileOutSharedPoolsOn: stream ]].
> 		cls fileOutOn: stream moveSource: false toFile: 0 ]. 
> ]
>
> 4. Select the whole in point 3) mentioned code while holding down
>    the left mouse button.
>
> 5. Press the right mouse button and select from the drop down menu
>    "Do It".
>
>
> Cheers,
> Philip
>
> Joshua Scholar via Cuis-dev <cuis-dev at lists.cuis.st> writes:
>
>> Thank you.
>>
>> 147394 lines of code.  [Blink]
>>
>> On Sat, Jan 16, 2021 at 1:16 AM Phil B <pbpublist at gmail.com> wrote:
>>
>>> They are text files so you can read them directly.  The sources file is
>>> CuisV5.sources and the changes file will be <image name>.changes.
>>>
>>> On Sat, Jan 16, 2021 at 4:11 AM Joshua Scholar <joshuascholar at gmail.com>
>>> wrote:
>>>
>>>> Ok, so how can I dump this out.  I want to do that even if it makes one
>>>> big file.
>>>>
>>>> On Sat, Jan 16, 2021 at 1:03 AM Phil B <pbpublist at gmail.com> wrote:
>>>>
>>>>> Joshua,
>>>>>
>>>>> It doesn't exist in the form you're imagining as the core image is
>>>>> monolithic and not built from a bunch of projects/fileins.  If you start
>>>>> with a fresh image, the .sources + .changes files represent the source code
>>>>> of everything in the image.  As soon as you start filing things in or
>>>>> loading packages they get added to the .changes file as well so it's no
>>>>> longer just the base image at that point.
>>>>>
>>>>> Thanks,
>>>>> Phil
>>>>>
>>>>> On Sat, Jan 16, 2021 at 3:30 AM Joshua Scholar via Cuis-dev <
>>>>> cuis-dev at lists.cuis.st> wrote:
>>>>>
>>>>>> Where can I find a project with all of the source code and comments
>>>>>> that make up a minimal cuis (or standard) cuis image?
>>>>>>
>>>>>> Or, if there isn't a project with that, how do I dump that out of an
>>>>>> image?
>>>>>>
>>>>>> Joshua Scholar
>>>>>> --
>>>>>> Cuis-dev mailing list
>>>>>> Cuis-dev at lists.cuis.st
>>>>>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>>>>>
>>>>>
>> -- 
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
> -- 

-- 


More information about the Cuis-dev mailing list