Monthly Archives: June 2015

DragPanels: Floating palette windows with drag-and-drop in Morphic

Morphic offers everything needed to create highly interactive applications in Pharo. It is however, difficult to find out how to actually create those applications. Morphic tutorials provide a starting point, and are not very good at showing how the different features interact and are supposed to be used together. Morph has lots of methods, and some of them are not in the method category where you might expect them. The result is that most Morphs in Pharo do not use much of what Morphic has to offer.

Wouldn’t it be great if there would be some sample code, showing how Morphic can be used to great effect?

Well, here is some code that takes a first step towards that goal.
DragPanels shows how to create a floating palette, filled with
wells that support dragging a property towards a target. It shows how to combine drag-and drop with click: and context menu actions, and show  to give UI feedback when over a well and when holding the mouse down over an element that reacts to click:.

You can see the code in action here:
https://vimeo.com/131889858

The color panel shows some colors. If you don’t set the allowDropBlock,
it will work with any morph that responds to #color: (like the world).
By clicking on the plus, you can add more colors to the panel. The panel has a context menu to restore the default values.

ColorPanel withSevenPaleColors
allowDropBlock: [ :source :target |
target class = CardMorph ];
openInHand

The people panel shows avatars belonging to an email addres. By default it uses gravatar for them, and caches the images.

PeoplePanel new
defaultValues:
#(‘stephan@stack.nl
serge.stinckwich@gmail.com
nicolas.anquetil@inria.fr
thierry.goubier@gmail.com
stephane.ducasse@inria.fr
marcus.denker@inria.fr‘);
allowDropBlock: [ :source :target |
target class = CardMorph ];
openInHand

When dropping, the dragSource sends #color: resp. #email: to the  target by default. By setting the dropSelector of the DragWell this
can be overridden.

You can try the code by do-ing

Gofer new
smalltalkhubUser: ‘StephanEggermont’ project: ‘Dragpanels’
package: ‘DragPanels’;
load.

It is used in (a work in progress)

Gofer new
smalltalkhubUser: ‘StephanEggermont’ project: ‘Documentation’
package: ‘CardsMorphic’;
load.

Stephan

p.s.

On the wishlist are
– add more color palettes
– add a dark theme, refactoring the colors
– add a small close cross in the title bar of the palette
– define the dropSelector in the panel, not the well
– support different sized wells, refactoring the sizes
– make the mouseOver rectangle color content dependent
– add pharo contributors as an avatar source
– add a configuration

Choose your high goal and tell its story through the system that you build

Hi,

I gave last week a talk at NDC Oslo on “Don’t demo facts. Demo stories!”. While the talk is less technical, I did exemplified the message by demoing Spotter in comparison with the search support from Eclipse. https://vimeo.com/131632605
There are several things I would like to emphasize.
I compared our solution with an “industry standard” one. We often think our system as being niche and perhaps not mature enough. We need to change that perception about our work. We build state of the art.
One thing that I did not mention explicitly in the talk is the size of the implementation. The Spotter implementation is 3500 lines of code — and that it is so large because it currently comes with its own widgets. Furthermore, the extensions average 8 lines per custom processor (including the method header and the pragma). This is orders of magnitude smaller than what is typically out there, and it is precisely the reason why we can compete even if we are fewer.
But, to get out there and compete we have to set that high goal for ourselves. For example, with GT we do not want to compete. We want to outcompete. So can you.
While details are important, high goals require us to get away from those details. Only polishing details will tend to limit you to incremental improvements. We need to jump from time to time. But, these jumps are hard. On the one hand, it is hard to find the right jump and convince people to jump with you. On the other hand, they are hard to predict. For example, Spotter would have not been predictable one year ago.
Yet, dry goals are not enough to keep us going. We need stories that make us dream. And the beauty is that Pharo breaths such a story. We should not limit ourselves to that story only. For example, with GT we want to reinvent the developer experience by making the developer be able to mold visual tools to her context because that is the only effective way to build sustainable systems. This little point of view will turn the IDE upside down, and this is only possible in a system like Pharo.
Choose your high goal and tell its story through the system that you build. And remember that Pharo already offers a beautiful story to start from.
Cheers,
Doru

Sonar importer for Moose

