Monthly Archives: August 2016

Updated Pillar Support In GT


I updated the Pillar support in GTInspector. Some of the extensions already exist in the default Pillar #development version. If you want to play with the full support, you can load it like this:
Gofer new
smalltalkhubUser: ‘Moose’ project: ‘PetitParser’;
package: ‘PetitAnalyzer’;
package: ‘PetitIndent’;
package: ‘PetitIslands’;
smalltalkhubUser: ‘Moose’ project: ‘GToolkit’;
package: ‘GT-InspectorExtensions-Pillar’;
Then you can just inspect a book folder and you get this:
I did not integrate this in the main Pillar yet because this is an older implementation based on a limited island parser. As now Pillar has a full parser based on PetitParser, the next step is to move the highlighting logic to use this parser instead of the island parser. From my measurements, the speed of the two parsers is about the same, so from a user perspective there will be not much changes.
It pains me that we are editing Pillar in outside tools, and now we should no longer have to do that. Of course, this is not the most ideal tool support for Pillar but I think it is a reasonable start.

TaskIt v2 is out

Hi all,

With Santi we wanted to share a new release of TaskIt, a concurrency management library for Pharo. TaskIt development is done entirely in github, using iceberg. Works like a charm. Please find below attached the changes log with more information.

Guille & Santi

TaskIt is a library that ease Process usage in Pharo. It provides abstractions to execute and synchronize concurrent tasks, and several pre-built mechanisms that are useful for many application developers. This chapter explores starts by familiarizing the reader with TaskIt’s abstractions, guided by examples and code snippets. At the end, we discuss TaskIt extension points and possible customizations.
ChangesLog TaskIt v0.2

Major Features

Task Runners
Futures with callbacks
Future combinators
Future synchronous access


Travis CI

Minor changes log (from commits)

Enhanced class comments
TKTWorker processes are terminated in case the worker is collected. See Issues #8 and #5
Process Dashboard. – Adds TKTTaskItProcessProvider by default with the extension package – Hides job and task fields since there are not reachable any more.

An amazing experience to learn

Gour asked in the mailing-list how he can access the Pharo bugs tracker.  He should log because we use a professional service nicely offered to us.

Now he asked the following question:

do you believe it makes sense for a noob to create account
in case there are some low-hanging fruits to pick?

And here is the answer Ben did. I fully fully agree. I learned and I’m still learning a lot from reading bug fixes.

Definitely.  And not necessarily that you *solve* an issues, but that
I found a benefit from "goal directed learning".
When I started using Pharo I learned a lot from:
* trying to reproduce issues - which also benefits core developers if
you can gather more complete symptom info
* testing other people's solutions - putting halts in the changed code
and simultaneously stepping through the original and solution code.
Actually I was surprised at far into the depths of the system this led
me sometimes and how accessible they were.  Look for issue marked
"Fixed - review needed"

cheers -ben


Custom GTDebugger for Seaside

As presented at ESUG on Monday, we now have a custom GTDebugger for Seaside. This was built by Andrei as an initial experiment.
As we do not know much about Seaside-specific debugging problems, we asked a couple of Seaside users to describe issues that would be useful to be addressed in the debugger, and Andrei allocated some 4h to construct some of these in an custom debugger for Seaside.
Two of the issues that popped up are:
– get a quick view of the current request context
– get an overview of the current component nesting
They are now addressed like depicted in the screenshot below.seaside-debugger.png
You should look at this debugger as a beginning. Beside the current basic extensions one added value is that we now have the scaffolding to build more. Please take a look at it and let’s try to identify more concrete issues that might be addressed. It would be great if this would be taken over by the Seaside community.
The debugger can be loaded on top of a Pharo 6.0 with Seaside inside like this:
Gofer new
    smalltalkhubUser: ‘Moose’ project: ‘GToolkit’;
    package: ‘GT-SeasideDebugger’;
#GTSeasideDebugger asClass register

More Enhancements

18980 QA v3.2.5

18903 CriticBrowser browser senders broken

18970 Add missing class comments for some RBToken classes
18936 RBParser allows pragmas after method code

18829 Add a RefactoringFramework System HelpTopic

18955 DoubleLinkedList and its test should be in its own package

18967 wrong title for “add trait” dialog

18954 ClassTest>>#testMethodsReferencingClass and testMethodsReferencingClasses should not use external packages

18975 copy sort –> sorted

18976 SmallDictionary>>#associationAt:ifPresent: is not implemented

18972 Group browse scoped class sync

18964 support for <sampleInstance>
18957 Class copy should not change the name of the instance variables

18434 Metacello-ProfSef classes sends wrong methods

18959 Create a class with a not existing trait does not suggest to create a new trait

