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