Planet Smalltalk

November 15, 2018

ESUG news - [ANN] Camp Smalltalk 2019 in Charlotte, NC

Camp Smalltalk – Charlotte will be held in Charlotte, North Carolina on March 29 – March 31, 2019.

Camp Smalltalk is a wonderful opportunity to meet and engage with a passionate community of folks interested in Smalltalk programming. Participants will come together, with their favorite flavor of Smalltalk, to discuss a variety of interesting topics such as Smalltalk on IOT devices; web frameworks; virtual machine implementations; data processing applications; programming language design and tooling are expected. In past Camp Smalltalk events we have had participants who were completely new to Smalltalk, or just wanted to see what Smalltalk programming was all about. We are an open community that enjoys sharing our ideas and listening to new everyone is welcome!

Event details and registration

November 14, 2018

Torsten Bergmann - What FP can learn from Smalltalk

November 13, 2018

Pharo Weekly - Better management of encoding of environment variables

Hi all,

Thanks Ben for reading.

For those wanting a follow up, I’ve proposed this pull request:
I’m still working on avoiding dependencies against UFFI, fixing one other
This is however almost finished, and given that I had to adapt the
original *abstract
proposal* to fit the real system, here is an updated version:

API Proposal for OSEnvironment and friends

OSEnvironment is the common denominator for all platforms. They should
implement at least the following messages with the following semantics:

– *at: aVariableName [ifAbsent:/ifAbsentPut:/ifPresent:ifAbsent:]*

Gets the String value of an environment variable called `aVariableName`.
It is the system reponsibility to manage the encoding of *both arguments
and return values*.

– *at: aVariableName put: aValue*

Sets the environment variable called `aVariableName` to value `aValue`.
It is the system reponsibility to manage the encoding of *both arguments
and return values*.

– *removeKey: aVariableName*

Removes the environment variable called `aVariableName`.
It is the system reponsibility to manage the encoding of *both arguments
and return values*.

API Extensions for *Nix Systems (OSX & Linux)

Since *Nixes environment variables are binary data that could be encoded in
any encoding, the following methods provide more flexibility to access such
data in the encoding of the choice of the user, or even in binary form.

– *at: aVariableName encoding: anEncoding
[ifAbsent:/ifAbsentPut:/ifPresent:ifAbsent:/put:] / removeKey:**
encoding: anEncoding*

Variants of the common API from OSEnvironment.
The encoding used as argument will be used to encode/decode *both arguments
and return values*.

– *rawAt: anEncodedVariableName encoding: anEncoding
[ifAbsent:/ifAbsentPut:/ifPresent:ifAbsent:/put:] / removeRawKey:*

Variants of the common API from OSEnvironment.
These methods assume arguments and return values are encoded/decoded by the
user, so no marshalling or decoded is done by it.


– Encoding/Decoding should be applied not only to values but to
variables names too. In most cases Ascii overlaps with utf* and Latin*
encodings, but this cannot be simply assumed.
– Windows requires calling the right *Wide version of the functions from
C, plus the correct encoding routine. This could be implemented as an FFI
call or by modifying the VM to do it properly instead of calling the Ascii
– Unix FileSystems and environment variables could mix strings in
different encodings, thus the flexibility added by the low level *Nix

Other Implementation Details

– VM primitives returning paths Strings should be carefuly managed to
decode them, since they are actually C strings (so byte arrays) disguised
as ByteStrings.
– Similar changes had to be applied to correctly obtain the current
working directory in case it is a wide string.



Cincom Smalltalk - Smalltalk Digest: November Edition

In this edition, we will discuss a Smart Parking App Proof of Concept and see a working demo of it. We will also feature a new Hidden Gems screencast as well as a reminder about next month’s talks by Cincomers.

The post Smalltalk Digest: November Edition appeared first on Cincom Smalltalk.

November 12, 2018

