SlideShare a Scribd company logo
1 of 30
Download to read offline
Pablo Tesone
Martín Dias
Bloc for
Current State and Future Perspective
ESUG 2022 - Novi Sad
Consortium
What is Bloc?
a low-level UI
infrastructure &
framework for Pharo
geometry

(polygon)
a BlElement
background
border
transformation

(a matrix with

skew and translation)
Element's visual properties
Element's outskirts
aBlElement


outskirts:


BlOutskirts outside
aBlElement


outskirts:


BlOutskirts centered
aBlElement


outskirts:


BlOutskirts inside
Border's cap
vertices := { 50@150. 150@50}.


referenceLine := (BlPolylineGeometry vertices: vertices) asElement.


capLine := (BlPolylineGeometry vertices: vertices) asElement.


capLine border: (BlBorder builder


	
	
	
	
paint: Color pink;


	
	
	
	
width: 50;


	
	
	
	
lineCap: BlStrokeLineCap round;


	
	
	
	
build)
Border's join
elementA := BlElement new
size: 100 @ 100;
background: Color red;
relocate: 100 @ 100;
clipChildren: false;
yourself.
elementB := BlElement new
size: 100 @ 100;
background: Color green;
relocate: 50 @ 50;
clipChildren: true;
yourself.
elementA addChild: elementB.
elementC := BlElement new
size: 100 @ 100;
background: Color blue;
relocate: 50 @ 50;
yourself.
elementB addChild: elementC.
BlSpace new
addChild: elementA;
show
Elements Tree
& Clipping
clipped
Space and Host
SPACE = "window"

SPACE has a HOST

HOST provides a loop: 

- events (e.g. mouse move)

- layout elements

- draw elements

- etc
Morphic
Options:
SDL2
Canvas
INPUT: a tree of BlElements

OUTPUT: pixels
Sparta Sparta Alexandrie
Bloc options:
Element's layout & constraints
The layout of an Element
can determine the position
and size of its children.

See in next demo!
A clean library that may be included in Pharo

• Make it easier to understand

• Have a clear maintenance process

Our code retro
fi
ts a part of the development made by feenk
Bloc for Pharo
Objectives
Host & Canvas - Current Direction
Stay with simple FFI bindings to C libraries
• Works on all Pharo's platforms

• GPU acceleration

• Active gamer community

• Stable. Active gnome community (it's the way to
draw custom widgets in gtk 3 and 4).

• Not GPU-optimized but we can use bu
ff
ering, layer
composition and other techniques to mitigate.
We chose Cairo...


but Sparta-Cairo?
Sparta Sparta
25
frame/s
Boids Example: Bird Flock Simulation
5
frame/s!
Sparta
10.4k


FFI calls / frame
Sparta
5.6k


FFI calls / frame
200
boids x 200
=
vs.
Few and simple
geometries but

the whole surface is 

updated on each
frame
Too
Much?
Sparta Sparta
O(n)
stops here
change color


6 times per boid
new path


5 times per boid
Sparta Alexandrie
Call the C API smartly

Avoid redundant calls

Start by rendering Bloc elements faster,
then look for abstract API
Bloc + Alexandrie v1.0
• Support for most features of Sparta-Cairo, but fast.

• Doesn't depend on SurfacePlugin, like Sparta-Cairo,
unlike Athens-Cairo

• Bloc v1.0 comes with Alexandrie, plus Sparta-Cairo and
Sparta-Skia. 

• Check it: https://github.com/pharo-graphics/Bloc
Bloc + Alexandrie Next
• Optimize transformations (this is Bloc level)

• Cache more Cairo objects

• Layer composition and Bu
ff
er unchanged elements

• E
ff
ects (blur, shadow)

• Bug in SVG path geometry

• Clear API (still not stable)
Performance
10.4k


calls/frame
3k


calls/frame
Sparta Alexandrie
Can be
better, but
1/3 is good!
Sparta Sparta Alexandrie
30

