Monthly Archives: January 2014

Commits Jan week 3

30731
12732 #sourceNode broken
https://pharo.fogbugz.com/f/cases/12732

12751 Improve #cleanUpForProduction
https://pharo.fogbugz.com/f/cases/12751

12750 Uppercase/lowercase different in config browser menu vs. buttons
https://pharo.fogbugz.com/f/cases/12750

30730
12745 Spec update
https://pharo.fogbugz.com/f/cases/12745

30729
12746 DoesNotUnderstandCatcher cleanup
https://pharo.fogbugz.com/f/cases/12746

12740 testClassDescriptionRespectsPolymorphismWithTraitDescription failing
https://pharo.fogbugz.com/f/cases/12740

30728
12731 Traits modifications cause a DNU
https://pharo.fogbugz.com/f/cases/12731

30727
12690 Infinite recursion with #wantsLineEndConversion: on commandline
https://pharo.fogbugz.com/f/cases/12690

12689 Implement equality in TraitComposition
https://pharo.fogbugz.com/f/cases/12689

30726
12684 NewValueHolder Enhancements
https://pharo.fogbugz.com/f/cases/12684

30725

12733 FileReference >> #absolutePath returns relative path
https://pharo.fogbugz.com/f/cases/12733

12715 Editing class comments looks broken with Nautilus
https://pharo.fogbugz.com/f/cases/12715

30724
12716 pharo initialization fails when there is no NativeBoost present
https://pharo.fogbugz.com/f/cases/12716

30723
12719 Creating Unnamed Package Kills Nautilus
https://pharo.fogbugz.com/f/cases/12719

12718 rpackage not reorganising properly moved classes
https://pharo.fogbugz.com/f/cases/12718

30722

12259 FileSystem memory reads/writes using a binary stream by default
https://pharo.fogbugz.com/f/cases/12259

12683 Color change of LabelModel when used with openWorldWithSpec
https://pharo.fogbugz.com/f/cases/12683

12704 clean FontMorphChooser
https://pharo.fogbugz.com/f/cases/12704

Advertisements
Tagged

PDFExporter for ROASSAL

Jamir announced a pdf exporter for ROASSAL. Here is the announce.

I’m currently working on a PDF exporter for
Roassal http://objectprofile.com/#/pages/products/roassal/overview.html

There is still a lot to do and many bugs to squash:

If you want to try it you can get it here:

RoassalPdfExporter http://www.smalltalkhub.com/#!/~Jamir/RoassalPdfExporter/

You’ll also need: Artefact http://www.smalltalkhub.com/#!/~RMoD/Artefact
and Roassal http://www.smalltalkhub.com/#!/~ObjectProfile/Roassal

In order to get the PDF file, click on ‘export’ and then on double click in ‘export as PDF’ . And a new file named ‘test.pdf’ will be created on the root of your Pharo directory.

There are still some missing shapes like arrows and new lines in text, and
there will be bugs. Your feedback is much appreciated!

Best regards.

http://objectprofile.com/#/pages/products/roassal/overview.html
http://www.smalltalkhub.com/#!/~Jamir/RoassalPdfExporter/
http://www.smalltalkhub.com/#!/~RMoD/Artefact
http://www.smalltalkhub.com/#!/~ObjectProfile/Roassal

Tagged ,

SWIG for Native Boost FFI

Ronnie Salgado announced SWIG for NatvieBoost today:

I started working on extending SWIG to generate bindings for NativeBoost FFI, using as a reference the C# binding generator. I am committing my work on this into https://github.com/ronsaldo/swig/ .

Note: SWIG is a tool designed to create bindings, for which you provide an interface descripitions, which usually includes your C/C++ headers, and you provide some SWIG specific directives for improving the generated bindings.
It produces C side module and a language specific module. The C side is required, since some C stuff can only be detected by an actual C compiler. In these matter, maybe TalkFFI is better, because is based in an actual compiler(clang), but maybe you lose some bindings fine tuning.

The problem is when you add C++ to the mix. In C++ there’s not a standard defined ABI, so a module made in one C++ compiler is almost for sure going to be incompatible with a module made by another C++ compiler. For making bindings to a C++ module, you have to first make C bindings to that module, compile those bindings with the same compiler that was used for the original module and then you can start making NativeBoost bindings. This is the only portable way for C++.