Hi,

I would like to announce that I developed a Sonar importer to get sonar data into a Moose model.

It imports the list of metrics and projects available in the Sonar repository.

On demand, it imports chosen metrics for all the projects. I let you see the tests and documentation to check the behavior of this importer.

The configuration is on the Pharo catalog, so it is very easy to load it (else the repo is here).

The importer is based on the public Sonar REST API Version 3.7.2, but should work with recent ones.

Don’t hesitate to contribute if you want to add new features, the project is in public access!

Cheers,

Vincent

Pharo is pulsing steady and regular

50133
15831 Replace PluggableTextMorph with RubScrolledTextModel in Nautilus for source code
https://pharo.fogbugz.com/f/cases/15831

15832 Integrate new FastTable
https://pharo.fogbugz.com/f/cases/15832
50132
15568 removeClass does not work for Last modified/Most viewed DynamicGroups
https://pharo.fogbugz.com/f/cases/15568

15827 Update Rubric
https://pharo.fogbugz.com/f/cases/15827

15272 RBPatternMessageNode>>match:inContext: SubscriptOutOfBounds
https://pharo.fogbugz.com/f/cases/15272
50131
12728 requestImplementorToInline: is missing in NautilusRefactoring
https://pharo.fogbugz.com/f/cases/12728

15828 NECController must check that its editor morph is not nil before unsubscribing from it
https://pharo.fogbugz.com/f/cases/15828

15826 Clean up discouraged uses of SourceFiles and friends (10)
https://pharo.fogbugz.com/f/cases/15826

50130
15825 Move Reflectivity changes from Opal into a Opal translator subclass (part1)
https://pharo.fogbugz.com/f/cases/15825

15824 Clean up discouraged uses of SourceFiles and friends (9)
https://pharo.fogbugz.com/f/cases/15824

50129
15823 Clean up discouraged uses of SourceFiles and friends (8)
https://pharo.fogbugz.com/f/cases/15823
50128
15818 Clean up discouraged uses of SourceFiles and friends (7)
https://pharo.fogbugz.com/f/cases/15818

50126
15813 Reflectivity: #value for ReturnNodes
https://pharo.fogbugz.com/f/cases/15813

50125
15812 MessageNotUnderstood: RGMethodDefinition>>ast (Suggestions expects it)
https://pharo.fogbugz.com/f/cases/15812

15791 Cleanup Script actions for methods
https://pharo.fogbugz.com/f/cases/15791

15557 New PackageManifests should be classes, not instances
https://pharo.fogbugz.com/f/cases/15557

50124
15809 Update Rubric
https://pharo.fogbugz.com/f/cases/15809
50123
15806 Clean up NautilusRefactoring
https://pharo.fogbugz.com/f/cases/15806

15805 support #newValue on assignmentNode + cleanups
https://pharo.fogbugz.com/f/cases/15805

15807 Revisiting RBUnpackagedCodeRule
https://pharo.fogbugz.com/f/cases/15807

15801 MorphTreeMorph improvement
https://pharo.fogbugz.com/f/cases/15801

50122
15801 MorphTreeMorph improvement
https://pharo.fogbugz.com/f/cases/15801
50121
15799 replace last #gather: reference
https://pharo.fogbugz.com/f/cases/15799

15800 Fix concurrency problem with RemoteString
https://pharo.fogbugz.com/f/cases/15800

15795 Playground enter does not work well anymore
https://pharo.fogbugz.com/f/cases/15795

15793 Better comment for Margin
https://pharo.fogbugz.com/f/cases/15793

13463 Monticello Browser doesnt scroll packages correctly
https://pharo.fogbugz.com/f/cases/13463

50120
15789 Progress with reifications
https://pharo.fogbugz.com/f/cases/15789

7367 Nautilus Colors “not in this package” methods differently on instance/class sides
https://pharo.fogbugz.com/f/cases/7367

15794 Clean up discouraged uses of SourceFiles and friends (5)
https://pharo.fogbugz.com/f/cases/15794
50119
15788 Clean up discouraged uses of SourceFiles and friends (4)
https://pharo.fogbugz.com/f/cases/15788

