Category Archives: Unsorted

New Booklet: a nice Bloc tutorial

Hi

We are happy to announce a nice tutorial on Bloc. The turorial is still in alpha version but fully working for now. We will add animations and more in the future.

http://files.pharo.org/books-pdfs/booklet-Bloc/BLOCDRAFT.pdf

A. Chis, S. Ducasse, and A. Syrel

Pharo Server Tools

Tools to deploy and manage headless Pharo servers from the command line.

To deploy and manage a Pharo based server application on a Linux system. More specifically, Pharo 4 on Ubuntu 14.04 LTS server.

The goal is to integrate well within the standard Linux world,

  • create an entry in /etc/init.d or /etc/systemd/system/ for automatic start/stop/restart
  • create an entry in /etc/monit/conf.d for monitoring with automatic restarts whenever the check fails
  • setup logging to daily files
  • setup secure REPL access to the running application

This document describes the basic manual installation procedure. There is also an interactive scaffold script that automates most work.

https://github.com/svenvc/pharo-server-tools

Pharo-Chrome

Hi Torsten and All,

Quick Introduction for those not familiar with Pharo-Chrome:

Pharo-Chrome enables Pharo to control and query Chrome / Chromium, in
particular to retrieve the DOM of a page.  This is useful as many modern
pages are just a template which then loads some javascript to
asynchronously build the DOM, meaning that the ZnEasy / Soap combination
doesn’t get the bulk of the information on a page.

Pharo-Chrome is now mostly working, i.e. it is possible to open
a connection to Chrome, navigate to a requested URL, wait for it to
load, retrieve the DOM and then navigate the DOM using a subset of the
Soap API, e.g. #findAllStrings:, #findAllTags:, attributeAt:, etc..

GoogleChrome class>>exampleNavigation has been updated to retrieve the
DOM from http://pharo.org.

GoogleChrome class>>get: is analogous to ZnEasy class>>get:, although it
returns a ChromeNode, not an html string.

I wasn’t able to get rid of the delay while waiting for the page to
finish loading.   This actually makes sense, since, as mentioned above,
many modern pages build the DOM asynchronously, so there’s no clear
indication of when it is complete.  The default delay is currently 2000
milliseconds, which is about twice the maximum I saw needed (983ms), but
this can be changed (ChromeTabPage>>pageLoadDelay:).

I had three use cases for this library: one which works with
ZnEasy+Soap, one that used to work with ZnEasy+Soap, but doesn’t due to
a page redesign, and one which I hadn’t got working before.  All three
are working now.

Unlike Soap, I’ve currently modelled the nodes as a single class, and
have only implemented a subset of Soap’s methods, but is enough for what
I need.

I’ve introduced a dependency on the Beacon logging framework.  I find it
useful, but can remove it if you don’t want the additional dependency.
(I’m planning to add some GoogleChrome specific logging classes and use
those to better understand what pageLoadDelay should be).

I was focussed on trying to understand the events that Chrome generates,
so documentation is still lacking (read “missing” :-)).

I’ll generate a pull request after some more testing, tweaking and
documenting, but if you would like to take a look, the code is available
at:

https://github.com/akgrant43/Pharo-Chrome/tree/development

I haven’t yet updated BaselineOfChrome with the Beacon dependency.  I
did merge in your two commits from May 23.

If you, or anyone else, finds this useful, I welcome any feedback.

P.S.  I’ve just realised that I need to tidy up #sendMessage:,
#sendMessageDictionary and #sendMessageDictionary:wait:.  I’ll do that
as part of the general tidy up.

Cheers,
Alistair

Reading JSON Feed format

Here is a quick example using the new JSON Feed format (https://jsonfeed.org).

json := ZnClient new
systemPolicy;
url: ‘https://daringfireball.net/feeds/json‘;
accept: ZnMimeType applicationJson;
contentReader: [ :entity | NeoJSONObject fromString: entity contents ];
get.

json items collect: #title.
json items collect: [ :each | each title -> each url ].

Note how you can just pretend that the objects understand #items, #title or #url.

Sven

Chrome DevTools Protocol and Pharo

Hi,

I played around with remote controlling Google Chrome from
Pharo using Chrome DevTools Protocol [1] (based on WebSockets).

The video shows an example using latest Pharo 6 on Mac:

Initial Code is on GitHub [2] if someone is interested,
requires OSOSX and Zinc Websockets to be loaded.

Have fun
T.

[1] https://chromedevtools.github.io/devtools-protocol
[2] https://github.com/astares/Pharo-Chrome

New booklet: Voyage :)