For example, gcc and Microsoft Visual C++ compilers are completely incompatible for C++, but for C they can interact. Clang is apparently designed to use the same ABI as gcc, so maybe it could be used in Linux, Mac but not for a closed source library in Window.

What SWIG does is generating the C bindings and Smalltalk code that calls the C bindings ready to be filed in. In addition, you can add extra code to the bindings to make things that hard to do using directly NativeBoost but can be easy to do with an intermediate function in C, for example messing with some unions and things that required lot of pointer arithmetic, that could be used maybe for a bad written library that some project needs.

SWIG works by creating a C side code and Smalltalk that can be filed-in in a image, which contains a class with all the NativeBoost-FFI callouts, a class for the global module, classes for each C++ class and SWIGTYPE_* classes for opaque types or types that SWIG couldn’t wrap.

It currently can generate bindings for C/C++ functions, constants, define based constants, opaque structures, methods, enums, and for C++ classes, nested classes, member methods, member fields, member constants, member static functions, variables and constants.

The overloaded functions support currently is not so great, since I am currently using the arguments name to build the selector. I have to still decide a better strategy for the overloaded methods.

WARNING: automatic garbage collection of the C++ classes is not yet ready, but it will be soon. Downcasting of C++ objects is also not supported yet.

Greetings
Ronie Salgado

Tagged , ,

Integration Videos

Two videos show how simple is an integration now (It could be better see below). This can influence some of you to help us and you are welcome.

First one: install some scripts
http://stephane.ducasse.free.fr/Videos/PharoIntegration/DownloadingScripts.mov

Second one
http://stephane.ducasse.free.fr/Videos/PharoIntegration/integratingAChange.mov

Then you should do the following

type on the command line

./prepare

In Pharo

start menu
merge (look at the fix….)
freeze menu
publish menu

Then type on the command line

./publish

I do not think that Monticello is the best tool for managing our changes and code but for now this is what we have and it is working.

Tagged ,

Installing PostgreSQL for GLORP

Daniel Lyons described a way to install PostgreSQL

In case someone else is trying to get this to work, here’s a recipe I found that worked for me.

Scenario: you have PostgreSQL on your Mac via MacPorts and would like to install GlorpDBX with your Pharo 2.0.

1. Make sure you have a universal build of PostgreSQL. Pharo 2.0 is 32-bit, and MacPorts is probably going to fetch you a 64-bit build of Postgres. So do this:

$ sudo port install postgresql93 +universal

2. Download opendbx 1.4.6 and use the following options to ./configure:

$ ./configure CFLAGS=”-I/opt/local/include -I/opt/local/include/postgresql93 -arch i386 -arch x86_64″ CXXFLAGS=”-I/opt/local/include -I/opt/local/include/postgresql93 -arch i386 -arch x86_64″ LDFLAGS=”-L/opt/local/lib -L/opt/local/lib/postgresql93 -arch i386 -arch x86_64″ –disable-dependency-tracking –disable-utils –with-backends=pgsql

Most of that is wiring up opendbx to the MacPorts-specific install areas for Postgres. The -arch flags cause it to build a universal library. –disable-dependency-tracking was mentioned on Stack Overflow here: http://stackoverflow.com/questions/3350107/how-to-compile-universal-libraries-on-mac-os-x

–disable-utils stops the build from trying to make a command line utility that seems not to build with the readline on Mavericks.

3. Install it:

$ sudo make install

From here, creating a username/database sodbxtest showed the unit tests passing.

Thanks,


Daniel Lyons

Pharo @ FOSDEM 2014

Call for Participation in the Smalltalk Devroom at FOSDEM 2014.
http://www.fosdem.org, please forward

A devroom for the Pharo, Squeak, Amber, GST, Etoilé, Seaside,
Moose Smalltalk projects & Newspeak as derived language.
Smalltalk environments offer a very high development productivity,
unmatched by their successors. Come do some pair programming
with us and experience yourself the advantages of a real OO
environment

The meetup will take place Saturday, February 1, 2014,
from 9AM until 5PM, building AW. This room has 72 seats,
a VGA video projector and wireless internet.
More information will be available later.

