SlideShare a Scribd company logo
BlazeHtml

Design of a blazingly fast
html combinator library
Hello!
My name is jasper
Studying BSc CS @ UGent
I like to make things

                @jaspervdj
               jaspervdj.be
Introduction
A web app usually has 3
important layers:

­ web application server
­ data storage layer
­ html generation layer
Trees in Haskell
> data Tree
>    = Node Tree Tree
>    | Empty
Html is a tree
This makes writing an
Html generation library
trivial in Haskell.
Le't write a library!

> type Attribute =
>     (String, String)
> type Tag = String
Le't write a library!
> data Html
>   = Node Tag [Attribute]
>           Html
>   | Leaf Tag [Attribute]
>   | Concat [Html]
>   | Text String
>   deriving (Show)
Hackage quick look
­ html
­ xhtml
­ xhtml­combinators
­ moe
­ xhtml1
s/String/Data.Text/g
­ A first good step
s/String/Data.Text/g
­ A first good step

text1 `append` text2
s/String/Data.Text/g
­ A first good step

text1 `append` text2

   BAD BAD BAD
No inspiration?
Just shamelessly steal
ideas from other Haskell
projects.
Builder Monoid
3­layer approach
Builder Fork
fromText :: Text -> Builder
fromEscapedText :: Text
                -> Builder
fromShow :: Show a
         => a -> Builder

fromRawAscii7Char :: Char
                  -> Builder
Builder Fork
Additional function:
> fromUnsafeWrite
>    :: Int
>    -> (Ptr Word8
>         -> IO ())
>    -> Builder
Benchmarks
Benchmarks
Benchmarks
Benchmarks
The future
Lots still to do until we
have a stable, fast,
awesome version.

For the curious:
github.com/jaspervdj/BlazeHtml
Questions?

More Related Content

What's hot

Nodejs vs php_apache
Nodejs vs php_apacheNodejs vs php_apache
Nodejs vs php_apache
Vodafone developer
 
Oracle's ListAgg Function & Pertinent Use
Oracle's ListAgg Function & Pertinent UseOracle's ListAgg Function & Pertinent Use
Oracle's ListAgg Function & Pertinent Use
Bryan L. Mack
 
Reflection in Pharo5
Reflection in Pharo5Reflection in Pharo5
Reflection in Pharo5
Marcus Denker
 
Adding A Dash In jQuery:
Adding A Dash In jQuery:Adding A Dash In jQuery:
Adding A Dash In jQuery:
Reema
 
C# Basic - Lec1 (Workshop on C# Programming: Learn to Build)
C# Basic - Lec1 (Workshop on C# Programming: Learn to Build)C# Basic - Lec1 (Workshop on C# Programming: Learn to Build)
C# Basic - Lec1 (Workshop on C# Programming: Learn to Build)
Jannat Ruma
 
Data Type C# - Lec2 (Workshop on C# Programming: Learn to Build)
Data Type C# - Lec2 (Workshop on C# Programming: Learn to Build)Data Type C# - Lec2 (Workshop on C# Programming: Learn to Build)
Data Type C# - Lec2 (Workshop on C# Programming: Learn to Build)
Jannat Ruma
 
Introduction to Elm
Introduction to ElmIntroduction to Elm
Introduction to Elm
Rogerio Chaves
 
Type Casting C# - Lec4 (Workshop on C# Programming: Learn to Build)
Type Casting C# - Lec4 (Workshop on C# Programming: Learn to Build)Type Casting C# - Lec4 (Workshop on C# Programming: Learn to Build)
Type Casting C# - Lec4 (Workshop on C# Programming: Learn to Build)
Jannat Ruma
 
#Pharo Days 2016 Reflectivity
#Pharo Days 2016 Reflectivity#Pharo Days 2016 Reflectivity
#Pharo Days 2016 Reflectivity
Philippe Back
 
Elm @ DublinJS
Elm @ DublinJSElm @ DublinJS
Elm @ DublinJS
Michael Twomey
 
Presentation on functional data mining at the IGT Cloud meet up at eBay Netanya
Presentation on functional data mining at the IGT Cloud meet up at eBay NetanyaPresentation on functional data mining at the IGT Cloud meet up at eBay Netanya
Presentation on functional data mining at the IGT Cloud meet up at eBay Netanya
Christopher Severs
 
MongoDB Aggregation MongoSF May 2011
MongoDB Aggregation MongoSF May 2011MongoDB Aggregation MongoSF May 2011
MongoDB Aggregation MongoSF May 2011
Chris Westin
 
