Monthly Archives: January 2015

Window Plague Doctor

During development your Pharo IDE will quickly become overcrowded with unused windows. The Plague Doctor is a tool, inspired by Autumn Leaves, that helps you to mitigate this issue by closing the windows that you are less likely to use in the future.
If you want to try our prototype, please install it with the following script or ask me for a quick demo (I am Lille for the PharoDays!).
Gofer new

  smalltalkhubUser: ‘RobertoMinelli’ project: ‘PlagueDoctor’;
  package: ‘ConfigurationOfPlagueDoctor’;
  load.
(Smalltalk at: #ConfigurationOfPlagueDoctor) loadDevelopment.
Minelli-PlagueDoctor-PharoDays2015
P.s. If you report a problem or a feature request, please file in an entry
https://github.com/RobertoMinelli/PlagueDoctor/issues

New version of PUnQLite NoSQL database project

Hi
are you in need for really simple out of image persistency?

If you like to use a small RDBMS solution with Pharo then there is the embeddable SQLite
shared library and NBSQLite3 project [1] to access it. Combine it with Glorp [2] and you do 
not have to fight too much with SQL.

On the other end of persistency world there are the so called "NoSQL databases" and beside 
Mongo and all the others that require special setup etc. there is this wonderful small UnQLite 
embeddable database [3] that similar to SQlite world only requires a simple library.

Thanks to Masashi Umezawa there is a nice wrapper for Pharo already to access this 
tiny embeddable NoSQL database called "PUnQLite" [4] and [5], also including access to 
the Jx9 machinery of UnQLite. It is really cool that he made this available.

This week I updated "PUnQLite" a little bit:
   - refactored the Native boost wrapper for UnQLite (using shared pools, ...)
   - documented classes
   - added a help topic
   - fixed a bug in cursors when accessing the keys in an empty database
   - and finally added a small spec based tool to work with a database file (see attached screenshot) 
     One can use it to open an unqlite database, show the key value pairs and remove or add entries.

If you are in latest Pharo 4 already you can load all of that right from the config browser. Be aware
that you need the external unqlite shared library which is downloaded and extracted into a folder
"pharo-vm" when loading the config.

For instance on Windows it automagically downloads a file "pharo-vm/unqlite.dll" below your
image directory and you just have to copy this shared library file to the folder where your 
VM (Pharo.exe) resides. Havent tried on other OS platforms.

>From the Pharo side using the UnQLite database basically works like having some kind
"external dictionary" in a database file. Just run that in a workspace:

|db|
db := PqDatabase open: 'comments.db'.
db disableAutoCommit.
db transact: [
Object subclasses do: [:cls | | key | 
    key := cls asString.
    db at: key put: cls comment ]
].
db close.

Then open the "Database Browser" from the world menu and open the "comments.db" file.
You can browse the keys and values, remove entries or add new. A filter for the keys
is also included. Nothing fancy but hope you like it or find it usable.

Couldnt make it to PharoConf 2015 but I hope all participants enjoy their time there. 
Keep the others updated by using the #pharodays2015 on Twitter. Have fun!

Bye
T.


[1] http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2015-January/104720.html
[2] http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2015-January/015809.html
[3] http://unqlite.org/
[4] https://github.com/mumez/PunQLite
[5] http://smalltalkhub.com/#!/~MasashiUmezawa/PunQLite

Object-Oriented Implementation of Numerical Methods now open-source

Didier Besset offered his great book “Object-Oriented Implementation of Numerical Methods: An Introduction with Smalltalk and Java” to the community. We would like to thank Didier Besset for his great book and for his gift of the source and implementation to the community. You can find

Both book versions are maintained by Stéphane Ducasse and Serge Stinckwich. 27 Janvier 2015

Another batch of improvements

40459
14784 toggle show hierarchy gives: list receiver of “package” is nil
https://pharo.fogbugz.com/f/cases/14784

14779 fix #definitionString for subclasses of ClassVariable and IntanceVariableSlot
https://pharo.fogbugz.com/f/cases/14779

14780 Bug in compiled method printing since signflag is printed.
https://pharo.fogbugz.com/f/cases/14780
40458
14775 Cleanup “Jobs” package further
https://pharo.fogbugz.com/f/cases/14775

14770 Clean up the AST-Interpreter package further
https://pharo.fogbugz.com/f/cases/14770
40455
14766 Fix two release methods in Versionner
https://pharo.fogbugz.com/f/cases/14766

14768 MCClassDefinition: merge #createClass into #load
https://pharo.fogbugz.com/f/cases/14768

40452
14755 Slot: do not call #index: on virtual slots
https://pharo.fogbugz.com/f/cases/14755

14753 add support for setting class comments to class builder
https://pharo.fogbugz.com/f/cases/14753

40450

14636: spotter: remap cmd+enter to shift+enter
14641: spot on global vars
14741: GTInspector: add simple slot support
14252: Make collections browsable again in the tools
14722: Disable FreeType gives MNU and RMOD in GTools
14711: The Playground print popper should allow for inserting the text in the editor
14587: deleting the whole text in the inspector pane throws SubscriptOutOfBounds
14515: Damaged configurations in the image
40449
14742 Fix: Allow defining simple ClassVariales using symbols
https://pharo.fogbugz.com/f/cases/14742

14712 The print-popper should have a different color than the selection in the default Pharo theme
https://pharo.fogbugz.com/f/cases/14712

14515 Damaged configurations in the image
https://pharo.fogbugz.com/f/cases/14515
40446
14733 do not check for coding convention on addClassVariable:
https://pharo.fogbugz.com/f/cases/14733

14731 Fixing DNU binding in GT and Nautilus
https://pharo.fogbugz.com/f/cases/14731
40442
14590 SHParserST80Test>>#testNumbers
https://pharo.fogbugz.com/f/cases/14590

14725 When using class side slot, show class definition for slots
https://pharo.fogbugz.com/f/cases/14725

40441
14720 Add support for Class Instance Slots
https://pharo.fogbugz.com/f/cases/14720
40440
14716 Remove all #notify: from inline checking
https://pharo.fogbugz.com/f/cases/14716

14718 Move class instance variable def from #load to #createClass in MCClassDefinition
https://pharo.fogbugz.com/f/cases/14718
40438
14699 Slot: #definingClass and #usingMethods should work on non-used slots
https://pharo.fogbugz.com/f/cases/14699

14698 Allow Slots to be saved with Monticello
https://pharo.fogbugz.com/f/cases/14698

14697 simplify extended search menu: case insensitive description not needed
https://pharo.fogbugz.com/f/cases/14697
40437
12501 Duplicate shortcut case sensitive/insenstive method literal strings with it
https://pharo.fogbugz.com/f/cases/12501

14691 Improve pretty printing of Slot classdefinition
https://pharo.fogbugz.com/f/cases/14691
40436
14693 Spotter version 1.0.6
https://pharo.fogbugz.com/f/cases/14693

14692 GTools version 2.0.8
https://pharo.fogbugz.com/f/cases/14692

40434
14684 Spotter version 1.0.5
https://pharo.fogbugz.com/f/cases/14684

14683 GTools version 2.0.7
https://pharo.fogbugz.com/f/cases/14683

40433
14681 Commiting to directory with subdirectory repo
https://pharo.fogbugz.com/f/cases/14681

14680 Improve printing of class definition of classes with Slots or ClassVars
https://pharo.fogbugz.com/f/cases/14680

40432
14638 Avoid indirectly invoking the Refactoring Engine parser (thru CompiledMethod>>ast) when installing a method from an used trait
https://pharo.fogbugz.com/f/cases/14638

40431
14679 Fix layout glitch in FileDialogWindows text preview
https://pharo.fogbugz.com/f/cases/14679

14678 fix DNU #index when redefining a class with slots that have no index
https://pharo.fogbugz.com/f/cases/14678

14675 correctly set superclass when creating classes with slots
https://pharo.fogbugz.com/f/cases/14675
40430
14672 ScriptLoader should not reset repositories
https://pharo.fogbugz.com/f/cases/14672

14673 Avoidable DNU at each compilation
https://pharo.fogbugz.com/f/cases/14673
40429
14668 HandMorph event statistics should be off by default with preference
https://pharo.fogbugz.com/f/cases/14668

14652 Float class fromIEEE32Bit: gradual underflow handling is buggy
https://pharo.fogbugz.com/f/cases/14652
40428
14658 cleaning/commenting SUnit classes
https://pharo.fogbugz.com/f/cases/14658
40427
14643 find records for classcomment changes in SourceFileArray
https://pharo.fogbugz.com/f/cases/14643

10529 ToolRegistry need to support multiple registrations per tool
https://pharo.fogbugz.com/f/cases/10529

DebrisDB Project published allowing Glorp style without SQL servers

The Debris Publishing Team released its Toolkit!

DebrisDB Project published under the MIT License.

This toolkit allows programmers to use the Glorp interface without a Glorp-system definition, and without needing any SQL servers up an running. If you use it right, you can back your application by Fuel files, SIXX files, any serializer, Gemstone, or Glorp/SQL, without modifying your application code. Therefore, it is perfect for prototyping concepts very quickly.

MCHttpRepository
user: ”
password: ”

See the project description for more information.

Good Luck from the Debris Team!

Readability metric in Pharo

Metrics to determine readability and comprehension difficulty for contemporary English text.

http://bracken-dev.github.io/Readability-Smalltalk/

[ANN] A simple debugger for stepping though bytecodes

Hi all,

We’ve just made a simple debugger for stepping through bytecodes. It’s still just the first version so a lot of things can still be improved.
Cheers,
Andrei

Ecole des Mines de Douai has joined the Consortium

The Pharo Consortium is very happy to announce that the Ecole des Mines de Douai has joined the Consortium as an Academic Partner.

About

– Ecole des Mines de Douai: http://www.mines-douai.fr
– Ecole des Mines de Douai, IA: http://ia.mines-douai.fr
– Pharo Consortium: http://consortium.pharo.org

The goal of the Pharo Consortium is to allow companies and institutions to support the ongoing development and future of Pharo.
Individuals can support Pharo via the Pharo Association: http://association.pharo.org

New Memory Profiler for Pharo

Dear Friends and Colleagues,

We are happy to announce Memory Profiler, a new profiler for Pharo. This profiler gives a nice output that indicates the memory consumption along the method call graph. Consider the following piece of code:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
(MSP profile: [
Object browse
]  onPackagesMatching: ‘Nautilus*’ ) inspect
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Consider that MSP uses instrumentation, therefore long execution may take really long. The code above takes about 19 seconds on my iMac.
It opens a visualization that indicates some interesting fact about memory consumption. For example, the expression “Object browse” consumes 14 851 kb with instances of the class Point. More than 1M of points are created.
Here is the blueprint obtained:
Screen Shot 2015-01-12 at 2.20.44 PM
A description of the visualization is available here:
You need to load Spy from the Configuration Browser. Else the following incantation should work:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Gofer it
smalltalkhubUser: ‘ObjectProfile’ project: ‘S2py’;
configurationOf: ‘Spy’;
loadDevelopment.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers,
Alejandro & Alexandre

— 

Pert underway

I have about 1/2 of an application written to implement PERT, which is something management types study for doing project cost estimation, but usually don't use in reality. It has a nice container hierarchy (Project > Phase > Task > Task > ... > Task). I have part of the UI written in Glamour and part in Spec, but it isn't finished. I'm using this as a tutorial to teach my wife Pharo—although I'm probably not so great at it that I should be teaching anybody. :) The tutorial isn't as far along as the application and is probably wrongly titled at this point.

