Monthly Archives: July 2017

System Monitoring Images & Nagios

Hi,
I just made it nagios compatible. I developed it because I’m using munin [1]. You can look at this [2] blog post how to do it. If you have questions just ask.
Norbert

Segment.com API

I made a segment.com API tool here:

http://smalltalkhub.com/#!/~pdebruic/SegmentIO

and they take the logging events and can send it to any of these 200+ tools:

https://segment.com/catalog

Last time I checked it was working but its been a while.  Unless they’ve
changed things dramatically it should work.

Paul

Free Ephemeric Cloud for Members

Pharo cloud… is now available for free for Pharo association members.

https://association.pharo.org/news/4897928

Sista: the Optimizing JIT for Pharo getting open-alpha

Another great blog post from Clement Bera one of the main architect of the forth coming optimising JIT for Pharo

https://clementbera.wordpress.com/2017/07/19/sista-open-alpha-release/

Stef

Keccak-256 hashing algorithm

Hi there!

I am just releasing the first version of the Keccak-256 hashing algorithm. https://en.wikipedia.org/wiki/SHA-3
This  version is based on a javascript implementation: https://github.com/emn178/js-sha3
This implementation supports  as message: bytearray and ascii and utf-8 strings.
Soon i will be adding support to the rest of the Keccak family of hashing functions, since the implementations is quite configurable, is just need to add some constructors with specific configurations and tests for this other cases of usage.
Here a onliner for building an image with the version v0.1:
Hope you find it useful 🙂

[ANN] Iceberg 0.5 released

Hi all,
I’m releasing 0.5 version of iceberg.
This is the changelog:
Major changes:
—-
– works on 64bits
– adds cheery-pick
Other:
—-
This version also includes a list of fixes, most important one is this:
– branchs are kept inline with local working copy (so if you change a branch in command line or in another image it will indicate it correctly)
But there are many others, next version will have a full list, I promise 🙂
Now, to actually use it you will need to accomplish several steps (until I update the image)
1) You need to download the new stable VM for P7 (it does not matters if you are on P6).
Zeroconf:
64bits:
wget -O- get.pharo.org/64/vm70 | bash
wget -O- get.pharo.org/64/vmT70 | bash #If you are on linux
32bits:
wget -O- get.pharo.org/vm70 | bash
wget -O- get.pharo.org/vmT70 | bash #If you are on linux
then, to update, execute this (sorry, this is like that because we have still an older Metacello version):
#(‘Iceberg-UI’ ‘Iceberg-Plugin’ ‘Iceberg-Metacello-Integration’ ‘Iceberg-Libgit’ ‘Iceberg’ ‘BaselineOfIceberg’ ‘LibGit-Core’ ‘BaselineOfLibGit’)
do: [ :each | each asPackage removeFromSystem ].
Metacello new
  baseline: ‘Iceberg’;
  repository: ‘github://pharo-vcs/iceberg‘;
  load.
There will be a version of 6.1 that provide Iceberg 0.5 but it requires different version of C plugins hence a different VM.
cheers!

News from PR battle front