Smalltalk Jobs - Smalltalk Jobs -11/11/18

  • Richardson, TX / Ashburn, VA / Raleigh, NC / Temple Terrace, FL / Cedar Rapids, IATechnology Lead through Infosys
    • Required Skills:
      • “At least 4 years of experience in one of the following skills…” with a wide ranging list that includes SmallTalk and Gemstone
      • At least 4 years of experience in software development.
      • At least 4 years of experience in Project life cycle activities on development and maintenance projects.
      • At least 4 years of experience in Design and architecture review.
      • Ability to work in team in diverse/ multiple stakeholder environment.
      • Experience to Telecom domain
      • Experience and desire to work in a Global delivery environment
    • Additional listings: Infosys
  • Buenos Aires, ArgentinaSoftware Developer – Smalltalk (Job ID 180102888) at J.P. Morgan
    • Required Skills:
      • The candidate should have an understanding of an object oriented programming language (Smalltalk) and their underlying principles
      • Data modelling
      • Code version control
      • Understanding of coding optimizations
      • Enthusiasm for increasing knowledge of financial markets and products
      • Willingness to adopt and contribute to an agile development process
    • Wanted Skills:
      • Smalltalk
  • Centurion Gauteng, South AfricaSenior Smalltalk Developer New Project through E-Merge IT Recruitment
    • Required Skills:
      • Relevant tertiary qualification in Engineering or Computer Science
      • 5 – 8 years’ experience as a Small Talk developer
      • 5 – 8 years’ experience as a technical team lead
      • Extensive experience in Gemstone (3 years)
      • In-depth knowledge of unit and integration testing and test automation
      • In-depth knowledge of enterprise, SOA and development patterns and practices
      • Experience in build, release and test automation.
    • Wanted Skills:
      • Experience in IBM WebSphere, MQ and Process Server
    • Additional listings: E-Merge IT Recruitment
  • Quebec, CanadaAnalyste programmeur Smalltalk – VisualWork through Procom
    • Required Skills:
      • Doit être motivé à apprendre et à travailler en SmallTalk
      • Expérience pertinente en Smalltalk, VB.NET ou autre langage orienté-objet
      • Avoir travailler dans un environnement Windows avec Visual Studio
      • Anglais écrit intermédiaire
      • BAC ou DEC en informatique de gestion
      • Minimum 5 ans d’expérience en développement de systèmes
    • Wanted Skills:
      • Expérience dans le domaine de l’assurance de dommages
      • Expérience dans un environnement utilisant les services WEB
      • Expérience en SQL et banque de données relationnelles
      • Expérience dans des projets AGILE
      • Connaissance du COBOL .NET
      • Capacité de faire de l’analyse fonctionnelle simple
Good luck with your job hunting,
James T. Savidge

View James T. Savidge's profile on LinkedIn

This blog’s RSS Feed

November 11, 2018

Pharo Weekly - New random generator: WELL512 PRNG


By accident I came across a pseudo random number generator that I never heard off before. It is supposed to be pretty good and had a very simple implementation. So I ported it to Pharo.

<class comment>

I am RandomWELL512, a random number generator.

I use the PRNG (Pseudo Randon Number Generator) WELL (Well equidistributed long-period linear) with a 512 bit state.

