types it accepts.
John Brant
arser>>parseCascadeMessage method:
parseCascadeMessage
| node receiver messages semicolons |
node := self parseKeywordMessage.
(currentToken isSpecial
and: [currentToken value = $; and: [node isMessage and: [node
parentheses isEmpty]]]) ifFalse: [^node].
...
John Brant
and ``@arg1.
John Brant
ears to be what is causing the problem. Even though I'm not
using any UI when I run my code, it must be doing something in the
background that is causing the slowdown. When I ran my model code
headlessly in Pharo, it actually finished the 2 minute job a couple
seconds faster than the headless Squeak image (instead of 30 seconds
slower).
John Brant
tween Squeak and Pharo for this. Furthermore, when I
ran the Pharo image using a Squeak vm, I still saw the difference so I
thought it must be some image related thing instead of a vm.
John Brant
but most every other Smalltalk (Squeak, VW, &
Dolphin) optimize the #repeat method.
John Brant
Instead of "node parent isSequence and: [ node isLastStatementInBlock
not ]", you can use "node isUsed not".
John Brant
why Pharo is slower? Is there some memory setting that I need
to change?
John Brant
> On Aug 16, 2016, at 5:45 PM, Nicolas Cellier
> <nicolas.cellier.aka.n...@gmail.com> wrote:
>
> 2016-08-16 23:19 GMT+02:00 John Brant <br...@refactoryworkers.com>:
> I’m guessing that it is using the read before written tester from the
> refactoring bro
references. And, the tool will be the current active process
so hopefully it isn't causing the memory leak. :)
John Brant
ows that it would have been wise to pick
the array of 11587 items to do the pointersTo analysis on above.
John Brant
iately pushes
the "Set" class on the stack so you can't see the "OrderedCollection
new" object.
BTW, the current variable list sometimes shows 'error obtaining field
value' for temporaries when stepping through a method. I'm not sure why
it occurs, but it should always be able to display the temp variables.
John Brant
thod body statements first value replaceWith: (RBParser
parseExpression: '2 - 1') andSource: '2
-
2'.
method newSource
Here the "2 - 2" expression in the replacement source, isn't equal to
the "2 - 1" expression node that was provided so it uses the formatted
code of the parse tree.
John Brant
m:
method and uses the formatted code of the rewritten tree instead.
John Brant
lltalk global to an instance of MyClass. If you want to
find a path to a particular instance, you can use “ReferenceFinder findPathTo:
myInst”.
In the past, I’ve found that NECController and some compiler infrastructure (I
forget the class) have been culprits for memory leaks with their caches.
John Brant
developers can more easily see when
something is a string vs. some other object.
John Brant
evaluated and which are only
for display. Of course, if you want a string that you can evaluate, you
should use #storeString.
John Brant
characters ?
VW allows them. When possible, we made the scanner/parser be a superset
of the VW & VA syntax.
John Brant
The time I was talking about was the time to quit the image without
saving. This time seems to be dependent on the size of the image. For
example, a 100MB image quits almost immediately, but a couple GB one
takes 5 or so seconds and my 7GB one was taking ~15 seconds.
John Brant
On 10/14
able to run Pharo so you could look
at what packages wine would install. One or more of them is likely what
you need to run.
John Brant
fractions. I prefer this
behavior over the ANSI behavior.
John Brant
Why convert it to a node? It has no affect on the running code.
John Brant
> On Nov 3, 2016, at 8:23 AM, Nicolai Hess <nicolaih...@gmail.com> wrote:
>
>
>
> 2016-11-03 13:41 GMT+01:00 stepharo <steph...@free.fr>:
> Hi marcus et al
>
> why RBComment
fect all of the code rewriting and validation that is part of the RB and its
rewrite tools?
John Brant
l of the code
>> rewriting and validation that is part of the RB and its rewrite tools
> With comments cannot act as nullobjects for such operation?
Yes, someone could spend time making all of this work with the existing code.
However, why not fix the real problem in that comments and methods should not
be a single string, but rather objects.
John Brant
io 2
>
> to:
>
> /etc/security/limits.d
Has anyone tried this in a docker container environment? Someone tried to setup
a docker container with the VM for me, but the VM wouldn’t start. After a few
attempts, I decided that we could use the non-heartbeat thread VM.
John Brant
from the standard AST traversal. We don’t need to keep the AST
around since we can recreate it and the 4th node visited will be the same.
John Brant
On 11/04/2016 03:50 AM, Norbert Hartl wrote:
Am 04.11.2016 um 07:53 schrieb Nicolas Cellier
<nicolas.cellier.aka.n...@gmail.com
<mailto:nicolas.cellier.aka.n...@gmail.com>>:
2016-11-04 1:54 GMT+01:00 John Brant <br...@refactoryworkers.com
<mailto:br...@refactoryworkers.com
> On Dec 7, 2016, at 3:44 AM, Denis Kudriashov <dionisi...@gmail.com> wrote:
>
>
> 2016-12-06 19:29 GMT+01:00 John Brant <br...@refactoryworkers.com>:
> > We could make it configurable. "Manually" accessors will be generated in
> > simplified mode
,
you get an error. This should be changed back to be:
match: aNode inContext: aDictionary
aNode class = self class
ifFalse: [ ^ false ].
^ self matchList: statements against: aNode statements inContext:
aDictionary
John Brant
stem where a user provides an sample of something to find. The system would
build some potential patterns and find potential matches, and then the user
would look at the matches and tell the tool which were valid or not. After a
few iterations, hopefully the tool has figured out the pattern the user wanted.
John Brant
> On Dec 6, 2016, at 10:53 AM, Denis Kudriashov <dionisi...@gmail.com> wrote:
>
>
> 2016-12-06 17:16 GMT+01:00 John Brant <br...@refactoryworkers.com>:
> > For me it is too intelligent now because it is tried to create new version
> > of accessors instead o
nd you get a debugger when the refactoring is being
performed on something that failed the preconditions.
John Brant
do: inlining. The first argument is
evaluated before the receiver. Here's a test case that fails:
| stream |
stream := ReadStream on: #(2 1).
stream next to: stream next
do: [ :i | self error: 'This should not occur' ]
This should be evaluated as "2 to: 1 do: ...". Instead it is evaluated
as "1 to: 2 do: ..." .
John Brant
solution. Or, you could
just write your code so the intent is expressed clearly and not worry
about performance until it is needed.
John Brant
racters are unchanged. However, the Capitalize method can
change all characters.
Finally, Dolphin Smalltalk has an implementation that is similar to Pharo's:
https://github.com/dolphinsmalltalk/Dolphin/blob/master/Core/Object%20Arts/Dolphin/Base/String.cls
John Brant
- sz + 2
max: 1).
Adding the "max: 1" allows me to connect to the ftp repository.
John Brant
5-4f4d-978d-22c917bdb3e4 May 26 2016
When I use that VM, it works -- I'm running the same Pharo image file.
If you debug it, the debugger steps over the method (implying that it is
a primitive).
John Brant
=Linux p5810.refactoryworkers.com 4.4.0-71-generic #92-Ubuntu
SMP Fri Mar 24 12:59:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
System seems to be 64 bit. You may need to (re)install the 32-bit
libraries.
This worked for the March 10th vm.
John Brant
^ true ].
^ false
instead of:
^borderColor isColor and: [ borderColor isTranslucentButNotTransparent ]
:)
John Brant
ass. Instead you can create a lightweight class with the breakpoint and
change the particular text widget to use the lightweight class. This way it can
trigger the breakpoint without crashing the image. I don’t use lightweight
classes often, but in certain cases they are really handy (and almost
necessary).
John Brant
en it is pre-refactoring (i.e., they don't look at
code outside the scope).
BTW, if you use post-refactoring, then things like safe remove method
wouldn't work since calls outside the scope would cause the refactoring
to abort without removing the method.
John Brant
ew
RB parser with pattern matching, the time to run Smalllint on the image
was cut in half even though our parser was quite a bit slower than the
VW parser. I don't remember everything that was done, but I think that
most of the speedup came from having special pattern AST nodes and the
small dictionary.
John Brant
which has a NodeModel that contained my AST node.
I'm running a Pharo 7 build from a few weeks ago
(Pharo-7.0+alpha.build.843.sha.edceb623c1a3ac3358f7e46ca1048d455657e10c)
so this may have been fixed.
John Brant
x isNil ifTrue: [Transcript show: 'nil']
However, if you change what is considered read before written, then you
would get something like this:
method
| x |
x := self someValue.
self extractedMethod
extractedMethod
| x |
x isNil ifTrue: [Transcript show: 'nil']
John Brant
w: x printString]
In this case, x is reported as potentially read before written, but it can’t
be.
John Brant
ValueHolder(NewValueHolder)>>valueChanged:
This issue existed in the image I have from a few weeks ago.
I've tried using the latest vm's from both files.pharo.org and bintray.com.
John Brant
BTW, there are other objects that implement #value:, and can be used instead of
blocks. For example, to get a collection of the first 256 characters:
(0 to: 255) collect: Character
John Brant
would get the same results if you replaced $_ with $a -- "#'a+'
precedence = 1".
John Brant
for a factorial included with Pharo would be the
#productTo: method above. It is simple to understand and is reasonably fast.
John Brant
> On May 16, 2020, at 11:17 AM, Bernhard Höfner wrote:
>
> It seems that someone needed an optimized factorial-routine…
> The problem on th
The ReferenceFinder class is the one I wrote for the Refactoring Browser and
then converted to Pharo. It is under the MIT license. It is already part of the
Pharo image
(https://github.com/pharo-project/pharo/tree/Pharo10/src/ReferenceFinder-Core).
John Brant
> On Feb 27, 2022, at 10:03
result in a 2x speedup.
You could also modify the algorithm to update the nsum value in the loop
instead of summing the array each time. I think the updating would require
<120,000 math ops vs the >1.6 billion that you are performing.
John Brant
g that the virus scanner may be getting
in the way.
John Brant
52 matches
Mail list logo