I prepared a script that should help you with the reviews of the pull requests on Pharo 7. We will later convert it into a more fancy tool. It does next steps:
– sets the basic information: pull request number, path to your pharo repository clone, name of your fork.
– registers the repository into Iceberg and sets pull and push target remotes
– switches branch to a particular commit from which the Pharo image was bootstrapped
– registers the repository into into Monticello packages to be able to do correct diffs
– gets basic information about the pull request from GitHub (original repository, branch name)
– registers the PR original repository into remotes if needed and fetches information from it
– creates a new local branch to merge the PR
– merges the PR branch
– displays a simple tool that shows differences in done in this merged branch
——–
pullRequest := 73.
target := ‘/path/pharo’ asFileReference.
myForkName := ‘myFork’.
repository := IceRepositoryCreator new location: target; subdirectory:’src’; createRepository.
repository register.
fork := repository remotes detect: [ :remote | remote remoteName = myForkName ].
repository pushRemote: fork.
repository pullRemote: repository origin.
repository checkoutBranch: (SystemVersion current commitHash).
fileTreeRepository := (MCFileTreeRepository new directory: target / #src; yourself).
repositoryGroup := MCRepositoryGroup withRepositories: { fileTreeRepository. MCCacheRepository uniqueInstance. }.
MCWorkingCopy allManagers
select: [ :wc | (wc repositoryGroup repositories reject: [ :repo | repo isCache ]) isEmpty ]
thenDo: [ :wc | wc repositoryGroup: repositoryGroup ].
stonString := (ZnEasy get: ‘https://api.github.com/repos/pharo-project/pharo/pulls/‘, pullRequest asString) contents.
head := (STONJSON fromString: stonString) at: ‘head’.
sshUrl := (head at: #repo) at: ‘ssh_url’.
branchName := head at: #ref.
user := (sshUrl withoutPrefix: ‘git@github.com:’) withoutSuffix: ‘/pharo.git’.
fork := repository remotes detect: [ :remote | remote remoteName = user ] ifNone: [
| newFork |
newFork := (IceRemote name: user url: (‘git@github.com:{1}/pharo.git’ format: {user})).
repository addRemote: newFork.
newFork ].
repository fetchFrom: fork.
prMergedBranchName := ‘pr’, pullRequest asString.
repository createBranch: prMergedBranchName.
repository checkoutBranch: prMergedBranchName.
commit := repository revparse: user, ‘/’, branchName.
bootstrapCommit := repository revparse: (SystemVersion current commitHash).
[ repository backend merge: commit id ]
on: IceMergeAborted
do: [ :error | repository mergeConflictsWith: commit   ] .
headCommit := repository revparse: ‘HEAD’.
browser := GLMTabulator new.
browser row: [:row | row column: #commits span: 2; column: #changes span: 3]; row: #diff.
browser transmit to: #commits.
browser transmit to: #changes; from: #commits; andShow: [ :a :commitInfo |
(IceDiffChangeTreeBuilder new entity: commitInfo; diff: (IceDiff from: commitInfo to: bootstrapCommit); buildOn: a) title: ‘Changes’. ].
browser transmit from: #commits; from: #changes;  to: #diff; andShow: [ :a |
a diff title: ‘Left: working copy / Right: incoming updates’; display: [ :commitInfo :change |
{ change theirVersion ifNil: ”. change myVersion ifNil: ”. }]].
browser openOn: {headCommit}.
——–
The merge operation only changes the Git working copy, no code is loaded into the image. If you want to test the PR code, currently you need to open Iceberg and reload all packages in the Pharo repository (Packages tab, Reload all)
Expect troubles 🙂
Cheers,
— Pavel

Iceberg 0.5.1 with Pull Request review tool

I just released Iceberg version 0.5.1 with a Pull Request tool Guille and I worked on since yesterday.
It allows you to list open Pull Requests (by right click on a repo, GitHub/Review pull requests… option):
unnamed.png
And then if you doubleclick on one (or select it with right button), you will see this:
unnamed-1.png
it allows you to see changes and
– merge changes into your image (in case you want to see more in details the code, run tests, etc.)
– accept a pull request
– reject a pull request
no, it does not shows (at least *yet*) comments, and it does not allows you to add comments, reviews, etc.
this could be done, but not time to implement it now, so for now this has to be enough.
Again, this can be loaded in a 6.0 image by executing this script:
#(‘Iceberg-UI’ ‘Iceberg-Plugin’ ‘Iceberg-Metacello-Integration’ ‘Iceberg-Libgit’ ‘Iceberg’ ‘BaselineOfIceberg’ ‘LibGit-Core’ ‘BaselineOfLibGit’) do: [ :each | each asPackage removeFromSystem ].
Metacello new
  baseline: ‘Iceberg’;
  repository: ‘github://pharo-vcs/iceberg:v0.5.1‘;
  load.
(and you still need to have the vm that is meant for Pharo7)
This tools are open for you to use on your projects… and to improve them, I accept pull requests on pharo-vcs/iceberg.
cheers!

SmartTests call for users

Hi everyone,

I’m working on a new plugin for Nautilus/Calypso that will help us with the test.

The goal is to provide us the selection of tests we should run after a modification.

It would be great if you accept to try it or want to use it.

Currently, by installing the plugin, when you select a method in Calypso or Nautilus, you will see a new critique that will offer you to run the test relative to the method you’ve selected (or class ^^ )

Another goal is to calculate the efficient of this new tool and how we will use it. It’s why I’ve also developed a plugin that will record  how we will use the plugin.

If you accept to help me. Please tell me ( so i will be able to estimate how many data I will obtain ).

Now the commands.

If you’d like to help me. The command is simple :

Metacello new

    smalltalkhubUser: ‘badetitou’ project: ‘TestsUsageAnalyser-CoraExtends’;

    configuration: ‘TestsUsageAnalyser_CORAExtends’;

    version: #stable;

    get;

    load.

If you’d like to use the plugin or just want to try it. It’s also simple

Metacello new

    smalltalkhubUser: ‘badetitou’ project: ‘CORA’;

    configuration: ‘CORA’;

    version: #stable;

    get;

    load.

For the version with Calypso ( because it’s cool ).

Metacello new

    smalltalkhubUser: ‘badetitou’ project: ‘CORA’;

    configuration: ‘CORA_Calypso’;

    version: #stable;

    get;

    load.

So, if you want to help me and use calypso you should run the first and the third command.

Options for the plugin are available in the settings of Pharo in the group : ‘TestRegression’. So you can extend the plugin with your own logic of testing strategy. 

To disable the spy (first package) in the option please uncheck ‘Test Usage Analyser’

I’m going to write a blog post that will explain all the plugin and how to use it.

If you find bugs ( But there are no bugs 😉 ) please tell me and i will fix it as soon as possible.

If you’d like that I add a feature, tell me too.

Thanks a lot for your help.

Benoît Verhaeghe

Community button :)

Hi,

I added a small utility called “Community” to the catalog that allows you to quickly
access/browse the most prominent Pharo pages (Homepage, Discord, Mailinglist Archive, CI Server,
Books page, Association, Consortium, STHub) right from the world menu. Also in Spotter.

Example:
========
Load Community from Pharo catalog. As the menu entries are mirrored also in Spotter you
can easily open Spotter, key in “Discord” hit enter and the local web browser should
open the Pharo chat.

Attached is a screenshot.

Maybe this is useful for others too.

Have fun

Torsten