Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- November
- October
- September
- 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
- 8 participants
- 144643 messages
Re: [Pharo-dev] rethinking the print it action in Pharo
by Thierry Goubier
So,
when do we do the syntax errors in the same way?
Thierry
Le 28/07/2014 01:33, Tudor Girba a écrit :
> Hi,
>
> In the course of revamping the Pharo environment, we stumbled across
> the print it action and we (Andrei and I) decided to rethink it.
> Inline image 1
>
> You can find more details here:
> http://www.humane-assessment.com/blog/rethinking-print-it-in-pharo
>
> Let us know what you think.
>
> Cheers,
> Doru
>
>
>
> --
> www.tudorgirba.com <http://www.tudorgirba.com>
>
> "Every thing has its own flow"
July 28, 2014
Re: [Pharo-dev] Configuration readonly archives
by stepharo
Salut Francois
> We've been bitten a few times at Ta Mère by the problem of changing
> metacello configuration.
I agree. This is why I also think that released should point to version
and not symbolic version.
What I do is that we can use versionner to release more often
configurations pointing to the versions.
Christophe will continue to improve it.
> At the moment, we rely on the policy of "you should never change a
> Metacello version once it has been published". Of course this is
> fragile and we've ended up with different code loaded in different
> environment while we were expecting stuff to be identical.
>
> Has anyone already tempted to centralize configurations/package in a
> read-only place (S3? Azure Storage?). Something like RubyGems or
> similar. It may be completely stupid to have centralised system but
> I'm not satisfied with the infastructure supporting our configurations.
>
> Am I the only one having this problem? How do you handle it?
We are discussing in the team
- I was thinking that each project/package should have its own
configuration saved in his repo.
-- then the developer may choose to publish it to a central place.
- other are telling to me that other language have a central place.
This is ok too.
I would like to have a catalog of frozen versions per pharo version. Now
this is two years that we request an engineering
to build a project validator and a catalog but we failed.
Stef
July 28, 2014
Configuration readonly archives
by François Stephany
We've been bitten a few times at Ta Mère by the problem of changing
metacello configuration.
At the moment, we rely on the policy of "you should never change a
Metacello version once it has been published". Of course this is fragile
and we've ended up with different code loaded in different environment
while we were expecting stuff to be identical.
Has anyone already tempted to centralize configurations/package in a
read-only place (S3? Azure Storage?). Something like RubyGems or similar.
It may be completely stupid to have centralised system but I'm not
satisfied with the infastructure supporting our configurations.
Am I the only one having this problem? How do you handle it?
July 28, 2014
[pharo-project/pharo-core]
by GitHub
Branch: refs/tags/40130
Home: https://github.com/pharo-project/pharo-core
July 28, 2014
[pharo-project/pharo-core] d60780: 40130
by GitHub
Branch: refs/heads/4.0
Home: https://github.com/pharo-project/pharo-core
Commit: d6078005b26041988357328583588cb2e6ebfd48
https://github.com/pharo-project/pharo-core/commit/d6078005b260419883573285…
Author: Jenkins Build Server <board(a)pharo-project.org>
Date: 2014-07-28 (Mon, 28 Jul 2014)
Changed paths:
R Monticello.package/MCPackageManager.class/instance/system changes/update_.st
M NodeNavigation.package/NNavNavigation.class/instance/navigation/navigate_direction_.st
R RecentSubmissions.package/MessageList.class/class/example/example.st
R RecentSubmissions.package/MessageList.class/class/example/example1.st
M RecentSubmissions.package/RecentMessageList.class/class/cleanup/cleanUp.st
M RecentSubmissions.package/RecentMessageList.class/class/tool registration/registerToolsOn_.st
M SUnit-UI.package/TestRunner.class/instance/actions/collectCoverageFor_.st
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - scripts/script130.st
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - updates/update40130.st
M ScriptLoader40.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st
R Tool-Changes.package/ChangeList.class/class/instance creation/open_name_multiSelect_.st
M Tool-Changes.package/ChangeList.class/class/public access/browseRecent_on_.st
M Tool-Changes.package/ChangeList.class/class/public access/browseStream_.st
M Tool-Changes.package/ChangeList.class/class/settings/ChangeListSettingsOn_.st
A Tool-Changes.package/ChangeList.class/instance/initialization-release/openAsMorphName_.st
R Tool-Changes.package/ChangeList.class/instance/initialization-release/openAsMorphName_multiSelect_.st
M Tool-Changes.package/ChangeList.class/instance/menu actions/browseCurrentVersionsOfSelections.st
Log Message:
-----------
40130
13035 Ctrl-Shift-b causes DNU
https://pharo.fogbugz.com/f/cases/13035
13702 MessageList should not have direct references
https://pharo.fogbugz.com/f/cases/13702
13703 MCPackageManager>>#update: not needed
https://pharo.fogbugz.com/f/cases/13703
http://files.pharo.org/image/40/40130.zip
July 28, 2014
[pharo-project/pharo-core]
by GitHub
Branch: refs/tags/40129
Home: https://github.com/pharo-project/pharo-core
July 28, 2014
[pharo-project/pharo-core] 050230: 40129
by GitHub
Branch: refs/heads/4.0
Home: https://github.com/pharo-project/pharo-core
Commit: 05023053dcf6a8226b08152260af791f8e1e8807
https://github.com/pharo-project/pharo-core/commit/05023053dcf6a8226b081522…
Author: Jenkins Build Server <board(a)pharo-project.org>
Date: 2014-07-28 (Mon, 28 Jul 2014)
Changed paths:
M GroupManager.package/DynamicGroup.class/class/instance creation/named_block_.st
M GroupManager.package/DynamicGroup.class/class/instance creation/named_blocks_.st
A Nautilus.package/AbstractClassWidget.class/instance/drag and drop/dragPassengersFor_inMorph_.st
A Nautilus.package/AbstractClassWidget.class/instance/drag and drop/wantsDroppedMorph_event_inMorph_.st
M Nautilus.package/AbstractNautilusUI.class/class/menu/groupsMenu_.st
M Nautilus.package/AbstractNautilusUI.class/class/shortcut-old/buildGroupShortcutsOn_.st
M Nautilus.package/AbstractNautilusUI.class/class/shortcuts/buildRunTestKeymappingsOn_.st
M Nautilus.package/AbstractNautilusUI.class/definition.st
M Nautilus.package/AbstractNautilusUI.class/instance/accessing/model_.st
R Nautilus.package/AbstractNautilusUI.class/instance/accessing/selected.st
M Nautilus.package/AbstractNautilusUI.class/instance/accessing/selectedGroupWithoutChangingSelection_.st
M Nautilus.package/AbstractNautilusUI.class/instance/accessing/selectedGroup_.st
M Nautilus.package/AbstractNautilusUI.class/instance/accessing/selectedPackageWithoutChangingSelectionInternally_.st
M Nautilus.package/AbstractNautilusUI.class/instance/accessing/selectedPackageWithoutChangingSelection_.st
M Nautilus.package/AbstractNautilusUI.class/instance/accessing/selectedPackage_.st
R Nautilus.package/AbstractNautilusUI.class/instance/accessing/selected_.st
M Nautilus.package/AbstractNautilusUI.class/instance/accessing/showGroups_.st
M Nautilus.package/AbstractNautilusUI.class/instance/accessing/showHierarchy_.st
M Nautilus.package/AbstractNautilusUI.class/instance/accessing/showPackages_.st
M Nautilus.package/AbstractNautilusUI.class/instance/displaying/buildFirstColumn_.st
M Nautilus.package/AbstractNautilusUI.class/instance/drag and drop/dragPassengersFor_inMorph_.st
R Nautilus.package/AbstractNautilusUI.class/instance/drag and drop/dropInList_inARow_.st
M Nautilus.package/AbstractNautilusUI.class/instance/drag and drop/wantsDroppedMorph_event_inMorph_.st
R Nautilus.package/AbstractNautilusUI.class/instance/events handling/doubleClick.st
M Nautilus.package/AbstractNautilusUI.class/instance/events handling/listMouseDown_.st
M Nautilus.package/AbstractNautilusUI.class/instance/focus/giveFocusToPackage.st
R Nautilus.package/AbstractNautilusUI.class/instance/icon/listIcon_.st
M Nautilus.package/AbstractNautilusUI.class/instance/initialization/initialize.st
R Nautilus.package/AbstractNautilusUI.class/instance/item creation/buildList.st
R Nautilus.package/AbstractNautilusUI.class/instance/list selections/listSelection.st
R Nautilus.package/AbstractNautilusUI.class/instance/list selections/listSelectionAt_.st
R Nautilus.package/AbstractNautilusUI.class/instance/list selections/listSelectionAt_put_.st
M Nautilus.package/AbstractNautilusUI.class/instance/menus behavior/enableSingleMenuItems.st
M Nautilus.package/AbstractNautilusUI.class/instance/menus behavior/mergeGroups.st
M Nautilus.package/AbstractNautilusUI.class/instance/menus behavior/removeGroups.st
M Nautilus.package/AbstractNautilusUI.class/instance/menus behavior/removePackages.st
M Nautilus.package/AbstractNautilusUI.class/instance/menus behavior/restrictedBrowseGroup.st
R Nautilus.package/AbstractNautilusUI.class/instance/menus/menu_shifted_.st
R Nautilus.package/AbstractNautilusUI.class/instance/private/getList.st
R Nautilus.package/AbstractNautilusUI.class/instance/private/listElement_.st
R Nautilus.package/AbstractNautilusUI.class/instance/private/listSize.st
M Nautilus.package/AbstractNautilusUI.class/instance/private/renamePackage_.st
R Nautilus.package/AbstractNautilusUI.class/instance/private/resetListSelection.st
A Nautilus.package/AbstractNautilusUI.class/instance/private/resetPackagesList.st
R Nautilus.package/AbstractNautilusUI.class/instance/private/selectedGroups.st
R Nautilus.package/AbstractNautilusUI.class/instance/private/selectedItems.st
M Nautilus.package/AbstractNautilusUI.class/instance/private/selectedPackages.st
M Nautilus.package/AbstractNautilusUI.class/instance/private/updateBothView.st
M Nautilus.package/AbstractNautilusUI.class/instance/private/updateGroupView.st
M Nautilus.package/AbstractNautilusUI.class/instance/private/updatePackageView.st
M Nautilus.package/AbstractNautilusUI.class/instance/private/updatePackageViewAndMove.st
M Nautilus.package/AbstractNautilusUI.class/instance/private/updatePackageViewContent.st
R Nautilus.package/AbstractNautilusUI.class/instance/source code area/listWrapper_.st
M Nautilus.package/AbstractNautilusUI.class/instance/system announcements/packageUnregistred_.st
A Nautilus.package/AbstractNautilusUI.class/instance/widget package/packageWidget.st
A Nautilus.package/AbstractNautilusUI.class/instance/widget package/resetPackagesSelection.st
A Nautilus.package/AbstractPackageWidget.class/instance/item creation/buildPackagesList.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/buildContents.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/deselectAll.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/hasFocus.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/removeShortcuts_.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/resetGroupsSelection.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/resetPackagesSelection.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/selectGroup_.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/selectPackage_.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/selectedGroups.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/selectedPackages.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/setShortcuts_.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/takeKeyboardFocus.st
A Nautilus.package/AbstractPackageWidget.class/instance/protocol/updatePackageView.st
M Nautilus.package/NautilusUI.class/definition.st
M Nautilus.package/NautilusUI.class/instance/accessing/selectedClassWithoutChangingSelectionInternally_.st
A Nautilus.package/NautilusUI.class/instance/displaying/buildFirstColumn_.st
M Nautilus.package/NautilusUI.class/instance/displaying/open.st
M Nautilus.package/NautilusUI.class/instance/events handling/keyPressedOnList2_shifted_.st
R Nautilus.package/NautilusUI.class/instance/events handling/keyPressedOnList_shifted_.st
M Nautilus.package/NautilusUI.class/instance/events handling/keyStroke_fromSourceCodeMorph_.st
M Nautilus.package/NautilusUI.class/instance/initialization/initialize.st
M Nautilus.package/NautilusUI.class/instance/private/selectedClass_withSelection_.st
M Nautilus.package/NautilusUI.class/instance/protocol/resetSelections.st
M Nautilus.package/NautilusUI.class/instance/widget - category/buildClassWidget.st
A Nautilus.package/NautilusUI.class/instance/widget - category/buildPackageWidget.st
M Nautilus.package/NautilusUI.class/instance/widget - method/hasFocus.st
A Nautilus.package/NautilusUI.class/instance/widget package/packageWidget.st
A Nautilus.package/NautilusUI.class/instance/widget package/resetPackagesSelection.st
A Nautilus.package/PackageListWidget.class/README.md
A Nautilus.package/PackageListWidget.class/definition.st
A Nautilus.package/PackageListWidget.class/instance/item creation/buildPackagesList.st
A Nautilus.package/PackageListWidget.class/instance/private list model/doubleClick.st
A Nautilus.package/PackageListWidget.class/instance/private list model/dropInPackageList_inARow_.st
A Nautilus.package/PackageListWidget.class/instance/private list model/getPackageItem_.st
A Nautilus.package/PackageListWidget.class/instance/private list model/keyPressedOnList_shifted_.st
A Nautilus.package/PackageListWidget.class/instance/private list model/menu_shifted_.st
A Nautilus.package/PackageListWidget.class/instance/private list model/packageItemWrapper_.st
A Nautilus.package/PackageListWidget.class/instance/private list model/packageListItemIcon_.st
A Nautilus.package/PackageListWidget.class/instance/private list model/packageListSize.st
A Nautilus.package/PackageListWidget.class/instance/private list model/selectedPackageIndex.st
A Nautilus.package/PackageListWidget.class/instance/private list model/selectedPackageIndex_.st
A Nautilus.package/PackageListWidget.class/instance/private/loadPackagesListElements.st
A Nautilus.package/PackageListWidget.class/instance/protocol/getPackagesList.st
A Nautilus.package/PackageListWidget.class/instance/protocol/packageSelectionAt_.st
A Nautilus.package/PackageListWidget.class/instance/protocol/packageSelectionAt_put_.st
A Nautilus.package/PackageListWidget.class/instance/protocol/resetPackagesList.st
M Nautilus.package/PackageTreeModel.class/instance/accessing/rootNodes.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/accessing/basicSelectPackage_.st
A Nautilus.package/PackageTreeNautilusUI.class/instance/accessing/packageWidget.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/accessing/selectedGroup_.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/accessing/selectedPackage_.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/accessing/selected_.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/accessing/showPackages_.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/displaying/buildFirstColumn_.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/events handling/keyPressedOnList_shifted_.st
A Nautilus.package/PackageTreeNautilusUI.class/instance/initialize/initialize.st
R Nautilus.package/PackageTreeNautilusUI.class/instance/items creation/buildList.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/package filter/updatePackages.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/private dispatch/registerSelectionGroup_.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/private dispatch/registerSelectionPackage_.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/private/basicShowHierarchy.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/private/clearPackageSelections.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/private/listClearSelection.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/private/listSelectItem_.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/private/updateBothView.st
M Nautilus.package/PackageTreeNautilusUI.class/instance/private/updatePackageView.st
A Nautilus.package/PackageTreeWidget.class/README.md
A Nautilus.package/PackageTreeWidget.class/definition.st
A Nautilus.package/PackageTreeWidget.class/instance/item creation/buildPackagesList.st
A Nautilus.package/PackageTreeWidget.class/instance/private/loadPackagesListElements.st
A Nautilus.package/PackageTreeWidget.class/instance/protocol/expandAllFromNode_.st
A Nautilus.package/PackageTreeWidget.class/instance/protocol/getPackagesList.st
A Nautilus.package/PackageTreeWidget.class/instance/protocol/resetPackagesList.st
A Nautilus.package/PackageTreeWidget.class/instance/protocol/scrollSelectionIntoView.st
A Nautilus.package/PackageTreeWidget.class/instance/protocol/selectItems_.st
A Nautilus.package/PackageTreeWidget.class/instance/protocol/updateList.st
M Nautilus.package/PackageWidget.class/README.md
M Nautilus.package/PackageWidget.class/definition.st
A Nautilus.package/PackageWidget.class/instance/accessing/packagesSelection.st
A Nautilus.package/PackageWidget.class/instance/initialization/initialize.st
A Nautilus.package/PackageWidget.class/instance/protocol/buildContents.st
A Nautilus.package/PackageWidget.class/instance/protocol/deselectAll.st
A Nautilus.package/PackageWidget.class/instance/protocol/enabled_.st
A Nautilus.package/PackageWidget.class/instance/protocol/hasFocus.st
A Nautilus.package/PackageWidget.class/instance/protocol/removeShortcuts_.st
A Nautilus.package/PackageWidget.class/instance/protocol/resetGroupsSelection.st
A Nautilus.package/PackageWidget.class/instance/protocol/resetPackagesSelection.st
A Nautilus.package/PackageWidget.class/instance/protocol/selectGroup_.st
A Nautilus.package/PackageWidget.class/instance/protocol/selectPackage_.st
A Nautilus.package/PackageWidget.class/instance/protocol/selectedGroups.st
A Nautilus.package/PackageWidget.class/instance/protocol/selectedPackages.st
A Nautilus.package/PackageWidget.class/instance/protocol/setShortcuts_.st
A Nautilus.package/PackageWidget.class/instance/protocol/takeKeyboardFocus.st
A Nautilus.package/PackageWidget.class/instance/protocol/updatePackageView.st
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - scripts/script129.st
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - updates/update40129.st
M ScriptLoader40.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st
Log Message:
-----------
40129
13699 Nautilus Refactoring 2: PackagePane widget
https://pharo.fogbugz.com/f/cases/13699
http://files.pharo.org/image/40/40129.zip
July 28, 2014
Re: [Pharo-dev] in latest 40 [Nautilus] we cannot drap and drop classes
by Marcus Denker
On 27 Jul 2014, at 22:28, Nicolai Hess <nicolaihess(a)web.de> wrote:
> done ;)
>
Integrating it nowâ¦
Marcus
July 28, 2014
rethinking the print it action in Pharo
by Tudor Girba
Hi,
In the course of revamping the Pharo environment, we stumbled across the
print it action and we (Andrei and I) decided to rethink it.
[image: Inline image 1]
You can find more details here:
http://www.humane-assessment.com/blog/rethinking-print-it-in-pharo
Let us know what you think.
Cheers,
Doru
--
www.tudorgirba.com
"Every thing has its own flow"
July 27, 2014
Re: [Pharo-dev] [Vm-dev] Delay machinery (was Re: Suspending a Process)
by Nicolai Hess
2014-07-27 7:09 GMT+02:00 Ben Coman <btc(a)openinworld.com>:
>
>
>
>
> 2014-07-25 16:56 GMT+02:00 Ben Coman <btc(a)openinworld.com>:
>
>>
>> Over the last few days I have been looking deeper into the image locking
>> when suspending a process. It is an interesting rabbit hole [1] that leads
>> to pondering the Delay machinery, that leads to some VM questions.
>>
>> When pressing the interrupt key it seems to always opens the debugger
>> with the following call stack.
>> Semaphore>>critical: 'self wait'
>> BlockClosure>>ensure: 'self valueNoContextSwitch'
>> Semaphore>>critical: 'ensure: [ caught ifTrue: [self signal]]
>> Delay>>schedule 'AccessProtect critical: ['
>> Delay>>wait 'self schedule'
>> WorldState>>interCyclePause:
>>
>>
> Nicolai Hess wrote:
>
> Hi Ben,
>
> I am on Windows too :(
> So, the fixes does not work (not always) on winddows too. But at least
> they make it less probable to occure, but it still happens.
> The most distracting thing is, after the first ui lock, pressing
> alt+dot, closing the debuggers, pressing alt+dot ....
> and trying to close the very first debugger, after that, it all works. The
> UI is responsive again and suspending the process does
> not block the ui anymore.
> It "looks like" supsending the process reactivates another process that
> blocks the UI. And as soon as I terminate this
> process (alt+dot, close debugger ...) all works.
> But I really don't know.
>
> Nicolai
>
>
> Hi Nicolai, I have something for you to try.
>
> With the problem seeming to be stuck in the semaphore critical section, I
> read around on mutexes and semaphores and found [1] enlightening, which
> says: "The correct use of a semaphore is for signaling from one task to
> another. A mutex is meant to be taken and released, always in that order,
> by each task that uses the shared resource it protects. By contrast, tasks
> that use semaphores either signal or waitânot both. [...] Any two RTOS
> tasks that operate at **different priorities** and coordinate via a mutex,
> create the opportunity for priority inversion [...while...] semaphores
> [...] do not cause priority inversion when used for signaling." [1]
>
> To summarize with an example, here's how to use a mutex:
> /* Task 1 */
> mutexWait(mutex_mens_room);
> // Safely use shared resource
> mutexRelease(mutex_mens_room);
>
> /* Task 2 */
> mutexWait(mutex_mens_room);
> // Safely use shared resource
> mutexRelease(mutex_mens_room);
>
> By contrast, you should always use a semaphore like this:
> /* Task 1 - Producer */
> semPost(sem_power_btn); // Send the signal
>
> /* Task 2 - Consumer */
> semPend(sem_power_btn); // Wait for signal
>
> I am out of my depth here, but in light [1] the way the current code seems
> to mix semaphore/mutex concepts with Semaphore>>forMutalExclusion and
> Semaphore>>critical: gave me some concern. Anyway, the delay scheduling
> code seemed more like a producer/consumer signaling problem than a shared
> resource mutal exclusion problem, so I rewrote it like the former and fixes
> the problem without causing any *obvious* problems. However I lack
> experience here and it could definitely use some review. Can you take the
> attached zip file and...
>
> 1. File in "Delay class-new delay code part 1.st"
> Defines #enableNewDelayCode and #enableNewDelayCode:
> Manually define the referenced class variables
>
> 2. File in "Delay class-new delay code part 2.st"
> Modifies #handleTimerEvent, guarded by enableNewDelayCode
>
> 3. File in "Delay-new delay code part 3.st"
> Modifies #schedule and #unschedule, guarded by enableNewDelayCode
>
> 4. File in "BackgroundWorkDisplayMorph.st"
>
> 5. Save checkpoint Image to return to between trials.
>
> 6. Open System Browser on BackgroundWorkDisplayMorph>>initialize
>
> Trial 1.
> BackgroundWorkDisplayMorph new openInWorld.
>
> Trial 2.
> Delay enableNewDelayCode: true.
> BackgroundWorkDisplayMorph new openInWorld.
>
> If if its deemed worthwhile, I'll open a ticket to track this more
> formally. One thing needed is to considered performance impact, I haven't
> so far.
>
> cheers -ben
>
> [1] http://www.barrgroup.com/Embedded-Systems/How-To/RTOS-Mutex-Semaphore
> [2] http://nerdfortress.com/2011/02/18/you-say-semaphore-i-say-mutex/
>
>
> I notice...
>> Delay class >> initialize
>> TimingSemaphore := (Smalltalk specialObjectsArray at: 30).
>> and...
>> Delay class >> startTimerEventLoop
>> TimingSemaphore := Semaphore new.
>> which seems incongruous that TimingSemaphore is set in differently. So
>> while I presume this critical stuff all works fine, just in an exotic way,
>> my entropy-guarding-neuron would just like confirm this is so.
>>
>> --------------
>>
>> In Delay class >> handleTimerEvent the comment says...
>> "Handle a timer event....
>> -a timer signal (not explicitly specified)"
>> ...is that event perhaps a 'tick' generated periodically by the VM via
>> that item from specialObjectArray ? Or is there some other mechanism ?
>>
>> --------------
>>
>> [1] http://www.urbandictionary.com/define.php?term=Rabbit+Hole
>> cheers -ben
>>
>>
>> P.S. I've left the following for some initial context as I change the
>> subject. btw Nicolai, I confirm that my proposed fixes only work on
>> Windows, not Mavericks (and I haven't checked Linux).
>>
>> Nicolai Hess wrote:
>>
>>
>> Hi ben, thank you for looking at this.
>>
>> 2014-07-22 20:17 GMT+02:00 <btc(a)openinworld.com>:
>>
>>> I thought this might be interesting to learn, so I've gave it a go. I
>>> had some success at the end, but I'll give a progressive report.
>>>
>>> First I thought I'd try moving the update of StringMorph outside the
>>> worker-process using a Morph's #step method as follows...
>>>
>>> Morph subclass: #BackgroundWorkDisplayMorph
>>> instanceVariableNames: 'interProcessString stringMorph'
>>> classVariableNames: ''
>>> category: 'BenPlay'
>>> "---------"
>>>
>>> BackgroundWorkDisplayMorph>>initializeMorph
>>> self color: Color red.
>>> stringMorph := StringMorph new.
>>> self addMorphBack: stringMorph.
>>> self extent:(300@50).
>>> "---------"
>>>
>>> BackgroundWorkDisplayMorph>>newWorkerProcess
>>> ^[
>>> | work |
>>> work := 0.
>>> [ 20 milliSeconds asDelay wait.
>>> work := work + 1.
>>> interProcessString := work asString.
>>> ] repeat.
>>> ] newProcess.
>>> "---------"
>>>
>>> BackgroundWorkDisplayMorph>>step
>>> stringMorph contents: interProcessString.
>>> "---------"
>>>
>>> BackgroundWorkDisplayMorph>>stepTime
>>> ^50
>>> "---------"
>>>
>>> BackgroundWorkDisplayMorph>>initialize
>>> | workerProcess running |
>>> super initialize.
>>> self initializeMorph.
>>>
>>> workerProcess := self newWorkerProcess.
>>> running := false.
>>>
>>> self on: #mouseUp send: #value to:
>>> [ (running := running not)
>>> ifTrue: [ workerProcess resume. self color: Color green. ]
>>> ifFalse: [ workerProcess suspend. self color: Color red. ]
>>> ]
>>> "---------"
>>>
>>>
>>>
>>> But evaluating "BackgroundWorkDisplayMorph new openInWorld" found this
>>> exhibited the same problematic behavior you reported... Clicking on the
>>> morph worked a few times and then froze the UI until Cmd-. pressed a few
>>> times.
>>>
>>
>>> However I found the following never locked the GUI.
>>>
>>> BackgroundWorkDisplayMorph>>initialize
>>> "BackgroundWorkDisplayMorph new openInWorld"
>>> | workerProcess running |
>>> super initialize.
>>> self initializeMorph.
>>>
>>> workerProcess := self newWorkerProcess.
>>> running := false.
>>>
>>> [ [ (running := running not)
>>> ifTrue: [ workerProcess resume. self color: Color green ]
>>> ifFalse: [ workerProcess suspend. self color: Color red ].
>>> 10 milliSeconds asDelay wait.
>>> ] repeat ] fork.
>>> "---------"
>>>
>>>
>> This locks the UI as well. Not every timet hough. I did this 5 times,
>> every time in a freshly loaded image and it happens two times.
>>
>>
>>
>>> So the problem seemed to not be with #suspend/#resume or with the shared
>>> variable /interProcessString/. Indeed, since in the worker thread
>>> /interProcessString/ is atomically assigned a copy via #asString, and the
>>> String never updated, I think there is no need to surround use of it with a
>>> critical section.
>>>
>>> The solution then was to move the "#resume/#suspend" away from the "#on:
>>> #mouseUp send: #value to:" as follows...
>>>
>>> BackgroundWorkDisplayMorph>>initialize
>>> "BackgroundWorkDisplayMorph new openInWorld"
>>> | workerProcess running lastRunning |
>>> super initialize.
>>> self initializeMorph.
>>>
>>> workerProcess := self newWorkerProcess.
>>> lastRunning := running := false.
>>>
>>> [ [ lastRunning = running ifFalse:
>>> [ running
>>> ifTrue: [ workerProcess resume ]
>>> ifFalse: [ workerProcess suspend ].
>>> lastRunning := running.
>>> ].
>>> 10 milliSeconds asDelay wait.
>>> ] repeat ] fork.
>>>
>>> self on: #mouseUp send: #value to:
>>> [ (running := running not)
>>> ifTrue: [ self color: Color green. ]
>>> ifFalse: [ self color: Color red. ]
>>> ]
>>> "---------"
>>>
>>
>> And this too :(
>>
>>
>>
>>>
>>> And finally remove the busy loop.
>>>
>>> BackgroundWorkDisplayMorph>>initialize
>>> "BackgroundWorkDisplayMorph new openInWorld"
>>> | workerProcess running lastRunning semaphore |
>>> super initialize.
>>> self initializeMorph.
>>>
>>> workerProcess := self newWorkerProcess.
>>> lastRunning := running := false.
>>> semaphore := Semaphore new.
>>>
>>> [ [ semaphore wait.
>>> running
>>> ifTrue: [ workerProcess resume ]
>>> ifFalse: [ workerProcess suspend ].
>>> ] repeat ] fork.
>>>
>>> self on: #mouseUp send: #value to:
>>> [ (running := running not)
>>> ifTrue: [ self color: Color green. ]
>>> ifFalse: [ self color: Color red. ].
>>> semaphore signal.
>>> ]
>>> "---------"
>>>
>>>
>>
>> And this locks the UI too. (Loaded the code 20 times, every time after
>> a fresh image start up. Two times I got a locked
>> ui after the first two clicks).
>> And I don't understand this code :)
>>
>>
>>
>>> Now I can't say how close that is to how it "should" be done. Its the
>>> first time I used sempahores and just what I discovered hacking around.
>>> But hey! it works :)
>>>
>>> cheers -ben
>>>
>>>
>>>
>>> Nicolai Hess wrote:
>>>
>>> I am still struggling with it.
>>>
>>> Any ideas?
>>>
>>>
>>> 2014-07-09 11:19 GMT+02:00 Nicolai Hess <nicolaihess(a)web.de>:
>>>
>>>>
>>>>
>>>>
>>>> 2014-07-09 2:07 GMT+02:00 Eliot Miranda <eliot.miranda(a)gmail.com>:
>>>>
>>>> Hi Nicolai,
>>>>>
>>>>>
>>>>> On Tue, Jul 8, 2014 at 7:19 AM, Nicolai Hess <nicolaihess(a)web.de>
>>>>> wrote:
>>>>>
>>>>>> I want to create a process doing some work and call #changed on a
>>>>>> Morph.
>>>>>> I want to start/suspend/resume or stop this process.
>>>>>> But sometimes, suspending the process locks the UI-Process,
>>>>>> and I don't know why. Did I miss something or do I have to care when
>>>>>> to call suspend?
>>>>>>
>>>>>> Wrapping the "morph changed" call in
>>>>>> UIManager default defer:[ morph changed].
>>>>>> Does not change anything.
>>>>>>
>>>>>> Here is an example to reproduce it.
>>>>>> Create the process,
>>>>>> call resume, call supsend. It works, most of the time,
>>>>>> but sometimes, calling suspend locks the ui.
>>>>>>
>>>>>> p:=[[true] whileTrue:[ Transcript crShow: (DateAndTime now asString).
>>>>>> 30 milliSeconds asDelay wait]] newProcess.
>>>>>>
>>>>> p resume.
>>>>>> p suspend.
>>>>>>
>>>>>
>>>>> If you simply suspend this process at random form a user-priority
>>>>> process you'll never be able to damage the Delay machinery you're using,
>>>>> but chances are you'll suspend the process inside the critical section that
>>>>> Transcript uses to make itself thread-safe, and that'll lock up the
>>>>> Transcript.
>>>>>
>>>>
>>>> Thank you Eliot
>>>> yes I guessed it locks up the critical section, but I hoped with
>>>> would not happen if I the use UIManager defer call.
>>>>
>>>>
>>>>
>>>>>
>>>>> ThreadSafeTranscript>>nextPutAll: value
>>>>> accessSemaphore
>>>>> critical: [stream nextPutAll: value].
>>>>> ^value
>>>>>
>>>>> So instead you need to use a semaphore. e.g.
>>>>>
>>>>> | p s wait |
>>>>> s := Semaphore new.
>>>>> p:=[[true] whileTrue:[wait ifTrue: [s wait]. Transcript crShow:
>>>>> (DateAndTime now asString). 30 milliSeconds asDelay wait]] newProcess.
>>>>> wait := true.
>>>>> 30 milliSeconds asDelay wait.
>>>>> wait := false.
>>>>> s signal
>>>>>
>>>>> etc...
>>>>>
>>>>
>>>> Is this a common pattern I can find in pharos classes. Or I need some
>>>> help understanding this. The semaphore
>>>> wait/signal is used instead of process resume/suspend?
>>>>
>>>> What I want is a process doing repeatly some computation,
>>>> calls or triggers an update on a morph, and I want to suspend and
>>>> resume this process.
>>>>
>>>> I would stop this discussion if someone tells me, "No your are doing it
>>>> wrong, go this way ..", BUT what strikes me:
>>>> in this example, that reproduces my problem more closely:
>>>>
>>>> |p m s running|
>>>> running:=false.
>>>> m:=Morph new color:Color red.
>>>> s:= StringMorph new.
>>>> m addMorphBack:s.
>>>> p:=[[true]whileTrue:[20 milliSeconds asDelay wait. s
>>>> contents:(DateAndTime now asString). m changed]] newProcess.
>>>> m on:#mouseUp send:#value to:[
>>>> running ifTrue:[p suspend. m color:Color red.]
>>>> ifFalse:[p resume.m color:Color green.].
>>>> running := running not].
>>>> m extent:(300@50).
>>>> m openInWorld
>>>>
>>>>
>>>> clicking on the morph will stop or resume the process, if it locks up
>>>> I can still press alt+dot ->
>>>> - a Debugger opens but the UI is still not responsive. I can click
>>>> with the mouse on the debuggers close icon.
>>>> - nothing happens, as the UI is still blocked.
>>>> - pressing alt+Dot again, the mouse click on the close icon is
>>>> processed and the first debugger window closes
>>>> - maybe other debuggers open.
>>>>
>>>> Repeating this steps, at some time the system is *fully* responsive
>>>> again!
>>>> And miraculously, it works after that without further blockages.
>>>> What's happening here?
>>>>
>>>>
>>>> Nicolai
>>>>
>>>>
>>>>
>>>>>
>>>>> HTH
>>>>>
>>>>> regards
>>>>>> Nicolai
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> best,
>>>>> Eliot
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
Interesting, it works.
So, it is the Delay>>schedule implementation?
Because it uses a #critical block for the wait instead of wait/signal only?
Nicolai
July 27, 2014