Monthly Archives: May 2015

Future new widget sets is coming to you

Aliaksei Syrel announced a new list for Brick (the new widget core) on top of Bloc (the future morph core designed by Alain Plantec – You can get access to Bloc via the launcher in the contribution list).

Screen Shot 2015-05-29 at 21.11.47

Main features:
 – List doesn’t care what kind of morphs to contain.
 – Flexible height of elements. Any will do.
 – Items can resize.
 – Elements can be partially visible.
 – Different kind of caches.
 – Selection strategies.
Short demo video: https://docs.google.com/file/d/0B-bMBVDOi3oTMnNKVHhCQUJ2UlU/edit
If you want to play load: http://ws.stfx.eu/F4DRC0CVSDII
Examples included.
Cheers,
Alex
Advertisements

New list widget under development

Esteban Lorenzano started to develop a new list widget to replace all the widgets into Pharo.

You can load it using

Gofer it
smalltalkhubUser: 'estebanlm' project: 'FastTable';
configuration;
loadStable.

My idea is to ask community help finish it.

Implementation uses datasources to feed the list, so in theory you can browse infinite rows without loosing speed.
according to my tests (in my machine):

[ Object browse ] timeToRun asMilliSeconds. -> ~3000ms (without cache)
[ Object browse ] timeToRun asMilliSeconds. -> ~350ms (with cache active)
[ Object browse ] timeToRun asMilliSeconds. -> ~150ms with FastTable, always.