Implementation algorithm (See #nextUInt32) (Chris Lomont,


  RandomWELL512 new in: [ :r | (1 to: 10) collect: [ :i | r nextUInt32 ] ]. 

  RandomWELL512 new useUnixRandomGeneratorSeed; in: [ :r | (1 to: 10) collect: [ :i | r next ] ]. 

  RandomWELL512 new in: [ :r | (1 to: 10) collect: [ :i | r nextInt: 1000 ] ].

  RandomWELL512 new in: [ :random | | count all |
    random useUnixRandomGeneratorSeed.
    count := 1024 * 1024.
    all := Array new: count streamContents: [ :out |
      count timesRepeat: [ out nextPut: random next ] ].
    { all min. all max. all average. all stdev } ].

  [ RandomWELL512 new in: [ :random | 1 to: 1e6 do: [ :i | random next ] ] ] timeToRun.

Note that you should create one instance, seed it properly, and keep using it.

</class comment>

It is acceptably fast, generating 1M [0,1) Floats in about 0.1s. I compared the output with a fixed initial state to the C code that I started from and I got the same numbers. Maybe some people find this interesting.

I attached a file out.


Pharo Weekly - Zn nicer API


I added a new convenience method to Zinc HTTP Components: ZnClient>>forJsonREST. This configures a ZnClient (HTTP client) to talk to standard JSON REST web services. Here are a couple of examples:

ZnClient new
  get: ''.

What #forJsonREST does is 3 things: set the 'Accept' header to 'application/json', install a #contentReader that parses incoming JSON as well as a #contentWriter that generates JSON.

ZnClient new
  url: '';
  contents: { #foo->1. #bar->2 } asDictionary;

As you can see, the full ZnClient API can be combined when needed.

ZnClient new
  post: '' 
  contents: (NeoJSONObject new foo: 1; bar: 2; yourself).

#post:contents: combines separate #url: #contents: and #post message.

#forJsonREST uses NeoJSON[Object|Writer] if found, else STONJSON. If both are missing, this results in an error.
ZnClient new
  url: '';
  queryAt: #address put: '';

Finally, here is a more sophisticated example, doing a DNS request over HTTPS:

ZnClient new
  accept: 'application/dns-json';
  url: '';
  queryAt: #name put: '';
  queryAt: #type put: #AAAA;

Note that in most cases, you will configure one client to a specific endpoint and keep on reusing it. At one point in time it might be good to #close the client (although that happens on finalise as well). For single requests, you can use #beOneShot.

All this can be found in #bleedingEdge (HEAD). There are unit tests as well.


November 09, 2018

Clément Béra - 64 bits Immediate Floats

Hi all,

In this post I will try to discuss some inner details of OpenSmalltalk-VM immediate floats. Immediate floats are present only in 64 bits hence I won’t talk about 32 bits VM in the whole blog post. In addition, OpenSmalltalk-VM supports only double precision IEEE floating pointer, hence I won’t discuss single precision IEEE floating pointer.

Immediate objects

OpenSmalltalk-VM uses an immediate object scheme to represent object oriented pointers (oop) in memory. Basically, due to 64 bits alignment, the last 3 bits of all pointers to objects are 000. This is abused to encode in the oop itself specific objects, in our context, SmallIntegers, Characters and ImmediateFloats. This optimization allows to save memory and to improve performance by avoiding boxing allocation for common arithmetic operations. The last 3 bits of an oop are called a tag. The Immediate Float tag is 100 (4 in decimal). Objects encoded directly in the oop are in our terminology called immediate objects.


Immediate floats

OpenSmalltalk-VM and its clients use the double precision IEEE format to represent floating pointers, supported by most modern hardware.


The key idea to the immediate float design is to use an immediate representation of double precision floats to avoid boxing and save memory, while still being 100% compatible with the IEEE double precision format (Customers requirement).

Therefore, in 64 bits, OpenSmalltalk-VM use two implementations for floats. The most common floats are represented with immediate floats, where 3 bits of the exponents are abused to encode the tags. The rest of the floats are represented as boxed floats.


By design, immediate floats occupy just less than the middle 1/8th of the double range. They overlap the normal single-precision floats which also have 8 bit exponents, but exclude the single-precision denormals (exponent-127) and the single-precision NaNs (exponent +127). +/- zero is just a pair of values with both exponent and mantissa 0.

So the non-zero immediate doubles range from
+/- 0x3800,0000,0000,0001 / 5.8774717541114d-39
to +/- 0x47ff,ffff,ffff,ffff / 6.8056473384188d+38

Encoding and decoding

The encoded tagged form has the sign bit moved to the least significant bit, which allows for faster encode/decode because offsetting the exponent can’t overflow into the sign bit and because testing for +/- 0 is an unsigned compare for <= 0xf.

So given the tag is 4, the tagged non-zero bit patterns are
to 0xffff,ffff,ffff,fff[c(8+4)]
and +/- 0d is 0x0000,0000,0000,000[c(8+4)]

Decoding of non-zero values in machine code is performed as follow:


Encoding of non-zero values in machine code is performed as follow:


Reading floats in general is fairly easy, the VM checks the class index, if the class index of immediate float is present, then the float is decoded from the oop, if the boxed float class index is present, the float is read from the boxed object.

Each primitive operation (arithmetic, comparison, etc.) has now to be implemented twice, once in both classes, where the first operand is expected to be an instance of the class where it is installed. In Smalltalk float primitive operations succeed if the second operand is one of the 2 float classes or a SmallInteger. It fails for large integers and arbitrary objects, in which case the VM takes a slow path to perform correctly the operation.

At the end of arithmetic operations, the resulting float has to be converted back from the unboxed format to either an immediate float or a boxed float. To do so, the VM checks the exponent of the float against the smallFloatExponentOffset, 896. 896 is 1023 – 127, where 1023 is the mid-point of the 11-bit double precision exponent range, and 127 is the mid-point of the 8-bit SmallDouble exponent range. If the exponent is in range, it can be converted to an immediate float. If not, one needs to check if the float is +/- 0, in which case it can still be converted to an immediate float, else it has to be converted to a boxed float. The code looks like that in Slang:

^exponent > self smallFloatExponentOffset
ifTrue: [exponent <= (255 + self smallFloatExponentOffset)]
[(rawFloat bitAnd: (1 << self smallFloatMantissaBits - 1)) = 0
ifTrue: [exponent = 0]
ifFalse: [exponent = self smallFloatExponentOffset]]

x86_64 encoding/decoding

To conclude the post, here are the instructions generated in x86_64 to encode immediate floats. I put the instruction so that you can see how to encode efficiently using the theoretical design from the figures above and in addition quick checks for +/- 0.

000020da: rolq $1, %r9 : 49 D1 C1
000020dd: cmpq $0x1, %r9 : 49 83 F9 01
000020e1: jbe .+0xD (0x20f0=+@F0) : 76 0D
000020e3: movq $0x7000000000000000, %r8 : 4D B8 00 00 00 00 00 00 00 70
000020ed: subq %r8, %r9 : 4D 2B C8
000020f0: shlq $0x03, %r9 : 49 C1 E1 03
000020f4: addq $0x4, %r9 : 49 83 C1 04

Decoding is easier:

00002047: movq %rdx, %rax : 48 89 D0
0000204a: shrq $0x03, %rax : 48 C1 E8 03
0000204e: cmpq $0x1, %rax : 48 83 F8 01
00002052: jle .+0xD (0x2061=+@61) : 7E 0D
00002054: movq $0x7000000000000000, %r8 : 4D B8 00 00 00 00 00 00 00 70
0000205e: addq %r8, %rax : 49 03 C0
00002061: rorq $1, %rax : 48 D1 C8
00002064: movq %rax, %xmm0 : 66 48 0F 6E C0

Let me know if you have any question or you want me to expand this post with something else.

Note: Part of the blog post was extracted from the SpurMemoryManager class comment on immediate float, I thank Eliot Miranda and other OpenSmalltalk-VM contributors for writing it.

Joachim Tuchel - Glorp findings – using count:

Conntinuing on the Customer/Order example from my last post, we might want to only send some ads to customers who have ordered at least twice in the past. For this we’d first have to cunt all orders of our customers who haven’t ordered for at least 100 days. So the first step is to create … Continue reading Glorp findings – using count:

Joachim Tuchel - Glorp Subqueries – notExists:

I decided to get back to blogging after a very long break. Since I am quite busy with our Kontolino! project, I also decided that I need to get back to blogging with small articles that require little time – but might still be useful. So here is the idea: I am struggling with Glorp … Continue reading Glorp Subqueries – notExists:

November 07, 2018

Pharo Weekly - [Ann] v1.4.0 of Iceberg


This week we are releasing the version v1.4.0 of Iceberg.

This version is available in the latest Pharo 7.

This release fixes a bug introduced in v1.3. It also add new features
in the repository view, add some cleaning and also re-introduce a
feature that was lost.

Thanks to all contributors.


Full changelog:


#1068 'There is no associated repository configured.' warning on right
clicking missing repository


#1077 Repository view: Allow to collapse branches/remotes/tags trees
#847 Move tags under remotes in Repository view
#1070 set upstream if missing


#1066 Pharo 7: PackageManifest subclasses should be packaged with "Manifest"
#1015 Replace usages of Glamour in the Github Plugin
#1063 1061-Introduce-iconNamed-in-IceDefinition-and-IceTipModel-and-remove-all-the-terrible-Smalltalk-ui-icons

Pharo Weekly - [ann] Pharo 7.0.0-rc1


I’m announcing today we reach Pharo 7.0.0-rc1!

This is the first step to release a definitive version, and while we will continue integrating bug fixes, API change Pull Requests will be delayed until the open of Pharo 8.0.0 development.
Now, you would wonder what is the ChangeLog of this release… and answer is we still do not have one (btw, we should find a way to automate this).

Anyway… we are very close to release now 🙂

Please download, test, report issues.

November 06, 2018

Pharo Weekly - [Ann] release v1.3 of Iceberg


This week we are releasing the version v1.3 of Iceberg.

This version will be available after we merge this PR:

This release contains some new features such as the support of self
hosted gitlab, integration with github, etc.
It also contains multiple bug fixes, cleanups and enhancements.

On the CI part, Guille made the Appveyor build green! This will
increase the stability of the windows support.

Thanks to all contributors.


Full changelog:


#1021 Self hosted gitlab support
#1027 Improved new tag dialog to generate semantic versionning tags
#1044 Show a button “View on Github” when creating a PR
#1008 Add “create branch from GitHub issue” option
#1048 Add commands to open remotes on Github
#1010 Add menu entry in extras to force calculate diff

Bug corrections

#975 Metacello asks too many times what to install when there are
conflicting versions
#980 Iceberg should Identify better the packages and the normal files
#982 The Edit Project should have a Warning if it will affect the packages
#986 Iceberg does not realize changes in extended classes
#999 Pulling and pushing to a gitolite server asks password
#984 Conversion to Tonel generates corrupted .properties
#1041 Filter in repository view don’t work with capital letters
#1019 Metacello Integration leaves Monticello leftover repositories
#859 Creating a branch and pushing does not sets the upstream
#1043 Packages starting with lowercase not recognized
#991 Error on right click in the project editon wizard
#775 Reviewing a PR is broken
#1036 Debugger if we try to merge without selecting a branch
#1064 Fix failing tests regarding clean code in Pharo


#988 Iceberg should load the packages in a single MCLoader (This will
make the loads of packages atomic)
#1001 Use “instance creation” instead of “instance-creation” for
method protocol name
#1004 Use displayScaleFactor in UI
#977 Add ToolTip help to the Commands
#1030 Better support for binary files
#1034 SSH passphrase is now hidden


#1018 Iceberg UI relies on deprecated classes from Spec and Commander
#1051 Clean useless huge hierarchy in Github plugin UI

Infrastructure Enhancements

#1023 Fix CI for windows

November 03, 2018

Hernán Morales Durand - Pharo Script of the Day: One-liner identity matrix

Check how easy is to create an identity matrix in Pharo, in just one line: require matrix size from user and print the output:

(Array2D identity: (UIManager default request: 'Enter size of the matrix:') asInteger) asString

November 02, 2018

Pharo Weekly - [Pharo-dev] [ANN] The STON Specification


Since there can never be enough documentation I finally took some time to write a more formal description of STON as a data format.

The idea is to let this stabilise a bit and to then update the two other documents describing STON, where necessary:

Also, the latest changes in STON have to make their way to the Pharo image as well.

All feedback is welcome.


Torsten Bergmann - Dynamic creation of compiler plugins in Pharo

A new class (merged this week into Pharo 7) called "OCCompilerDynamicASTPlugin" allows for the dynamic creation of compiler plugins

Object compiler
newFromTransformBlock: [ :ast | (RBParseTreeRewriter replaceLiteral: 42 with: 'meaning of life') executeTree: ast. ast. ]
andPriority: 0
evaluate: '42'.
This would give 'meaning of life'

November 01, 2018

Joachim Tuchel - Seaside Learnings, pt. 123

Note to self: never, never ever try to use show:onAnswer: or answer: in an Ajax callback. In your delegating WATask or  WAComponent you will see the callback code run as if all was good, just the new components won’t show up in th browser. This will take a long time to debug and you won’t … Continue reading Seaside Learnings, pt. 123

October 30, 2018

Hernán Morales Durand - Pharo Script of the Day: Mass image format conversion from PNG to JPEG

You might find useful the following code to convert a whole directory of image in PNG format to JPEG:

(FileSystem disk workingDirectory filesMatching: '*.png') do: [ : pngFile |
pngFile asFileReference binaryReadStreamDo: [ : stream |
putForm: (PNGReadWriter formFromStream: stream)
onFileNamed: pngFile withoutExtension , 'jpg' ] ]
displayingProgress: 'Converting images to JPG...'.

October 26, 2018

David A. Smith - arcos

The arcos platform embedded in my blog.

Hernán Morales Durand - Pharo Script of the Day: Text analysis using tf-idf

Today's snippet takes a natural language text as input (a.k.a. the Corpus) where each line is considered a different document, and outputs a matrix of term documents with word mappings and frequencies for the given documents. This is also known as tf-idf, a distance metric widely used in information retrieval and provides the relevance or weight of terms in a document.

Why is not this just simple word counting?

If you increase relevance proportionally to word count, then all your query results will have words like "the" as the most relevant in the whole set of documents (or even in a single document), as it is a very common word. So you would need to decrease count for these common words, or increase count for "rare" words to get their relevance. This is where IDF (inverse document frequency) comes into play. With IDF you count documents, so you will assign low score to terms appeared in a lot of documents, then increasing the divider and decreasing relevance.

Finally, Stop words are removed and stemming is performed to reduce words with the same root.

First of all, you can install Moose-Algos (with some needed Hapax classes in a clean Pharo image by evaluating:

Metacello new
configuration: 'MooseAlgos';
smalltalkhubUser: 'Moose' project: 'MooseAlgos';
version: #development;
Gofer it
smalltalkhubUser: 'GustavoSantos' project: 'Hapax';
package: 'Hapax';
package: 'Moose-Hapax-VectorSpace';

Then you can execute the script:

| corpus tdm documents |
corpus := MalCorpus new.
documents := 'Julie loves me more than Linda loves me
Jane likes me more than Julie loves me'.
documents lines doWithIndex: [: doc : index |
addDocument: index asString
with: (MalTerms new
addString: doc
using: MalCamelcaseScanner;
corpus removeStopwords.
corpus stemAll.
tdm := HapTermDocumentMatrix on: corpus.

October 25, 2018

Smalltalk Jobs - Smalltalk Jobs -10/25/18

Very cool job at Thales in Brest France working with 3D, VR and Pharo.  Do note that Thales has joined the Pharo Consortium so they seem into Smalltalk.

NB:  This is a 6 month internship (Stage in French) aimed at people finishing their BAC.  So this is probably only useful if you are a French student in France.

Hernán Morales Durand - Pharo Script of the Day: Count lines of code

Lines of code, LOC, SLOC, ELOC... one the simplest and metrics around, and we could find the method with the most LOC in the image with just one line of code (tested in Pharo 6.1):

SystemNavigation default allMethods 
collect: [ : m | m -> m linesOfCode ]
into: (SortedCollection sortBlock: [ : a : b | a value < b value ])

For more advanced software engineering queries have a look to the cool Moose ecosystem

October 24, 2018

Cincom Smalltalk - Cincomers to Speak at Upcoming JavaScript Meetup

Like chocolate and peanut butter, Cincom Smalltalk and JavaScript go hand and hand and you have an opportunity to see that for yourself at an upcoming JavaScript Meetup. On Wednesday, […]

The post Cincomers to Speak at Upcoming JavaScript Meetup appeared first on Cincom Smalltalk.

Cincom Smalltalk - Smalltalk Digest: October Edition

In this edition, we will discuss fiscally responsible ways to use year-end budget and how custom Services solutions may be a good fit for customers. We will also feature two new Hidden Gems screencasts as well as a preview for upcoming talks by Cincomers.

The post Smalltalk Digest: October Edition appeared first on Cincom Smalltalk.

Hernán Morales Durand - Pharo Script of the Day: SPARQL access to DBPedia

Let's face it, how many times you could have a mix of Natalie Portman with Smalltalk code? :) If you install a little SPARQL wrapper library in Pharo, you could for example access the Natalie's movie list querying DBPedia by writing something like the following code in the SPARQL query language:

DBPediaSearch new
timeout: 5000;
query: 'PREFIX dbpedia-owl: <>
?film foaf:name ?filmName .
?film dbpedia-owl:starring ?actress .
?actress foaf:name ?name.
FILTER(contains(?name, "Natalie"))
FILTER(contains(?name, "Portman"))

To actually get only the titles you can use NeoJSON to parse the results:

((((NeoJSONReader fromString: jsonResults) at: #results) at: #bindings) collect: [ : entry | entry at: #filmName ]) 
collect: [ : movie | movie at: #value ]

And this is how results looks like:

October 23, 2018

Pierce Ng - Glorp SQLite on Pharo 7

GlorpSQLite works on Pharo 7!

Take a fresh Pharo 7 alpha image; as of yesterday's download that is 5f13ae8. Launch it and run the following snippet in a Playground:

Metacello new
  baseline: 'GlorpSQLite';
  repository: 'github://PierceNg/glorp-sqlite3:pharo7dev';

Run the Glorp tests in TestRunner. The result should be green, with all 891 tests passed and 12 tests skipped. The database file is sodbxtestu.db in your image directory. Tested on 32- and 64-bit Ubuntu 18.04.

October 22, 2018

Hernán Morales Durand - Pharo Script of the Day: Visualize SVG paths using Roassal

Let's suppose we want to render a SVG shape described in a SVG Path. As SVG is basically XML you can grab (read: parse) the figure coordinates from the SVG path description attribute. For this we can use the XML DOM parser, Roassal and pass just the coordinates found in the "d" attribute of the "path" node, to build more complex shapes, like the following country:

| xmlTree view |
view := RTView new.
xmlTree := (XMLDOMParser onURL: '') parseDocument firstNode.
((xmlTree findElementNamed: 'g')
nodesCollect: [ :node | | elem |
[ elem := (RTSVGPath new
path: (node attributeAt: 'd');
fillColor: Color random;
scale: 0.5) element ]
on: Error
do: [ : ex |
elem ifNotNil: [
elem model: (node attributeAt: 'title').
elem @ RTPopup.
elem ] ]])
reject: #isNil
thenDo: [ : e | view add: e ].
view open

That's basically code extracted from the Territorial library to easily render maps. Have you guessed it yet? Yes, it's Belgium!

Cincom Smalltalk - Smalltalks 2018 Conference Schedule Announced

Smalltalks 2018, the 12th conference on Smalltalk-based technologies, research and industry applications, will be held from October 31 to November 2 at Universidad Nacional de Salta, in Salta, Argentina. And, we’re happy to say that the conference schedule has been announced.

The post Smalltalks 2018 Conference Schedule Announced appeared first on Cincom Smalltalk.

Hernán Morales Durand - Pharo Script of the Day: Unzip, the Smalltalk way

Hi everybody. Today a simple but useful script to uncompress a ZIP file in the current image directory. Notice the #ensure: send, Smalltalk provides an very elegant way to evaluate a termination block:

| zipArchive fileRef |
zipArchive := ZipArchive new.
fileRef := '' asFileReference.
[ zipArchive
readFrom: fileRef fullName;
extractAllTo: FileSystem workingDirectory ]
ensure: [ zipArchive close ].

October 21, 2018

Pharo Weekly - [Ann] Smacc Book V1.0

The book around Smacc: the compiler-compiler framework is now available in pdf and html.

S. Ducasse