bloc status update: june 2016

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: bloc status update: june 2016

EstebanLM
yes, and I always said this is plain bad. 
how it is now it is not a contextual menu, is NextStep style and is the correct behaviour (after we can discuss if we want to keep a menu as it is now or not, but that’s another discussion) :)

Esteban

On 21 Jun 2016, at 15:54, Aliaksei Syrel <[hidden email]> wrote:

 In Pharo the World menu is accessed through left-click and right-click provides the world contents. In Bloc, right-click displays the world menu and left-click does nothing. Is it expected / some design choice or just convenience for debugging ? At first glance I thought Bloc didn't work because I was left-clicking like in Pharo.

It was like that from the very begging of Bloc development. Main developers of Bloc prefer right click to open menu (like almost everywhere except Pharo).

Cheers,
Alex

On Tue, Jun 21, 2016 at 3:52 PM, Aliaksei Syrel <[hidden email]> wrote:
What is Cairo-Sparta ? What is the difference with Athens ?
Sparta-Canvas is just an implementation of Athens API that uses Cairo as backend. It is the same as Athens-Cairo, with a few small differences.

 - Sparta has different meaning of clipBy: during: In Athens clipBy: only accepts a Rectangle, in Sparta it is an arbitrary Path.
 - Sparta has some experimental api just for fun and to find out if there is a way to render faster.

Since Athens is used in (many?) external packages it is not possible to redefine clipBy: . Also having a separate implementation of Athens API (Sparta-Cairo) allows developers of Bloc to iterate faster and save time on integration process.

Cheers,
Alex

On Tue, Jun 21, 2016 at 3:46 PM, Aliaksei Syrel <[hidden email]> wrote:
Can we change the fonts in Bloc ? 

Bloc is not new Pharo :) It is also not Morphic. Bloc is very low level engine that does not have theme and widgets.
Morphic apps (like Nautilus) are just running in compatibility mode and are rendered on Athens canvas. Existing Pharo applications use fonts provided by StandardFonts that can be changed from Menu > Settings.

Cheers,
Alex

On Tue, Jun 21, 2016 at 3:42 PM, Aliaksei Syrel <[hidden email]> wrote:
When (in Bloc) I go to World menu>>help>>Help browser>>Bloc>>Grid Layout, I find the following license: 

It is important to mention that Grid is more general than Table layout. It allows developers to create complex UI with less nested elements compared to the case when Table layout would be used instead. Reducing amount of nested/composed elements leads to performance boost (we have less elements in the tree) and reduces overall complexity - no need to use "hack" elements that have no intent and not part of real UI.

Since Grid requires more complex (compared to table) computations we should take care about performance. General complexity of algorithm to compute distribution of cell sizes is O(n^2) - too much. Google already invested time (money) in this problem and developed a special case algorithm with linear complexity. It is used in Grid layout in bloc which means that we have a derivative work and need to ship original licence.

Here is google's documentation:
 
Bellman-Ford variant - modified to reduce typical running time from O(N^2) to O(N)
GridLayout converts its requirements into a system of linear constraints of the
form:
x[i] - x[j] < a[k]
 
Where the x[i] are variables and the a[k] are constants.
For example, if the variables were instead labeled x, y, z we might have:
x - y < 17
y - z < 23
z - x < 42
 
This is a special case of the Linear Programming problem that is, in turn,
equivalent to the single-source shortest paths problem on a digraph, for
which the O(n^2) Bellman-Ford algorithm the most commonly used general solution.

Apache 2.0 is compatible/can be used with MIT - as far as I can tell according to answers on Internet. Maybe a layer can answer more correctly.

Cheers,
Alex


On Tue, Jun 21, 2016 at 3:06 PM, Aliaksei Syrel <[hidden email]> wrote:

>
> Hello Clement
>
> restoreAfter: is not only for transformation. It also restores clipping - that is why we need restoreAfter. (uses push and pop state). Having that clipping region is an arbitrary path there is no way to avoid pop and push state - which costs a lot in Cairo. It is slow because Cairo and Athens are statefull - which is bad for rendering a composition of arbitrary elements.
>
> Right now there is a huge work going on new Sparta - it will be almost stateless and will support a wide variety of backends (Cairo, Skia, CoreGraphics and so on).
> Current Sparta-Cairo is an experiment which goal was to support clipping by arbitrary path. We learned that it is slow because of statefullness.
>
> In order to fill a square with color we have to perform the following ffi native calls:
> - set color
> - set shape
> - fill
>
> Even in the most simple case we need 3 calls. When it gets more complicated there are even more calls. Preparing drawing context with multiple calls to perform an operation is a consequence of statefullness.
>
> Modern browsers use stateless canvases to render content. Idea is simple: one call per drawing operation. Example above would look like:
> - fillPath(aPath, aPattern, drawOptions).
> That is it.
> Second benefit is that we don't need to care about shared state between drawing operations, no more push/pop state and as result huge performance boost.
>
> Cheers
> Alex
>
> On Jun 21, 2016 1:34 PM, "Clément Bera" <[hidden email]> wrote:
>>
>> Hi,
>>
>> Thanks Doru it now works for me ! Very exciting indeed.
>>
>> I have a few questions:
>>
>> 1. In Pharo the World menu is accessed through left-click and right-click provides the world contents. In Bloc, right-click displays the world menu and left-click does nothing. Is it expected / some design choice or just convenience for debugging ? At first glance I thought Bloc didn't work because I was left-clicking like in Pharo.
>>
>> 2. Can we change the fonts in Bloc ?
>>
>> 3. When (in Bloc) I go to World menu>>help>>Help browser>>Bloc>>Grid Layout, I find the following license:
>>
>> Copyright (C) 2011 The Android Open Source Project
>>
>> Licensed under the Apache License, Version 2.0 (the "License");
>> you may not use this file except in compliance with the License.
>> You may obtain a copy of the License at
>>
>>       http://www.apache.org/licenses/LICENSE-2.0
>>
>> Unless required by applicable law or agreed to in writing, software
>> distributed under the License is distributed on an "AS IS" BASIS,
>> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>> See the License for the specific language governing permissions and
>> limitations under the License.
>>
>> Does it mean Bloc is not under MIT ? Or is it completely unrelated ?
>>
>> 4. What is Cairo-Sparta ? What is the difference with Athens ?
>>
>> 5. It seems that the normal Pharo image in idle spends between 4 and 5% of execution time in the Morphic process, while in Bloc it seems that between 17 and 23% of execution time is in the main bloc loop (BlBoostedMainLoopManager). Isn't that a lot ?
>> - It's interesting to see that 28% of execution time spent in Bloc is in BlSpartaCanvas>>#restoreAfter:. In the 2D video games I wrote (both using Cairo and Javascript canvas) I avoided using #restoreAfter: and instead in method such as BlSpartaCanvas >>#transform:during: I used a reverse transformation to restore the state. I am wondering if that's possible in large graphic framework like Bloc, that would save a quarter of the time. Maybe it's possible only in simple 2D video games.
>> - Aside from restoreAfter, there is no obvious ways on how to save time...
>>
>> Well keep up the good work.
>>
>>
>>
>> On Tue, Jun 21, 2016 at 11:36 AM, Tudor Girba <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> Thanks for looking at it.
>>>
>>> You have to first switch to the Bloc space:
>>>
>>> World Menu / Bloc / Switch to Bloc
>>> (I think there is a problem right now with OS-Window)
>>>
>>> Then, from Nautilus, you can pick an example and Inspect Return-Values to get the object.
>>>
>>> Cheers,