frame/s
5

frame/s
25

frame/s
Still poor: Users need at least 60 FPS,
but this is one step. ?
About GPU
Explore last generation techniques (e.g. Chrome's RenderingNG,
Firefox's WebRender, GTK4) with SDL and Cairo:

• Layer composition

• bu
ff
er elements in GPU textures / tiles

• composite layers in GPU

• GPU rastering

• take advantage of GPU

• avoid bottleneck of transferring from CPU to GPU memory

• Dedicated thread to render and animate elements
Canvas FPS
Bloc Skia 18.3
Bloc Cairo 12.5
Bloc Alexandrie 40.3
Experimental (SDL2+Cairo)* 187.7 (Example based on "Box Windmill"

by Milton Mamani in RS3)
• 1600x1600 pixels to update
on every frame

• Elements only update their
transformation matrix

=> Having the elements in a
texture and operate with GPU
makes a good di
ff
erence
*: SDL2 w/OpenGL Renderer, on a MacbookPro 2018
FFI Call Logger
Monitor calls, live! https://github.com/tinchodias/FFICallLogger
Copy of the stack that
performed the selected call
Recorded calls

(in a circular collection)
Call
fi
lters
Plans as a User of Bloc
• Spec backend

• Create Examples

• Microdown editor

• Small game
Discord: Pharo server / #bloc channel

Mailing-list: lse-bloc@inria.fr 

Bloc Core: https://github.com/pharo-graphics/Bloc

Bloc Tutorial: https://github.com/pharo-graphics/Tutorials

Bloc Dev Ecosystem: https://github.com/pharo-graphics/
BlocBenchs
Bloc for Pharo
Consortium

More Related Content

What's hot

re:mobidyc the overview
re:mobidyc the overviewre:mobidyc the overview
re:mobidyc the overviewESUG
 
Improving Pharo Snapshots
Improving Pharo SnapshotsImproving Pharo Snapshots
Improving Pharo SnapshotsESUG
 
PharoJS: Hijack the JavaScript Ecosystem
PharoJS: Hijack the JavaScript EcosystemPharoJS: Hijack the JavaScript Ecosystem
PharoJS: Hijack the JavaScript EcosystemESUG
 
Pharo 11: A stabilization release
Pharo 11: A stabilization releasePharo 11: A stabilization release
Pharo 11: A stabilization releaseESUG
 
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang) [Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang) Johnny Sung
 
WebRTC開発者向けプラットフォーム SkyWayの裏側
WebRTC開発者向けプラットフォーム SkyWayの裏側WebRTC開発者向けプラットフォーム SkyWayの裏側
WebRTC開発者向けプラットフォーム SkyWayの裏側Yusuke Naka
 
FreeCAD OpenFOAM Workbenchセットアップ方法と課題
FreeCAD OpenFOAM Workbenchセットアップ方法と課題FreeCAD OpenFOAM Workbenchセットアップ方法と課題
FreeCAD OpenFOAM Workbenchセットアップ方法と課題murai1972
 
Advantages and disadvantages of a monorepo
Advantages and disadvantages of a monorepoAdvantages and disadvantages of a monorepo
Advantages and disadvantages of a monorepoIanDavidson56
 
'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko
'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko
'BUILDING ANGULAR APPS WITH NX' by Anastasia NecheporenkoOdessaJS Conf
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy CodeExcella
 
iPad LiDARで エンジニアカフェを3Dスキャン
iPad LiDARでエンジニアカフェを3DスキャンiPad LiDARでエンジニアカフェを3Dスキャン
iPad LiDARで エンジニアカフェを3DスキャンTakashi Yoshinaga
 
C# 8.0 null許容参照型
C# 8.0 null許容参照型C# 8.0 null許容参照型
C# 8.0 null許容参照型信之 岩永
 