If there are volunteers to record video content, the FOSDEM
organization kindly offered to provide needed equipment & instructions.
Please let me know if you would be willing to spend some
time pointing a camera at a speaker.

Proposals on content and format are welcome.

People interested in running a session should send me an
email at
stephan ( @ ) stack ( dot ) nl
with ‘FOSDEM2014’ in the subject and the following information:

– Their name
– The project they are associated with
– A short bio, to be put on the website along with their speaker name
– (optionally) a picture of themselves
– The title of their session (which will go on the website and in the booklet)
– A abstract describing the session in further detail.
– The desired length of the session.
– The desired time slot in which they want to hold the session.

I will send out updates on a regular basis to the lists and anyone
stating his interest.

Suggested values for the duration are 55min, 25min, 6m40 (Pecha Kucha).
The desired time slot is meant to help you prevent conflicts with other dev
rooms in which you might have a talk or your travel arrangements.

There are alternative, non smalltalk-specific tracks available:
lightning talk and the main track

The deadline for submissions is December 31, 23:00 GMT+1.

Devroom related URLs:
http://www.pharo-project.org
http://www.squeak.org/
http://etoileos.com/
http://www.seaside.st/
http://smalltalk.gnu.org/
http://www.moosetechnology.org
http://amber-lang.net
http://newspeaklanguage.org/
http://www.esug.org

Tagged ,

Commits for Weeks 3-4 (2014)

30721

12077 MNU in AdditionalMethodState>>analogousCodeTo:
https://pharo.fogbugz.com/f/cases/12077

12712 make sure that all class definition messages without “poolDictionaries” part exist
https://pharo.fogbugz.com/f/cases/12712

12711 ReleaseTest #testObsoleteClasses fails
https://pharo.fogbugz.com/f/cases/12711

30720

12701 In GZipReadStream #unzip:to: answer the new file name, but not #unzip:
https://pharo.fogbugz.com/f/cases/12701

11755 When removing an instance variable, far too many package are dirty after
https://pharo.fogbugz.com/f/cases/11755

12713 RecentMessageList>>lastClasses: includes obsolete testclasses
https://pharo.fogbugz.com/f/cases/12713

12726 add command line handler for ImageCleaner
https://pharo.fogbugz.com/f/cases/12726

30719

12703 revert DockingBarMorph>>updatePosition
https://pharo.fogbugz.com/f/cases/12703

12704 clean FontMorphChooser
https://pharo.fogbugz.com/f/cases/12704

30718

12519 Codepanel in ByteCode view should be read only
https://pharo.fogbugz.com/f/cases/12519

12693 TasklistMorph Navigation Cleanup
https://pharo.fogbugz.com/f/cases/12693

12705 Better implementation of a method from case 12163
https://pharo.fogbugz.com/f/cases/12705

30715

12600 MessageBrowser “senders of”list adds new created messages
https://pharo.fogbugz.com/f/cases/12600

12692 KeyboardEvent>>#asKeyCombination ignores Option key
https://pharo.fogbugz.com/f/cases/12692

30713

12687 Spec Update
https://pharo.fogbugz.com/f/cases/12687

30712

12685 wrong version ordering in NewVersionBrowser compareTo
https://pharo.fogbugz.com/f/cases/12685

12686 Failing test: testClassRespectsPolymorphismWithTrait
https://pharo.fogbugz.com/f/cases/12686

12688 Fix WorldModel layout
https://pharo.fogbugz.com/f/cases/12688

30711

12163 New class template without poolDictionaries: line
https://pharo.fogbugz.com/f/cases/12163

12632 window menu close all debuggers does not work anymore
https://pharo.fogbugz.com/f/cases/12632

30710

12449 Nautilus setting “Show groups on top” breaks automatic group update
https://pharo.fogbugz.com/f/cases/12449

12490 Unloading package does not unload correctly
https://pharo.fogbugz.com/f/cases/12490

30709

11714 NewVersionBrowser needs to be finished
https://pharo.fogbugz.com/f/cases/11714

12532 Unable to find sources file: blank image screen when starting Pharo30 and vm crash report
https://pharo.fogbugz.com/f/cases/12532