I'm happy to give away the code and the tutorial but I'm a little stuck now since we have just had a baby and are now preparing to move in three weeks. So I apologize for the rough state of affairs, but since you asked I only hope it may be better than nothing.

Code 
http://smalltalkhub.com/#!/~DanielLyons/PERT/

The tutorial can be read here: http://st.7gf.org/PERT/
PDF: http://st.7gf.org/PERT/PERT.pdf
Markdown source: http://st.7gf.org/PERT/PERT.md

Additionally I have a whiteboard capture of the interface I envision with Glamour (which may or may not be appropriate). The size is quite large despite the low quality, my apologies:

http://st.7gf.org/PERT/project-window.jpg
http://st.7gf.org/PERT/simulation-window.jpg 
http://st.7gf.org/PERT/project-graph-diagram.jpg

It would be hard to come up with a more "boring" and "business" application domain than this… but for management people the problem is pretty well-known and for my wife, her only prior programming experience (not counting Excel) is C and the experience has been positive for her so far. She's also greatly enjoying going through my paper copy of Pharo by Example and the built-in tutorial.

The basic concept, in case anyone is interested, is that you can form a directed acyclic graph between subtasks and then using min/max cost estimates, determine which tasks are "critical" and which tasks can be late without affecting the deadline or budget. The "project window" above uses a GLFinder-like approach to allow drilling down into subtasks from projects and phases. This means you're stuck with a tree instead of a DAG. 

The target level of sophistication for the final application is one that can use expected costs and a beta distribution to simulate thousands of different possible outcomes and then aggregate from there to see which tasks are likely to be troublesome or have bad estimates. This is what is pictured in the simulation-window mockup.

All the best,

— 
Daniel Lyons