18969 RBParser gets stuck in an endless loop if literal array contains an error
18158 MessageSend should not care about obsolete classes
18953 remove Regex dependency from SplitJoinTest>>#testSplitJoinBoundaryCases

18916 simplify asSlotCollection for bootstrap

18938 Remove RBClassInstVarNotInitializedRule, it is a bad rule
18949 reduce direct references to OpalCompiler

18951 Add helper methods to get all assignment nodes of a slot

18952 adopt some extensions of AST-Core from Reflectivity
18944 misspackaged Intege r>> readFrom: radix:

18945 do not require a Text in MockSourceEditor

18937 RBRefactoryTestDataApp and RBSmallintTestObject #fileBlocks sends undefined #asFilename

18940 simplify deferFlushDuring:

18942 workaround: fix adding ivars to classes with class vars

18939 New critic for catching redundant periods after statements
18917 simplify trait name validation for bootstrap

18941 ClassBuilderWarning should not override defaultAction

18602 Dependency-Analyzer v1.19

18925 cleanup InMidstOfFileinNotification

16789 RBUnaryAccessingMethodWithoutReturnRule refers to #nodes instead of #statements

18894 RBPatternParser should respect RBErrorNode when parsing pattern blocks II

18928 ambigous isArray for RBArrayNode

18914 Improve MethodClassifier classification based on selector parts

18888 Move Pharo bootstrap rule to Renraku model

18910 MNU: OrderedCollection>>parent: when trying to rewrite a tree with RBParseTreeRewriter

18911 unify property API of CompiledMethod with all the others (Class, AST…)

18912 update comment Deprecation

18907 Prevent LanguageEnvironment sublclasses to be in startup list

18906 SessionManager default should store the new instance when no default defined

18908 Prevent Symbol subclasses to be in startup list

18909 Monkey broken because System-CommandLine-TextSupport unloaded in 60164

18866 Rename protocol window title is ambiguous

18897 Monkey crashing with MessageNotUnderstood: VTermOutputDriver>>color256:
18891 MethodFinderTest>>#testGreaterThanANumber is dependent on order

18889 CriticsBrowser “BlockCannotReturn”

18896 add support for ignored fields in structures

18898 Sista Encoder update for release.
18890 Parser cant not parse faulty or unfinished blocks with return caret

18893 MCStWriterTest>>#expectedClassMethodDefinition will always fail on bootstrapped image

18892 simplify isBlockReturn: to use encoder

18887 QA 3.2.4

18878 MNU ReINvocationSequenceRule isArchitecturalRule

18886 parsing an unfinished block with invalid expressions in its body should not create only a single parse error node

18883 SystemReporter calls deprecated #name on MCWorkingCopy
18875 RBRemoveClassRefactoring applicable despite showing a warning

18793 Add CTGrid

18876 Rename BinaryFileStream >> setAtEnd -> setToEnd

18816 Failing test: ChangesBrowserTest.testInitializeWidgets

18846 <script:> and <script> pragmas do not always work

18782 Add DateAndTime class>>readFrom:defaultOffset:

18870 Delivery preparation hook for announcement

18861 TaskbarMorph reports damage outside its own area

18868 Announcements subscription should supports exclusion like exceptions by minus

18867 MetaceloPackageSpec workingCopyNameFor call name which could lead to deprecation warning when current version is array

18865 can not open critics browser on a package from nautilus package pane menu

18856 After Epicea integration: “an OmReference(Pharo_2elhj7i:199) not found in OmSessionStore”

17710 rename variable do not update class template

18855 reduce calls on #compiledMethod in RGMethodDefinition

18860 cleanup after running RGMethodDefintionTest

18858 #testUndeclared fails: missing ivars in RadioButtonModel

18821 format code creates invalid pragma statement

18843 #digitLength is implemented in SmallInteger and in BigInteger but not in Integer

18763 Update CriticBrowser to the latest Renraku changes

18781 Do it in File Browser text pane yields MNU: RubTextEditor>>doIt

18857 #hasSpecialSelector:ifTrueSetByte: can be removed
18854 Unload System-CommandLine-TextSupport

18831 Integrate new Epicea version

18768 Inlined method const could be implemented by metalinks

18835 Update RBParser-Nodes class comments

18836 Second cleaning of Spec-Polywidgets and adding test

18845 Move MIMEHeaderValue from Mail to MIME package

18749 QA v3.2.1
18749 QA v3.2.1

18845 Move MIMEHeaderValue from Mail to MIME package

18840 Cleaning of Spec-example, adding their tests

18848 Traits do not show up when using sendersOfIt

18802 Versionner puts a MCLazyVersionInfo(package name) instead of the package name

