Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 3 participants
- 144615 messages
Re: [Pharo-dev] Layout for placing widgets
by Stephane Ducasse
My main concerns is that right now we have limited ressources to work
on this topics.
Stef
On Sun, Oct 29, 2017 at 5:14 PM, Ben Coman <btc(a)openinworld.com> wrote:
>
>
> On Sun, Oct 29, 2017 at 8:28 PM, Thierry Goubier <thierry.goubier(a)gmail.com>
> wrote:
>>
>> Hi Hernan,
>>
>> It's difficult to do an evaluation for the underlying solver, because the
>> paper doesn't evaluate that aspect.
>
>
> The solver seems the least interesting part of ALM. There two orthogonal
> concerns:
> * Generating the constraints - which is probably what distinguishes
> AutoLayout, ConstraintLayout, enaml and the key to usability
> * Solving the constraints - while doing it right is well known, doing it
> efficiently is the challenge which Cassowary has covered. But ideally the
> solver would be pluggable so performance could be improved later
> substituting an FFI or GPU implemented solver. Also, if it is feasible to
> include a solver in the main Pharo distribution, it would be great if that
> could be re-used at the business application level.
>
> So the interesting aspect of ALM seems to be:
> * A new algorithm that automatically generates the constraints necessary to
> keep a layout non-overlapping.
> * Many other layout managers rely on a hierarchy of nested layouts to define
> more complex layouts. Within nested layouts, widgets typically cannot be
> aligned across different levels of the hierarchy
> * ALM constraints are specified as horizontal and vertical tabstops, which
> are virtual lines that form a grid to which all the elements of the GUI are
> aligned.
>
> This last point of virtual guidelines echos some ideas that reoccur for me
> from time to time - something similar to how professional designer software
> like Adobe Illustrator operate with virtual guidelines - though they use
> manual placement rather than dynamic constraint based placement.
>
> There is also the Auckland Layout Editor that might provide a good template
> to copy. We've been missing a GUI editor for layouts.
>
> cheers -ben
>
>>
>>
>> Le 29/10/2017 à 13:11, Hernán Morales Durand a écrit :
>>>
>>> IMO the right move is to take advantage of this technique/library in
>>> Smalltalk :
>>>
>>> "The Auckland Layout Model (ALM) is a novel technique for specifying
>>> 2D layout as it is used for arranging the controls in a GUI. The model
>>> allows the specification of constraints based on linear algebra, and
>>> an optimal layout is calculated using linear programming. Linear
>>> equalities and inequalities can be specified on horizontal and
>>> vertical tabstops, which are virtual lines that form a grid to which
>>> all the elements of the GUI are aligned. The described technique
>>> supports the dynamic adaptation of a layout to changes in the
>>> environment, e.g. window size, and offers more flexibility than other
>>> layout managers. "
>>>
>>> http://aucklandlayout.sourceforge.net/
>>>
>>> Contains various models of layouts:
>>>
>>> Border Layout
>>> Box Layout (BGroupLayout)
>>>
>>> Horizontal Layout
>>> Vertical Layout
>>>
>>> Gridbag Layout
>>> Flow Layout
>>> Constraint-Based Layout (BALMLayout)
>>>
>>> The paper:
>>> https://www.cs.auckland.ac.nz/~lutteroth/publications/ZeidlerEtAl2013-Auckl…
>>>
>>> The video: https://www.youtube.com/watch?v=NPPz1OJwICA
>>>
>>> The website:
>>> https://www.haiku-os.org/blog/czeidler/2012-09-03_ale_auckland_layout_editor
>>>
>>>
>>> Cheers,
>>>
>>> Hernán
>>>
>>>
>>>
>>> 2017-10-27 14:13 GMT-03:00 Stephane Ducasse <stepharo.self(a)gmail.com>:
>>>>
>>>> Hi
>>>>
>>>> I was wondering if there is a layout that we can use to propose
>>>> alternate placing layout
>>>> for widgets in spec?
>>>>
>>>> Like
>>>>
>>>> attached to the left 10pixels rubber band box or fixed size box
>>>> 10pixels attached to the right.
>>>>
>>>>
>>>> Stef
>>>>
>>>
>>>
>>
>>
>
Oct. 29, 2017
Re: [Pharo-dev] Layout for placing widgets
by Ben Coman
On Sun, Oct 29, 2017 at 8:28 PM, Thierry Goubier <thierry.goubier(a)gmail.com>
wrote:
> Hi Hernan,
>
> It's difficult to do an evaluation for the underlying solver, because the
> paper doesn't evaluate that aspect.
>
The solver seems the least interesting part of ALM. There two orthogonal
concerns:
* Generating the constraints - which is probably what distinguishes
AutoLayout, ConstraintLayout, enaml and the key to usability
* Solving the constraints - while doing it right is well known, doing it
efficiently is the challenge which Cassowary has covered. But ideally the
solver would be pluggable so performance could be improved
later substituting an FFI or GPU implemented solver. Also, if it is
feasible to include a solver in the main Pharo distribution, it would be
great if that could be re-used at the business application level.
So the interesting aspect of ALM seems to be:
* A new algorithm that automatically generates the constraints necessary to
keep a layout non-overlapping.
* Many other layout managers rely on a hierarchy of nested layouts to
define more complex layouts. Within nested layouts, widgets typically
cannot be aligned across different levels of the hierarchy
* ALM constraints are specified as horizontal and vertical tabstops, which
are virtual lines that form a grid to which all the elements of the GUI are
aligned.
This last point of virtual guidelines echos some ideas that reoccur for me
from time to time - something similar to how professional designer software
like Adobe Illustrator operate with virtual guidelines - though they use
manual placement rather than dynamic constraint based placement.
There is also the Auckland Layout Editor that might provide a good template
to copy. We've been missing a GUI editor for layouts.
cheers -ben
>
> Le 29/10/2017 à 13:11, Hernán Morales Durand a écrit :
>
>> IMO the right move is to take advantage of this technique/library in
>> Smalltalk :
>>
>> "The Auckland Layout Model (ALM) is a novel technique for specifying
>> 2D layout as it is used for arranging the controls in a GUI. The model
>> allows the specification of constraints based on linear algebra, and
>> an optimal layout is calculated using linear programming. Linear
>> equalities and inequalities can be specified on horizontal and
>> vertical tabstops, which are virtual lines that form a grid to which
>> all the elements of the GUI are aligned. The described technique
>> supports the dynamic adaptation of a layout to changes in the
>> environment, e.g. window size, and offers more flexibility than other
>> layout managers. "
>>
>> http://aucklandlayout.sourceforge.net/
>>
>> Contains various models of layouts:
>>
>> Border Layout
>> Box Layout (BGroupLayout)
>>
>> Horizontal Layout
>> Vertical Layout
>>
>> Gridbag Layout
>> Flow Layout
>> Constraint-Based Layout (BALMLayout)
>>
>> The paper: https://www.cs.auckland.ac.nz/~lutteroth/publications/Zeidle
>> rEtAl2013-AucklandLayoutEditor.pdf
>>
>> The video: https://www.youtube.com/watch?v=NPPz1OJwICA
>>
>> The website: https://www.haiku-os.org/blog/czeidler/2012-09-03_ale_auckla
>> nd_layout_editor
>>
>>
>> Cheers,
>>
>> Hernán
>>
>>
>>
>> 2017-10-27 14:13 GMT-03:00 Stephane Ducasse <stepharo.self(a)gmail.com>:
>>
>>> Hi
>>>
>>> I was wondering if there is a layout that we can use to propose
>>> alternate placing layout
>>> for widgets in spec?
>>>
>>> Like
>>>
>>> attached to the left 10pixels rubber band box or fixed size box
>>> 10pixels attached to the right.
>>>
>>>
>>> Stef
>>>
>>>
>>
>>
>
>
Oct. 29, 2017
Re: [Pharo-dev] Layout for placing widgets
by Todd Blanchard
+1
Sent from the road
> On Oct 29, 2017, at 03:58, stephan <stephan(a)stack.nl> wrote:
>
> Just applying and adapting Thierry's code should provide us what we need
Oct. 29, 2017
Re: [Pharo-dev] Layout for placing widgets
by Thierry Goubier
Hi Hernan,
It's difficult to do an evaluation for the underlying solver, because
the paper doesn't evaluate that aspect.
From a small sentence, they seem to be using the same algorithm than a
1997 A. Borning work (quadratic optimization) (i.e. the one used by
Cassowary).
Regards,
Thierry
Le 29/10/2017 à 13:11, Hernán Morales Durand a écrit :
> IMO the right move is to take advantage of this technique/library in Smalltalk :
>
> "The Auckland Layout Model (ALM) is a novel technique for specifying
> 2D layout as it is used for arranging the controls in a GUI. The model
> allows the specification of constraints based on linear algebra, and
> an optimal layout is calculated using linear programming. Linear
> equalities and inequalities can be specified on horizontal and
> vertical tabstops, which are virtual lines that form a grid to which
> all the elements of the GUI are aligned. The described technique
> supports the dynamic adaptation of a layout to changes in the
> environment, e.g. window size, and offers more flexibility than other
> layout managers. "
>
> http://aucklandlayout.sourceforge.net/
>
> Contains various models of layouts:
>
> Border Layout
> Box Layout (BGroupLayout)
>
> Horizontal Layout
> Vertical Layout
>
> Gridbag Layout
> Flow Layout
> Constraint-Based Layout (BALMLayout)
>
> The paper: https://www.cs.auckland.ac.nz/~lutteroth/publications/ZeidlerEtAl2013-Auckl…
>
> The video: https://www.youtube.com/watch?v=NPPz1OJwICA
>
> The website: https://www.haiku-os.org/blog/czeidler/2012-09-03_ale_auckland_layout_editor
>
>
> Cheers,
>
> Hernán
>
>
>
> 2017-10-27 14:13 GMT-03:00 Stephane Ducasse <stepharo.self(a)gmail.com>:
>> Hi
>>
>> I was wondering if there is a layout that we can use to propose
>> alternate placing layout
>> for widgets in spec?
>>
>> Like
>>
>> attached to the left 10pixels rubber band box or fixed size box
>> 10pixels attached to the right.
>>
>>
>> Stef
>>
>
>
Oct. 29, 2017
Re: [Pharo-dev] Layout for placing widgets
by Hernán Morales Durand
IMO the right move is to take advantage of this technique/library in Smalltalk :
"The Auckland Layout Model (ALM) is a novel technique for specifying
2D layout as it is used for arranging the controls in a GUI. The model
allows the specification of constraints based on linear algebra, and
an optimal layout is calculated using linear programming. Linear
equalities and inequalities can be specified on horizontal and
vertical tabstops, which are virtual lines that form a grid to which
all the elements of the GUI are aligned. The described technique
supports the dynamic adaptation of a layout to changes in the
environment, e.g. window size, and offers more flexibility than other
layout managers. "
http://aucklandlayout.sourceforge.net/
Contains various models of layouts:
Border Layout
Box Layout (BGroupLayout)
Horizontal Layout
Vertical Layout
Gridbag Layout
Flow Layout
Constraint-Based Layout (BALMLayout)
The paper: https://www.cs.auckland.ac.nz/~lutteroth/publications/ZeidlerEtAl2013-Auckl…
The video: https://www.youtube.com/watch?v=NPPz1OJwICA
The website: https://www.haiku-os.org/blog/czeidler/2012-09-03_ale_auckland_layout_editor
Cheers,
Hernán
2017-10-27 14:13 GMT-03:00 Stephane Ducasse <stepharo.self(a)gmail.com>:
> Hi
>
> I was wondering if there is a layout that we can use to propose
> alternate placing layout
> for widgets in spec?
>
> Like
>
> attached to the left 10pixels rubber band box or fixed size box
> 10pixels attached to the right.
>
>
> Stef
>
Oct. 29, 2017
Re: [Pharo-dev] Layout for placing widgets
by stephan
On 28-10-17 23:20, Thierry Goubier wrote:
> Hi Pavel,
>
> Le 28/10/2017 à 22:29, Pavel Krivanek a écrit :
>> Hi Thierry,
>>
>> your repository mentions the MIT license but the original license of
>> the Cassowary package was LGPL. Is is a different code?
>
> I ported the original, public domain smalltalk implementation of Cassowary.
I also looked at the morphic port on squeaksource which is just a very
thin layer of using the public domain code on top of morphic. The author
of that was open to have his work relicensed (Apache style, but I never
followed up on that)
https://github.com/pharo-graphics/Bloc/issues/25
Just applying and adapting Thierry's code should provide us what we need
Stephan
Oct. 29, 2017
Re: [Pharo-dev] [ANNOUNCE] ParrotTalk release/design change considerations
by henry
Yes well it is an extension to what you found as I combined with eventual references such that it computes in a single thread.
- HH
On Sat, Oct 28, 2017 at 23:59, Ben Coman <[btc(a)openinworld.com]("mailto:btc@openinworld.com")> wrote:
> On Thu, Oct 26, 2017 at 12:00 AM, henry <[henry(a)callistohouse.club]("mailto:henry@callistohouse.club")> wrote:
>
>> I disabled vatId authorization in version 3, located in SessionOperations>> processIWant | SessionOperations>>processIAm: .
>>
>> I was asked to disseminate my news to Pharo Users, hello there. I was asked to describe ParrotTalk well, provide use cases and adopters of its use. Alright, I will give an attempt.
>>
>> ParrotTalk is an encrypted connection framework. Currently allowing anonymous 2048-bit key negotiation to establish user-provided encryption cipher and user-provided encoding and decoding, both through a provided SessionAgentMap to a starting SessionAgent server. Please look in the test case ThunkHelloWorldTest for building these maps and running a connection iwth data passing after encryption is established. There is a 4-way negotiation, from ProtocolOffered/Accepted to Go/GoToo. In using RSA 2048 signature validation and DH 2048 primes to establish the key used within the selected Cipher. The Cipher and Encoder are selected by name through the negotiation protocol. Currently three Ciphers are selectable, AESede, DESede, and DES. There are two encoders tested, asn1der, and Bytes. This protocol is described here, in this document.
>>
>> [https://github.com/ZiroZimbarra/callistohouse/blob/master/docs/ParrotTalkFr…"https://github.com/ZiroZimbarra/callistohouse/blob/master/docs/ParrotTalkFr…")
>>
>> For as to use cases, this encrypted connection has no third party, man-in-the-middle situation by not using Certificates. As such, this is a tight implementation of NSA-proof encryption without explicit authorization beyond knowledge of a host:port. The use cases involve any communication desired to be encrypted with such high encryption. The support will last my lifetime, so we have a settled solution, here in the third version, provided here. It requires version 111 of Cryptography, as a prerequisite. Both run on Squeak and Pharo.
>>
>> [http://www.squeaksource.com/Cryptography/Cryptography-zzz.111.mcz]("http://www.squeaksource.com/Cryptography/Cryptography-zzz.111.mcz")
>> [http://www.squeaksource.com/Cryptography/ParrotTalk-HenryHouse.3.mcz]("http://www.squeaksource.com/Cryptography/ParrotTalk-HenryHouse.3.mcz")
>>
>> The current use is with my hubbub system, a promise-based distributed object implementation. I am working to bring ParrotTalk to Java and allow hubbub to operate interdependently between Squeak, Pharo, Java and any other languages which can support ParrotTalk and STON. My latest efforts with hubbub are to bring STON as the Layer 6 encoding. Hubbub depends on eLinda.
>
> Took me a while to track down what eLinda was. I presume its an implementation of Linda "a model of coordination and communication among several parallel processes operating upon objects stored in and retrieved from shared, virtual, associative memory"
> [https://en.wikipedia.org/wiki/Linda_(coordination_language)]("https://en.wikipedia.org/wiki/Linda_(coordination_language)")
> [http://www.cs.yale.edu/publications/techreports/tr984.pdf]("http://www.cs.yale.edu/publications/techreports/tr984.pdf")
>
> cheers -ben
Oct. 29, 2017
Re: [Pharo-dev] [ANNOUNCE] ParrotTalk release/design change considerations
by Ben Coman
On Thu, Oct 26, 2017 at 12:00 AM, henry <henry(a)callistohouse.club> wrote:
> I disabled vatId authorization in version 3, located in SessionOperations>>processIWant
> | SessionOperations>>processIAm:.
>
> I was asked to disseminate my news to Pharo Users, hello there. I was
> asked to describe ParrotTalk well, provide use cases and adopters of its
> use. Alright, I will give an attempt.
>
> ParrotTalk is an encrypted connection framework. Currently allowing
> anonymous 2048-bit key negotiation to establish user-provided encryption
> cipher and user-provided encoding and decoding, both through a provided
> SessionAgentMap to a starting SessionAgent server. Please look in the test
> case ThunkHelloWorldTest for building these maps and running a connection
> iwth data passing after encryption is established. There is a 4-way
> negotiation, from ProtocolOffered/Accepted to Go/GoToo. In using RSA 2048
> signature validation and DH 2048 primes to establish the key used within
> the selected Cipher. The Cipher and Encoder are selected by name through
> the negotiation protocol. Currently three Ciphers are selectable, AESede,
> DESede, and DES. There are two encoders tested, asn1der, and Bytes. This
> protocol is described here, in this document.
>
> https://github.com/ZiroZimbarra/callistohouse/blob/master/docs/
> ParrotTalkFrameDesign-3.5.pdf
>
> For as to use cases, this encrypted connection has no third party,
> man-in-the-middle situation by not using Certificates. As such, this is a
> tight implementation of NSA-proof encryption without explicit authorization
> beyond knowledge of a host:port. The use cases involve any communication
> desired to be encrypted with such high encryption. The support will last my
> lifetime, so we have a settled solution, here in the third version,
> provided here. It requires version 111 of Cryptography, as a prerequisite.
> Both run on Squeak and Pharo.
>
> http://www.squeaksource.com/Cryptography/Cryptography-zzz.111.mcz
> http://www.squeaksource.com/Cryptography/ParrotTalk-HenryHouse.3.mcz
>
> The current use is with my hubbub system, a promise-based distributed
> object implementation. I am working to bring ParrotTalk to Java and allow
> hubbub to operate interdependently between Squeak, Pharo, Java and any
> other languages which can support ParrotTalk and STON. My latest efforts
> with hubbub are to bring STON as the Layer 6 encoding. Hubbub depends on
> eLinda.
>
Took me a while to track down what eLinda was. I presume its an
implementation of Linda "a model of coordination and communication among
several parallel processes operating upon objects stored in and retrieved
from shared, virtual, associative memory"
https://en.wikipedia.org/wiki/Linda_(coordination_language)
http://www.cs.yale.edu/publications/techreports/tr984.pdf
cheers -ben
Oct. 29, 2017
Re: [Pharo-dev] Layout for placing widgets
by Thierry Goubier
Hi Pavel,
Le 28/10/2017 à 22:29, Pavel Krivanek a écrit :
> Hi Thierry,
>
> your repository mentions the MIT license but the original license of the
> Cassowary package was LGPL. Is is a different code?
I ported the original, public domain smalltalk implementation of Cassowary.
Regards,
Thierry
> Cheers,
> -- Pavel
>
> 2017-10-28 21:43 GMT+02:00 Thierry Goubier <thierry.goubier(a)gmail.com
> <mailto:thierry.goubier@gmail.com>>:
>
> Le 28/10/2017 à 16:26, Stephane Ducasse a écrit :
>
> I was reading ...
> I will see if I can load cassowary in Pharo.
>
>
> https://github.com/ThierryGoubier/Cassowary
> <https://github.com/ThierryGoubier/Cassowary>
>
> Done two years ago.
>
> Thierry
>
>
>
> On Sat, Oct 28, 2017 at 4:21 PM, Stephane Ducasse
> <stepharo.self(a)gmail.com <mailto:stepharo.self@gmail.com>> wrote:
>
> Ok then may be we should give a try to use. Tx for the links.
>
> Stef
>
> On Sat, Oct 28, 2017 at 4:18 PM, Ben Coman
> <btc(a)openinworld.com <mailto:btc@openinworld.com>> wrote:
>
> 2017-10-27 19:13 GMT+02:00 Stephane Ducasse
> <stepharo.self(a)gmail.com
> <mailto:stepharo.self@gmail.com>>:
>
>
> I was wondering if there is a layout that we can
> use to propose
> alternate placing layout for widgets in spec?
>
> Like...
> attached to the left 10pixels rubber band box
> or fixed size box
> 10pixels attached to the right.
>
>
>
> On Oct 27, 2017, at 12:59 PM, Pavel Krivanek
> <pavel.krivanek(a)gmail.com
> <mailto:pavel.krivanek@gmail.com>>
> wrote:
>
> Maybe we should check cassowary
>
> https://croisant.net/blog/2016-02-24-ui-layout-constraints-part-1/#ui-const…
> <https://croisant.net/blog/2016-02-24-ui-layout-constraints-part-1/#ui-const…>
>
>
>
> On Sat, Oct 28, 2017 at 4:48 PM, Stephane Ducasse
> <stepharo.self(a)gmail.com <mailto:stepharo.self@gmail.com>>
> wrote:
>
>
> Pavel I do not think that cassowary is good for us.
>
>
>
> Do you mean Cassowary in particular, or constraint based
> UI in general?
>
> My naive first impression is, if Cassowary is good
> enough for Apple...
> https://news.ycombinator.com/item?id=9846992
> <https://news.ycombinator.com/item?id=9846992>
> https://www.quora.com/Should-I-use-Auto-Layout
> <https://www.quora.com/Should-I-use-Auto-Layout>
>
> and Google (search here for "solver")...
> https://academy.realm.io/posts/cool-constraintlayout-droidcon-boston-2017/
> <https://academy.realm.io/posts/cool-constraintlayout-droidcon-boston-2017/>
>
> such that "in 2016, both iOS and Android have
> first-party layout systems
> based on Cassowary."
> https://www.bignerdranch.com/blog/constraintlayout-vs-auto-layout-how-do-th…
> <https://www.bignerdranch.com/blog/constraintlayout-vs-auto-layout-how-do-th…>
>
> then it seems worth some analysis, and discussion of
> better alternatives.
>
>
> Coincidentally, I see a Smalltalk implementation is
> available...
> http://www.squeaksource.com/Cassowary.html
> <http://www.squeaksource.com/Cassowary.html>
> https://constraints.cs.washington.edu/solvers/cassowary-tochi.pdf
> <https://constraints.cs.washington.edu/solvers/cassowary-tochi.pdf>
>
>
> For balance, some points against AutoLayout, but some
> alternatives also seem
> to use Cassowary solver...
> https://www.reddit.com/r/iOSProgramming/comments/4t6kd5/why_i_dont_use_auto…
> <https://www.reddit.com/r/iOSProgramming/comments/4t6kd5/why_i_dont_use_auto…>
> https://www.bignerdranch.com/blog/constraintlayout-vs-auto-layout-how-do-th…
> <https://www.bignerdranch.com/blog/constraintlayout-vs-auto-layout-how-do-th…>
> https://makeapppie.com/2015/10/28/why-stack-views-are-your-best-friend-if-y…
> <https://makeapppie.com/2015/10/28/why-stack-views-are-your-best-friend-if-y…>
> https://cocoacasts.com/working-with-stack-views/
> <https://cocoacasts.com/working-with-stack-views/>
>
>
> cheers -ben
>
>
>
>
>
Oct. 28, 2017
Re: [Pharo-dev] , for vector creation
by Nicolas Cellier
Just a few notes:
1) 4 , 2 , 3 , 5 looks too much like Shlemiel the painter, ok for short
vector input, but not even for printing (think re-interpreting)
2) 1 x + 2 y + 3 z might look nice. Exactly like 1+2i (Complex) or
1+2i+3j+4k (Quaternion)
But for the sake of efficiency, I had to introduce (1 i: 2) otherwise
interpretng a complex matrix was too much expensive (compared to Matlab)
3) as Doru said, there are many possible conflicts for Number>>, I'm pretty
sure that Jun was using it too
for this reason I removed it from Smallapack
2017-10-27 19:12 GMT+02:00 Stephane Ducasse <stepharo.self(a)gmail.com>:
> Ok good to know.
>
> On Fri, Oct 27, 2017 at 8:39 AM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
> > Indeed, we have BlInsets that are used for either padding or margin.
> >
> > Doru
> >
> >> On Oct 26, 2017, at 11:43 PM, Stephane Ducasse <stepharo.self(a)gmail.com>
> wrote:
> >>
> >> Doru
> >>
> >> I was thinking that you would also have BlMargin because Margin is a
> >> nice concept.
> >> When I introduced it with Igor it simplified a lot of code in expand,
> >> shrink and other operations.
> >>
> >> Stef
> >>
> >> On Thu, Oct 26, 2017 at 11:39 AM, Tudor Girba <tudor(a)tudorgirba.com>
> wrote:
> >>> Hi,
> >>>
> >>> To make the conversation more interesting, in Bloc we also have
> BlPoint with subclasses for 2D, 3D and 4D. The reason for this is that we
> model explicitly the intention of usage even if they share the instance
> variable names. We did not use Point because we needed 3D and 4D as well
> and Point has too many meanings that are conflated into one.
> >>>
> >>> This pattern was used everywhere we could. For example, we have
> BlBounds instead of Rectangle (actually, this is also because of
> performance reasons of working directly with 4 numbers rather than 2
> points).
> >>>
> >>> Of course, these come with an apparent extra maintenance cost. So, if
> we see a possibility of unifying we should definitely take it, and this is
> where external reviewers can help to point out possibilities. We should
> just not unify just for the sake of it.
> >>>
> >>> Cheers,
> >>> Doru
> >>>
> >>>> On Oct 26, 2017, at 10:57 AM, Tudor Girba <tudor(a)tudorgirba.com>
> wrote:
> >>>>
> >>>> Hi,
> >>>>
> >>>>> On Oct 26, 2017, at 10:36 AM, Denis Kudriashov <dionisiydk(a)gmail.com>
> wrote:
> >>>>>
> >>>>> 2017-10-26 10:20 GMT+02:00 Tudor Girba <tudor(a)tudorgirba.com>:
> >>>>> Hi,
> >>>>>> On Oct 26, 2017, at 10:10 AM, Denis Kudriashov <
> dionisiydk(a)gmail.com> wrote:
> >>>>>>
> >>>>>> Another question.
> >>>>>>
> >>>>>> Will not these vectors deprecate Point in future ? Imaging that we
> will completely move to Bloc.
> >>>>>
> >>>>> No. Point is a perfectly reasonable data structure to describe a
> position. A Vector is something else and has other contracts. The
> coincidence is that they share the same variables, but they have different
> API. For example, a vector has #length. A point does not.
> >>>>>
> >>>>> Now Point implements most vector operations. The #length is defined
> as radius by #r message. I imaging that with new vector you will
> reimplement many of Point methods. Also I doubt that Point plays any role
> in system which is different than math vector.
> >>>>
> >>>> I think that over time we have accumulated all sorts of other usages
> for Point. For example, Rectangle uses origin and corner as a position not
> as vectors.
> >>>>
> >>>> Doru
> >>>>
> >>>>>
> >>>>>> And what about Rectangle? (Bloc implements own BlRectangle).
> >>>>>
> >>>>> These two do not have the same semantics. BlRectangle is a
> BlGeometry and is used for defining a path within an element. BlRectangle
> is polymorphic with other paths such as BlEllipse or BlPolygon. Rectangle
> is a generic data structure that can be used for other purposes.
> >>>>>
> >>>>> We should definitely try to find commonalities and opportunities for
> unification. However, we should not confuse state with types which are
> defined by the purpose they are used for (and associated behavior).
> >>>>>
> >>>>> Doru
> >>>>>
> >>>>>
> >>>>>
> >>>>>> 2017-10-26 9:26 GMT+02:00 phil(a)highoctane.be <phil(a)highoctane.be>:
> >>>>>> #(1 3 4 5 7 -2) asVector
> >>>>>>
> >>>>>> Meh.
> >>>>>> Ugly.
> >>>>>>
> >>>>>> { 1. 3. 4. a. b } asVector
> >>>>>>
> >>>>>> is the natural consequence.
> >>>>>>
> >>>>>> v := (1,3,4,5,7,-2) asVector
> >>>>>>
> >>>>>> keeps the parens. But why do I need to do that?
> >>>>>>
> >>>>>> Autoformatting messing with my parentheses is just a mistake.
> >>>>>> I put them in, leave them where they are, 'kay? I do not need an
> editor that rewrites what I tell it. AST power or not.
> >>>>>>
> >>>>>> And frankly, I like the "Feenk way of doing things" most of the
> time, so I am willing to go that route.
> >>>>>>
> >>>>>> Phil
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Thu, Oct 26, 2017 at 8:52 AM, Peter Uhnák <i.uhnak(a)gmail.com>
> wrote:
> >>>>>>>
> >>>>>>> Automatic formatting will turn it into
> >>>>>>>
> >>>>>>> vector := 1,3,4,5,7,-2.
> >>>>>>>
> >>>>>>> Which is not as nice.
> >>>>>>>
> >>>>>>> And even though it looks ok for literal numbers (#(1 3 4 5 7 -2)
> asVector would work too), this starts to look quite generic:
> >>>>>>>
> >>>>>>> vector := width, height, depth.
> >>>>>>>
> >>>>>>>
> >>>>>>> Question: why not extend @ notation?
> >>>>>>>
> >>>>>>> x @ y @ z?
> >>>>>>>
> >>>>>>> Peter
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On Thu, Oct 26, 2017 at 8:22 AM, phil(a)highoctane.be <
> phil(a)highoctane.be> wrote:
> >>>>>>>>
> >>>>>>>> I also like the , message for those vectors and the concatenation
> of dimensions makes sense.
> >>>>>>>>
> >>>>>>>> vector := (1,3,4,5,7,-2).
> >>>>>>>>
> >>>>>>>> looks how it should be.
> >>>>>>>>
> >>>>>>>> Readable, easy to translate vector stuff from reference text.
> >>>>>>>>
> >>>>>>>> Phil
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On Thu, Oct 26, 2017 at 7:00 AM, Nicolai Hess <
> nicolaihess(a)gmail.com> wrote:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Am 25.10.2017 10:50 PM schrieb "Torsten Bergmann" <
> astares(a)gmx.de>:
> >>>>>>>>>
> >>>>>>>>> Hi,
> >>>>>>>>>
> >>>>>>>>> there might be reasons for an own 2D vector class (instead of
> using Point).
> >>>>>>>>> But still I dislike the reimplementation of "," because for me
> so far it
> >>>>>>>>> has the meaning of "concatenating things".
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Like concatenating coordinates :-)
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Here you redefine it to create vector instances and it works
> only up to three
> >>>>>>>>> so far. Right?
> >>>>>>>>>
> >>>>>>>>> I understand that this gives some similarities with the math
> notation (1,2)
> >>>>>>>>> but I personally would prefer to use:
> >>>>>>>>>
> >>>>>>>>> 1@2 asVector
> >>>>>>>>>
> >>>>>>>>> or Vector2D x: 1 y: 2
> >>>>>>>>>
> >>>>>>>>> Thx
> >>>>>>>>> T.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>> Gesendet: Mittwoch, 25. Oktober 2017 um 20:06 Uhr
> >>>>>>>>>> Von: "Tudor Girba" <tudor(a)tudorgirba.com>
> >>>>>>>>>> An: "Pharo Development List" <pharo-dev(a)lists.pharo.org>
> >>>>>>>>>> Betreff: [Pharo-dev] , for vector creation
> >>>>>>>>>>
> >>>>>>>>>> Hi,
> >>>>>>>>>>
> >>>>>>>>>> As mentioned in the separate thread, we played with introducing
> the extension:
> >>>>>>>>>>
> >>>>>>>>>> , aNumber
> >>>>>>>>>> ^ BlVector2D x: self y: aNumber
> >>>>>>>>>>
> >>>>>>>>>> This means that (10,20) will return a 2D vector.
> >>>>>>>>>>
> >>>>>>>>>> We also have (10,20,30) which returns a 3D vector.
> >>>>>>>>>>
> >>>>>>>>>> , is used for different meanings already in the image beside
> the collection concatenation. For example, in FileReference is adds a file
> extension. And Exceptions create a collection. In other packages,
> PetitParser uses it as a sequence operator.
> >>>>>>>>>>
> >>>>>>>>>> Please voice your concerns.
> >>>>>>>>>>
> >>>>>>>>>> Cheers,
> >>>>>>>>>> Doru
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> www.tudorgirba.com
> >>>>>>>>>> www.feenk.com
> >>>>>>>>>>
> >>>>>>>>>> "Every thing should have the right to be different."
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>> --
> >>>>> www.tudorgirba.com
> >>>>> www.feenk.com
> >>>>>
> >>>>> "When people care, great things can happen."
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>> --
> >>>> www.tudorgirba.com
> >>>> www.feenk.com
> >>>>
> >>>> "If you interrupt the barber while he is cutting your hair,
> >>>> you will end up with a messy haircut."
> >>>
> >>> --
> >>> www.tudorgirba.com
> >>> www.feenk.com
> >>>
> >>> "We are all great at making mistakes."
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >
> > --
> > www.tudorgirba.com
> > www.feenk.com
> >
> > "If you can't say why something is relevant,
> > it probably isn't."
> >
> >
>
>
Oct. 28, 2017