A new booklet is joining the collection and it is on Voyage the object to document mapper developed by E. Lorenzano.

Available in beta http://files.pharo.org/books/ and open to contributors at https://github.com/SquareBracketAssociates/Booklet-Voyage

Enjoy

Stef

Pompeii Volcanic Graphics, a mesh based 2D graphics API

Hello,

I am releasing a first version of a new 2D graphics API that I am making for Pharo, using OpenGL.

unnamed.png
http://smalltalkhub.com/#!/~ronsaldo/PompeiiGraphics
https://youtu.be/emE6_1RpAo8

This 2D graphics API is not vectorial based becase it does not use SVG style paths. This API is triangle mesh based, so it is more friendlier with the GPU than Athens or Sparta.

With this API I did a basic gui toolkit, with only two widgets: buttons and label. I did this Widget toolkit to not mess with Bloc, and because I need something relatively stable for the Woden 2 level editor. For now, I am leaving this widget toolkit mostly as a demo. Hopefully it is possible to make Bloc backend using this API.

During the process of making this API, I had to fix several bugs with OSWindow, and bugs in the interaction between OSWindow and OpenGL. The biggest problem was a race condition between the creation of an OSWindow using SDL2, and the events (such as Expose) that are sent to the just created Window.

As for Mac OS X, OSWindow is out of service until a pull request ( https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/138 ) gets integrated into the VM.

Best regards,

Ronie

Last enhancements getting closer to the release

60485
20047 in Versioner (or Komitter), RemotesManager needs to list just remotes
https://pharo.fogbugz.com/f/cases/20047

20005 Epicea: Integrate release 8.2.2
https://pharo.fogbugz.com/f/cases/20005

60484
20035 UDPSocketEchoTest testEcho fails on Mac
https://pharo.fogbugz.com/f/cases/20035

20036 WindowAnnouncementTest is failing on mac
https://pharo.fogbugz.com/f/cases/20036

20038 GLMPharoScriptMorphicTest and GLMTextMorphicTest are failing on Mac CI
https://pharo.fogbugz.com/f/cases/20038

20032 RF: compile access to #node as LiteralVariable
https://pharo.fogbugz.com/f/cases/20032

60483
20023 #isDeprecated does not cover all deprecation messsages
https://pharo.fogbugz.com/f/cases/20023

19920 FTTableMorph implicit filter isnt working properly with the escape keystroke
https://pharo.fogbugz.com/f/cases/19920
60482
20010 Deprecated methods should be placed in the Deprecated60 package
https://pharo.fogbugz.com/f/cases/20010

20021 fix for #instead: stack needs to be cleaned
https://pharo.fogbugz.com/f/cases/20021

60481
19984 TabExample does not switch theme correctly
https://pharo.fogbugz.com/f/cases/19984

20014 Dark theme is bad for changes browser
https://pharo.fogbugz.com/f/cases/20014

19975 Can add a _tag_ to a Nautilus work group but a package is expected
https://pharo.fogbugz.com/f/cases/19975

20016 Extensions with the same prefix may not be categorized correctly
https://pharo.fogbugz.com/f/cases/20016
60480
19986 STON do not support WideSymbols
https://pharo.fogbugz.com/f/cases/19986

20013 WelcomeHelp for Pharo 6
https://pharo.fogbugz.com/f/cases/20013

19979 Revert gray comments color and fix colors in DiffMorph
https://pharo.fogbugz.com/f/cases/19979

60479
20011 OSEnvironment>>getEnv: needs to use a primitive
https://pharo.fogbugz.com/f/cases/20011

19936 The code presentation in the Meta tab cuts the scrollbar at the bottom
https://pharo.fogbugz.com/f/cases/19936

19897 Problem with presentations containing tabulators in the inspector from the debugger
https://pharo.fogbugz.com/f/cases/19897

60478
19988 #testShouldGetUnresolvedDependencies can fail easily
https://pharo.fogbugz.com/f/cases/19988
60477
19909 Versionner reset modifications of first opened project when user opens another project in addition
https://pharo.fogbugz.com/f/cases/19909