>>> Doru
>>>
>>>
>>>
>>> On Jun 21, 2016, at 10:42 AM, Clément Bera <[hidden email]> wrote:
>>>
>>> Hi Doru,
>>>
>>> Ok I understand I have issues keeping comments updated in my projects too :-). Do your best.
>>>
>>> I tried to run the examples from Bloc-Core-Examples but they didn't work. I downloaded the latest Pharo-Spur32 VM from files.pharo.org and retried and it still didn't work.
>>>
>>> How can I have the examples running ?
>>>
>>> Here is the errors I have for the first two examples of BlExampleElementWithBorderAndFill.
>>>
>>> <Screen Shot 2016-06-21 at 10.40.39 AM.png>
>>>
>>> Here are the examples:
>>>
>>> <Screen Shot 2016-06-21 at 10.37.49 AM.png>
>>>
>>>
>>> Best,
>>>
>>> Clement
>>>
>>> On Tue, Jun 21, 2016 at 10:09 AM, Tudor Girba <[hidden email]> wrote:
>>> Hi Clement,
>>>
>>> Thanks for looking at it.
>>>
>>> Indeed, there aren’t many comments. A large part of the engine got rewritten twice over the last months, and many of the previous comments were no longer up to date.
>>>
>>> And no, the policy is not to not write comments :), but right now the priority is on building examples. which you will find in the Bloc-Core-Examples classes and their subclasses.
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>>
>>> > On Jun 21, 2016, at 9:39 AM, Clément Bera <[hidden email]> wrote:
>>> >
>>> > Hi Doru,
>>> >
>>> > I downloaded the image, opened Nautilus, clicked on the package named 'Bloc-Core' and all the classes I can see have no class comments (See screenshot below). Is there a 'No class comment' policy in Bloc ? Or maybe the top classes shown are just non representative of the class comments of the overall framework.
>>> >
>>> > <Screen Shot 2016-06-21 at 9.33.31 AM.png>
>>> >
>>> > On Tue, Jun 21, 2016 at 7:42 AM, Tudor Girba <[hidden email]> wrote:
>>> > Hi,
>>> >
>>> > Here is a brief update on the status of Bloc.
>>> >
>>> > Several of us came together to form a team and work to see Bloc in Pharo 6 at least as a preview. The team communication happens via Slack in a dedicated team, and the goal is to have regular progress/feedback communication on this mailing list.
>>> >
>>> > Just because we have a dedicated team does not mean that your feedback is important. In fact, over the last months, Bloc was redesigned again to include the feedback we got here. So, now we have:
>>> > - Element is responsible for drawing (no more shape)
>>> > - Interaction area and clipping area are now distinct
>>> >
>>> > You can find the current build on top of Pharo 6 here:
>>> > https://ci.inria.fr/moose/job/bloc/PHARO=alpha,VERSION=development,VM=vmLatest/
>>> >
>>> > The current team focus goes like this:
>>> > - Alain is looking at events,
>>> > - Glenn is playing with creating new elements in Bloc and refactoring the way we can manage ,
>>> > - Alex (Syrel) and Esteban are working on the backend to make rendering faster,
>>> > - Doru is pretending to do something useful.
>>> >
>>> > Cheers,
>>> > Doru
>>> >
>>> >
>>> > --
>>> > www.tudorgirba.com
>>> > www.feenk.com
>>> >
>>> > "What we can governs what we wish."
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>>
>>> --
>>> www.tudorgirba.com
>>> www.feenk.com
>>>
>>> "Presenting is storytelling."
>>>
>>>
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>> www.feenk.com
>>>
>>> "Problem solving should be focused on describing
>>> the problem in a way that makes the solution obvious."
>>>
>>>
>>>
>>>
>>>
>>




Reply | Threaded
Open this post in threaded view
|

Re: bloc status update: june 2016

Glenn Cavarlé
In reply to this post by Tudor Girba-2
Hi,
Please, pay attention that the design may/will change quickly.
As Doru said, it is the current status, not the final status and many changes may/will appear.
I say that because we are working on it (revisiting the core model), so it would be different.

Cheers,
Glenn.
Glenn Cavarlé
Reply | Threaded
Open this post in threaded view
|

Re: bloc status update: june 2016

Ben Coman
In reply to this post by EstebanLM
On Tue, Jun 21, 2016 at 10:07 PM, Esteban Lorenzano <[hidden email]> wrote:
> yes, and I always said this is plain bad.
> how it is now it is not a contextual menu,

