Monthly Archives: January 2019

Rewriting 900 methods in a couple of lines

I got 900 methods that I wanted to rewrite so I hacked the ParseRewriter to do it for me ūüôā
| rewriter node method testsels |
testsels := ReTest selectors select: [ :e | e beginsWith: ‘test’ ].
    do: [ :s | rewriter := RBParseTreeRewriter new.
¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† replace: ‘self shouldnt: [re compile] raise: Error’
¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† with: ‘self compileIsOK’.
                   method := ReTest compiledMethodAt: s.
                   node := method parseTree.
                   (rewriter executeTree: node)
                   ifTrue: [
                       method origin
                           compile: node formattedCode
                           classified: method protocol ]]

[ann] Smallapack in Pharo6

I announce the availability of Smallapack in Pharo6.

The ConfigurationOfSmallapack is in and there is a copy in metarepo for Pharo 3/4/5/6.

Currently, the ported version uses a derivative of OpalCompiler patched to handle method with 16+ arguments.
External function calls have not been converted yet to UnifiedFFI, but the patched compiler rather has hook to compile legacy FFI.
Though I did not install the hook to call FFI with more than 15 arguments, so there is at least 1 unit test failing (but not crashing).

I have auto-re-generated all the source code for using UnifiedFFI formats, so the dependency on legacy FFI is not a necessity (apart for simplifying cross dialect maintenance).

But I want to review the generated code method by method rather than filing it in blindly (the wrapper functions are also generated, and I might loose comments or improvments if I'm careless). Unfortunately, the state of diff tools in Pharo6, be it thru MC or worse than all, thru legacy change lists, does not enable such a large scale review, so I think that I will edit in Squeak and run in Pharo...

Now that Smallapack supports Opal, there should be no major problem for porting to Pharo7, but I did not have time to try yet. A few more MC regressions, and the fact to forbid protocol beginning with a * was too serious a cross compatibility hurdle for me. But I'll come back to it, tools are generally better in ph7 than ph6. Stay tuned.

Nicolas Cellier

Visual Studio code Configuration for the VM

Hi guys,

We have been using this week with Pablo a combination of Visual Studio Code, cygwin, and gdb to build and debug the VM to chase some issues during ffi calls in win64.

It was overall simple to setup, and though I thought it was going to be just a text editor with vitamines, it ended up being a really light but versatile IDE with code navigation, compilation and debugging integration.

But, since there were some little things over here and there like gdb
source code mapping that was not so straight forward to find in the
documentation, we thought it would be good to share it.

If somebody is interested in using a similar setup to work with the VM, I've left my configuration files in the following gist, including:

 - cygwin bash terminal integration (also with zsh, but that's pure cygwin)
 - task actions to build cog and stack vms on debug mode
 - launch configs to run both in debug mode with gdb attached

Guille & Pablo

[Ann] Discord Pharo news channel

I am happy to annoyance a new channel in our Discord Server , #news

News is a read only channel (members cannot post there only admins) that I
intended to act as a newspaper of short that you can read with your morning
coffee to get all the latest news in the Pharo land.

The rules of the channel are very simple,
1) Only admins can post there. Its not a dicussion channel, all other
relevant channels can be used for discussing the Pharo news. We already
have tons of them.
2) every post must be no more than 2 lines, similarly to twitter, this is
for headlines not for entire articles
3) every post must contain a link for more info
4) every post must mention the author that the news concern
5)  least news must always be related to Pharo, it can be anything
(article, project, update etc)
6) last but not least I am always open to suggestions in case something
escapes my attention

If you have not done so make sure you join our Discord server following
this link

You wont be getting only news but a very active community always willing to
help you with any questions and problems you may have, real time.

All people are welcomed :)


New Pharo Discord channel

Since we got some bots attacks we use now the following discord link to get into discord:




[ann] MaterialDesignLite v2.0.0


Today I released the version v2.0.0 of MaterialDesignLite for Seaside.