There is an adaptor FTPluggableIconListMorphAdaptor that has the same format as a PluggableIconListMorph so changing already existing calls will be easy (even if there should not be done like that in the long term 🙂

So, so far, list works fine, but

– still missing drag&drop support
– there are some issues remaining:
— cells escaping his width
— last elements in long lists sometimes are not visible

some details has to be around too… but this is a good design, taken from Cocoa… is years better than the naive implementation of old PluggableListMorph and better than the strategy used by NewList (spawning threads all around).

Please, help me finish!
Repository is open so anybody can contribute.

FTExamples has a set of wxamples with all things implemented 🙂

Esteban

ps: I already has the adaptor working with Nautilus, but since it depends on some changes on it I will wait until is integrated to push it. But basically if you want to try you just need to go to: CategoryWidget>>#buildCategoriesList, ClassWidget>>#buildClassesList and MethodWidget>>#buildMethodList and change PluggableIconListMorph with FTPluggableIconListMorphAdaptor

Pharo pi machine

Got my Raspberry Pi B+ with a Tontec® 3.5 touch screen display
to bootstrap into Pharo.

The Raspberry Pi from CI (https://ci.inria.fr/pharo/view/RaspberryPi/)
worked out of the box on Raspbian. Nice!

Torsten B.

pi2

A system monitoring for Pharo images

Finally I’ve found some time to release some of my code I’ve been using the last years. It is a project around system monitoring. It defines system parameters to watch and integrates them with popular tools like munin, monit and nagios/icinga/… As an example the following picture shows the monitoring of the vm memory over a day.

monitor-memory

System monitoring is basically about monitoring system parameters in order to send alerts when thresholds are exceeded or to plot graphs that enables one to estimate further progression of image behaviour.

The code is here

http://smalltalkhub.com/#!/~NorbertHartl/Monitoring

and an introduction article (more will follow) to it is here

http://norbert.hartl.name/blog/2015/05/16/system-monitoring-for-pharo-images/

Feedback is welcomed!

Hopy you enjoy it. And bug me if you have questions or something is not working.

Norbert

Parsing code with syntax errors

We can parse code with syntax errors: it generates partial ASTs with the faulty part of the input as a RBParseErrorNode.

Only three methods are needed to allow generating executable methods from such an AST: the SyntaxErrorNotification
 is raised at runtime instead of compile time.

testEvalSimpleMethodWithError
    | ast cm |
    ast := OpalCompiler new
                source: 'method 3+';
                useFaultyForParsing: true;
                parse.
    
    self assert: ast isMethod.
    self assert: ast isFaulty.
    
    cm := ast compiledMethod.
    self should: [cm valueWithReceiver: nil arguments: #()] raise: SyntaxErrorNotification

The syntax error instance is compiled in via a literal variable, in the end the only thing needed was:

visitParseErrorNode: anErrorNode  
	methodBuilder 
		pushLiteralVariable: #error -> anErrorNode asSyntaxErrorNotification;
		send: #signal.

This is in #50044.

Future work: introduce a RuntimeSyntaxError that can be turned off per error and globally.

	Marcus

Mixed Number

I wrote a little tool to print fractions/decimals as mixed numbers. Enjoy :)

Gofer it
	smalltalkhubUser: 'SeanDeNigris' project: 'SeansPlayground';
	package: 'MixedNumberPrinter';
	load.
	
Usage Examples:
	1.25 mixedNumberString = '1¼'. "use special ASCII characters when possible"
	1.125 mixedNumberString = '1 1/8'

Sean De Nigris

New release of Teapot

Hello,

Teapot 0.91 released today.

Teapot is micro web framework that focuses on simplicity and ease of use.

Here's a summary of changes:
 - Routes and before/after filters may include conditions (see the example
below)
 - Routes can be defined with /any:/ that serves as a wildcard matching any
http method
 - Added /charSet:/ accessor to TeaResponse

E.g.

Teapot on 
    GET: 'test' -> result; when: [:req | req accept = 'application/json'];
    start.

More information:

http://smalltalkhub.com/#!/~zeroflag/Teapot

The Garage database driver API

Hi all,

I’m pleased to announce the release 0.1 of Garage, a database driver API. Garage is meant to be a common interface to access several database servers, in a JDBC style.
The current version works in Pharo3 and Pharo4 and includes drivers for:
 – mysql (pure smalltalk)
 – postgres (pure smalltalk)
 – sqlite (using ffi)
 – opendbx (allowing connecting with several db vendors, using ffi)
We have a nice test suite (that maybe you can help to enlarge) that is tested every day in Jenkins [1].
Also, in garage’s website [2] you’ll find
 – installation instructions
 – basic usage
 – documentation of features such as statements, transactions, cursored fetches.
 – issue tracker, backlog and other information
Feedback (and contributions) are very welcome!
Enjoy,
Guille

Pharo 50 is starting fast…

50027
15457 Update Zinc to handle some deprecations in Pharo 5
https://pharo.fogbugz.com/f/cases/15457

15463 Rubric turns text to transparent when styling
https://pharo.fogbugz.com/f/cases/15463
50026
15164 Misleading error message for nonexisting Package (String>>asPackage)
https://pharo.fogbugz.com/f/cases/15164

15373 forward port 15322 “Save As” does not properly save filenames with dots in them, like “one.two” or “one.two.image”
https://pharo.fogbugz.com/f/cases/15373

15458 fix #mustBeBoolean handling for #or:
https://pharo.fogbugz.com/f/cases/15458

50025
15451 AST Shout: should recognize incomplete class names and color them correctly
https://pharo.fogbugz.com/f/cases/15451

15446 Enhance RadioButtonGroup
https://pharo.fogbugz.com/f/cases/15446

15448 remove package Play
https://pharo.fogbugz.com/f/cases/15448

50024
15430 Integrate new versionner
https://pharo.fogbugz.com/f/cases/15430
50023
15422 SHTextStyler>>#styleInBackgroundProcess: should not set the text if styling process was terminated
https://pharo.fogbugz.com/f/cases/15422

15443 AST based highlighter: DNU sometimes
https://pharo.fogbugz.com/f/cases/15443

15437 remove writeToSlot:of:
https://pharo.fogbugz.com/f/cases/15437

50022
15447 Links with MetaContext
https://pharo.fogbugz.com/f/cases/15447

15436 emitStore: should not send writeToSlot:of:
https://pharo.fogbugz.com/f/cases/15436

15444 OldClassBuilderAdapter: move checks into SlotClassBuilder (first step)
https://pharo.fogbugz.com/f/cases/15444

50021
ConfigurationOfRubric
50020
15438 Update Rubric
https://pharo.fogbugz.com/f/cases/15438

15440 remove deprecated references to #allRangesOfSubString: in TextMorphForEditView
https://pharo.fogbugz.com/f/cases/15440

50019
14080 Nuke remaining subStringXyzs
https://pharo.fogbugz.com/f/cases/14080

15435 MetaLink: invalidate all methods when state of link ist changed
https://pharo.fogbugz.com/f/cases/15435

50018
15429 remove coupling from monticello GUI with metacello
https://pharo.fogbugz.com/f/cases/15429

15433 issue 15426 breaks NEC-Completion
https://pharo.fogbugz.com/f/cases/15433

15235 Faster Morphic>>removeHalo
https://pharo.fogbugz.com/f/cases/15235

50017
15426 SHRBTextStyler does not work for all predefined styles
https://pharo.fogbugz.com/f/cases/15426

15427 Link Condition: Test + fix conditions for links
https://pharo.fogbugz.com/f/cases/15427

15259 Remove paintTabIcon
https://pharo.fogbugz.com/f/cases/15259

50017
15426 SHRBTextStyler does not work for all predefined styles
https://pharo.fogbugz.com/f/cases/15426

15427 Link Condition: Test + fix conditions for links
https://pharo.fogbugz.com/f/cases/15427

15259 Remove paintTabIcon
https://pharo.fogbugz.com/f/cases/15259
50016
15421 fix offset in SHRBTextStyler
https://pharo.fogbugz.com/f/cases/15421

15300 MNU: Association>>adaptToNumber:andSend:
https://pharo.fogbugz.com/f/cases/15300

15398 Deprecated StartupLoader should present migration instructions
https://pharo.fogbugz.com/f/cases/15398

15405 Suggestion menu SystemNavigation(Object)>>doesNotUnderstand: #browseClassRefsOf:
https://pharo.fogbugz.com/f/cases/15405

50015
15420 Forward port 15417 TestRunner does not offer the RunCoverage functionality
https://pharo.fogbugz.com/f/cases/15420

15419 Pharo3Theme installFullTheme background is too dark
https://pharo.fogbugz.com/f/cases/15419

15424 #removeInstVarNamed: should just call #removeSlot:
https://pharo.fogbugz.com/f/cases/15424

50014
15416 Load new Athens configuration (3.4)
https://pharo.fogbugz.com/f/cases/15416

15414 TxText Cleanup for Pharo 5.0 #1
https://pharo.fogbugz.com/f/cases/15414
50013
15249 Comment RBEnvironment classes
https://pharo.fogbugz.com/f/cases/15249

15412 SHParserST80 class>#new not needed
https://pharo.fogbugz.com/f/cases/15412

15413 fix AST based syntax colouring
https://pharo.fogbugz.com/f/cases/15413
50012
15395 Cleanup #1: Lots of little things
https://pharo.fogbugz.com/f/cases/15395

15401 MessageNotUnderstood: Association>>translated
https://pharo.fogbugz.com/f/cases/15401

15400 comment window announcement classes
https://pharo.fogbugz.com/f/cases/15400

50011
15388 RBRepeteadMethodsInTheSuperclassRule duplicates RBEquivalentSuperclassMethodsRule
https://pharo.fogbugz.com/f/cases/15388

50010
12595 Add Morph>>#asText
https://pharo.fogbugz.com/f/cases/12595

15338 OrderedDictionary changes to merge
https://pharo.fogbugz.com/f/cases/15338
50009
15372 forward port pharaoh: 15339 Monticello with spotter extension methods throws MNU errors when browsing packages in repos that don
https://pharo.fogbugz.com/f/cases/15372

15380 Failing test: ClassTest.testClassRespectsPolymorphismWithTrait
https://pharo.fogbugz.com/f/cases/15380
50008
15384 kommiter throws DNU when browsing remotes
https://pharo.fogbugz.com/f/cases/15384

50007
15380 Failing test: ClassTest.testClassRespectsPolymorphismWithTrait
https://pharo.fogbugz.com/f/cases/15380

15379 Failing Test: MatrixTest>>#testOneColumnOnly
https://pharo.fogbugz.com/f/cases/15379

15378 Pharo5 0003: Nautilus start with pre-set filter
https://pharo.fogbugz.com/f/cases/15378
50006
15385 Improving ParseTreeSearcher and RewriterTests
https://pharo.fogbugz.com/f/cases/15385

15386 Clean up OldClassBuilderAdapter (first step)
https://pharo.fogbugz.com/f/cases/15386
50005
15387 Put back simplistic link code generation support+ enable test
https://pharo.fogbugz.com/f/cases/15387

15332 [Spec Help] protocol and protocol-events dont exist anymore
https://pharo.fogbugz.com/f/cases/15332

15349 The menu in the PharoTutorial has an erroneous label
https://pharo.fogbugz.com/f/cases/15349

50004
15377 StartupLoader leftovers in StartupPreferencesLoader
https://pharo.fogbugz.com/f/cases/15377

15354 Add <script> to #open in Monticello tools
https://pharo.fogbugz.com/f/cases/15354

15355 Add MetaRepo for Pharo 40 in 5.0 config browser, also fix example method
https://pharo.fogbugz.com/f/cases/15355

50003
15330 NumberParser>>#isNumber:
https://pharo.fogbugz.com/f/cases/15330

15368 unload Deprecate40 in Pharo5
https://pharo.fogbugz.com/f/cases/15368

50001
15288 Shortcuts in text editor are hardcoded
https://pharo.fogbugz.com/f/cases/15288