I'm not clear how you mean this "how it is now", so I /think/ I'm
agreeing when I say the World Menu is a context menu - the menu in the
context of the World - which is why it should be on the
right-mouse-button - the same as all our other context menus and those
of the rest of the world.

> is NextStep style and is the
> correct behaviour (after we can discuss if we want to keep a menu as it is
> now or not, but that’s another discussion) :)
>
> Esteban
>
> On 21 Jun 2016, at 15:54, Aliaksei Syrel <[hidden email]> wrote:
>
>>  In Pharo the World menu is accessed through left-click and right-click
>> provides the world contents. In Bloc, right-click displays the world menu
>> and left-click does nothing. Is it expected / some design choice or just
>> convenience for debugging ? At first glance I thought Bloc didn't work
>> because I was left-clicking like in Pharo.
>
>
> It was like that from the very begging of Bloc development. Main developers
> of Bloc prefer right click to open menu (like almost everywhere except
> Pharo).
>
> Cheers,
> Alex



> On Tue, Jun 21, 2016 at 3:52 PM, Aliaksei Syrel <[hidden email]>
> wrote:

>>> On Tue, Jun 21, 2016 at 3:42 PM, Aliaksei Syrel <[hidden email]>
>>> wrote:
>>>>>
>>>>> When (in Bloc) I go to World menu>>help>>Help browser>>Bloc>>Grid
>>>>> Layout, I find the following license:
>>>>
>>>> >> Copyright (C) 2011 The Android Open Source Project
>>>> >>
>>>> >> Licensed under the Apache License, Version 2.0 (the "License");
>>>> >> you may not use this file except in compliance with the License.
>>>> >> You may obtain a copy of the License at
>>>> >>
>>>>
>>>> Apache 2.0 is compatible/can be used with MIT - as far as I can tell
>>>> according to answers on Internet. Maybe a lawyer can answer more correctly.
>>>>
>>>> Cheers,
>>>> Alex

These charts provide a nice overview...
[1] http://i.stack.imgur.com/CZIoa.png
[2] http://www.dwheeler.com/essays/floss-license-slide.html
[3] http://choosealicense.com/licenses/

Comparing MIT and Apache, the latter...
   * protects against patents
   * protects against trademark misuse
   * disclaims warranty and liability
   * requires changes to be clearly identified (in source)
   * default license assignment to contributions

I believe  [1] is in error tagging Apache as "any change must be
distributed in source form."  It is only IF you distribute in source
form that you need to retain all copyright, patent, trademark and
attribution notices.

cheers -ben


>>>> >>       http://www.apache.org/licenses/LICENSE-2.0
>>>> >>
>>>> >> Unless required by applicable law or agreed to in writing, software
>>>> >> distributed under the License is distributed on an "AS IS" BASIS,
>>>> >> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> >> implied.
>>>> >> See the License for the specific language governing permissions and
>>>> >> limitations under the License.
>>>> >>
>>>> >> Does it mean Bloc is not under MIT ? Or is it completely unrelated ?

Reply | Threaded
Open this post in threaded view
|

Re: bloc status update: june 2016

Sean P. DeNigris
Administrator
In reply to this post by Tudor Girba-2
Tudor Girba-2 wrote
Here is a brief update on the status of Bloc.
Thanks!

Tudor Girba-2 wrote
your feedback is important
As we've imagined and experimented with the UI of our future, I've felt very strongly that it's essential for the world to be built up from building blocks which make few assumptions other than their communication protocol and can be easily plugged in and out by a courageous user.

A test case for this, which opens up many exciting possibilities (imagine I want to control time in my space e.g. run a simulation at 10x speed...), would be to have a world within a world. I dabbled with this idea a bit in Morphic, but quickly became frustrated because Morphic makes too many assumptions e.g. relying on globals and hardcoded classes.