「再代入なんて、あるわけない」 ~ふつうのプログラマが関数型言語を知るべき理由~ (Gunma.web #5 2011/05/14)
「再代入なんて、あるわけない」 ~ふつうのプログラマが関数型言語を知るべき理由~ (Gunma.web #5 2011/05/14)「再代入なんて、あるわけない」 ~ふつうのプログラマが関数型言語を知るべき理由~ (Gunma.web #5 2011/05/14)
「再代入なんて、あるわけない」 ~ふつうのプログラマが関数型言語を知るべき理由~ (Gunma.web #5 2011/05/14)parrotstudio
 
Binary exploitation - AIS3
Binary exploitation - AIS3Binary exploitation - AIS3
Binary exploitation - AIS3Angel Boy
 
View Inheritance in Odoo 16
View Inheritance in Odoo 16View Inheritance in Odoo 16
View Inheritance in Odoo 16Celine George
 
C API for Lotus Notes & Domino
C API for Lotus Notes & DominoC API for Lotus Notes & Domino
C API for Lotus Notes & DominoUlrich Krause
 
Dot net platform and dotnet core fundamentals
Dot net platform and dotnet core fundamentalsDot net platform and dotnet core fundamentals
Dot net platform and dotnet core fundamentalsLalit Kale
 

What's hot (20)

re:mobidyc the overview
re:mobidyc the overviewre:mobidyc the overview
re:mobidyc the overview
 
Improving Pharo Snapshots
Improving Pharo SnapshotsImproving Pharo Snapshots
Improving Pharo Snapshots
 
PharoJS: Hijack the JavaScript Ecosystem
PharoJS: Hijack the JavaScript EcosystemPharoJS: Hijack the JavaScript Ecosystem
PharoJS: Hijack the JavaScript Ecosystem
 
Pharo 11: A stabilization release
Pharo 11: A stabilization releasePharo 11: A stabilization release
Pharo 11: A stabilization release
 
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang) [Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
 
WebRTC開発者向けプラットフォーム SkyWayの裏側
WebRTC開発者向けプラットフォーム SkyWayの裏側WebRTC開発者向けプラットフォーム SkyWayの裏側
WebRTC開発者向けプラットフォーム SkyWayの裏側
 
Master the Monorepo
Master the MonorepoMaster the Monorepo
Master the Monorepo
 
FreeCAD OpenFOAM Workbenchセットアップ方法と課題
FreeCAD OpenFOAM Workbenchセットアップ方法と課題FreeCAD OpenFOAM Workbenchセットアップ方法と課題
FreeCAD OpenFOAM Workbenchセットアップ方法と課題
 
Advantages and disadvantages of a monorepo
Advantages and disadvantages of a monorepoAdvantages and disadvantages of a monorepo
Advantages and disadvantages of a monorepo
 
'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko
'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko
'BUILDING ANGULAR APPS WITH NX' by Anastasia Necheporenko
 
Monorepo at Pinterest
Monorepo at PinterestMonorepo at Pinterest
Monorepo at Pinterest
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 
iPad LiDARで エンジニアカフェを3Dスキャン
iPad LiDARでエンジニアカフェを3DスキャンiPad LiDARでエンジニアカフェを3Dスキャン
iPad LiDARで エンジニアカフェを3Dスキャン
 
C# 8.0 null許容参照型
C# 8.0 null許容参照型C# 8.0 null許容参照型
C# 8.0 null許容参照型
 
「再代入なんて、あるわけない」 ~ふつうのプログラマが関数型言語を知るべき理由~ (Gunma.web #5 2011/05/14)
「再代入なんて、あるわけない」 ~ふつうのプログラマが関数型言語を知るべき理由~ (Gunma.web #5 2011/05/14)「再代入なんて、あるわけない」 ~ふつうのプログラマが関数型言語を知るべき理由~ (Gunma.web #5 2011/05/14)
「再代入なんて、あるわけない」 ~ふつうのプログラマが関数型言語を知るべき理由~ (Gunma.web #5 2011/05/14)
 
Flujos de trabajo y mejores prácticas en git
Flujos de trabajo y mejores prácticas en gitFlujos de trabajo y mejores prácticas en git
Flujos de trabajo y mejores prácticas en git
 
Binary exploitation - AIS3
Binary exploitation - AIS3Binary exploitation - AIS3
Binary exploitation - AIS3
 
View Inheritance in Odoo 16
View Inheritance in Odoo 16View Inheritance in Odoo 16
View Inheritance in Odoo 16
 
C API for Lotus Notes & Domino
C API for Lotus Notes & DominoC API for Lotus Notes & Domino
C API for Lotus Notes & Domino
 
Dot net platform and dotnet core fundamentals
Dot net platform and dotnet core fundamentalsDot net platform and dotnet core fundamentals
Dot net platform and dotnet core fundamentals
 

Similar to Bloc for Pharo: Current State and Future Perspective

News on Bloc for Pharo
News on Bloc for PharoNews on Bloc for Pharo
News on Bloc for PharoESUG
 
Building a High-Performance Database with Scala, Akka, and Spark
Building a High-Performance Database with Scala, Akka, and SparkBuilding a High-Performance Database with Scala, Akka, and Spark
Building a High-Performance Database with Scala, Akka, and SparkEvan Chan
 
Inspecting Block Closures To Generate Shaders for GPU Execution
Inspecting Block Closures To Generate Shaders for GPU ExecutionInspecting Block Closures To Generate Shaders for GPU Execution
Inspecting Block Closures To Generate Shaders for GPU ExecutionESUG
 
Fortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLASFortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLASJongsu "Liam" Kim
 
Performance optimization in JS. Based on project experience, Алина Синявская ...
Performance optimization in JS. Based on project experience, Алина Синявская ...Performance optimization in JS. Based on project experience, Алина Синявская ...
Performance optimization in JS. Based on project experience, Алина Синявская ...Sigma Software
 
Performance optimization in JS. Based on project experience, Аліна Синявська ...
Performance optimization in JS. Based on project experience, Аліна Синявська ...Performance optimization in JS. Based on project experience, Аліна Синявська ...
Performance optimization in JS. Based on project experience, Аліна Синявська ...Sigma Software
 
RailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMsRailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMsLourens Naudé
 
ECMAScript 6: A Better JavaScript for the Ambient Computing Era
ECMAScript 6: A Better JavaScript for the Ambient Computing EraECMAScript 6: A Better JavaScript for the Ambient Computing Era
ECMAScript 6: A Better JavaScript for the Ambient Computing EraAllen Wirfs-Brock
 
Let's talks about string operations in C++17
Let's talks about string operations in C++17Let's talks about string operations in C++17
Let's talks about string operations in C++17Bartlomiej Filipek
 
GTC 2009 OpenGL Barthold
GTC 2009 OpenGL BartholdGTC 2009 OpenGL Barthold
GTC 2009 OpenGL BartholdMark Kilgard
 
Scala can do this, too
Scala can do this, tooScala can do this, too
Scala can do this, tooHairy Fotr
 
The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of LayoutStephen Hay
 
Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Prabindh Sundareson
 
Front-end God Mode with Reagent and Figwheel
Front-end God Mode with Reagent and FigwheelFront-end God Mode with Reagent and Figwheel
Front-end God Mode with Reagent and FigwheelDavid Kay
 
RapidApp - YAPC::NA 2014
RapidApp - YAPC::NA 2014RapidApp - YAPC::NA 2014
RapidApp - YAPC::NA 2014Henry Van Styn
 
Behavior driven oop
Behavior driven oopBehavior driven oop
Behavior driven oopPiyush Verma
 

Similar to Bloc for Pharo: Current State and Future Perspective (20)

News on Bloc for Pharo
News on Bloc for PharoNews on Bloc for Pharo
News on Bloc for Pharo
 
CSS and CSS3
CSS and CSS3CSS and CSS3
CSS and CSS3
 
Building a High-Performance Database with Scala, Akka, and Spark
Building a High-Performance Database with Scala, Akka, and SparkBuilding a High-Performance Database with Scala, Akka, and Spark
Building a High-Performance Database with Scala, Akka, and Spark
 
CSS 3 Overview
CSS 3 OverviewCSS 3 Overview
CSS 3 Overview
 
Inspecting Block Closures To Generate Shaders for GPU Execution
Inspecting Block Closures To Generate Shaders for GPU ExecutionInspecting Block Closures To Generate Shaders for GPU Execution
Inspecting Block Closures To Generate Shaders for GPU Execution
 
Fortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLASFortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLAS
 
Performance optimization in JS. Based on project experience, Алина Синявская ...
Performance optimization in JS. Based on project experience, Алина Синявская ...Performance optimization in JS. Based on project experience, Алина Синявская ...
Performance optimization in JS. Based on project experience, Алина Синявская ...
 
Performance optimization in JS. Based on project experience, Аліна Синявська ...
Performance optimization in JS. Based on project experience, Аліна Синявська ...Performance optimization in JS. Based on project experience, Аліна Синявська ...
Performance optimization in JS. Based on project experience, Аліна Синявська ...
 
RailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMsRailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMs
 
ECMAScript 6: A Better JavaScript for the Ambient Computing Era
ECMAScript 6: A Better JavaScript for the Ambient Computing EraECMAScript 6: A Better JavaScript for the Ambient Computing Era
ECMAScript 6: A Better JavaScript for the Ambient Computing Era
 
Let's talks about string operations in C++17
Let's talks about string operations in C++17Let's talks about string operations in C++17
Let's talks about string operations in C++17
 
GTC 2009 OpenGL Barthold
GTC 2009 OpenGL BartholdGTC 2009 OpenGL Barthold
GTC 2009 OpenGL Barthold
 
CSS 3
CSS 3CSS 3
CSS 3
 
CSS3
CSS3CSS3
CSS3
 
Scala can do this, too
Scala can do this, tooScala can do this, too
Scala can do this, too
 
The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of Layout
 
Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011
 
Front-end God Mode with Reagent and Figwheel
Front-end God Mode with Reagent and FigwheelFront-end God Mode with Reagent and Figwheel
Front-end God Mode with Reagent and Figwheel
 
RapidApp - YAPC::NA 2014
RapidApp - YAPC::NA 2014RapidApp - YAPC::NA 2014
RapidApp - YAPC::NA 2014
 
Behavior driven oop
Behavior driven oopBehavior driven oop
Behavior driven oop
 

More from ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingESUG
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in PharoESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapESUG
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 

More from ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Recently uploaded

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 

Recently uploaded (20)

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 

Bloc for Pharo: Current State and Future Perspective

  • 1. Pablo Tesone Martín Dias Bloc for Current State and Future Perspective ESUG 2022 - Novi Sad Consortium
  • 2. What is Bloc? a low-level UI infrastructure & framework for Pharo
  • 3. geometry (polygon) a BlElement background border transformation (a matrix with skew and translation) Element's visual properties
  • 5. Border's cap vertices := { 50@150. 150@50}. referenceLine := (BlPolylineGeometry vertices: vertices) asElement. capLine := (BlPolylineGeometry vertices: vertices) asElement. capLine border: (BlBorder builder paint: Color pink; width: 50; lineCap: BlStrokeLineCap round; build)
  • 7. elementA := BlElement new size: 100 @ 100; background: Color red; relocate: 100 @ 100; clipChildren: false; yourself. elementB := BlElement new size: 100 @ 100; background: Color green; relocate: 50 @ 50; clipChildren: true; yourself. elementA addChild: elementB. elementC := BlElement new size: 100 @ 100; background: Color blue; relocate: 50 @ 50; yourself. elementB addChild: elementC. BlSpace new addChild: elementA; show Elements Tree & Clipping clipped
  • 8.
  • 9. Space and Host SPACE = "window" SPACE has a HOST HOST provides a loop: - events (e.g. mouse move) - layout elements - draw elements - etc Morphic Options: SDL2
  • 10. Canvas INPUT: a tree of BlElements OUTPUT: pixels Sparta Sparta Alexandrie Bloc options:
  • 11. Element's layout & constraints The layout of an Element can determine the position and size of its children. See in next demo!
  • 12.
  • 13. A clean library that may be included in Pharo • Make it easier to understand • Have a clear maintenance process Our code retro fi ts a part of the development made by feenk Bloc for Pharo Objectives
  • 14. Host & Canvas - Current Direction Stay with simple FFI bindings to C libraries • Works on all Pharo's platforms • GPU acceleration • Active gamer community • Stable. Active gnome community (it's the way to draw custom widgets in gtk 3 and 4). • Not GPU-optimized but we can use bu ff ering, layer composition and other techniques to mitigate.
  • 15. We chose Cairo... but Sparta-Cairo?
  • 16. Sparta Sparta 25 frame/s Boids Example: Bird Flock Simulation 5 frame/s!
  • 17. Sparta 10.4k FFI calls / frame Sparta 5.6k FFI calls / frame 200 boids x 200 = vs. Few and simple geometries but the whole surface is updated on each frame Too Much?
  • 18. Sparta Sparta O(n) stops here change color 6 times per boid new path 5 times per boid
  • 19. Sparta Alexandrie Call the C API smartly Avoid redundant calls Start by rendering Bloc elements faster, then look for abstract API
  • 20. Bloc + Alexandrie v1.0 • Support for most features of Sparta-Cairo, but fast. • Doesn't depend on SurfacePlugin, like Sparta-Cairo, unlike Athens-Cairo • Bloc v1.0 comes with Alexandrie, plus Sparta-Cairo and Sparta-Skia. • Check it: https://github.com/pharo-graphics/Bloc
  • 21. Bloc + Alexandrie Next • Optimize transformations (this is Bloc level) • Cache more Cairo objects • Layer composition and Bu ff er unchanged elements • E ff ects (blur, shadow) • Bug in SVG path geometry • Clear API (still not stable)
  • 22.
  • 25. Sparta Sparta Alexandrie 30 frame/s 5 frame/s 25 frame/s Still poor: Users need at least 60 FPS, but this is one step. ?
  • 26. About GPU Explore last generation techniques (e.g. Chrome's RenderingNG, Firefox's WebRender, GTK4) with SDL and Cairo: • Layer composition • bu ff er elements in GPU textures / tiles • composite layers in GPU • GPU rastering • take advantage of GPU • avoid bottleneck of transferring from CPU to GPU memory • Dedicated thread to render and animate elements
  • 27. Canvas FPS Bloc Skia 18.3 Bloc Cairo 12.5 Bloc Alexandrie 40.3 Experimental (SDL2+Cairo)* 187.7 (Example based on "Box Windmill" by Milton Mamani in RS3) • 1600x1600 pixels to update on every frame • Elements only update their transformation matrix => Having the elements in a texture and operate with GPU makes a good di ff erence *: SDL2 w/OpenGL Renderer, on a MacbookPro 2018
  • 28. FFI Call Logger Monitor calls, live! https://github.com/tinchodias/FFICallLogger Copy of the stack that performed the selected call Recorded calls (in a circular collection) Call fi lters
  • 29. Plans as a User of Bloc • Spec backend • Create Examples • Microdown editor • Small game
  • 30. Discord: Pharo server / #bloc channel Mailing-list: lse-bloc@inria.fr Bloc Core: https://github.com/pharo-graphics/Bloc Bloc Tutorial: https://github.com/pharo-graphics/Tutorials Bloc Dev Ecosystem: https://github.com/pharo-graphics/ BlocBenchs Bloc for Pharo Consortium