This release does not brings much new features but it contains all
breaking changes that accumulated in the issue tracker. (That's why it's
a major release).

The main changes are:
- Migration to Tonel (People using Gemstone might need to stick to v1.x.x)
- Removal of all deprecated classes and methods
- I added named URLs in the demo to be able to send links of pages or
- Addition of a Pagination widget as extension of MDL

A migration guide can be found here:

This release is tagged with v2.0.0 and I also introduced tags v2.x.x and
v2.0.x which are moving tags following patch and minor versions.

Here is the full changelog of the release:

If you have issues, need a new feature or have a comment on the project
feel free to open a issue:

I also updated the demo:

Have a nice day!

Cyril Ferlicot

[Ann] Raw Pharo 70 ChangeLog

I’m trying to summarize the changelog for Pharo 7 (based on about 2500 merged PRs, not counting standalone commits to Iceberg and Calypso). If something more should be mentioned, please let me know.
Revolutionary kernel changes
– bootstrap
– modular stateful traits
– traits flattening in kernel packages
– new sources file for every bootstrapped version, empty changes
– new class builder
– binary packages loading (Hermes)
Infrastructure changes
– switch to GitHub
– Tonel code format
– update building infrastructure to Jenkins 2
Code management
– Calypso, the new system browser
  Рnew navigation model
  Рfaster UI
  Рtabs toolbar instead of single source code panel
  Рexplicit commands instead of duplicated menu and shortcuts
  Рextendable by plugins
  Рsuitable for the remote scenario
¬† – “dynamic protocols”, support multiple tags per method
  Рnot required star convention for class extension
  Рsupport multiple tags per class
  Рvisibility option for inherited methods
  Рmethods inherited from traits are not shown by default
  Рvariable view as the special mode for method group view.
  Рbetter keyboard navigation
  Рand many more
– a new friendly user interface
– simplification of solving problems with repositories
– workflow simplification
– better GitHub, BitBucket, GitLab support
– improved code merging and comparisons
– new code serialization format (Tonel)
– repositories metadata
– documentation
– better error handling, tags support
– improved Iceberg-Metacello integration
– credentials store
– remove Nautilus
– remove UpdateStream
– remove all Configurations
– remove ShoreLine-Report
– remove TxText
– remove PluggableTabBarMorph
– remove the old Compiler
– remove Watery theme
– remove Versionner
– remove Komitter
– remove LegacyWeakSubscription
– continue on deprecation of FileStream
– dead code cleanups
– code organization cleanups
– unify categorization of common methods
– cleanups of object inspection protocol
– start with Ring deprecation
– better structure of packages
– package comments
– Zinc
– Epicea
– Metacello
– Fuel
– Calypso
– integrate WebBrowser
– integrate ReferenceFinder
– Hermes
– Refactoring 2
– Commander
– ClassAnnotation
– ComposableModel renamed to ComposablePresenter
– new calendar presenter
– Spec-Demo
– improve Spec linking to domain models
Look & Feel
– use the white theme by default
– improve themes switching
– main menu bar
– new window management shortcuts
– better support of fallback bitmap fonts
– improved Inspector refreshing
– Spotter is looking for opened windows
– display scale factor
– FastTable improvements
VM interface
– DoubleWord and DoubleByte arrays
– add EncoderForSistaV1
– read-only literals support
– improvements and fixes for 64-bit support
– fixes for FullBlockClosure
– support of the new bytecode set
– breakpoints improvements
– test coverage using metalinks
– reflectivity and metalinks improvements
– startup running in a fresh process
– better pin messages
– NewValueHolder and Model API unification
– better working and image directories meaning separation
– SortFunctions composable
– better OSWindow support
– convert rules to the Renraku architecture
– class and method comments improvements
– extensible Playground (pageActionOrder:)
– optional password management for command line handlers
– system dependencies tests
– unify way to obtain package manifests