Callable and runnable objects in ruby
Callable and runnable objects in rubyCallable and runnable objects in ruby
Callable and runnable objects in ruby
Rahul Bajaj
 
Automation in ArcGIS using Arcpy
Automation in ArcGIS using ArcpyAutomation in ArcGIS using Arcpy
Automation in ArcGIS using Arcpy
Geodata AS
 
Redis Developers Day 2015 - Secondary Indexes and State of Lua
Redis Developers Day 2015 - Secondary Indexes and State of LuaRedis Developers Day 2015 - Secondary Indexes and State of Lua
Redis Developers Day 2015 - Secondary Indexes and State of Lua
Itamar Haber
 
Network programming1
Network programming1Network programming1
Network programming1
Soham Sengupta
 
3 Презентация Kotlin - why not?
3 Презентация Kotlin - why not?3 Презентация Kotlin - why not?
3 Презентация Kotlin - why not?
STEP Computer Academy (Zaporozhye)
 
Python Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part IPython Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part I
DUSPviz
 
Roslyn
RoslynRoslyn
R Data Analysis/Rを使った人事データ分析入門
R Data Analysis/Rを使った人事データ分析入門R Data Analysis/Rを使った人事データ分析入門
R Data Analysis/Rを使った人事データ分析入門
Takanori Omote
 

What's hot (20)

Nodejs vs php_apache
Nodejs vs php_apacheNodejs vs php_apache
Nodejs vs php_apache
 
Oracle's ListAgg Function & Pertinent Use
Oracle's ListAgg Function & Pertinent UseOracle's ListAgg Function & Pertinent Use
Oracle's ListAgg Function & Pertinent Use
 
Reflection in Pharo5
Reflection in Pharo5Reflection in Pharo5
Reflection in Pharo5
 
Adding A Dash In jQuery:
Adding A Dash In jQuery:Adding A Dash In jQuery:
Adding A Dash In jQuery:
 
C# Basic - Lec1 (Workshop on C# Programming: Learn to Build)
C# Basic - Lec1 (Workshop on C# Programming: Learn to Build)C# Basic - Lec1 (Workshop on C# Programming: Learn to Build)
C# Basic - Lec1 (Workshop on C# Programming: Learn to Build)
 
Data Type C# - Lec2 (Workshop on C# Programming: Learn to Build)
Data Type C# - Lec2 (Workshop on C# Programming: Learn to Build)Data Type C# - Lec2 (Workshop on C# Programming: Learn to Build)
Data Type C# - Lec2 (Workshop on C# Programming: Learn to Build)
 
Introduction to Elm
Introduction to ElmIntroduction to Elm
Introduction to Elm
 
Type Casting C# - Lec4 (Workshop on C# Programming: Learn to Build)
Type Casting C# - Lec4 (Workshop on C# Programming: Learn to Build)Type Casting C# - Lec4 (Workshop on C# Programming: Learn to Build)
Type Casting C# - Lec4 (Workshop on C# Programming: Learn to Build)
 
#Pharo Days 2016 Reflectivity
#Pharo Days 2016 Reflectivity#Pharo Days 2016 Reflectivity
#Pharo Days 2016 Reflectivity
 
Elm @ DublinJS
Elm @ DublinJSElm @ DublinJS
Elm @ DublinJS
 
Presentation on functional data mining at the IGT Cloud meet up at eBay Netanya
Presentation on functional data mining at the IGT Cloud meet up at eBay NetanyaPresentation on functional data mining at the IGT Cloud meet up at eBay Netanya
Presentation on functional data mining at the IGT Cloud meet up at eBay Netanya
 
MongoDB Aggregation MongoSF May 2011
MongoDB Aggregation MongoSF May 2011MongoDB Aggregation MongoSF May 2011
MongoDB Aggregation MongoSF May 2011
 
Callable and runnable objects in ruby
Callable and runnable objects in rubyCallable and runnable objects in ruby
Callable and runnable objects in ruby
 
Automation in ArcGIS using Arcpy
Automation in ArcGIS using ArcpyAutomation in ArcGIS using Arcpy
Automation in ArcGIS using Arcpy
 
Redis Developers Day 2015 - Secondary Indexes and State of Lua
Redis Developers Day 2015 - Secondary Indexes and State of LuaRedis Developers Day 2015 - Secondary Indexes and State of Lua
Redis Developers Day 2015 - Secondary Indexes and State of Lua
 
Network programming1
Network programming1Network programming1
Network programming1
 
