Re: [Pharo-dev] chunk file format (unrecoverable changes)

2015-09-08 Thread John Brant
types it accepts. John Brant

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-16 Thread 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

Re: [Pharo-dev] displayingProgress on demand

2015-12-08 Thread John Brant
and ``@arg1. John Brant

Re: [Pharo-dev] Pharo vs. Squeak performance

2016-06-21 Thread 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

Re: [Pharo-dev] Pharo vs. Squeak performance

2016-06-21 Thread 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

Re: [Pharo-dev] Performance of [ * ] repeat vs [ * . true ] whileTrue

2016-08-14 Thread John Brant
but most every other Smalltalk (Squeak, VW, & Dolphin) optimize the #repeat method. John Brant

Re: [Pharo-dev] [Vm-dev] Re: [ANN] Ephemeron Support is Ready

2016-06-30 Thread John Brant
Instead of "node parent isSequence and: [ node isLastStatementInBlock not ]", you can use "node isUsed not". John Brant

[Pharo-dev] Pharo vs. Squeak performance

2016-06-20 Thread John Brant
why Pharo is slower? Is there some memory setting that I need to change? John Brant

Re: [Pharo-dev] PositionableStream>>upTo: anObject

2016-08-16 Thread 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

Re: [Pharo-dev] Memory leaks

2017-01-31 Thread John Brant
references. And, the tool will be the current active process so hopefully it isn't causing the memory leak. :) John Brant

Re: [Pharo-dev] Memory leaks

2017-01-31 Thread 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

Re: [Pharo-dev] GTDebugger variables table

2017-02-02 Thread 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

Re: [Pharo-dev] AST node replacement API

2017-01-23 Thread 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

Re: [Pharo-dev] AST node replacement API

2017-01-23 Thread John Brant
m: method and uses the formatted code of the rewritten tree instead. John Brant

Re: [Pharo-dev] Memory leaks

2017-01-30 Thread 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

Re: [Pharo-dev] confused about printString and printIt

2017-02-19 Thread John Brant
developers can more easily see when something is a string vs. some other object. John Brant

Re: [Pharo-dev] confused about printString and printIt

2017-02-19 Thread 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

Re: [Pharo-dev] Binary selector and special characters

2016-08-31 Thread John Brant
characters ? VW allows them. When possible, we made the scanner/parser be a superset of the VW & VA syntax. John Brant

Re: [Pharo-dev] [squeak-dev] Re: large images

2016-10-14 Thread 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

Re: [Pharo-dev] Running on Ubuntu?

2016-11-22 Thread John Brant
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

Re: [Pharo-dev] roundTo: strange behavior

2016-10-31 Thread John Brant
fractions. I prefer this behavior over the ANSI behavior. John Brant

Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread 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

Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread John Brant
fect all of the code rewriting and validation that is part of the RB and its rewrite tools? John Brant

Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread 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

Re: [Pharo-dev] Instructions for Pharo 6 64bits

2016-11-03 Thread 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

Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread 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

Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-04 Thread 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

Re: [Pharo-dev] Generate accessors refactoring

2016-12-07 Thread John Brant
> 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

Re: [Pharo-dev] RBPattern matching dynamic array expressions

2016-12-10 Thread John Brant
, 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

Re: [Pharo-dev] RBPattern matching dynamic array expressions

2016-12-12 Thread 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

Re: [Pharo-dev] Generate accessors refactoring

2016-12-06 Thread 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

Re: [Pharo-dev] Generate accessors refactoring

2016-12-06 Thread John Brant
nd you get a debugger when the refactoring is being performed on something that failed the preconditions. John Brant

Re: [Pharo-dev] collection flatCollect: #something VS (collection collect: #something) flattened

2017-01-12 Thread 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

Re: [Pharo-dev] collection flatCollect: #something VS (collection collect: #something) flattened

2017-01-12 Thread 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

Re: [Pharo-dev] Capitalized

2017-03-15 Thread 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

[Pharo-dev] ftp repositories broken

2017-04-04 Thread John Brant
- sz + 2 max: 1). Adding the "max: 1" allows me to connect to the ftp repository. John Brant

Re: [Pharo-dev] ftp repositories broken

2017-04-04 Thread 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

[Pharo-dev] unable to start linked vm file (linux)

2017-04-03 Thread 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

Re: [Pharo-dev] Rationale behind the "ifTrue:/ifFalse: returns instead of and:/or:'s" rule

2017-04-07 Thread John Brant
^ true ]. ^ false instead of: ^borderColor isColor and: [ borderColor isTranslucentButNotTransparent ] :) John Brant

Re: [Pharo-dev] [Pharo-users] What is the craziest bug you ever face

2017-03-11 Thread 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

Re: [Pharo-dev] [Ann] Calypso is moved to github

2017-07-29 Thread 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

Re: [Pharo-dev] Why do we have SmallDictionary?

2018-06-08 Thread 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

[Pharo-dev] memory leak

2018-06-02 Thread 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

Re: [Pharo-dev] Critiques - Temporaries read before written.

2018-04-16 Thread 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

Re: [Pharo-dev] Critiques - Temporaries read before written.

2018-04-15 Thread John Brant
w: x printString] In this case, x is reported as potentially read before written, but it can’t be. John Brant

[Pharo-dev] Pharo & Windows 10

2018-12-14 Thread 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

Re: [Pharo-dev] Fed up

2020-01-22 Thread 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

Re: [Pharo-dev] _ and precedence

2020-04-27 Thread John Brant
would get the same results if you replaced $_ with $a -- "#'a+' precedence = 1". John Brant

Re: [Pharo-dev] Squeak and Pharo speed differences

2020-05-16 Thread 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

[Pharo-dev] Re: Migration of ReferenceFinder

2022-03-01 Thread John Brant
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

[Pharo-dev] Re: Array sum. is very slow

2022-01-06 Thread John Brant
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

[Pharo-dev] Re: [ANN] Pharo Launcher 3.0.1 released!

2022-05-03 Thread John Brant
g that the virus scanner may be getting in the way. John Brant