18844 Move String>>#join: to correct protocol

18838 ScrollSyncExample seems dont really work

18769 Add test for Spec-Core-Widgets

18841 Margin improvements

Updated OpenCL bindings


I have just finished updating the OpenCL bindings and the VirtualGPU to use the UnifiedFFI in Pharo 5. All of the examples have been tested in Mac OS X El Capitan 10.11.6.
Best regards,
P.S: Do not confuse the VirtualGPU with the AbstractGPU. The AbstractGPU is an abstraction layer above Vulkan, Direct3D 12 and Metal. The AbstractGPU is used as the foundation for Woden 2.

Windows Installer

PhyloclassTalk includes a Windows Installer written in Unicode NSIS.
It has two generators for this: A code generator written in Pharo to generate the NSIS script, and an image builder batch script which downloads image from ZeroConf, loads everything through Metacello, and launches NSIS to generate the executable file.

Hernan Morales

Examples and Examplar methods now reconciled!

Hi all

I implemented the <examplar> to behave as suggested by Torsten in thread more than a year ago if I got it correctly and it is available in less than 5 min (I loved it). An examplar is JUST a class method returning an instance. For example :), here I just define a class method returning a grid object.

CTGrid class >> grid22
“self grid22”
| grid1 |
grid1 := self new: 2.
grid1 atRow: 1 atColumn: 1 put: 1.
grid1 atRow: 1 atColumn: 2 put: 3.
grid1 atRow: 2 atColumn: 1 put: 2.
grid1 atRow: 2 atColumn: 2 put: 4.
^ grid1

You can use this method as any class method in the past. NOTHING new!!
So in particular your test can use it to build a fixture (yes reuse). You can use this method in several test cases (yes reuse).

Now nautilus supports nicely <examplar> methods: you can execute them and get a cool GTInspector open on them. So this is similar to the method exampleSomething pattern from Nautilus point of view.

And now people can use exampleSomething to create/open/display… their lovely examples (that may not return instances) – no stress you have the example you always liked (me too). And we get examplar methods that must return an instance but can behave as example from Nautilus perspective. So a nice win/win:

Better documentation of classes, better code reuse, nice integration and dead simple implementation: One class, 3 methods, no more  🙂

If you want to try

If you want to try you can load the CTGrid packages.

ScriptLoader new unloadPackageNamed: ‘Collections-Grid’.
ScriptLoader new unloadPackageNamed: ‘Collections-Grid-Tests’.
“Because there were not good and will be removed from the image”
Gofer it
url: ‘;;
configurationOf: ‘Grid’;

Click on class side of CTGrid and press the triangle and yes you get an inspector on this instance.


Q/A about Unicode

I've also discovered 'Unicode project' thread on dev-list, but would
like to get some pointer about the current (5.0 <= Pharo < 6) state of
affairs in regard writing multi-language-capable and Unicode-aware apps
in Pharo?

For the translation part of l10n, there's also a package providing gettext support if needed.
locale support is limited to an API similar to *nix locales.

"Unicode-aware" is a wide topic, as reflected by the plethora of functional bits and bobs defined by different parts of the standard.
(With base image)
Can you represent all Unicode string? Yes.
Can you pass them to other systems in Unicode encodings? Yes.
Is the text renderer (in image) capable of displaying Unicode code points? Yes, if glyph is included in fonts.
(With Unicode project)
Can you query  Unicode properties of any codepoint? Yes
Can you normalize strings in the different forms? Yes.
Can you sort strings in Unicode collate order? Yes.
(With both)
Can you sort strings in CLDR-locale collate order? No.
Can you do regexp as per the Unicode spec? No.
Does the text renderer (in image) heed Unicode properties such as RTL and combining marks? No

Depending on what you want to do, the base image capabilities may be considered sufficient for writing multi-language-capable apps,
but for more advanced Unicode functionality, the groundworks is there, (ie, querying properties, normalization, the core collate algorithm) but many practical uses are as of yet unimplemented, the complete lack of CLDR support ranking high.


The big eyesore in

NeoCSV at Work :)


I know a lot of people are interested in (public) datasets (to use as examples). The website contains a (small) number of interesting ones. Here is how to access them using NeoCSV.

(NeoCSVReader on:
 '' asUrl retrieveContents readStream) upToEnd.


ZnClient new
 url: '';
 contentReader: [ :entity | (NeoCSVReader on: entity readStream) upToEnd ];

Of course, they don't use UTF-8 and don't advertise it, so on some datasets you need to do something extra.

(NeoCSVReader on:
     value: ZnCharacterEncoder latin1
     during: [ '' asUrl retrieveContents ])
     readStream) upToEnd.

(Warning: this last example is quite large, 500K records).