3 Презентация Kotlin - why not?
3 Презентация Kotlin - why not?3 Презентация Kotlin - why not?
3 Презентация Kotlin - why not?
 
Python Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part IPython Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part I
 
Roslyn
RoslynRoslyn
Roslyn
 
R Data Analysis/Rを使った人事データ分析入門
R Data Analysis/Rを使った人事データ分析入門R Data Analysis/Rを使った人事データ分析入門
R Data Analysis/Rを使った人事データ分析入門
 

Viewers also liked

Lizard thein sein
Lizard thein seinLizard thein sein
Lizard thein sein
yadana8888
 
Small group presentation
Small group presentationSmall group presentation
Small group presentation
VOX Church
 
2010 Symposium - Monday - Retai
2010 Symposium - Monday - Retai2010 Symposium - Monday - Retai
2010 Symposium - Monday - Retai
SOCAP
 
What is Scrum
What is ScrumWhat is Scrum
What is Scrum
Chris Shayan
 
Touch&play framework
Touch&play frameworkTouch&play framework
Touch&play frameworkCSP Scarl
 
Marketing On The Internet
Marketing On The InternetMarketing On The Internet
Marketing On The Internet
Jeremy Schneider
 
Storie dal futuro: persone e cose sempre connesse
Storie dal futuro: persone e cose sempre connesseStorie dal futuro: persone e cose sempre connesse
Storie dal futuro: persone e cose sempre connesse
CSP Scarl
 
What is Lean Startup?
What is Lean Startup?What is Lean Startup?
What is Lean Startup?
Chris Shayan
 
how VietnamWorks works
how VietnamWorks workshow VietnamWorks works
how VietnamWorks works
Chris Shayan
 
CV Somendra Nov 2016 external
CV Somendra Nov 2016 externalCV Somendra Nov 2016 external
CV Somendra Nov 2016 external
SOMENDRA06
 
Technical Instructions
Technical InstructionsTechnical Instructions
Technical Instructions
EKMom
 
Independent Presentation Final Sb (2)
Independent Presentation Final Sb (2)Independent Presentation Final Sb (2)
Independent Presentation Final Sb (2)
Independent Ltd
 
D:\Ring O 2nd Grade
D:\Ring O 2nd GradeD:\Ring O 2nd Grade
D:\Ring O 2nd Grade
guest5ac3f31
 
Dasar html
Dasar htmlDasar html
Dasar html
Reno Bastian Syah
 
Requisitos oo-para-projetos-oo-transicao-facil
Requisitos oo-para-projetos-oo-transicao-facilRequisitos oo-para-projetos-oo-transicao-facil
Requisitos oo-para-projetos-oo-transicao-facil
Sandra Rocha
 
C re ate-cirma-def-060611
C re ate-cirma-def-060611C re ate-cirma-def-060611
C re ate-cirma-def-060611
CSP Scarl
 
Red leaves profile
Red leaves profileRed leaves profile
Red leaves profile
Red Leaves Solution Sdn Bhd
 
3 5massvacation
3 5massvacation3 5massvacation
3 5massvacation
hollister69
 
Escher
EscherEscher
MyFriendsTreeII
MyFriendsTreeIIMyFriendsTreeII
MyFriendsTreeII
Eric Esquivel
 

Viewers also liked (20)

Lizard thein sein
Lizard thein seinLizard thein sein
Lizard thein sein
 
Small group presentation
Small group presentationSmall group presentation
Small group presentation
 
2010 Symposium - Monday - Retai
2010 Symposium - Monday - Retai2010 Symposium - Monday - Retai
2010 Symposium - Monday - Retai
 
What is Scrum
What is ScrumWhat is Scrum
What is Scrum
 
Touch&play framework
Touch&play frameworkTouch&play framework
Touch&play framework
 
Marketing On The Internet
Marketing On The InternetMarketing On The Internet
Marketing On The Internet
 
Storie dal futuro: persone e cose sempre connesse
Storie dal futuro: persone e cose sempre connesseStorie dal futuro: persone e cose sempre connesse
Storie dal futuro: persone e cose sempre connesse
 
What is Lean Startup?
What is Lean Startup?What is Lean Startup?
What is Lean Startup?
 
how VietnamWorks works
how VietnamWorks workshow VietnamWorks works
how VietnamWorks works
 
CV Somendra Nov 2016 external
CV Somendra Nov 2016 externalCV Somendra Nov 2016 external
CV Somendra Nov 2016 external
 
Technical Instructions
Technical InstructionsTechnical Instructions
Technical Instructions
 
