[Pharo-dev] Bloc Feedback

Aliaksei Syrel alex.syrel at gmail.com
Mon Oct 23 04:05:13 EDT 2017


>
> BlElement has 278 instance-side methods. A frequent battle cry against
> Morphic was the bloated Morph class with 899. Definitely an improvement,
> but are we "there yet”?


Quick method count metric:

(BlElement methods reject: [ :aMethod | aMethod isDeprecated or: [ aMethod
isExtension ] ]) size
gives us *"224"* instance side methods.

Or putting this into perspective:

classes := Smalltalk allClasses collect: [ :aClass | aClass -> (aClass
methods reject: [ :aMethod | aMethod isDeprecated or: [ aMethod isExtension
] ]) size ].
classes := (classes sorted: [ :a :b | a value > b value ]) collect:
#yourself as: OrderPreservingDictionary.
classes

[image: Inline images 1]

Cheers,
Alex

On 23 October 2017 at 09:49, Tudor Girba <tudor at tudorgirba.com> wrote:

> Thanks for the feedback!
>
> Alex will reply in more details on Wednesday.
>
> In the meantime, some comments inline.
>
> > On Oct 23, 2017, at 4:15 AM, Sean P. DeNigris <sean at clipperadams.com>
> wrote:
> >
> > Highlights:
> >
> > - BlCornerRadii - 1st class corners - yay to the death of cryptic arrays
> for
> > this kind of thing :)
> >
> > Questions:
> >
> > - How would one do e.g. a ticking clock in Bloc? The only possibly
> relevant
> > example I see is BlAnimatedCursor. Is that a typical usage? One thing
> that
> > I'm not sure how to translate to a BlElement is that the cursor seems to
> be
> > responsible for starting and stopping the animation via #activateOn:,
> which
> > doesn't exist for an element. How would one prevent an element's
> animation
> > from continuing to run after a space was closed?
> > - BlElement has 278 instance-side methods. A frequent battle cry against
> > Morphic was the bloated Morph class with 899. Definitely an improvement,
> but
> > are we "there yet”?
>
> What do you mean?
>
> > - Does Bloc implement its own keybinding outside of "Keymapping" e.g.
> > BlShortcut? If so, why? Will it ultimately be a replacement?
>
> We wanted the simplest mechanism that we could find to start with. To this
> end, BlShortcut is simpler than Keymapping in that it does not include
> global shortcuts, and categories. In Bloc, we only have shortcut bubbling
> from the leaf element to the root, and all shortcuts are instance-based.
>
>
> > - In BlTextEditElement class>>#exampleText, text construction seems
> awfully
> > complex (`text := BrRopedText rope: (BrCollectionRope collection: (String
> > loremIpsum: 30)). text attributes: { BrFontWeightAttribute bold }.`. How
> > does that way contrast to e.g. `'X' asRopedText`?
>
> Both are valid. The example means to show the most detailed way to
> construct the text object.
>
>
> > Problems:
> >
> > BlBasicExamples
> > - #exampleShapes, select the yellow shape with red border -> inspector ->
> > Transformations Tab -> Click on Composition -> "ShouldNotImplement:
> > #multiplyOn: should not have been implemented in
> BlCompositeTransformation"
> > - #exampleImageBackground -> "ShouldBeImplemented: #fillPath:withForm:
> > should have been implemented in SpartaCairoFillPainter"
> > BlTextEditElement class>>#exampleText
> >    - insert some characters and then press [delete] -> "Error: Illegal
> > sub-sequence end index: 44"
> >    - There is aBlSelectionHandler, but I can't seem to select any of the
> > text
> > BrAttributeRopeExamples#>>simpleRope -> inspect return value -> In
> > inspector, click on "Children" tab -> "Error: Improper store into
> indexable
> > object"
> > - In BlLinearLayoutExamples class>>#exampleVerticalLeftCenterRightRTL,
> >    - the red sub-element does `c linear horizontal alignLeft`, which is
> > then overridden by its parent's `BlLinearLayout vertical "rightToLeft"`.
> Was
> > it intentional to show the precedence because I found it confusing when
> an
> > element that sent #alignLeft showed up on the right!
> >    - the yellow sub-element does not appear at all. Maybe it should do a
> `c
> > vertical exact: 100.` like its siblings?
> > - All BlAnimationExamples lead to deprecation warnings and DNU's, but *do
> > not even attempt* #exampleBallsAnim or face endlessly multplying debugger
> > windows!
>
> I will let Alex answer to these ones :)
>
> Doru
>
> >
> > -----
> > Cheers,
> > Sean
> > --
> > Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.
> html
> >
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Some battles are better lost than fought."
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171023/a8f9404f/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pharo Classes by number of methods.png
Type: image/png
Size: 292763 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171023/a8f9404f/attachment.png>


More information about the Pharo-dev mailing list