The last time I tried this in Bloc, the result of the discussion was that Alain said that this should be conceptually possible, but that I should be patient (http://forum.world.st/Bloc-Space-within-a-Space-td4877474.html). Are we any closer to this dream?
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: bloc status update: june 2016

Sean P. DeNigris
Administrator
Sean P. DeNigris wrote
A test case for this, which opens up many exciting possibilities (imagine I want to control time in my space e.g. run a simulation at 10x speed...), would be to have a world within a world. I dabbled with this idea a bit in Morphic, but quickly became frustrated because Morphic makes too many assumptions e.g. relying on globals and hardcoded classes.

The last time I tried this in Bloc, the result of the discussion was that Alain said that this should be conceptually possible, but that I should be patient (http://forum.world.st/Bloc-Space-within-a-Space-td4877474.html). Are we any closer to this dream?
Bump!!
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: bloc status update: june 2016

Tudor Girba-2
Hi,

That is one of the variables we have on the radar. Whether we can make it in the first iteration, remains to be seen.

Cheers,
Doru


> On Jul 12, 2016, at 4:57 PM, Sean P. DeNigris <[hidden email]> wrote:
>
> Sean P. DeNigris wrote
>> A test case for this, which opens up many exciting possibilities (imagine
>> I want to control time in my space e.g. run a simulation at 10x speed...),
>> would be to have a world within a world. I dabbled with this idea a bit in
>> Morphic, but quickly became frustrated because Morphic makes too many
>> assumptions e.g. relying on globals and hardcoded classes.
>>
>> The last time I tried this in Bloc, the result of the discussion was that
>> Alain said that this should be conceptually possible, but that I should be
>> patient (http://forum.world.st/Bloc-Space-within-a-Space-td4877474.html).
>> Are we any closer to this dream?
>
> Bump!!
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/bloc-status-update-june-2016-tp4901988p4906283.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>

--
www.tudorgirba.com
www.feenk.com

"Sometimes the best solution is not the best solution."


Reply | Threaded
Open this post in threaded view
|

Re: bloc status update: june 2016

stepharo
In reply to this post by Sean P. DeNigris
Hi glenn

with bloc2 (yes new implementation) it will be possible, Glenn can open
separate worlds and we discussed a lot your point (and we share it).

Stef

Le 12/7/16 à 16:57, Sean P. DeNigris a écrit :

> Sean P. DeNigris wrote
>> A test case for this, which opens up many exciting possibilities (imagine
>> I want to control time in my space e.g. run a simulation at 10x speed...),
>> would be to have a world within a world. I dabbled with this idea a bit in
>> Morphic, but quickly became frustrated because Morphic makes too many
>> assumptions e.g. relying on globals and hardcoded classes.
>>
>> The last time I tried this in Bloc, the result of the discussion was that
>> Alain said that this should be conceptually possible, but that I should be
>> patient (http://forum.world.st/Bloc-Space-within-a-Space-td4877474.html).
>> Are we any closer to this dream?
> Bump!!
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/bloc-status-update-june-2016-tp4901988p4906283.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: bloc status update: june 2016

Brad Selfridge
Does this mean "worlds within worlds" or "worlds adjacent to other worlds". If adjacent, will they be able to communicate with each other?
Brad Selfridge
Reply | Threaded
Open this post in threaded view
|

Re: bloc status update: june 2016

stepharo
For now it means that we can write "World new open" and we can use this
to write tests.

We have Bloc2 SDL worlds side by side and the goal is to have everything
ready (tools and widgets) and to get rid of the morphic one.

In Bloc1 we did not have other physical window so we had too many
constraints and morphic infection points.

But we could run Morphic inside Bloc. In Bloc2 this is not possible but
we get a better event bubbling model and other possibilities.

Stef


Le 13/7/16 à 03:27, Brad Selfridge a écrit :

> Does this mean "worlds within worlds" or "worlds adjacent to other worlds".
> If adjacent, will they be able to communicate with each other?
>
>
>
>
> -----
> Brad Selfridge
> --
> View this message in context: http://forum.world.st/bloc-status-update-june-2016-tp4901988p4906373.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>
>


12