Independent Presentation Final Sb (2)
Independent Presentation Final Sb (2)Independent Presentation Final Sb (2)
Independent Presentation Final Sb (2)
 
D:\Ring O 2nd Grade
D:\Ring O 2nd GradeD:\Ring O 2nd Grade
D:\Ring O 2nd Grade
 
Dasar html
Dasar htmlDasar html
Dasar html
 
Requisitos oo-para-projetos-oo-transicao-facil
Requisitos oo-para-projetos-oo-transicao-facilRequisitos oo-para-projetos-oo-transicao-facil
Requisitos oo-para-projetos-oo-transicao-facil
 
C re ate-cirma-def-060611
C re ate-cirma-def-060611C re ate-cirma-def-060611
C re ate-cirma-def-060611
 
Red leaves profile
Red leaves profileRed leaves profile
Red leaves profile
 
3 5massvacation
3 5massvacation3 5massvacation
3 5massvacation
 
Escher
EscherEscher
Escher
 
MyFriendsTreeII
MyFriendsTreeIIMyFriendsTreeII
MyFriendsTreeII
 

Similar to Dutch hug

Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...
Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...
Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...
apidays
 
The program reads data from two files, itemsList-0x.txt and .docx
The program reads data from two files, itemsList-0x.txt and .docxThe program reads data from two files, itemsList-0x.txt and .docx
The program reads data from two files, itemsList-0x.txt and .docx
oscars29
 
Smalltalk in a .NET World
Smalltalk in a  .NET WorldSmalltalk in a  .NET World
Smalltalk in a .NET World
ESUG
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracket
jnewmanux
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial En
Ankur Dongre
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial En
Ankur Dongre
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
zonathen
 
PPT
PPTPPT
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
dwm042
 
Ant tutorial
Ant tutorialAnt tutorial
Ant tutorial
Ratnesh Kumar Singh
 
Java ant tutorial
Java ant tutorialJava ant tutorial
Java ant tutorial
Ashoka Vanjare
 
ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in...
 ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in... ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in...
ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in...
Saurabh Nanda
 
Echtzeitapplikationen mit Elixir und GraphQL
Echtzeitapplikationen mit Elixir und GraphQLEchtzeitapplikationen mit Elixir und GraphQL
Echtzeitapplikationen mit Elixir und GraphQL
Moritz Flucht
 
WEB DEVELOPMENT
WEB DEVELOPMENTWEB DEVELOPMENT
WEB DEVELOPMENT
Gourav Kaushik
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#
Talbott Crowell
 
HTML literals, the JSX of the platform
HTML literals, the JSX of the platformHTML literals, the JSX of the platform
HTML literals, the JSX of the platform
Kenneth Rohde Christiansen
 
A Life of breakpoint
A Life of breakpointA Life of breakpoint
A Life of breakpoint
Hajime Morrita
 
Internet Programming
Internet ProgrammingInternet Programming
Internet Programming
FkdiMl
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
bobmcwhirter
 
Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2
GDSCUniversitasMatan
 

Similar to Dutch hug (20)

Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...
Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...
Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...
 
The program reads data from two files, itemsList-0x.txt and .docx
The program reads data from two files, itemsList-0x.txt and .docxThe program reads data from two files, itemsList-0x.txt and .docx
The program reads data from two files, itemsList-0x.txt and .docx
 
Smalltalk in a .NET World
Smalltalk in a  .NET WorldSmalltalk in a  .NET World
Smalltalk in a .NET World
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracket
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial En
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial En
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
PPT
PPTPPT
PPT
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
 
Ant tutorial
Ant tutorialAnt tutorial
Ant tutorial
 
Java ant tutorial
Java ant tutorialJava ant tutorial
Java ant tutorial
 
ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in...
 ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in... ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in...
ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in...
 
Echtzeitapplikationen mit Elixir und GraphQL
Echtzeitapplikationen mit Elixir und GraphQLEchtzeitapplikationen mit Elixir und GraphQL
Echtzeitapplikationen mit Elixir und GraphQL
 
WEB DEVELOPMENT
WEB DEVELOPMENTWEB DEVELOPMENT
WEB DEVELOPMENT
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#
 
HTML literals, the JSX of the platform
HTML literals, the JSX of the platformHTML literals, the JSX of the platform
HTML literals, the JSX of the platform
 
A Life of breakpoint
A Life of breakpointA Life of breakpoint
A Life of breakpoint
 
Internet Programming
Internet ProgrammingInternet Programming
Internet Programming
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
 
Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2
 

Dutch hug