Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 3 participants
- 144616 messages
Re: [Pharo-dev] DNU with GT Debugger
by Tudor Girba
Hi,
Thanks for the report. Do you happen to have an image around?
Doru
> On Aug 9, 2016, at 11:47 AM, stepharo <stepharo(a)free.fr> wrote:
>
> While trying to debug pillar I got a DNU when clicking on the raw pane (when the items was selected)
>
> DNU:
>
> presentation rawSelection is aLinkedList and it does not understand key
>
>
>
>
> 'From Pharo 6.0 of 13 May 2016 [Latest update: #60173] on 9 August 2016 at 11:45:10.355092 am'!
>
> !GTRawObjectVariablesBrowser methodsFor: 'private building' stamp: 'AndreiChis 4/26/2016 10:37'!
> variablesIn: composite
> ^ composite table
> showOnly: 50;
> shouldValidate: false;
> allowsRecursiveSearch: false;
> children: [ :assoc |
> assoc key = 'self'
> ifTrue: [ #() ]
> ifFalse: [ self variableValuePairsFor: assoc value ] ];
> icon: [ :assoc | self iconFor: assoc value ];
> display: [ :anObject |
> self rebuildCacheFor: anObject.
> self variableValuePairsFor: anObject ];
> column: 'Variable'
> evaluated: [:assoc | ' ', (GTObjectPrinter new asNonTruncatedTextFrom: assoc key) ];
> column: 'Value'
> evaluated: [:assoc | GTObjectPrinter new asTruncatedTextFrom: assoc value ]
> modified: [:newValue :assoc :presentation |
> self updateInstanceVariable: assoc key from: presentation entity basedOn: newValue.
> presentation update ];
> morphicSelectionAct: [:list | list selection value browse ]
> icon: GLMUIThemeExtraIcons glamorousBrowse
> on: $b
> entitled: 'Browse';
> morphicSelectionAct: [:list | list selection value inspect ]
> icon: GLMUIThemeExtraIcons glamorousInspect
> on: $i
> entitled: 'Inspect';
> selectionAct: [:list |
> ((list selection pointersToExcept: { list selection })
> reject: [ :each | each pointsOnlyWeaklyTo: list selection ]) inspect ]
> on: $t
> entitled: 'Open pointers to';
> dynamicActionsOnSelection: [ :presentation |
> (presentation entity class hasInstVarNamed: presentation rawSelection key)
>
> ^^^^^^^^ here
>
>
>
> ifTrue: [
> {
> GLMGenericAction new
> action: [:list | self systemNavigation browseAllAccessesTo: list rawSelection key from: list entity class ];
> title: 'List methods using this variable'.
> GLMGenericAction new
> action: [:list | self systemNavigation browseAllStoresInto: list rawSelection key from: list entity class ];
> title: 'List methods storing into this variable'.
> }
> ]
> ifFalse: [ #() ] ]! !
>
> <GTRawObjectVariablesBrowser-variablesIn.st>
--
www.tudorgirba.com
www.feenk.com
"Reasonable is what we are accustomed with."
Aug. 9, 2016
DNU with GT Debugger
by stepharo
While trying to debug pillar I got a DNU when clicking on the raw pane
(when the items was selected)
DNU:
presentation rawSelection is aLinkedList and it does not understand key
'From Pharo 6.0 of 13 May 2016 [Latest update: #60173] on 9 August 2016
at 11:45:10.355092 am'!
!GTRawObjectVariablesBrowser methodsFor: 'private building' stamp:
'AndreiChis 4/26/2016 10:37'!
variablesIn: composite
^ composite table
showOnly: 50;
shouldValidate: false;
allowsRecursiveSearch: false;
children: [ :assoc |
assoc key = 'self'
ifTrue: [ #() ]
ifFalse: [ self variableValuePairsFor: assoc value ] ];
icon: [ :assoc | self iconFor: assoc value ];
display: [ :anObject |
self rebuildCacheFor: anObject.
self variableValuePairsFor: anObject ];
column: 'Variable'
evaluated: [:assoc | ' ', (GTObjectPrinter new
asNonTruncatedTextFrom: assoc key) ];
column: 'Value'
evaluated: [:assoc | GTObjectPrinter new
asTruncatedTextFrom: assoc value ]
modified: [:newValue :assoc :presentation |
self updateInstanceVariable: assoc key from:
presentation entity basedOn: newValue.
presentation update ];
morphicSelectionAct: [:list | list selection value browse ]
icon: GLMUIThemeExtraIcons glamorousBrowse
on: $b
entitled: 'Browse';
morphicSelectionAct: [:list | list selection value inspect ]
icon: GLMUIThemeExtraIcons glamorousInspect
on: $i
entitled: 'Inspect';
selectionAct: [:list |
((list selection pointersToExcept: { list selection })
reject: [ :each | each
pointsOnlyWeaklyTo: list selection ]) inspect ]
on: $t
entitled: 'Open pointers to';
dynamicActionsOnSelection: [ :presentation |
(presentation entity class hasInstVarNamed: presentation
rawSelection key)
^^^^^^^^ here
ifTrue: [
{
GLMGenericAction new
action: [:list | self systemNavigation
browseAllAccessesTo: list rawSelection key from: list entity class ];
title: 'List methods using this variable'.
GLMGenericAction new
action: [:list | self systemNavigation
browseAllStoresInto: list rawSelection key from: list entity class ];
title: 'List methods storing into this
variable'.
}
]
ifFalse: [ #() ] ]! !
Aug. 9, 2016
Re: [Pharo-dev] another segfault from Pharo5.0 vm (freshly downloaded today) Ubuntu 14.04
by stepharo
Me too I get from time to time a VM crash (sometimes after a
smalltalkhub hiccups).
Stef
Le 8/8/16 à 15:26, Mariano Martinez Peck a écrit :
> For the record, I do also continue to see this crash in Pharo 5.0 with
> it's stable VM.
> But as Esteban said, it's too random that I don't have more info to
> share :(
>
>
> On Mon, Aug 8, 2016 at 6:39 AM, Esteban Lorenzano <estebanlm(a)gmail.com
> <mailto:estebanlm@gmail.com>> wrote:
>
> damn :(
> FreeType bug strikes again⦠:((
>
> to be honest, Iâm playing with the idea to completely replace it
> with a UFFI version.
> I cannot find why/how this happens⦠in some conditions handle
> become invalid and pharo has no idea pointer is not valid any
> more⦠then crash. Double free was what I guess but I do not find
> where that happens (the double free). And Iâm also open to believe
> in some memory handling problem in VM, now :((
>
> Esteban
>
> > On 05 Aug 2016, at 22:55, Dale Henrichs
> <dale.henrichs(a)gemtalksystems.com
> <mailto:dale.henrichs@gemtalksystems.com>> wrote:
> >
> > Attached crash dump file ...
> >
> > This one occurred after I'd had an image open for several hours
> interesting that similar to the other crashes I've seen recently
> FreeTypeFace seems to be implicated:
> >
> > Smalltalk stack dump:
> > 0xff7bc02c I [] in FreeTypeFace(FT2Handle)>pvtDestroyHandle
> 0xcdeae10: a(n) FreeTypeFace
> > 0xff7bc04c M BlockClosure>ensure: 0x9edc9b0: a(n) BlockClosure
> > 0xff7bc078 I [] in Mutex>critical: 0xadc7960: a(n) Mutex
> > 0xff7bc098 M [] in Semaphore>critical: 0xba42d50: a(n) Semaphore
> > 0xff7bc0b8 M BlockClosure>ensure: 0x9edcab8: a(n) BlockClosure
> > 0xff7bc0d8 M Semaphore>critical: 0xba42d50: a(n) Semaphore
> > 0xff7bc100 I Mutex>critical: 0xadc7960: a(n) Mutex
> > 0xff7bc124 I FreeTypeFace(FT2Handle)>pvtDestroyHandle 0xcdeae10:
> a(n) FreeTypeFace
> > 0xff7bc13c M FreeTypeFace(FT2Handle)>finalize 0xcdeae10: a(n)
> FreeTypeFace
> > 0xff7bc154 M ByteSymbol(Symbol)>value: 0xa3ab850: a(n) ByteSymbol
> > 0xff7bc178 M ObjectFinalizerCollection(OrderedCollection)>do:
> 0xaa62580: a(n) ObjectFinalizerCollection
> > 0xff7bc19c I ObjectFinalizerCollection>finalize 0xaa62580: a(n)
> ObjectFinalizerCollection
> > 0xff7bc1c0 I WeakFinalizerItem>finalizeValues 0xb8cae80: a(n)
> WeakFinalizerItem
> > 0xff7bc1dc M [] in WeakRegistry>finalizeValues 0xa6dd690: a(n)
> WeakRegistry
> > 0xff7bc1f4 M BlockClosure>on:do: 0x9edc8a8: a(n) BlockClosure
> > 0xff7bc214 M BlockClosure>on:fork: 0x9edc8a8: a(n) BlockClosure
> > 0xff7bc234 M [] in WeakRegistry>finalizeValues 0xa6dd690: a(n)
> WeakRegistry
> > 0xff7bc258 M OrderedCollection>do: 0x9edc450: a(n) OrderedCollection
> > 0xff7bc280 M WeakRegistry>finalizeValues 0xa6dd690: a(n)
> WeakRegistry
> > 0xff7bc29c M [] in WeakArray class>finalizationProcess
> 0xa5cefc0: a(n) WeakArray class
> > 0xff7bc2b4 M BlockClosure>on:do: 0x9edc398: a(n) BlockClosure
> > 0xff7bc2d4 M BlockClosure>on:fork: 0x9edc398: a(n) BlockClosure
> > 0xff7bc2f4 M [] in WeakArray class>finalizationProcess
> 0xa5cefc0: a(n) WeakArray class
> > 0xff7bc318 M WeakArray(SequenceableCollection)>do: 0xa381328:
> a(n) WeakArray
> > 0xff7bc33c I [] in WeakArray class>finalizationProcess
> 0xa5cefc0: a(n) WeakArray class
> > 0xff7bc35c M [] in Semaphore>critical: 0xcc147b0: a(n) Semaphore
> > 0xff7bc37c M BlockClosure>ensure: 0x9edb760: a(n) BlockClosure
> > 0xff7bc39c M Semaphore>critical: 0xcc147b0: a(n) Semaphore
> > 0xff7bc3c0 I WeakArray class>finalizationProcess 0xa5cefc0: a(n)
> WeakArray class
> > 0xbd19fe8 s [] in WeakArray class>restartFinalizationProcess
> > 0xce10050 s [] in BlockClosure>newProcess
> >
> > Looks like pvtDestroyHandle went a little overboard:)
> >
> > Dale
> > <crash.dmp>
>
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
Aug. 9, 2016
Re: [Pharo-dev] [pharo-project/pharo-core] e91f1f: 60171
by stepharo
Pay attention that it was on my todo to work on packaging Grid and I
need to do a pass on the Spec version
because I do not like the design. So I will probably change the Grid
package.
Then I not sure that the grid should be by default in Pharo.
It was a personal project and I should probably improve it again.
Stef
Le 8/8/16 à 10:34, GitHub a écrit :
> 60171
> 18875 RBRemoveClassRefactoring applicable despite showing a warning
> https://pharo.fogbugz.com/f/cases/18875
>
> 18793 Add CTGrid
> https://pharo.fogbugz.com/f/cases/18793
>
> 18876 Rename BinaryFileStream >> setAtEnd -> setToEnd
> https://pharo.fogbugz.com/f/cases/18876
Aug. 9, 2016
Re: [Pharo-dev] ensure blocks in TestCase>>tearDown are not run if an error occurs inside ensured block when test itself was halted ...
by Max Leske
> On 9 Aug 2016, at 00:03, Nicolai Hess <nicolaihess(a)gmail.com> wrote:
>
>
>
> 2016-08-08 17:35 GMT+02:00 Max Leske <maxleske(a)gmail.com <mailto:maxleske@gmail.com>>:
>
>> On 8 Aug 2016, at 17:15, Nicolai Hess <nicolaihess(a)gmail.com <mailto:nicolaihess@gmail.com>> wrote:
>>
>>
>>
>> 2016-08-08 15:26 GMT+02:00 Max Leske <maxleske(a)gmail.com <mailto:maxleske@gmail.com>>:
>>
>>> On 8 Aug 2016, at 15:00, Dale Henrichs <dale.henrichs(a)gemtalksystems.com <mailto:dale.henrichs@gemtalksystems.com>> wrote:
>>>
>>> Max,
>>>
>>> Thanks for looking into this.
>>>
>>> Do you think that this bug will be fixed in Pharo5.0? When I'm debugging the tests with this fatal pattern, my only recourse is to start and stop images between test runs ...
>>>
>>>
>>
>> If this is indeed a bug in the termination logic then yes, it will be ported to Pharo 5 since itâs critical.
>>> The side effect of not running ensure blocks in tests is that a SharedQueue gets stuck waiting on an empty queue and when I interrupt that process (and get another debugger that is closed) I end up with the Empty Debugger problem where the debuggers have decide to stop working ... I saw that there was logic in Process>>terminate involved in dealing with processes running in critical blocks and that logic might be faulty as well ...
>>>
>>>
>>
>> Thanks for the details.
>>
>>
>> Hey Max,
>>
>> I looked at
>> Process>>#terminate
>> and I think the problem is that it sets isTerminating := true, but later for the "Unwind error during termination", it spaws a new debugger for this process.
>> And if we now again press "Abondand" we don't try to terminate this process (and don't call the inner ensure-block) because isTerminating is already true.
>
> Thanks Nicolai,
>
> I canât look at the code at the moment, but as far as I recall, sending #terminate twice should signal a warning. So if what youâre saying is true, Iâd expect to see a debugger opened with that warning. I also think that even if there was an unwind error, the process that is already terminating the process within termination should be the only process to continue termination. In other terms: only a single process should ever execute termination for a given process. But thatâs an educated guess, as I donât know how the exception handling is implemented for unwind errors.
>
> If itâs indeed how you describe, then I think the proper way to terminate the process in case of an unwind error, would be to pop the contexts up to the next unwind handler and execute that. #terminate should not be sent multiple times.
>
>
> There are actually two ensure-blocks involved.
> If we "Abandon" the first debugger window, the ensure block of TestCase>>#runCase is called, which in turn throws an error from BugTestCase>>#tearDown, so we now have an exception during
> process terminations unwind operation. That is why the second debugger windonw shows "Unwind error during termination" instead of "Error:teardown".
> If we new "ABandon" this second debugger window, we try to terminate a process that is within its terminate-and-unwind operation.
Ok. Thanks for the analysis.
>
> Cheers,
> Max
>
>>
>>
>>
>>> Dale
>>>
>>> On 8/8/16 12:11 AM, Max Leske wrote:
>>>> Thanks Nicolai.
>>>>
>>>> Iâve opened an issue on phogbugz: https://pharo.fogbugz.com/f/cases/18885/Ensure-blocks-in-test-tear-down-not… <https://pharo.fogbugz.com/f/cases/18885/Ensure-blocks-in-test-tear-down-not…>.
>>>>
>>>>
>>>>> On 8 Aug 2016, at 09:03, Nicolai Hess <nicolaihess(a)gmail.com <mailto:nicolaihess@gmail.com>> wrote:
>>>>>
>>>>>
>>>>>
>>>>> 2016-08-08 8:52 GMT+02:00 Max Leske <maxleske(a)gmail.com <mailto:maxleske@gmail.com>>:
>>>>> Wow, thatâs pretty bad. The process termination logic should be taking care of the ensure blocks. Unfortunately I canât run any Pharo images at the moment but if thereâs something wrong with process termination then itâs likely that me or Ben made some mistake. Could someone please rerun Daleâs test scenario with the original process termination code (e.g. from Pharo 3) and report the results?
>>>>>
>>>>> Yes, test runs fine in pharo 30864 (halts in the ensure block)
>>>>>
>>>>>
>>>>> Cheers,
>>>>> Max
>>>>>
>>>>>
>>>>> > On 8 Aug 2016, at 03:25, Dale Henrichs <dale.henrichs(a)gemtalksystems.com <mailto:dale.henrichs@gemtalksystems.com>> wrote:
>>>>> >
>>>>> > While attempting to characterize the "Empty Debugger" problem that I've recently reported[1], I found that ensure blocks in TestCase>>teardown methods are not run if an Error is signaled while executing the code protected by the ensure block ... when the test itself brings up a debugger --- now that is a mouthful :) ... but a situation that commonly occurs ...
>>>>> >
>>>>> > I've attached a fileIn with a very simple reproduction of this problem. After filing in the code, execute the following:
>>>>> >
>>>>> > BugTestCase debug: #test.
>>>>> >
>>>>> > Abandon the first halt -- this is the halt in the test. Next a debugger is brought up on the error from inside the ensure block in the tearDown method:
>>>>> >
>>>>> > tearDown
>>>>> > [ self error: 'teardown' ]
>>>>> > ensure: [
>>>>> > "Imagine that something important NEEDED to be done here"
>>>>> > self halt ].
>>>>> > super tearDown.
>>>>> >
>>>>> > Abandon the error and the `self halt` in the ensure block is not run ...
>>>>> >
>>>>> > If you take the `self halt` out of the test method itself, the `self halt` in the ensure block _is_ run ...
>>>>> >
>>>>> > This does not directly lead to the Empty Debugger, but when the ensure blocks called during teardown are not run, a resource is not cleaned up properly and that leads to SharedQueue hanging ... when I interrupt the SharedQueue, I believe that this leads to the "Empty Debugger" a separate, but more nasty problem ...
>>>>> >
>>>>> > Dale
>>>>> >
>>>>> > [1] http://forum.world.st/Re-Empty-debugger-Pharo-5-0-td4909911.html <http://forum.world.st/Re-Empty-debugger-Pharo-5-0-td4909911.html>
>>>>> >
>>>>> > <BugTestCase.st <http://bugtestcase.st/>>
Aug. 9, 2016
Re: [Pharo-dev] Status of SmallPOS
by ЮÑий ÐиÑоненко
>
> I do not have the time now to write configuration (working on boring
> report)
>
You shouldn't probably make the configuration even if you have time.
Reason is: SmallPOS is dependent on outdated version of both Seaside and
GLORP. No reason to make configuration before I'll adopt the contemporary
ones. Really it's the reason I didn't made it myself.
It would be nice.
> I want to see if I can say to lionel to have a look :)
>
Ok, I'll do it.
You should have PostgreSQL installed on your system, BTW.
P.S. There are couple of screenshots of SmallPOS-based management system,
They are in russian, but you can understand basic idea.
2016-08-07 21:37 GMT+03:00 stepharo <stepharo(a)free.fr>:
>
> Well, general procedure is loading magritte, then loading seaside 2.8,
> then loading SmallPOS...I made some packaging efforts, see
> https://code.google.com/archive/p/smalltalkpos/wikis/
> FullyAutomatedGoferScriptForSmallPOSInstallation.wiki
>
>
> ok
> I do not have the time now to write configuration (working on boring
> report).
>
>
> But, well, at the moment simplest possibility is sending you
> pre-configured image. I may make one for you, if you want.
>
> Another trouble is: SmallPOS is not the management software, it's a
> framework for making management software. I.e., if only smallpos loaded,
> then you can't look at how it *works*.
>
> If you want, I may tinker a small SmallPOS-based example, it's easy and
> usefull anyway, so do not hesitate to ask :) Something like "Firms and
> persons", or "books, authors and bookholders" or "teachers, students and
> courses" - feel free to propose one.
>
> It would be nice.
> I want to see if I can say to lionel to have a look :)
>
>
> There ARE some real-life examples at the same repo, but trouble is they
> are tinkered for russian market, so all the labels in russian :)
>
> Greetings,
> Yuriy Mironenko
>
> 2016-08-07 14:36 GMT+03:00 stepharo <stepharo(a)free.fr>:
>
>> There is no configuration and I tried to load the latest version and it
>> looks like it depends on magritte.
>>
>> How do you load it?
>>
>>
>> Stef
>>
>>
>> Le 30/7/16 à 19:16, Yuriy Mironenko a écrit :
>>
>>> Sorry for answering the "deadly long forgotten" post, but, anyway: it
>>> happens
>>>
>>> at the moment of migration to ss3, I believe. I don't really remember
>>> actual
>>> "relicensing" process, I think it was just...welll...selecting from the
>>> drop-down list, and this time I selected another option.
>>>
>>> If you or somebody else will ever need SmallPOS under any other open
>>> license, I will be glad to deliver it under this license.
>>>
>>>
>>>
>>> --
>>> View this message in context: http://forum.world.st/Status-o
>>> f-SmallPOS-tp4649796p4908797.html
>>> Sent from the Pharo Smalltalk Developers mailing list archive at
>>> Nabble.com.
>>>
>>>
>>>
>>
>>
>
>
Aug. 9, 2016
Re: [Pharo-dev] Out of ideas...
by Bernardo Ezequiel Contreras
Hi,
have you try with (World>>Help>>Help Browser>>Regular Expressions
Framework>>Usage)
SUBEXPRESSION MATCHES
After a successful match attempt, you can query the specifics of which
part of the original string has matched which part of the whole
expression.
A subexpression is a parenthesized part of a regular expression, or
the whole expression. When a regular expression is compiled, its
subexpressions are assigned indices starting from 1, depth-first,
left-to-right. For example, `((ab)+(c|d))?ef' includes the following
subexpressions with these indices:
1: ((ab)+(c|d))?ef
2: (ab)+(c|d)
3: ab
4: c|d
After a successful match, the matcher can report what part of the
original string matched what subexpression.
And theres an example
This facility provides a convenient way of extracting parts of input
strings of complex format. For example, the following piece of code
uses the 'MMM DD, YYYY' date format recognizer example from the
`Syntax' section to convert a date to a three-element array with year,
month, and day strings (you can select and evaluate it right here):
| matcher |
matcher := RxMatcher forString:
'(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[
]+(:isDigit::isDigit:?)[ ]*,[ ]*(19|20)(:isDigit::isDigit:)'.
(matcher matches: 'Aug 6, 1996')
ifTrue:
[Array
with: (matcher subexpression: 5)
with: (matcher subexpression: 2)
with: (matcher subexpression: 3)]
ifFalse: ['no match']
(should answer ` #('96' 'Aug' '6')').
you could make two subexpressions
'([\s.;\:!?]*)(#\w+)'
first subexpression is ([\s.;\:!?]*)
and second subexpression is (#\w+)
and then use
It understandards these
messages:
subexpressionCount
Answers the total number of subexpressions: the highest value that
can be used as a subexpression index with this matcher. This value
is available immediately after initialization and never changes.
subexpression: anIndex
An index must be a valid subexpression index, and this message
must be sent only after a successful match attempt. The method
answers a substring of the original string the corresponding
subexpression has matched to.
On Mon, Aug 8, 2016 at 7:10 PM, Casimiro - GMAIL <casimiro.barreto(a)gmail.com
> wrote:
> If someone can help me... I'm dealing with the following situation:
>
>
> I may have a string in which matches of the following regex:
> '[\s.;\:!?]*#\w+' may happen (multiple times). I want to replace the
> #\w+ part of it by nothing but keep the [\s.;\:!?]* but it seems to be
> no easy way using copyWithRegex: matchesTranslatedWith: or
> copyWithRegex: matchesReplacedWith:
>
> Someone knows an easy (meaning, no several operations, etc) to do this????
>
>
> Thanks in advance,
>
>
> Casimiro Barreto
>
>
> --
> The information contained in this message is confidential and intended
> to the recipients specified in the headers. If you received this message
> by error, notify the sender immediately. The unauthorized use,
> disclosure, copy or alteration of this message are strictly forbidden
> and subjected to civil and criminal sanctions.
>
> ==
>
>
> ---
> Este email foi escaneado pelo Avast antivÃrus.
> https://www.avast.com/antivirus
>
>
>
--
Bernardo E.C.
Sent from a cheap desktop computer in South America.
Aug. 8, 2016
Out of ideas...
by Casimiro - GMAIL
If someone can help me... I'm dealing with the following situation:
I may have a string in which matches of the following regex:
'[\s.;\:!?]*#\w+' may happen (multiple times). I want to replace the
#\w+ part of it by nothing but keep the [\s.;\:!?]* but it seems to be
no easy way using copyWithRegex: matchesTranslatedWith: or
copyWithRegex: matchesReplacedWith:
Someone knows an easy (meaning, no several operations, etc) to do this????
Thanks in advance,
Casimiro Barreto
--
The information contained in this message is confidential and intended
to the recipients specified in the headers. If you received this message
by error, notify the sender immediately. The unauthorized use,
disclosure, copy or alteration of this message are strictly forbidden
and subjected to civil and criminal sanctions.
==
---
Este email foi escaneado pelo Avast antivÃrus.
https://www.avast.com/antivirus
Aug. 8, 2016
Re: [Pharo-dev] ensure blocks in TestCase>>tearDown are not run if an error occurs inside ensured block when test itself was halted ...
by Nicolai Hess
2016-08-08 17:35 GMT+02:00 Max Leske <maxleske(a)gmail.com>:
>
> On 8 Aug 2016, at 17:15, Nicolai Hess <nicolaihess(a)gmail.com> wrote:
>
>
>
> 2016-08-08 15:26 GMT+02:00 Max Leske <maxleske(a)gmail.com>:
>
>>
>> On 8 Aug 2016, at 15:00, Dale Henrichs <dale.henrichs(a)gemtalksystems.com>
>> wrote:
>>
>> Max,
>>
>> Thanks for looking into this.
>>
>> Do you think that this bug will be fixed in Pharo5.0? When I'm debugging
>> the tests with this fatal pattern, my only recourse is to start and stop
>> images between test runs ...
>>
>>
>> If this is indeed a bug in the termination logic then yes, it will be
>> ported to Pharo 5 since itâs critical.
>>
>> The side effect of not running ensure blocks in tests is that a
>> SharedQueue gets stuck waiting on an empty queue and when I interrupt that
>> process (and get another debugger that is closed) I end up with the Empty
>> Debugger problem where the debuggers have decide to stop working ... I saw
>> that there was logic in Process>>terminate involved in dealing with
>> processes running in critical blocks and that logic might be faulty as well
>> ...
>>
>>
>> Thanks for the details.
>>
>
>
> Hey Max,
>
> I looked at
> Process>>#terminate
> and I think the problem is that it sets isTerminating := true, but later
> for the "Unwind error during termination", it spaws a new debugger for this
> process.
> And if we now again press "Abondand" we don't try to terminate this
> process (and don't call the inner ensure-block) because isTerminating is
> already true.
>
>
> Thanks Nicolai,
>
> I canât look at the code at the moment, but as far as I recall, sending
> #terminate twice should signal a warning. So if what youâre saying is true,
> Iâd expect to see a debugger opened with that warning. I also think that
> even if there was an unwind error, the process that is already terminating
> the process within termination should be the only process to continue
> termination. In other terms: only a single process should ever execute
> termination for a given process. But thatâs an educated guess, as I donât
> know how the exception handling is implemented for unwind errors.
>
> If itâs indeed how you describe, then I think the proper way to terminate
> the process in case of an unwind error, would be to pop the contexts up to
> the next unwind handler and execute that. #terminate should not be sent
> multiple times.
>
>
There are actually two ensure-blocks involved.
If we "Abandon" the first debugger window, the ensure block of
TestCase>>#runCase is called, which in turn throws an error from
BugTestCase>>#tearDown, so we now have an exception during
process terminations unwind operation. That is why the second debugger
windonw shows "Unwind error during termination" instead of "Error:teardown".
If we new "ABandon" this second debugger window, we try to terminate a
process that is within its terminate-and-unwind operation.
> Cheers,
> Max
>
>
>
>
>>
>> Dale
>> On 8/8/16 12:11 AM, Max Leske wrote:
>>
>> Thanks Nicolai.
>>
>> Iâve opened an issue on phogbugz: https://pharo.fogbug
>> z.com/f/cases/18885/Ensure-blocks-in-test-tear-down-not-always-executed.
>>
>>
>> On 8 Aug 2016, at 09:03, Nicolai Hess <nicolaihess(a)gmail.com> wrote:
>>
>>
>>
>> 2016-08-08 8:52 GMT+02:00 Max Leske <maxleske(a)gmail.com>:
>>
>>> Wow, thatâs pretty bad. The process termination logic should be taking
>>> care of the ensure blocks. Unfortunately I canât run any Pharo images at
>>> the moment but if thereâs something wrong with process termination then
>>> itâs likely that me or Ben made some mistake. Could someone please rerun
>>> Daleâs test scenario with the original process termination code (e.g. from
>>> Pharo 3) and report the results?
>>>
>>
>> Yes, test runs fine in pharo 30864 (halts in the ensure block)
>>
>>
>>>
>>> Cheers,
>>> Max
>>>
>>>
>>> > On 8 Aug 2016, at 03:25, Dale Henrichs <dale.henrichs@gemtalksystems.
>>> com> wrote:
>>> >
>>> > While attempting to characterize the "Empty Debugger" problem that
>>> I've recently reported[1], I found that ensure blocks in TestCase>>teardown
>>> methods are not run if an Error is signaled while executing the code
>>> protected by the ensure block ... when the test itself brings up a debugger
>>> --- now that is a mouthful :) ... but a situation that commonly occurs ...
>>> >
>>> > I've attached a fileIn with a very simple reproduction of this
>>> problem. After filing in the code, execute the following:
>>> >
>>> > BugTestCase debug: #test.
>>> >
>>> > Abandon the first halt -- this is the halt in the test. Next a
>>> debugger is brought up on the error from inside the ensure block in the
>>> tearDown method:
>>> >
>>> > tearDown
>>> > [ self error: 'teardown' ]
>>> > ensure: [
>>> > "Imagine that something important NEEDED to be done here"
>>> > self halt ].
>>> > super tearDown.
>>> >
>>> > Abandon the error and the `self halt` in the ensure block is not run
>>> ...
>>> >
>>> > If you take the `self halt` out of the test method itself, the `self
>>> halt` in the ensure block _is_ run ...
>>> >
>>> > This does not directly lead to the Empty Debugger, but when the ensure
>>> blocks called during teardown are not run, a resource is not cleaned up
>>> properly and that leads to SharedQueue hanging ... when I interrupt the
>>> SharedQueue, I believe that this leads to the "Empty Debugger" a separate,
>>> but more nasty problem ...
>>> >
>>> > Dale
>>> >
>>> > [1] http://forum.world.st/Re-Empty-debugger-Pharo-5-0-td4909911.html
>>> >
>>> > <BugTestCase.st <http://bugtestcase.st/>>
>>
>>
>
Aug. 8, 2016
Re: [Pharo-dev] GT-Spotter dive in shortcut
by Nicolai Hess
2016-08-07 22:59 GMT+02:00 Tudor Girba <tudor(a)tudorgirba.com>:
> Hi,
>
> > On Aug 7, 2016, at 9:15 PM, Nicolai Hess <nicolaihess(a)gmail.com> wrote:
> >
> >
> >
> > 2016-08-07 19:58 GMT+02:00 Tudor Girba <tudor(a)tudorgirba.com>:
> >
> > > On Aug 7, 2016, at 6:24 PM, Nicolai Hess <nicolaihess(a)gmail.com>
> wrote:
> > >
> > >
> > >
> > > 2016-08-07 16:23 GMT+02:00 Tudor Girba <tudor(a)tudorgirba.com>:
> > > Hi,
> > >
> > > > On Aug 7, 2016, at 4:13 PM, Nicolai Hess <nicolaihess(a)gmail.com>
> wrote:
> > > >
> > > >
> > > >
> > > > 2016-08-07 15:23 GMT+02:00 Tudor Girba <tudor(a)tudorgirba.com>:
> > > > Hi,
> > > >
> > > >
> > > > > On Aug 3, 2016, at 11:16 AM, Nicolai Hess <nicolaihess(a)gmail.com>
> wrote:
> > > > >
> > > > >
> > > > >
> > > > > 2016-08-03 10:02 GMT+02:00 Tudor Girba <tudor(a)tudorgirba.com>:
> > > > > Hi,
> > > > >
> > > > > > On Aug 3, 2016, at 9:16 AM, Nicolai Hess <nicolaihess(a)gmail.com>
> wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > 2016-06-18 23:34 GMT+02:00 Nicolai Hess <nicolaihess(a)gmail.com>:
> > > > > >
> > > > > >
> > > > > > 2016-06-18 20:55 GMT+02:00 Tudor Girba <tudor(a)tudorgirba.com>:
> > > > > > Hi,
> > > > > >
> > > > > > Command is an actual key on Mac next to Option(which is Alt) and
> Control. So, Command is a concrete key and mapping it logically to another
> key on another platform is mixing semantics.
> > > > > >
> > > > > > I propose to have two distinct layers in the image:
> > > > > > 1. the raw layer is about having a distinct selector for each
> concrete key that is found on the keyboard. Right now, it seems to me that
> the VM does a bit of interpretation and mapping, and if it does, I think it
> should just provide a distinct code for each distinct key.
> > > > > > 2. the portable layer is about having a couple of selectors
> (e.g., #meta, #secondaryMeta) that provide consistent mappings to the raw
> keys.
> > > > > >
> > > > > > So, in this way, #command/#control/#alt would belong to layer 1.
> and #meta/#secondaryMeta (we could find a better name) would belong to
> layer 2.
> > > > > >
> > > > > > Does this make sense?
> > > > > >
> > > > > >
> > > > > > So, what does that mean for the text navigation mapping in
> Rubric. Which shortcut should I use?
> > > > > >
> > > > > > Any way to take a decision?
> > > > > >
> > > > > > I don't really want to wait until we implement a new layer.
> > > > >
> > > > > Thanks for the ping.
> > > > >
> > > > > I think that you cannot use now properly a uniform shortcut if we
> do not introduce these âlayersâ. I also think that we are talking about a
> couple of methods, so the effort is only in making the decision. I think
> that given that nobody disagreed, we can go ahead with it.
> > > > >
> > > > > For the specific question related to text navigation in Rubric,
> you could use #meta.
> > > > >
> > > > > But how?
> > > > > If I add this to RubTextEditor class>>#buildShortcutsOn: aBuilder
> > > > >
> > > > >
> > > > > (aBuilder shortcut: #nextWord)
> > > > > category: RubTextEditor name
> > > > > default: Character arrowRight meta
> > > > > do: [ :target :morph :event | target editor cursorRight:
> event]
> > > > > description: 'move to next word'.
> > > > >
> > > > >
> > > > >
> > > > > (aBuilder shortcut: #previousWord)
> > > > > category: RubTextEditor name
> > > > > default: Character arrowLeft meta
> > > > > do: [ :target :morph :event | target editor cursorLeft:
> event]
> > > > > description: 'move to the previous word'.
> > > > >
> > > > >
> > > > > we can not dive in/out in spotter.
> > > > >
> > > > > This is why I asked:
> > > > >
> > > > > Why did the shortcut for dive-in element/category changed from
> > > > > cmd+right
> > > > > cmd+shift+right
> > > > > to
> > > > > ctrl+right
> > > > > ctrl+shift+right
> > > >
> > > > Oh, I see now!
> > > >
> > > > The change was made from cmd+right to meta+right in the move of
> Guille to make all keybindings uniform.
> > > >
> > > > If a keybinding would be problematic in Spotter, we could also
> override the keybinding directly in the Spotter editor, I think. What do
> you think?
> > > >
> > > > what is Spotter editor? if it is the text input field, yes, but you
> have to overwrite it on this morph
> > >
> > > That is what I meant, to define the keys for diving twice, once in the
> spotter morph and once in the text input field. This should solve the
> problem, right?
> > >
> > > twice ?
> >
> > On a second thought, this is probably not needed because the focus
> should always be in the text input morph :).
> >
> > Still, we would only do that after we introduce the âlayeringâ.
> >
> > Would this be Ok with you?
> >
> > Cheers,
> > Doru
> >
> > Oh well ....
> > Please take a look at the current implementation of event handling, just
> 10 minutes or so.
> > how we use different (shortcut) event registration
> > shortcut handling
> > event handling
> > some are defined in code, some shortcuts handled by the editor , some by
> the morph
> > some shortcuts are defined on the morph that gets the events, some are
> defined on other morphs.
> > some event (shortcuts spotters dive in / dive out) only works *because*
> we have the two shortcut handlers (handleKeystroke: / dispatchKeystroke:)
> >
> > and tell me that it is a good idea to just start introducing something
> new
> >
> > I really think we should clean up what we have now or at least finish
> the move to the kmdispatcher event handling.
>
> Sure, but I think the two issues are independent from each other.
>
> I think that we can add the âlayersâ that I mentioned on top of what we
> have right now to offer tools built on top a choice of platform-independent
> modifiers, and then we can still continue cleaning underneath.
>
> I mean, if we change #meta and add #secondaryMeta it should work, not? Or
> do I miss something?
>
> Cheers,
> Doru
>
>
Hey Doru,
about what "two issues" are we talking? My only issue for now is,
what shortcut shold we use for moving the cursor forward/backward word.
Even if we introduce a new layer, at some point in time you need to
define: If the user types the CTRL+LEFT -key, even if we call it
differently, some action happens, dive-out or move-backward-word ?
At the moment (on windows) you can use both to move word-by-word:
ctrl+left/right and alt+left/right, because this is how it is defined in
rubrics action/cmdaction map.
If we want to clean this up and use the kmdispatcher registration, I think
we don't want to use both ctr and alt again, right?
So, someone has to take the decision.
I myself would prefer
ctrl+left/right because this is what (all) many other programs are using on
windows. Fine. But recently Spotter changed its
dive in / dive out shortcut to use ctrl+left/right.
Therefor I am asking you, why, and whether we want to keep it or not. If we
want to keep it, we may
- just overwrite the binding for the textfield -> not good, I think, you
wouldn't be able to do word-by-word movements in the textfield anymore
- overwrite the binding and use another binding for word-by-word moving,
but just in spotters text field
Or we revert that change and use the old shortcuts again.
(And what to use for mac and linux?)
but I am getting really tired of asking, and will do something else
instead.
Aug. 8, 2016