15785 Fix do it etc in class comment in Nautilus
https://pharo.fogbugz.com/f/cases/15785
50117
15783 First cleanup of Workspace
https://pharo.fogbugz.com/f/cases/15783

15778 The meaning of command-click (apple-click) on class names changed from Browse class to References to class
https://pharo.fogbugz.com/f/cases/15778

15779 Clean up discouraged uses of SourceFiles and friends (3)
https://pharo.fogbugz.com/f/cases/15779

15724 RB lint rules should not directly query the system dictionary
https://pharo.fogbugz.com/f/cases/15724
50116
15754 New Code Critic for unary “accessing” methods without explicit returns
https://pharo.fogbugz.com/f/cases/15754

15739 lastKeystroke broken
https://pharo.fogbugz.com/f/cases/15739

15146 Spec TabManagerModel>>selectedTab: aTab manipulates with Morphic tab
https://pharo.fogbugz.com/f/cases/15146

15781 Fix TraitMethodDescriptionTest>>testArgumentNames
https://pharo.fogbugz.com/f/cases/15781
50115
15776 Clean up discouraged uses of SourceFiles and friends (2)
https://pharo.fogbugz.com/f/cases/15776

15681 Manifest-CriticBrowser
https://pharo.fogbugz.com/f/cases/15681

15775 remove some “halt” that where left over
https://pharo.fogbugz.com/f/cases/15775

50114
15765 OrderedCollection>>#at: and #at:put is slow
https://pharo.fogbugz.com/f/cases/15765

15753 wrong styling for comments
https://pharo.fogbugz.com/f/cases/15753

15770 Methods are in wrong protocol on ThemeIcons
https://pharo.fogbugz.com/f/cases/15770

15711 The File Browser has a Context Menu “Workspace with Contents”. It opens an Edit Window (String Morph), but not a Workspace …
https://pharo.fogbugz.com/f/cases/15711
50113
15276 radioUnselectedFormContents and radioSelectedFormContents broken in Pharo3UIThemeIcons
https://pharo.fogbugz.com/f/cases/15276

15766 remove explicit isKindOf: PluggableTextFieldMorph in rubric
https://pharo.fogbugz.com/f/cases/15766

15767 remove explicit isKindOf: PluggableTextFieldMorph
https://pharo.fogbugz.com/f/cases/15767

50111
15761 remove package Tool-Browser-Old
https://pharo.fogbugz.com/f/cases/15761

14614 FileList is not working
https://pharo.fogbugz.com/f/cases/14614

15640 Call to obsolete method in LinearGradientPaint class
https://pharo.fogbugz.com/f/cases/15640
50110
15746 clean up RPackage-SystemIntegration
https://pharo.fogbugz.com/f/cases/15746

15681 Manifest-CriticBrowser
https://pharo.fogbugz.com/f/cases/15681

15718 Remove StringHolder
https://pharo.fogbugz.com/f/cases/15718

15532 Methods in Object category drag and drop should be a Morphic extension
https://pharo.fogbugz.com/f/cases/15532
50109
15660 Add String methods for removing prefix/suffix
https://pharo.fogbugz.com/f/cases/15660

15756 Move FileStream usages to File and Friends
https://pharo.fogbugz.com/f/cases/15756

15759 Remove debug code from ASMJit
https://pharo.fogbugz.com/f/cases/15759

15718 Remove StringHolder
https://pharo.fogbugz.com/f/cases/15718
50108
15740 openInWorld: aPasteUpMorph raises MNU PasteUpMorph>>startSteppingSubmorphsOf:
https://pharo.fogbugz.com/f/cases/15740

15726 unimplemented methods for new change list
https://pharo.fogbugz.com/f/cases/15726

15720 RubTextEditor references StringHolder
https://pharo.fogbugz.com/f/cases/15720
50107
15741 PluggableTextMorphWithLimits should be removed
https://pharo.fogbugz.com/f/cases/15741

15749 RB: Dont Add Parens Around Lit Array Elements
https://pharo.fogbugz.com/f/cases/15749

15751 catalog (with spotter) needs to show projects after classes and packages
https://pharo.fogbugz.com/f/cases/15751

15752 make browsing versions of removed methods working again
https://pharo.fogbugz.com/f/cases/15752
50106
15745 add API to enumerate AST nodes
https://pharo.fogbugz.com/f/cases/15745