19981 Class side slot initialization does not work
https://pharo.fogbugz.com/f/cases/19981

20004 SnapshotDone should be after all startup actions
https://pharo.fogbugz.com/f/cases/20004

60476
19985 SourceFileArray should be encoding independent when read preamble of methods
https://pharo.fogbugz.com/f/cases/19985

20003 useExternalPackages mentions Pharo 5.0 although in Pharo 6.0
https://pharo.fogbugz.com/f/cases/20003

20000 HelpBrowser should open real browser when “WebBrowser” is loaded
https://pharo.fogbugz.com/f/cases/20000

19998 Settings Syntax highlighting “set to default” crashes the image
https://pharo.fogbugz.com/f/cases/19998
60475
19993 Provide comment for TAbleToRotate
https://pharo.fogbugz.com/f/cases/19993

19959 base local Metaclass and ClassTrait methods tests on pragmas
https://pharo.fogbugz.com/f/cases/19959

19989 testAllCallsOnASymbol can fail easily
https://pharo.fogbugz.com/f/cases/19989

19997 Cleanup the Help menu (order)
https://pharo.fogbugz.com/f/cases/19997

60474
19982 Better method comments
https://pharo.fogbugz.com/f/cases/19982

19925 Document that SmallInteger>>printString breaks the #printOn: rule
https://pharo.fogbugz.com/f/cases/19925

19999 Improve SHTextStylerST80 class side protocols
https://pharo.fogbugz.com/f/cases/19999

19990 UFFI not reset method cache at image startup
https://pharo.fogbugz.com/f/cases/19990
60473
19968 Class rename do not mark extending packages dirty
https://pharo.fogbugz.com/f/cases/19968

19987 Bad highlight for matching parentheses with dark theme
https://pharo.fogbugz.com/f/cases/19987

19995 Fix typo in testIsNativeSSLPluginPresent
https://pharo.fogbugz.com/f/cases/19995

19996 Cleanup FFIConstants
https://pharo.fogbugz.com/f/cases/19996
60472
19992 Use assert:equals: in simulateKeyStroke tests
https://pharo.fogbugz.com/f/cases/19992

19463 Improve SessionManager class comment
https://pharo.fogbugz.com/f/cases/19463

19983 activate the Dark theme by default in the bootstrapped image
https://pharo.fogbugz.com/f/cases/19983

19991 Use of deprecated name method in TextEditor>>changeStyle
https://pharo.fogbugz.com/f/cases/19991
60471
19912 Epicea: Integrate release 8.2.1
https://pharo.fogbugz.com/f/cases/19912

60470
19958 Find and Replace dialog uses black text color in dark theme
https://pharo.fogbugz.com/f/cases/19958

19963 Improvement of TravisIntegrationHelp
https://pharo.fogbugz.com/f/cases/19963

19977 Menu failure on right click in code pane when coming from MessageBrowser
https://pharo.fogbugz.com/f/cases/19977
60469
19960 Comments in changed code in Diff tool
https://pharo.fogbugz.com/f/cases/19960

19962 Watery theme is broken because SimpleButtonMorph does not understand isDefault
https://pharo.fogbugz.com/f/cases/19962

19970 Formatting methods recently introduced for WelcomeHelp should be accessible to all Help classes
https://pharo.fogbugz.com/f/cases/19970
60468
19956 switching back to pharo3 theme has wrong tooltip color
https://pharo.fogbugz.com/f/cases/19956

19937 Help for TravisIntegration
https://pharo.fogbugz.com/f/cases/19937

19961 Impossible to read popup error in playground and Dark Theme
https://pharo.fogbugz.com/f/cases/19961
60467
19943 Error while browsing a comment un MessageBrowser
https://pharo.fogbugz.com/f/cases/19943

19945 PharoCommandLineHandler class comments incorrect
https://pharo.fogbugz.com/f/cases/19945

19954 Komitter should explicitly unsubscribe form SystemAnnoucer when window is closed
https://pharo.fogbugz.com/f/cases/19954

19941 Dark Theme – overlapped title bars need to be distinctive
https://pharo.fogbugz.com/f/cases/19941
60466
19935 Versionner tags are unreadable in the dark theme
https://pharo.fogbugz.com/f/cases/19935

