4
|
1 |
"*
|
|
2 |
* $Header$
|
|
3 |
*
|
|
4 |
* sample private.rc - file
|
|
5 |
*
|
52
|
6 |
* a copy of this file can (should) reside in $home/.smalltalk/private.rc or
|
|
7 |
* in the current directory - put all private preferences in here.
|
41
|
8 |
*
|
|
9 |
*
|
25
|
10 |
* notice, you will find some things enclosed in
|
|
11 |
* ... getLoginName = 'claus' ifTrue:[
|
|
12 |
*
|
|
13 |
* these are my personal preferrences which will be
|
|
14 |
* ignored in your environment, but are taken in mine.
|
|
15 |
* That way, I dont have to maintain two different 'private.rc' files.
|
|
16 |
* (you may want to have a look into it - some is of general interrest)
|
4
|
17 |
*"
|
|
18 |
|
25
|
19 |
"/
|
26
|
20 |
"/ I want the hostname to be prepended to a windows label
|
|
21 |
"/
|
|
22 |
StandardSystemView includeHostNameInLabel:true.
|
|
23 |
|
|
24 |
"/
|
52
|
25 |
"/ this turns off/on information messages from classes
|
25
|
26 |
"/ (such as 'D8IMAGE: allocating colors ...'
|
|
27 |
"/
|
|
28 |
"/ Object infoPrinting:false.
|
|
29 |
Object infoPrinting:true.
|
|
30 |
|
|
31 |
"/
|
52
|
32 |
"/ this turns off/on information messages from the VM
|
25
|
33 |
"/ (such as 'MEM: chitty chatty ...'
|
|
34 |
"/
|
|
35 |
"/ ObjectMemory infoPrinting:false.
|
|
36 |
ObjectMemory infoPrinting:true.
|
|
37 |
|
|
38 |
"/
|
|
39 |
"/ this turns off error/fatal messages from the VM
|
|
40 |
"/ (it does not really make sense to turn them off)
|
|
41 |
"/
|
|
42 |
"/ Smalltalk debugPrinting:false.
|
|
43 |
|
|
44 |
"/
|
|
45 |
"/ set the package for fileIns done below
|
|
46 |
"/
|
24
|
47 |
Project notNil ifTrue:[
|
|
48 |
Project setDefaultProject.
|
25
|
49 |
Project current packageName:#'goody-fileIn'.
|
24
|
50 |
].
|
|
51 |
!
|
|
52 |
|
91
|
53 |
|whoAmI|
|
|
54 |
|
116
|
55 |
Transcript showCR:'reading keyboard.rc ...'.
|
41
|
56 |
Smalltalk fileIn:'keyboard.rc'.
|
26
|
57 |
|
|
58 |
"/
|
|
59 |
"/ no matter what the 'display.rc' says:
|
|
60 |
"/ I want my #iris style ...
|
|
61 |
"/
|
77
|
62 |
View defaultStyle:#iris.
|
|
63 |
"/ View defaultStyle:#motif.
|
25
|
64 |
|
104
|
65 |
|
|
66 |
|
25
|
67 |
"/ add my private directories to the searchPath ...
|
|
68 |
"/ This does not make sense in your environment.
|
|
69 |
"/ However, I leave the code here to show how its done.
|
|
70 |
"/
|
24
|
71 |
Smalltalk systemPath addFirst:'../..'.
|
|
72 |
|
91
|
73 |
whoAmI := OperatingSystem getLoginName.
|
|
74 |
|
|
75 |
(whoAmI = 'claus' or:[whoAmI = 'cg']) ifTrue:[
|
26
|
76 |
Smalltalk systemPath addFirst:'../../not_delivered'.
|
|
77 |
Smalltalk systemPath addFirst:'../../private_classes'.
|
|
78 |
Smalltalk systemPath addFirst:'../../fileIn/not_delivered'.
|
25
|
79 |
Smalltalk systemPath addFirst:'../../libpro'.
|
16
|
80 |
].
|
25
|
81 |
|
|
82 |
"/ since smalltalk keeps track of which directories exist
|
|
83 |
"/ in the path, this cache has to be flushed whenever new directories
|
|
84 |
"/ are added to the path:
|
|
85 |
"/
|
24
|
86 |
Smalltalk flushPathCaches.
|
16
|
87 |
|
25
|
88 |
"/
|
|
89 |
"/ color allocation strategy:
|
|
90 |
"/
|
|
91 |
"/ the default is to allocate from the colormap as required.
|
|
92 |
"/ As long as the number of distinct colors used is less than the number
|
|
93 |
"/ of available colors (which is usually the case) this leads to better looking
|
|
94 |
"/ images.
|
|
95 |
"/ However, if many images are to be displayed simulatiously, images displayed
|
|
96 |
"/ first may steal too many colors required in images displayed later.
|
|
97 |
"/ In this case, it is better to preallocate some colors, and dither all images
|
|
98 |
"/ using theese. Of course, while making the worst case better, this makes
|
|
99 |
"/ the best case worse. You can decide ...
|
|
100 |
"/
|
10
|
101 |
"/ Color getColors6x6x4.
|
|
102 |
|
|
103 |
|
25
|
104 |
"/ The following loads some nice cursors; for example thumbsUp and thumbsDown
|
|
105 |
"/
|
|
106 |
"/ claus:
|
|
107 |
"/ I like those fancy cursors :-)
|
|
108 |
"/ if you think this is too 'childish', remove the line below ...
|
|
109 |
"/
|
|
110 |
"/
|
116
|
111 |
"/ Transcript showCR:'loading fancy cursors ...'.
|
118
|
112 |
Cursor initializeNewCursors.
|
10
|
113 |
|
25
|
114 |
|
|
115 |
"/ claus:
|
26
|
116 |
"/ The history manager automatically adds a history line to changed
|
|
117 |
"/ methods and optionally to a classes history method.
|
|
118 |
"/
|
91
|
119 |
(whoAmI = 'claus' or:[whoAmI = 'cg']) ifTrue:[
|
12
|
120 |
Compiler warnSTXSpecials:false.
|
26
|
121 |
HistoryManager notNil ifTrue:[
|
116
|
122 |
Transcript showCR:'activating HistoryManager ...'.
|
26
|
123 |
HistoryManager activate.
|
|
124 |
]
|
7
|
125 |
].
|
41
|
126 |
|
|
127 |
"/ claus:
|
|
128 |
"/ I dont want those warnings about stx features being non-portable ...
|
|
129 |
"/ However, you should (at least when new to the system) see them.
|
|
130 |
"/ Once you get bored about them, make the below unconditional.
|
|
131 |
"/ (you can also turn them off in the NewLaunchers settings menu ...)
|
|
132 |
"/
|
26
|
133 |
Compiler allowUnderscoreInIdentifier:true.
|
|
134 |
Compiler warnUnderscoreInIdentifier:false.
|
10
|
135 |
|
25
|
136 |
|
|
137 |
"/ this is a temporary kludge: specify the flags to be used
|
|
138 |
"/ when compiling via stc. Primitive compilation (from within the browser)
|
|
139 |
"/ is still experimental. So you better not care (yet)
|
|
140 |
"/ BTW: its only supported on UnixWare and SGI anyway
|
|
141 |
"/ (and not in the free demo release).
|
|
142 |
"/
|
|
143 |
Compiler stcCompilation:#default.
|
10
|
144 |
OperatingSystem getOSType = 'irix' ifTrue:[
|
64
|
145 |
Compiler stcCompilationIncludes:'-I../../include -I../../libPVM/pvm3/include -I../../libPVM/pvm3/pvmgs'.
|
26
|
146 |
Compiler stcCompilationDefines:'-DGLX'.
|
10
|
147 |
] ifFalse:[
|
64
|
148 |
Compiler stcCompilationIncludes:'-I../../include -I../../support/VGL/vogl/src -I../../libPVM/pvm3/include -I../../libPVM/pvm3/pvmgs'.
|
26
|
149 |
Compiler stcCompilationDefines:'-DVGL'.
|
|
150 |
|
|
151 |
"/
|
|
152 |
"/ disabled; thats the default anyway ....
|
|
153 |
"/
|
|
154 |
"/ OperatingSystem getOSType = 'linux' ifTrue:[
|
|
155 |
"/ ObjectFileLoader searchedLibraries:#('/usr/lib/libc.a')
|
|
156 |
"/ ]
|
|
157 |
|
25
|
158 |
].
|
64
|
159 |
Compiler stcCompilationOptions:'+optinline +inlineNew -O'.
|
7
|
160 |
|
25
|
161 |
"/ experimental: try to always keep some bytes in the pocket
|
64
|
162 |
"/ this changes the memory policy, to start the background collector whenever
|
25
|
163 |
"/ freespace drops below 250k or 500k have been allocated since the last GC.
|
|
164 |
"/ AND to allocate more memory, if (after the collect) less than 1Mb is free.
|
|
165 |
"/ Doing so makes the system behave better if lots of memory is required
|
64
|
166 |
"/ for short periods of time, since it prepares itself for that situation
|
25
|
167 |
"/ during idle time. (I often walk around in the fileBrowser, loading big
|
|
168 |
"/ files like XWorkstation.st or SystemBrowser.st ....)
|
|
169 |
"/
|
26
|
170 |
ObjectMemory freeSpaceGCAmount:1000000.
|
|
171 |
ObjectMemory freeSpaceGCLimit:250000.
|
|
172 |
ObjectMemory incrementalGCLimit:500000.
|
|
173 |
ObjectMemory startBackgroundCollectorAt:5.
|
|
174 |
ObjectMemory startBackgroundFinalizationAt:5.
|
25
|
175 |
|
|
176 |
"/ experimental: configure the memory manager to quickly increase
|
|
177 |
"/ its oldSpace, as long as it stays below 8Mb (i.e. do not enter
|
|
178 |
"/ a blocking mark&sweep or compress, but go straight ahead increasing
|
|
179 |
"/ the oldSpace). Above that, behave as usual, i.e. try a GC first,
|
|
180 |
"/ then increase the oldSpace size if that did not help.
|
|
181 |
"/ If you have a machine with lots of (real) memory, you may want to
|
|
182 |
"/ increase the number. The value below should be ok for 16-32Mb machines.
|
|
183 |
"/
|
26
|
184 |
ObjectMemory fastMoreOldSpaceLimit:8*1024*1024.
|
|
185 |
ObjectMemory fastMoreOldSpaceAllocation:true.
|
16
|
186 |
!
|
|
187 |
|
25
|
188 |
"/ another experimental (and a secret for now, since I dont want
|
|
189 |
"/ you to play with those ;-)
|
|
190 |
"/ For now, this is experimental. Once the best numbers
|
|
191 |
"/ have been found, I'll hardwire them and document it ...
|
|
192 |
|
8
|
193 |
|a|
|
|
194 |
ObjectMemory newSpaceSize > (500*1024) ifTrue:[
|
|
195 |
a := #(nil nil nil nil -16 -4 -2 -2 0 0 16 nil) copy.
|
|
196 |
] ifFalse:[
|
17
|
197 |
"/ min max cpy /32 /16 /8 /4 /2 /4 /8 /16 /32 "
|
25
|
198 |
"/
|
|
199 |
"/ slow tenure - keeps objects longer in newSpace,
|
|
200 |
"/ producing more scavenge overhead, but releasing IGC somewhat
|
|
201 |
"/
|
17
|
202 |
"/ a := #(nil nil nil -100 -8 -4 -1 1 2 4 8 16 nil) copy.
|
|
203 |
"/ a := #(nil nil nil nil -16 -4 0 0 0 4 16 nil) copy.
|
25
|
204 |
|
17
|
205 |
"fast tenure"
|
25
|
206 |
"/
|
|
207 |
"/ fast tenure - moves objects earlier into oldSpace,
|
|
208 |
"/ releasing newSpace collector; however, the oldSpace IGC
|
|
209 |
"/ may have more work to do.
|
|
210 |
"/
|
16
|
211 |
a := #(nil nil nil nil -20 -8 -3 -1 -1 1 16 nil) copy.
|
8
|
212 |
].
|
|
213 |
ObjectMemory tenureParameters:a.
|
25
|
214 |
|
|
215 |
|
|
216 |
"/ set the package back to some useful default for programming
|
|
217 |
"/ this is the package token assigned (by default) to all new methods/classes
|
|
218 |
"/ (so you can use a browser on package=#private to find all of your new
|
|
219 |
"/ stuff easily. (the conditional on Project being nonNil is for stripped down
|
|
220 |
"/ systems without a Project class)
|
|
221 |
|
|
222 |
Project notNil ifTrue:[
|
|
223 |
Project setDefaultProject.
|
|
224 |
Project current packageName:#'private'.
|
|
225 |
].
|
8
|
226 |
!
|