15747 cleanup tools to get rid of undeclared
https://pharo.fogbugz.com/f/cases/15747

15748 Reflectivity: fixes for reifications
https://pharo.fogbugz.com/f/cases/15748

15703 integrate new Catalog Browser
https://pharo.fogbugz.com/f/cases/15703

50105
15735 Start to move RPackage-SystemIntegration to into RPackage
https://pharo.fogbugz.com/f/cases/15735

15744 CatalogBrowser moved to PharoExtras
https://pharo.fogbugz.com/f/cases/15744

15742 Small clean up in ChangesBrowser
https://pharo.fogbugz.com/f/cases/15742

50104
15636 PharoTutorial contents
https://pharo.fogbugz.com/f/cases/15636

15731 Kill the last two #asTimeStamp methods
https://pharo.fogbugz.com/f/cases/15731

15734 More tests for reifications
https://pharo.fogbugz.com/f/cases/15734

NeoConsole

Hi,

NeoConsole is a small, standalone package that offers a command line (a.k.a. a REPL) interface to a headless Pharo image.

It contains a number of extendable commands and metrics that allow you to execute arbitrary Pharo code for result (introspection and debugging) or side effect (to manipulate the live, running image). There is a history mechanism, you can refer to previous evaluation results and there is a primitive describe mechanism (like a one level inspect). The metrics system allows you to consult a number of predefined values. There is decent error handling.

Here is a screencast showing how this feels in practice:

  https://www.youtube.com/watch?v=tAtYff6_X_4

The movie shows how to start from scratch, downloading Pharo, installing NeoConsole, running a headless image with the REPL installed in the background. Next, an HTTP server is added to the image and later a specific response is added as well. (You can speed up the movie, if you want).

Obviously this has been done before, and this is not the definitive solution in this area. For example, readline support (allowing you to edit your input) would be fantastic. A true command line inspector and debugger would be super as well. These are standard features in Lisp and would be totally possible in Pharo too.

I just needed this for myself, liked the result and thought it would be worth sharing.

Sven

PS: 

Security warning: this service opens up your image for access to those with access to your local network (i.e. those logged in to your machine), without any further authenication, allowing them to do absolutely anything. Think and make sure that you know what you are doing.



Amazing blogs about Pharo

Hi

I wanted to say that I love these two blogs:

Excellent job!

NanoStrand

nanomsg is a simple, fast socket abstraction library that supports many communication patterns (“scalability protocols”).

NanoStrand is a gate to the nanomsg world for Smalltalk users. Since there are many language-bindings for nanomsg, integrations with other network programs would be much simpler via NanoStrand.

The project page includes a nice description on how to use it in Pharo.

EventZoom

The application displays maps of historical events and is described here. It uses data from WikiData. If you have a Q-ID from Wikidata you can paste the ID and after importing the data the map is automatically generated.

The application is written in Seaside on top of Pharo and is hosted on PharoCloud.

eventzoom

 

 

New Tool: Catalog Browser in Pharo 5.0

Hi,

maybe you already noticed. The latest update for Pharo 5 which is 50103 (see [1]).
includes a new tool called "Catalog Browser". 

Where to go
===========

You will find it under "Tools" -> "Catalog Browser" and it will display the
configs together with the catalog metadata like project description.

The code is managed with a configuration similar to what we have for
a few other packages/projects. The tool was written by Esteban Lorenzano with small 
improvements like spotter integration from my side. Feel free to contribute more features.

The repository can be found on SmalltalkHub [2].

