Cleaning code completition's namespace
Hi all, Code completition tools show class/method old names i've changed and no longer use. How can i remove all unused (occurring nowhere in source code) or unimplemented names? Best, Laura
Probably by resetting the Symbol intern table. but no time to dive into it now.
Hi all,
Code completition tools show class/method old names i've changed and no longer use. How can i remove all unused (occurring nowhere in source code) or unimplemented names?
Best, Laura
Got the same problem here. Annoying when third parties have to do something in the environment as they are shown things that do not exist. Where to look? What's the symbol intern table? Phil On Mon, Feb 2, 2015 at 11:44 AM, stepharo <stepharo@free.fr> wrote:
Probably by resetting the Symbol intern table. but no time to dive into it now.
Hi all,
Code completition tools show class/method old names i've changed and no longer use. How can i remove all unused (occurring nowhere in source code) or unimplemented names?
Best, Laura
It's the table that keeps the symbols and checks their uniqueness. but AFAIK the symbol table is weak. So probably it's the completion mechanism that is keeping extra references... El Mon Feb 02 2015 at 11:52:28 AM, phil@highoctane.be <phil@highoctane.be> escribió:
Got the same problem here.
Annoying when third parties have to do something in the environment as they are shown things that do not exist.
Where to look? What's the symbol intern table?
Phil
On Mon, Feb 2, 2015 at 11:44 AM, stepharo <stepharo@free.fr> wrote:
Probably by resetting the Symbol intern table. but no time to dive into it now.
Hi all,
Code completition tools show class/method old names i've changed and no longer use. How can i remove all unused (occurring nowhere in source code) or unimplemented names?
Best, Laura
But weak refs are only killed after GC, right ? And even then...
On 02 Feb 2015, at 12:03, Guillermo Polito <guillermopolito@gmail.com> wrote:
It's the table that keeps the symbols and checks their uniqueness.
but AFAIK the symbol table is weak. So probably it's the completion mechanism that is keeping extra references... El Mon Feb 02 2015 at 11:52:28 AM, phil@highoctane.be <phil@highoctane.be> escribió: Got the same problem here.
Annoying when third parties have to do something in the environment as they are shown things that do not exist.
Where to look? What's the symbol intern table?
Phil
On Mon, Feb 2, 2015 at 11:44 AM, stepharo <stepharo@free.fr> wrote: Probably by resetting the Symbol intern table. but no time to dive into it now. Hi all,
Code completition tools show class/method old names i've changed and no longer use. How can i remove all unused (occurring nowhere in source code) or unimplemented names?
Best, Laura
Well yes, but GCs are happening all the time :). So the problem is that someone is keeping a strong reference on the symbol. I tried the following: - create a method named #unusedUnexpectedMessage: That came up in the auto completion, ok - remove it: Still in auto completion - force GC a looot: still in auto completion After chasing strong references I could clean up my image by doing: ChangeSet cleanUp: true. RecentMessageList cleanUp. 10 timesRepeat: [Smalltalk garbageCollect] First obvious thing: changesets and friends (lets also think about nautilus history that may do that) could keep strong references on symbols. Then the question is if that is correct or not... To me the problem is that the auto completion mechanism is pretty primitive and depends on all existing symbols instead of <the subset of symbols that could be messages>. Guille El Mon Feb 02 2015 at 12:05:49 PM, Sven Van Caekenberghe <sven@stfx.eu> escribió:
But weak refs are only killed after GC, right ?
And even then...
On 02 Feb 2015, at 12:03, Guillermo Polito <guillermopolito@gmail.com> wrote:
It's the table that keeps the symbols and checks their uniqueness.
but AFAIK the symbol table is weak. So probably it's the completion mechanism that is keeping extra references... El Mon Feb 02 2015 at 11:52:28 AM, phil@highoctane.be < phil@highoctane.be> escribió: Got the same problem here.
Annoying when third parties have to do something in the environment as they are shown things that do not exist.
Where to look? What's the symbol intern table?
Phil
On Mon, Feb 2, 2015 at 11:44 AM, stepharo <stepharo@free.fr> wrote: Probably by resetting the Symbol intern table. but no time to dive into it now. Hi all,
Code completition tools show class/method old names i've changed and no longer use. How can i remove all unused (occurring nowhere in source code) or unimplemented names?
Best, Laura
Thank you all for your answers. Hi Guille , Nice solution! It worked perfectly for Code Completition! Yet the obsolete symbols (class names and selectors) keep showing in Spotlight, but i guess this is too implementation specific. I will step through its execution to try to find out how it works. Best, Laura On Mon, Feb 2, 2015 at 8:39 AM, Guillermo Polito <guillermopolito@gmail.com> wrote:
Well yes, but GCs are happening all the time :). So the problem is that someone is keeping a strong reference on the symbol.
I tried the following:
- create a method named #unusedUnexpectedMessage: That came up in the auto completion, ok - remove it: Still in auto completion - force GC a looot: still in auto completion
After chasing strong references I could clean up my image by doing:
ChangeSet cleanUp: true. RecentMessageList cleanUp. 10 timesRepeat: [Smalltalk garbageCollect]
First obvious thing: changesets and friends (lets also think about nautilus history that may do that) could keep strong references on symbols.
Then the question is if that is correct or not... To me the problem is that the auto completion mechanism is pretty primitive and depends on all existing symbols instead of <the subset of symbols that could be messages>.
Guille
El Mon Feb 02 2015 at 12:05:49 PM, Sven Van Caekenberghe <sven@stfx.eu> escribió:
But weak refs are only killed after GC, right ?
And even then...
On 02 Feb 2015, at 12:03, Guillermo Polito <guillermopolito@gmail.com> wrote:
It's the table that keeps the symbols and checks their uniqueness.
but AFAIK the symbol table is weak. So probably it's the completion mechanism that is keeping extra references... El Mon Feb 02 2015 at 11:52:28 AM, phil@highoctane.be < phil@highoctane.be> escribió: Got the same problem here.
Annoying when third parties have to do something in the environment as they are shown things that do not exist.
Where to look? What's the symbol intern table?
Phil
On Mon, Feb 2, 2015 at 11:44 AM, stepharo <stepharo@free.fr> wrote: Probably by resetting the Symbol intern table. but no time to dive into it now. Hi all,
Code completition tools show class/method old names i've changed and no longer use. How can i remove all unused (occurring nowhere in source code) or unimplemented names?
Best, Laura
Hi! Spotlight or Spotter? Which version of Pharo are you using? I ask because the old Spotlight should be using the same code completion mechanism => it should appear/disappear from both at the same time... As for spotter, I don't have an answer now :) Saludos, Guille El Tue Feb 03 2015 at 5:24:26 PM, Laura Risani <laura.risani@gmail.com> escribió:
Thank you all for your answers.
Hi Guille ,
Nice solution! It worked perfectly for Code Completition!
Yet the obsolete symbols (class names and selectors) keep showing in Spotlight, but i guess this is too implementation specific. I will step through its execution to try to find out how it works.
Best, Laura
On Mon, Feb 2, 2015 at 8:39 AM, Guillermo Polito < guillermopolito@gmail.com> wrote:
Well yes, but GCs are happening all the time :). So the problem is that someone is keeping a strong reference on the symbol.
I tried the following:
- create a method named #unusedUnexpectedMessage: That came up in the auto completion, ok - remove it: Still in auto completion - force GC a looot: still in auto completion
After chasing strong references I could clean up my image by doing:
ChangeSet cleanUp: true. RecentMessageList cleanUp. 10 timesRepeat: [Smalltalk garbageCollect]
First obvious thing: changesets and friends (lets also think about nautilus history that may do that) could keep strong references on symbols.
Then the question is if that is correct or not... To me the problem is that the auto completion mechanism is pretty primitive and depends on all existing symbols instead of <the subset of symbols that could be messages>.
Guille
El Mon Feb 02 2015 at 12:05:49 PM, Sven Van Caekenberghe <sven@stfx.eu> escribió:
But weak refs are only killed after GC, right ?
And even then...
On 02 Feb 2015, at 12:03, Guillermo Polito <guillermopolito@gmail.com> wrote:
It's the table that keeps the symbols and checks their uniqueness.
but AFAIK the symbol table is weak. So probably it's the completion mechanism that is keeping extra references... El Mon Feb 02 2015 at 11:52:28 AM, phil@highoctane.be < phil@highoctane.be> escribió: Got the same problem here.
Annoying when third parties have to do something in the environment as they are shown things that do not exist.
Where to look? What's the symbol intern table?
Phil
On Mon, Feb 2, 2015 at 11:44 AM, stepharo <stepharo@free.fr> wrote: Probably by resetting the Symbol intern table. but no time to dive into it now. Hi all,
Code completition tools show class/method old names i've changed and no longer use. How can i remove all unused (occurring nowhere in source code) or unimplemented names?
Best, Laura
I'm using v3, and the #Spotlight (class name) that comes with it. I didn't know about Spotter of v4 before your comment. I've just tried it, it could be handy for some specific situations, after i manually tweak its non-sense whiteness which somewhy escapes global theme defaults (lovely dark theme), i'll give it a try. Yet to the end of shortcuting accessing methods/classes i found Spotlight to be more direct and keystroke cheap. Saludos On Tue, Feb 3, 2015 at 1:28 PM, Guillermo Polito <guillermopolito@gmail.com> wrote:
Hi!
Spotlight or Spotter? Which version of Pharo are you using?
I ask because the old Spotlight should be using the same code completion mechanism => it should appear/disappear from both at the same time...
As for spotter, I don't have an answer now :)
Saludos, Guille
El Tue Feb 03 2015 at 5:24:26 PM, Laura Risani <laura.risani@gmail.com> escribió:
Thank you all for your answers.
Hi Guille ,
Nice solution! It worked perfectly for Code Completition!
Yet the obsolete symbols (class names and selectors) keep showing in Spotlight, but i guess this is too implementation specific. I will step through its execution to try to find out how it works.
Best, Laura
On Mon, Feb 2, 2015 at 8:39 AM, Guillermo Polito < guillermopolito@gmail.com> wrote:
Well yes, but GCs are happening all the time :). So the problem is that someone is keeping a strong reference on the symbol.
I tried the following:
- create a method named #unusedUnexpectedMessage: That came up in the auto completion, ok - remove it: Still in auto completion - force GC a looot: still in auto completion
After chasing strong references I could clean up my image by doing:
ChangeSet cleanUp: true. RecentMessageList cleanUp. 10 timesRepeat: [Smalltalk garbageCollect]
First obvious thing: changesets and friends (lets also think about nautilus history that may do that) could keep strong references on symbols.
Then the question is if that is correct or not... To me the problem is that the auto completion mechanism is pretty primitive and depends on all existing symbols instead of <the subset of symbols that could be messages>.
Guille
El Mon Feb 02 2015 at 12:05:49 PM, Sven Van Caekenberghe <sven@stfx.eu> escribió:
But weak refs are only killed after GC, right ?
And even then...
On 02 Feb 2015, at 12:03, Guillermo Polito <guillermopolito@gmail.com> wrote:
It's the table that keeps the symbols and checks their uniqueness.
but AFAIK the symbol table is weak. So probably it's the completion mechanism that is keeping extra references... El Mon Feb 02 2015 at 11:52:28 AM, phil@highoctane.be < phil@highoctane.be> escribió: Got the same problem here.
Annoying when third parties have to do something in the environment as they are shown things that do not exist.
Where to look? What's the symbol intern table?
Phil
On Mon, Feb 2, 2015 at 11:44 AM, stepharo <stepharo@free.fr> wrote: Probably by resetting the Symbol intern table. but no time to dive into it now. Hi all,
Code completition tools show class/method old names i've changed and no longer use. How can i remove all unused (occurring nowhere in source code) or unimplemented names?
Best, Laura
Hi, On Tue, Feb 3, 2015 at 6:39 PM, Laura Risani <laura.risani@gmail.com> wrote:
I'm using v3, and the #Spotlight (class name) that comes with it.
I didn't know about Spotter of v4 before your comment. I've just tried it, it could be handy for some specific situations, after i manually tweak its non-sense whiteness which somewhy escapes global theme defaults (lovely dark theme), i'll give it a try.
In the latest Pharo 4 Spotter works properly with the Dark Theme. Yet to the end of shortcuting accessing methods/classes i found Spotlight to
be more direct and keystroke cheap.
Could you elaborate? Where do you see the difference? What do you mean by "more direct"? Cheers, Doru
Saludos
On Tue, Feb 3, 2015 at 1:28 PM, Guillermo Polito < guillermopolito@gmail.com> wrote:
Hi!
Spotlight or Spotter? Which version of Pharo are you using?
I ask because the old Spotlight should be using the same code completion mechanism => it should appear/disappear from both at the same time...
As for spotter, I don't have an answer now :)
Saludos, Guille
El Tue Feb 03 2015 at 5:24:26 PM, Laura Risani <laura.risani@gmail.com> escribió:
Thank you all for your answers.
Hi Guille ,
Nice solution! It worked perfectly for Code Completition!
Yet the obsolete symbols (class names and selectors) keep showing in Spotlight, but i guess this is too implementation specific. I will step through its execution to try to find out how it works.
Best, Laura
On Mon, Feb 2, 2015 at 8:39 AM, Guillermo Polito < guillermopolito@gmail.com> wrote:
Well yes, but GCs are happening all the time :). So the problem is that someone is keeping a strong reference on the symbol.
I tried the following:
- create a method named #unusedUnexpectedMessage: That came up in the auto completion, ok - remove it: Still in auto completion - force GC a looot: still in auto completion
After chasing strong references I could clean up my image by doing:
ChangeSet cleanUp: true. RecentMessageList cleanUp. 10 timesRepeat: [Smalltalk garbageCollect]
First obvious thing: changesets and friends (lets also think about nautilus history that may do that) could keep strong references on symbols.
Then the question is if that is correct or not... To me the problem is that the auto completion mechanism is pretty primitive and depends on all existing symbols instead of <the subset of symbols that could be messages>.
Guille
El Mon Feb 02 2015 at 12:05:49 PM, Sven Van Caekenberghe <sven@stfx.eu> escribió:
But weak refs are only killed after GC, right ?
And even then...
On 02 Feb 2015, at 12:03, Guillermo Polito < guillermopolito@gmail.com> wrote:
It's the table that keeps the symbols and checks their uniqueness.
but AFAIK the symbol table is weak. So probably it's the completion mechanism that is keeping extra references... El Mon Feb 02 2015 at 11:52:28 AM, phil@highoctane.be < phil@highoctane.be> escribió: Got the same problem here.
Annoying when third parties have to do something in the environment as they are shown things that do not exist.
Where to look? What's the symbol intern table?
Phil
On Mon, Feb 2, 2015 at 11:44 AM, stepharo <stepharo@free.fr> wrote: Probably by resetting the Symbol intern table. but no time to dive into it now. Hi all,
Code completition tools show class/method old names i've changed and no longer use. How can i remove all unused (occurring nowhere in source code) or unimplemented names?
Best, Laura
-- www.tudorgirba.com "Every thing has its own flow"
Hi Doru , On Fri, Feb 6, 2015 at 9:40 AM, Tudor Girba <tudor@tudorgirba.com> wrote:
In the latest Pharo 4 Spotter works properly with the Dark Theme.
Starting from a fresh image (downloaded this week), and doing nothing more than setting the theme to Pharo 3 Dark, GTSpotter shows white, what is curious because GTInspector and GTPlayground show dark. Could you elaborate? Where do you see the difference? What do you mean by
"more direct"?
I'll tell you what i think based exclusively on my personal preferences (like the black theme) and not having tried the tool for very long, probably there are additional customizations and features i ignore, so my opinion won't be fully qualified. For accessing+navigating the world menu, i like better a global shortcut+the world menu itself, because, unlike Spotter, there is a visual depiction of submenus that let you recognize them beforehand, and when you type to navigate items stay at place so i don't have to visually rescan (to me these qualities are directness ones). In addition, unlike Spotter , word menu opens where the ponter is, so i could choose where to open it if i wanted to. To quickly find and/or browse classes and msg implementations/senders is a need i frequently face (many times i know the names and want a quick access without "polluting" where i am), which can occur in two forms, with or without context. In the contextual case (like browsing from within a class/method) the tool i'm using provides me the browse facilities to address the need. In the uncontextual case, i have Spotlight and Spotter . Spotlight addresses the need directly in two steps 1° find the cls/msg "name" 2°open a specialized (info+actions) browser on it in a regular window (modal/movable/resizeable). The model is a simple direct one-to-one mapping of what i want to do, doesn't make me think how to do what i want to do. In contrast, from the perspective of that need, Spotter -Doesn't search "names" (class names/selectors) but implementations, overlaping the two actions of the need (when i olny hava a clue and i'm not sure of the name i'm interesed into, i don't care for the list of implementations, is obstrusive "garbage"). Forcing me to unnecessarily think how to do what i want to do. In addition i find it hard to think about the tool because i can't figure out a statement of purpose for it, perhaps "global search for a name", but i'm not sure of "global" because it doesn't do source code. -Shows me "garbage" i have to mentally filter (world menu, packages, pragmas, ... ). -Only shows me 5 (implementation) results at the time. - Its window misses the useful qualities of a regular one, which are in many cases useful (sometimes i want to keep the list of implementations/senders open). I don't understand the motivation of this absence, why is better to not have/implement them than to do so? Also i don't understand the motivation of its fixed size/position, i find them annoying, a centered rectangle which impedes me to see anything else and of a size which also makes me hard to read it contents and forces me to scroll, and i "can't" do anything about it because it is fixed, seems a warning sign. Spotlight opens on a corner giving me the choice of seeing something else if i wanted to. -Because it searches implementations instead of selectors it avoids MessageBrowser which (to me) offers a much richer experience for browsing impementations/senders (dual views, more info of implementations like its package, more actions). I want to stress one more time that this is my personal opinion for myself, and while i probably won't use the tool i think that Spotlight and Spotter should coexist as other tools do (like Workspace and Playground) because one tool can't fit all mindsets/preferences. Does anyone know why was Spotlight removed from distribution v4?
Cheers, Doru
Thank you for being interested in my opinion. Best, Laura
Maybe try Symbol compactSymbolTable But completion could do its own caching, I don't know.
On 02 Feb 2015, at 11:44, stepharo <stepharo@free.fr> wrote:
Probably by resetting the Symbol intern table. but no time to dive into it now.
Hi all,
Code completition tools show class/method old names i've changed and no longer use. How can i remove all unused (occurring nowhere in source code) or unimplemented names?
Best, Laura
participants (7)
-
Guillermo Polito -
Laura Risani -
Marcus Denker -
phil@highoctane.be -
stepharo -
Sven Van Caekenberghe -
Tudor Girba