19938 Traits methods flattened
https://pharo.fogbugz.com/f/cases/19938

19809 Failing test: WeakAnnouncerTest>>#testNoDeadWeakSubscriptions
https://pharo.fogbugz.com/f/cases/19809

19951 StringMorph imageForm shows a white rectangle in DarkTheme
https://pharo.fogbugz.com/f/cases/19951

19944 Server deployment is broken due to GlobalIdentifier
https://pharo.fogbugz.com/f/cases/19944

60465
19932 WelcomeHelp for Pharo 6 update
https://pharo.fogbugz.com/f/cases/19932

19934 change default theme to DarkTheme
https://pharo.fogbugz.com/f/cases/19934

19933 Remove ConfigurationOfMooseAlgos from the image.
https://pharo.fogbugz.com/f/cases/19933

19929 Comment guard to warn debugging top most process context
https://pharo.fogbugz.com/f/cases/19929

19926 Glamour Fast Table selection menu item actions does not work together with a filter
https://pharo.fogbugz.com/f/cases/19926

60464
19884 Rubric should not use SmallInteger maxVal
https://pharo.fogbugz.com/f/cases/19884
60463
19923 QA v3.3.1
https://pharo.fogbugz.com/f/cases/19923

19922 System-BasicCommandLineHandler calls name method
https://pharo.fogbugz.com/f/cases/19922
60462
19921 allow CairoLibrary to find x86_64 bits libcairo when needed (linux)
https://pharo.fogbugz.com/f/cases/19921
60461
19918 split unixModuleName into unix32ModuleName and unix64ModuleName
https://pharo.fogbugz.com/f/cases/19918
60460
18028 Playground play-cache does ignore rename of current working directory
https://pharo.fogbugz.com/f/cases/18028

19895 Remove SmallInteger>>#instVarAt:
https://pharo.fogbugz.com/f/cases/19895

19855 SyntaxErrorNotification skips ensured block
https://pharo.fogbugz.com/f/cases/19855

19916 Fix correct author naming
https://pharo.fogbugz.com/f/cases/19916
60459
19907 Improve Comment OpalCompiler
https://pharo.fogbugz.com/f/cases/19907

19911 Epicea makes a memory leak
https://pharo.fogbugz.com/f/cases/19911

60458
19898 CompiledMethod package detection logic has bug when same selector is defined on instance and class side
https://pharo.fogbugz.com/f/cases/19898

19886 Add a popup in case the title of a window is too large
https://pharo.fogbugz.com/f/cases/19886

19905 ZlibPlugin reads past the zipCollection boundary
https://pharo.fogbugz.com/f/cases/19905

19900 Better ProcessTest about ensure processing
https://pharo.fogbugz.com/f/cases/19900
60457
19892 Socket problem with LatestVM
https://pharo.fogbugz.com/f/cases/19892

19870 Removing a method using Nautilus while it is present in a message browser raises #ast was sent to nil
https://pharo.fogbugz.com/f/cases/19870

19860 MC generates duplicated trait methods
https://pharo.fogbugz.com/f/cases/19860

19899 SettingBrowser>>choosePackagesIn: is not documented at all
https://pharo.fogbugz.com/f/cases/19899
60456
19888 FastTable should not reset highlighting rows when selection is changed
https://pharo.fogbugz.com/f/cases/19888

19887 cairo surface does not need to set lock/show surface callbacks
https://pharo.fogbugz.com/f/cases/19887

60455
19882 copyBits fails when showing Athens surface
https://pharo.fogbugz.com/f/cases/19882

19885 STON cannot read classes with underscore in their name
https://pharo.fogbugz.com/f/cases/19885

19879 Accessors for instance and class variable rename refactoring
https://pharo.fogbugz.com/f/cases/19879

19881 add Time >> #hour:minute:second:nano: constructor
https://pharo.fogbugz.com/f/cases/19881

Pharo job in Belgium

Dear all,

Yesplan is looking for a new colleague to join the software engineering team.
The position is required to be full-time and on-site in Gent, Belgium.
Do you fancy working with Pharo and GemStone/S but also with Javascript / ReactJS and other technologies to build intuitive event venue management software?
Read our vacancy in the link below and let me know!
Best regards
Johan