This new tool basically gives you access to all available configurations
aggregated at [3]. You can use a small UI to search and load the configs
(see world menu -> "Tools" -> "Catalog Browser".

But you can also use Spotter to load a config. 

Example on how to load ScriptManager config: 
============================================
 - open Spotter (SHIFT + ENTER on Windows, ...)
 - type in "Script" and you will find a spotter category "Catalog Projects" with "ScriptManager" in it
 - just hit enter and the config is loaded

Same for all others, so try with "Seaside", "MongoTalk", ...

In the short/mid-term this new tool should replace the existing config browser as it
gives more informations about the projects.   

What to do next:
================
catalogBrowser- give feedback
- we should update all our configs with catalog descriptions
- it would be nice if the spotter integration would include also a preview of the project
  description
- ...

If you want to contribute just tell Esteban so he can add you to the project.

Thanks
Esteban & Torsten

[1] http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2015-June/110964.html
[2] http://www.smalltalkhub.com/#!/~estebanlm/CatalogBrowser
[3] http://catalog.pharo.org/catalog/json

Already 100 updates for Pharo50

50103
Tool-ConfigurationBrowser
https://pharo.fogbugz.com/f/cases/50103

50102
10803 Aliasing a method to a non-existent method breaks Browser
https://pharo.fogbugz.com/f/cases/10803

15728 Meta support in keymapping
https://pharo.fogbugz.com/f/cases/15728

15730 tests for #value (Global, Temp) and fix: allow tests to be run multiple times
https://pharo.fogbugz.com/f/cases/15730

50101
15708 Deleting a class with nautilus raises an error
https://pharo.fogbugz.com/f/cases/15708

12736 Text Selection Not Updated
https://pharo.fogbugz.com/f/cases/12736

15694 Browse versions does not take focus
https://pharo.fogbugz.com/f/cases/15694

12775 Nautilus: Performance problem when selecting group with many classes
https://pharo.fogbugz.com/f/cases/12775

15723 It would be nice if Kernel-Traits (e.g. TClass) dont use #class because its too low level
https://pharo.fogbugz.com/f/cases/15723

50100
15722 Remove unused method -= in SHParserST80
https://pharo.fogbugz.com/f/cases/15722

15725 SystemNavigation shouldnt use Smalltalk globals for self environment
https://pharo.fogbugz.com/f/cases/15725

15721 Reflectivity: add #name reification for Variables
https://pharo.fogbugz.com/f/cases/15721

50099
13180 Class class>>superclassOrder: should preserve classes order
https://pharo.fogbugz.com/f/cases/13180

11711 Remove CodeHolder
https://pharo.fogbugz.com/f/cases/11711

50098
15719 Remove ChangeList
https://pharo.fogbugz.com/f/cases/15719

14013 no package information for class side trait methods
https://pharo.fogbugz.com/f/cases/14013

15197 remove unnecessary menu item in MC
https://pharo.fogbugz.com/f/cases/15197

50097
15710 ExternalChangesBrowser should register to serviceFiles
https://pharo.fogbugz.com/f/cases/15710

15709 Remove FilePackage and PseudoClasses
https://pharo.fogbugz.com/f/cases/15709

15708 Deleting a class with nautilus raises an error
https://pharo.fogbugz.com/f/cases/15708
50096
7472 Remove old Browser
https://pharo.fogbugz.com/f/cases/7472

15714 Reflectivity: add #newValue reification for variables
https://pharo.fogbugz.com/f/cases/15714

50095
15715 Character>>#serializeOn: needs to use accessor to value
https://pharo.fogbugz.com/f/cases/15715

15712 Remove FileContentsBrowser
https://pharo.fogbugz.com/f/cases/15712

50093
15658 Prepare FilePackageRemoval and FileContentsBrowser
https://pharo.fogbugz.com/f/cases/15658
50092
15159 Move file drop handlers to morphic
https://pharo.fogbugz.com/f/cases/15159

15701 Remove browse compressed changes
https://pharo.fogbugz.com/f/cases/15701

15655 a MCWorkingCopy(ConfigurationOfRubric)
https://pharo.fogbugz.com/f/cases/15655

15285 Clean endianness detection
https://pharo.fogbugz.com/f/cases/15285

50091
15700 rollback latest font changes, until we have a real solution
https://pharo.fogbugz.com/f/cases/15700

15686 add missing editor shortcuts to class PharoShortcuts
https://pharo.fogbugz.com/f/cases/15686

15698 do not load package from cache if version info differs
https://pharo.fogbugz.com/f/cases/15698

50090
15693 refactoring of GTAnnouncement to have less duplication
https://pharo.fogbugz.com/f/cases/15693

15679 Writing only one quote at the beginning of a method produces a syntax error.
https://pharo.fogbugz.com/f/cases/15679

15685 Adapt font color to current theme in Rubric
https://pharo.fogbugz.com/f/cases/15685

50089
15664 Merge category method into group in RBRule
https://pharo.fogbugz.com/f/cases/15664
50088
15646
Cleaning method category api should be protocol (part 1)
50087
15684 reduce direct references to PharoClassInstaller
https://pharo.fogbugz.com/f/cases/15684

15677 Remove ComposableModel>>#instantiateModels:s senders in Spec-Debugger
https://pharo.fogbugz.com/f/cases/15677

15673 Remove ComposableModel>>#instantiateModels:s senders in Spec-PolyWidgets
https://pharo.fogbugz.com/f/cases/15673

50086
15674 Clean Nautilus icons and fixed missing class variables
https://pharo.fogbugz.com/f/cases/15674

15661 KeymapBrowser should have an icon
https://pharo.fogbugz.com/f/cases/15661

15683 Fix prompt for cancel in class comment pane
https://pharo.fogbugz.com/f/cases/15683
50085
15644 empty comment pane in nautilus
https://pharo.fogbugz.com/f/cases/15644

50084
15671 remove OldClassBuilderAdapter
https://pharo.fogbugz.com/f/cases/15671

15668 Old caseOf: patterns still in use
https://pharo.fogbugz.com/f/cases/15668
50083
15670 Integrate new version of code importer for 15658
https://pharo.fogbugz.com/f/cases/15670
50082
15666 Class rename does not update references in class-side methods
https://pharo.fogbugz.com/f/cases/15666

15659 LucidaGrande font should be installed just in Macs
https://pharo.fogbugz.com/f/cases/15659

15535 break circular reference for keymappings
https://pharo.fogbugz.com/f/cases/15535

50081
15529 add Character space to the special km single Keycombination class
https://pharo.fogbugz.com/f/cases/15529

15657 Empty UDP packets are not sent
https://pharo.fogbugz.com/f/cases/15657

15665 Remove ComposableModel>>#instantiateModels:s senders in Manifest-CriticBrowser
https://pharo.fogbugz.com/f/cases/15665

15629 Remove ComposableModel>>#instantiateModels:s senders in HudsonBuildTools20
https://pharo.fogbugz.com/f/cases/15629

15650 Remove ComposableModel>>#instantiateModels:s senders in Spec-Tools
https://pharo.fogbugz.com/f/cases/15650

15634 TestRunner refers to categories and should use packages instead
https://pharo.fogbugz.com/f/cases/15634

50080
15632 Integrate latest version of CodeImporter
https://pharo.fogbugz.com/f/cases/15632

50078
15609 dnu RBParserErrorNode addParenthesis
https://pharo.fogbugz.com/f/cases/15609

15625 file out broken due to refactor of adaptToNumber:andSend:
https://pharo.fogbugz.com/f/cases/15625

15643 Remove ComposableModel>>#instantiateModels:s senders in Spec-Core
https://pharo.fogbugz.com/f/cases/15643

15642 Remove ComposableModel>>#instantiateModels:s senders in Tool-ConfigurationBrowser
https://pharo.fogbugz.com/f/cases/15642

15644 empty comment pane in nautilus
https://pharo.fogbugz.com/f/cases/15644

50077
15639 rubric has a lot of hardcoded defaults (for colors, etc.)
https://pharo.fogbugz.com/f/cases/15639

15138 inprecise interpolateTo:at: for floats
https://pharo.fogbugz.com/f/cases/15138
50076
15627 menuShortcutModifierString needs to answer ctrl for windows and linux
https://pharo.fogbugz.com/f/cases/15627

15598 Morphic – Cant go back directly to the first menu when more than 2 submenus are opened.
https://pharo.fogbugz.com/f/cases/15598

50075
15630 Remove duplicate shortcut definition (TextEditors actionMap vs KM)
https://pharo.fogbugz.com/f/cases/15630

15637 Fixed nautilus tests
https://pharo.fogbugz.com/f/cases/15637

15633 FT2Handle needs to cleanUp on exit, not on startup
https://pharo.fogbugz.com/f/cases/15633

15631 Change PluggableTextMorph in comment pane into a RubScrolledTextMorph via RubScrolledTextModel
https://pharo.fogbugz.com/f/cases/15631