12680 RPackage>>includesClassNamed: does not ensure that name is a Symbol
https://pharo.fogbugz.com/f/cases/12680

12681 remove #copyReplaceAll:with:asTokens: from SquenceableCollection
https://pharo.fogbugz.com/f/cases/12681

30708

12547 In the messageBrowser the [package] > [nil]
https://pharo.fogbugz.com/f/cases/12547

30707

5541 SequenceableCollection>>#copyReplaceAll:with:asTokens: should be moved to string
https://pharo.fogbugz.com/f/cases/5541

30706

12679 change package of ClassTrait >> #soleInstance
https://pharo.fogbugz.com/f/cases/12679

12649 Closing AnnouncementSpy does not unregister from associatedAnnouncer
https://pharo.fogbugz.com/f/cases/12649

12585 asFullRingDefinition does not (always) find the package of a method
https://pharo.fogbugz.com/f/cases/12585

30705

12675 Add NativeBoost class >>#isAvailable
https://pharo.fogbugz.com/f/cases/12675

12674 Fix NBExternalTypeValue initialization
https://pharo.fogbugz.com/f/cases/12674

12673 Missing method to get the corresponding MCPackage from a RPackage
https://pharo.fogbugz.com/f/cases/12673

Tagged , ,

Pharo Ubuntu packages

About a month ago Nicolas and Damien announced their work on Ubuntu to install Pharo VM.

 

Nicolas Petton and Damien Cassou are proud to announce Ubuntu packages for the Pharo VM. Installing the pharo vm is now just a matter of:

sudo add-apt-repository ppa:cassou/pharo
sudo apt-get update
sudo apt-get install pharo-vm

With this package, you get:

– the latest pharo vm as a ‘pharo’ binary in the PATH
– all plugins and libraries (native boost, freetype, ssl, …)
– file association so you can just double-click on pharo images
– pharo icons visible everywhere (on image files, on ALT+TAB…)
– PharoV10.sources and PharoV20.sources

Please fill bug reports on https://pharo.fogbugz.com.

This package is currently only available for Ubuntu 12.10 Quantal.
Fill a bug report if you want me to package it for another version of
Ubuntu.

Tagged ,

Building Platform Specific Installers

Damien Cassou just released the draft of a chapter for the Entreprise Pharo book explaining how to build platform specific installers. Since the chapter is written in Pillar (our nice markdown format) here is the html version of the chapter.

https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/lastSuccessfulBuild/artifact/Deployment/Deployment.pier.html

But you can also read the pdf version.

Have fun.

Tagged

PunQLite: another noSQL DB for Pharo

There is a new player in the NoSql world and a bridge for Pharo made by masashi umezawa. This is a nice addition to the Pharo world and I hope that one of you will extend Voyage (that is an abstract layer on top of NoSql databases) to propose PunQLite as a back-end. Here is the announce about PunQLite.

Hi all,

I’ve developed PunQLite. UnQLite NoSQL database binding for Pharo.
https://github.com/mumez/PunQLite
http://smalltalkhub.com/#!/~MasashiUmezawa/PunQLite

UnQLite is a fast, lightweight, portable, embedded KVS with a simple  scripting engine (Jx9).
http://unqlite.org/

Torsen kindly wrote about PunQLite project’s beginning on his blog.
http://astares.blogspot.jp/2013/11/punqlite-for-pharo-using-unqlite.html

At that time, it was only a bare NativeBoost FFI interface. Now it has
become a full-fledged wrapper.

db := PqDatabase open: ‘test.db’.
db at: ‘Smalltalk’ put: ‘COOL’.
db at: ‘Pharo’ put: ‘HOT’.
db at: ‘Smalltalk’ ifPresent: [:data |
data asString inspect
].
Transcript cr; show: db keys.
db do: [:cursor |
Transcript cr; show: cursor currentStringKey; space; show: cursor
currentStringValue.
].
db close.

Moreover, it is quite fast. I wrote a simple benchmark that does many
round-trips (put/get 100000 small elements). The result is 877 msecs
(on my windows laptop). It was impressive.

Enjoy!


[:masashi | ^umezawa]

Tagged