SlideShare une entreprise Scribd logo
1  sur  74
Télécharger pour lire hors ligne
The Egison Programming Language
Vol.01 Mar/28/2014
Satoshi Egi
Rakuten Institute of Technology
http://rit.rakuten.co.jp/
2
Profile of Egison
Paradigm Pattern-matching-oriented,
Pure functional
Author Satoshi Egi
License MIT
Version 3.3.4 (2014/03/28)
First Released 2011/5/24
Filename Extension .egi
Implemented in Haskell (about 3,400 lines)
Egison is the programming language I’ve created.
3
Motivation
I’d like to create a programming language that
directly represents human’s intuition.
Function modularity
Type system Pattern matching
Egison (current)
Egison next version
Function modularity
Type system Pattern matching
Lisp (before Scheme)
Scheme
ML, OCaml, Haskell
4
Egison in one minute
Egison is the world's first programming language
that realized non-linear pattern-matching with
backtracking.
(match-all xs (multiset integer)
[<cons $x <cons ,x _>> x])
Egison
Enumerate the elements of
the collection ‘xs’ that appear
more than twice
pairs = []
(1..n).each do |i|
(i..n).each do |j|
if xs[i] == xs[j]
pair = xs[i]
end
end
end
Ruby
5
Quick Tour
6
The ‘match-all’ expression
Target Matcher
Pattern Expression executed
when pattern matching
succeed
Result
Meaning: Pattern match against the “target” as
the “matcher” with the “pattern” and return all
results of pattern matching.
7
The ‘match-all’ expression
Target
Pattern-match against the target data {1 1 2 3 2}
8
The ‘match-all’ expression
MatcherTarget
Pattern-match against the target data {1 1 2 3 2}
as the multiset of integers
9
The ‘match-all’ expression
Target Matcher
Pattern
Pattern-match against the target data {1 1 2 3 2}
as the multiset of integers with the pattern
<cons $x <cons ,x _>>
10
The ‘match-all’ expression
Target Matcher
Pattern Expression executed
when pattern matching
succeed
Pattern-match against the target data {1 1 2 3 2}
as the multiset of integers with the pattern
<cons $x <cons ,x _>> and return the value
bound to x.
11
The ‘match-all’ expression
Target Matcher
Pattern Expression executed
when pattern matching
succeed
Result
Pattern-match against the target data {1 1 2 3 2}
as the multiset of integers with the pattern
<cons $x <cons ,x _>> and return the value
bound to x.
12
The ‘cons’ pattern constructor
Divide a collection into an element and a
collection of rest of elements.
13
The ‘cons’ pattern constructor
The meaning of ‘cons’ changes for each matcher
Divide a collection into an element and a
collection of rest of elements.
14
The nested ‘cons’ pattern constructor
Extracting two elements using the ‘cons’ patterns.
15
Non-linear patterns
Elements that appear twice
Two same head elements
We can deal with the multiple occurrences of the
same variables in a pattern.
16
The ‘join’ pattern constructor
Divide a collection into two collections.
17
Playing with the ‘join’ pattern constructor
Enumerate all two combination of elements.
18
Demonstrations
19
The first application of Egison
20
The first application of Egison
Match as a set of cards
21
The first application of Egison
Pattern for straight flash
22
The pattern for straight flush
23
The pattern for straight flush
Same suit with $s
24
The pattern for straight flush
Same suit with $s
Numbers are serial from
$n
25
The pattern for straight flush
Same suit with $s
Numbers are serial from
$n
We can write any expression after ‘,’
26
The first application of Egison
Pattern for two pair
27
The pattern for two pair
28
The pattern for two pair
Matches with any suit
Matches with any card
29
The pattern for two pair
Matches with any suit
Matches with any card
Same number with $m
Same number with $n
30
The pattern for two pair
Matches with any suit
Matches with any card
Same number with $m
Same number with $n
Non-linear patterns have very strong power
31
The first application of Egison
Non-linear patterns enables to
represent all hands in a single pattern
32
The first application of Egison
Egisonists can write this
code in 2 minutes!
Non-linear patterns enables to
represent all hands in a single pattern
33
Java version
public static boolean hasPair(Card[] cards) {
for (int i = 0; i <= 4 ;i++) {
for (int j = i + 1 ; j <= 4 ; j++) {
if (cards[i] == (cards[j])) {
return true;
}
return false;
}
}
}
Just finding a pair of cards is already complex.
I found a poker-hand evaluator in Java more than
200 lines of code.
http://www.codeproject.com/Articles/38821/Make-a-poker-hand-evalutator-in-Java
34
More complex example, Mahjong
35
More complex example, Mahjong
Two same tiles
Three consecutive tiles
Three same tiles
36
More complex example, Mahjong
Two same tiles
Three consecutive tiles
Three same tiles
Seven twins or one twin + four shuntsu or kohtsu
37
More complex example, Mahjong
Two same tiles
Three consecutive tiles
Three same tiles
Seven twins or one twin + four shuntsu or kohtsu
Pattern modularization makes
programming more simple!
38
One More Exciting Demonstration
39
Collections
40
Infinite collections
41
Beautiful example on elementary mathematics
Pattern matching against an infinite collection
42
This sample is on the homepage of Egison
43
Egison design policy
Beautiful and Elegant
-> Simple
44
Visions
45
What we will be able to do with Egison
• Access data in new elegant ways
• The most elegant query language
• Able to access lists, sets, graphs, trees or any
other data in a unified way
• Analyze data in new elegant ways
• Provide a way to access various algorithm and
data structures in a unified way
• Implement new interesting applications
e.g.
• Natural language processing, New programming
languages, Mathematical expression handling,
Image processing
46
What we will be able to do with Egison
• Access data in new elegant ways
• The most elegant query language
• Able to access lists, sets, graphs, trees or any
other data in a unified way
• Analyze data in new elegant ways
• Provide a way to access various algorithm and
data structures in a unified way
• Implement new interesting applications
e.g.
• Natural language processing, New programming
languages, Mathematical expression handling,
Image processing
Stage1
Stage2
47
What we will be able to do with Egison
• Access data in new elegant ways
• The most elegant query language
• Able to access lists, sets, graphs, trees or any
other data in a unified way
• Analyze data in new elegant ways
• Provide a way to access various algorithm and
data structures in a unified way
• Implement new interesting applications
e.g.
• Natural language processing, New programming
languages, Mathematical expression handling,
Image processing
Stage1
Stage2
48
Query example
• Query that returns twitter users who are
followed by “__Egi” but not follow back
“__Egi”.
id integer
name string
User:
from_id integer
to_id Integer
Follow:
49
SQL version
• Complex and difficult to understand
• Complex where clause contains “NOT EXIST”
• Subquery
50
Egison version
• Very Simple
• No where clauses
• No subquery
51
Egison version
• Very Simple
• No where clauses
• No subquery
Joining 4 tables
52
Egison version
• Very Simple
• No where clauses
• No subquery
Joining 4 tables
1. Get id of “__Egi”
53
Egison version
• Very Simple
• No where clauses
• No subquery
Joining 4 tables
1. Get id of “__Egi”
2. Followed by ‘uid’
54
Egison version
• Very Simple
• No where clauses
• No subquery
Joining 4 tables
1. Get id of “__Egi”
2. Followed by ‘uid’
3. But not follow backnot
55
Egison version
• Very Simple
• No where clauses
• No subquery
Joining 4 tables
1. Get id of “__Egi”
2. Followed by ‘uid’
3. But not follow backnot
4. Get name of ‘fid’
56
Egison version
• Very Simple
• No where clauses
• No subquery
Joining 4 tables
1. Get id of “__Egi”
2. Followed by ‘uid’
3. But not follow backnot
4. Get name of ‘fid’
Return the results
57
Egison version
• Very Simple
• No where clauses
• No subquery
Joining 4 tables
1. Get id of “__Egi”
2. Followed by ‘uid’
3. But not follow backnot
4. Get name of ‘fid’
Return the results
We can run this query against
data in SQLite!
58
GUI frontend
• We’ll provide GUI for intuitive data access
• Data access for even non-engineers
• Engineers can concentrate on data analysis
Very Easy!
59
What we will be able to do with Egison
• Access data in new elegant ways
• The most elegant query language
• Able to access lists, sets, graphs, trees or any
other data in a unified way
• Analyze data in new elegant ways
• Provide a way to access various algorithm and
data structures in a unified way
• Implement new interesting applications
e.g.
• Natural language processing, New programming
languages, Mathematical expression handling,
Image processing
Stage1
Stage2
60
Database in the next age
In future, databases will be
embedded in programming
languages and hidden.
We will be able to handle
databases directly and
easily as arrays and
hashes in existing
languages.
The pattern-matching of Egison will play a
necessary role for this future.
61
The other funny plans
• Access data in new elegant ways
• The most elegant query language
• Able to access lists, sets, graphs, trees or any
other data in a unified way
• Analyze data in new elegant ways
• Provide a way to access various algorithm and
data structures in a unified way
• Implement new interesting applications
e.g.
• Natural language processing, New programming
languages, Mathematical expression handling,
Image processing
Stage1
Stage2
62
Egison has wide range of applications
• Data mining
• Work as the most elegant query language
• Natural Language Processing
• Enable to handle complex syntax structures
intuitively as humans do in their mind
• New Programming Languages
• Mathematical expression handling
• Enable to handle complex structures easily
• Enable to handle various mathematical notion
directly
Egison is an inevitable and necessary
innovation in the history of computer science
63
The Current Situation
64
Egison website
65
Online demonstrations
66
Installer of Egison and ‘egison-tutorial’
• Egison can be installed on Mac, Windows and Linux.
• We’ve prepared a package for Mac
• Download it from http://www.egison.org
Install me Egison
and please try
‘egison-tutorial’!
Get following commands!
• egison
• egison-tutorial
67
‘egison-tutorial’
You’ll get Egison
easily!
68
‘egison-tutorial’
We can try it
online, too!
69
Next Plans
70
Egison as the programming language
Function modularity
Type system Pattern matching
Egison (current)
Egison next version
Function modularity
Type system Pattern matching
Lisp (before Scheme)
Scheme
ML, OCaml, Haskell
Make Egison the perfect programming language.
71
Extending other languages
• Ruby https://github.com/egison/egison-ruby
• Python (planning)
• Haskell (planning)
72
Poker hands in Ruby
73
Database support
I appreciate your request for support !
We will extend support for high speed data
storages as the backend of Egison.
74
Thank you!
Please visit our website!
http://www.egison.org
Follow us in Twitter @Egison_Lang
Let’s talk and collaborate with us!
satoshi.egi@mail.rakuten.com

Contenu connexe

Tendances

Python programming Part -6
Python programming Part -6Python programming Part -6
Python programming Part -6Megha V
 
Data Structures in Python
Data Structures in PythonData Structures in Python
Data Structures in PythonDevashish Kumar
 
Datastructures in python
Datastructures in pythonDatastructures in python
Datastructures in pythonhydpy
 
Datatypes in python
Datatypes in pythonDatatypes in python
Datatypes in pythoneShikshak
 
Python Datatypes by SujithKumar
Python Datatypes by SujithKumarPython Datatypes by SujithKumar
Python Datatypes by SujithKumarSujith Kumar
 
Arrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | EdurekaArrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | EdurekaEdureka!
 
Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0BG Java EE Course
 
Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Hashing notes data structures (HASHING AND HASH FUNCTIONS)Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Hashing notes data structures (HASHING AND HASH FUNCTIONS)Kuntal Bhowmick
 
High-Performance Haskell
High-Performance HaskellHigh-Performance Haskell
High-Performance HaskellJohan Tibell
 
Data types in python
Data types in pythonData types in python
Data types in pythonRaginiJain21
 
Five Languages in a Moment
Five Languages in a MomentFive Languages in a Moment
Five Languages in a MomentSergio Gil
 
Python strings presentation
Python strings presentationPython strings presentation
Python strings presentationVedaGayathri1
 
Functional Programming by Examples using Haskell
Functional Programming by Examples using HaskellFunctional Programming by Examples using Haskell
Functional Programming by Examples using Haskellgoncharenko
 

Tendances (20)

Python :variable types
Python :variable typesPython :variable types
Python :variable types
 
Python programming Part -6
Python programming Part -6Python programming Part -6
Python programming Part -6
 
Data Structures in Python
Data Structures in PythonData Structures in Python
Data Structures in Python
 
Hashing
HashingHashing
Hashing
 
Datastructures in python
Datastructures in pythonDatastructures in python
Datastructures in python
 
Ds 8
Ds 8Ds 8
Ds 8
 
Datatypes in python
Datatypes in pythonDatatypes in python
Datatypes in python
 
Python Datatypes by SujithKumar
Python Datatypes by SujithKumarPython Datatypes by SujithKumar
Python Datatypes by SujithKumar
 
Arrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | EdurekaArrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | Edureka
 
Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0
 
Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Hashing notes data structures (HASHING AND HASH FUNCTIONS)Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Hashing notes data structures (HASHING AND HASH FUNCTIONS)
 
Python numbers
Python numbersPython numbers
Python numbers
 
Hashing
HashingHashing
Hashing
 
High-Performance Haskell
High-Performance HaskellHigh-Performance Haskell
High-Performance Haskell
 
Standard data-types-in-py
Standard data-types-in-pyStandard data-types-in-py
Standard data-types-in-py
 
Data types in python
Data types in pythonData types in python
Data types in python
 
Python list
Python listPython list
Python list
 
Five Languages in a Moment
Five Languages in a MomentFive Languages in a Moment
Five Languages in a Moment
 
Python strings presentation
Python strings presentationPython strings presentation
Python strings presentation
 
Functional Programming by Examples using Haskell
Functional Programming by Examples using HaskellFunctional Programming by Examples using Haskell
Functional Programming by Examples using Haskell
 

En vedette

[RakutenTechConf2013] [C-4_2] Building Structured Data from Product Descriptions
[RakutenTechConf2013] [C-4_2] Building Structured Data from Product Descriptions[RakutenTechConf2013] [C-4_2] Building Structured Data from Product Descriptions
[RakutenTechConf2013] [C-4_2] Building Structured Data from Product DescriptionsRakuten Group, Inc.
 
E-commerce企業におけるビッグデータ活用の取り組みと今後の展望
E-commerce企業におけるビッグデータ活用の取り組みと今後の展望E-commerce企業におけるビッグデータ活用の取り組みと今後の展望
E-commerce企業におけるビッグデータ活用の取り組みと今後の展望Rakuten Group, Inc.
 
Intelligent Electronic Commerce Service Based on Understanding of User Behaviors
Intelligent Electronic Commerce Service Based on Understanding of User BehaviorsIntelligent Electronic Commerce Service Based on Understanding of User Behaviors
Intelligent Electronic Commerce Service Based on Understanding of User BehaviorsRakuten Group, Inc.
 
[RakutenTechConf2013] [C4-1] Text detection in product images
[RakutenTechConf2013] [C4-1] Text detection in product images[RakutenTechConf2013] [C4-1] Text detection in product images
[RakutenTechConf2013] [C4-1] Text detection in product imagesRakuten Group, Inc.
 
Latent Semantic Transliteration using Dirichlet Mixture
Latent Semantic Transliteration using Dirichlet MixtureLatent Semantic Transliteration using Dirichlet Mixture
Latent Semantic Transliteration using Dirichlet MixtureRakuten Group, Inc.
 
Scaling and High Performance Storage System: LeoFS
Scaling and High Performance Storage System: LeoFSScaling and High Performance Storage System: LeoFS
Scaling and High Performance Storage System: LeoFSRakuten Group, Inc.
 
Latent Class Transliteration based on Source Language Origin
Latent Class Transliteration based on Source Language OriginLatent Class Transliteration based on Source Language Origin
Latent Class Transliteration based on Source Language OriginRakuten Group, Inc.
 
Unsupervised Extraction of Attributes and Their Values from Product Description
Unsupervised Extraction of Attributes and Their Values from Product DescriptionUnsupervised Extraction of Attributes and Their Values from Product Description
Unsupervised Extraction of Attributes and Their Values from Product DescriptionRakuten Group, Inc.
 
[RakutenTechConf2013] [LT] Giving Life to your IDEAS to Survive in Evolving Era
[RakutenTechConf2013] [LT] Giving Life to your IDEAS to Survive in Evolving Era[RakutenTechConf2013] [LT] Giving Life to your IDEAS to Survive in Evolving Era
[RakutenTechConf2013] [LT] Giving Life to your IDEAS to Survive in Evolving EraRakuten Group, Inc.
 
[RakutenTechConf2013] [D-3_2] Counting Big Data by Streaming Algorithms
[RakutenTechConf2013] [D-3_2] Counting Big Databy Streaming Algorithms[RakutenTechConf2013] [D-3_2] Counting Big Databy Streaming Algorithms
[RakutenTechConf2013] [D-3_2] Counting Big Data by Streaming AlgorithmsRakuten Group, Inc.
 
[RakutenTechConf2013][C-4_3] Our Goals and Activities at Rakuten Institute o...
[RakutenTechConf2013][C-4_3] Our Goals and Activities at Rakuten Institute o...[RakutenTechConf2013][C-4_3] Our Goals and Activities at Rakuten Institute o...
[RakutenTechConf2013][C-4_3] Our Goals and Activities at Rakuten Institute o...Rakuten Group, Inc.
 
Purchase prediction by statistical analysis (統計技術を用いた商品購買予測)
Purchase prediction by statistical analysis (統計技術を用いた商品購買予測)Purchase prediction by statistical analysis (統計技術を用いた商品購買予測)
Purchase prediction by statistical analysis (統計技術を用いた商品購買予測)Rakuten Group, Inc.
 

En vedette (12)

[RakutenTechConf2013] [C-4_2] Building Structured Data from Product Descriptions
[RakutenTechConf2013] [C-4_2] Building Structured Data from Product Descriptions[RakutenTechConf2013] [C-4_2] Building Structured Data from Product Descriptions
[RakutenTechConf2013] [C-4_2] Building Structured Data from Product Descriptions
 
E-commerce企業におけるビッグデータ活用の取り組みと今後の展望
E-commerce企業におけるビッグデータ活用の取り組みと今後の展望E-commerce企業におけるビッグデータ活用の取り組みと今後の展望
E-commerce企業におけるビッグデータ活用の取り組みと今後の展望
 
Intelligent Electronic Commerce Service Based on Understanding of User Behaviors
Intelligent Electronic Commerce Service Based on Understanding of User BehaviorsIntelligent Electronic Commerce Service Based on Understanding of User Behaviors
Intelligent Electronic Commerce Service Based on Understanding of User Behaviors
 
[RakutenTechConf2013] [C4-1] Text detection in product images
[RakutenTechConf2013] [C4-1] Text detection in product images[RakutenTechConf2013] [C4-1] Text detection in product images
[RakutenTechConf2013] [C4-1] Text detection in product images
 
Latent Semantic Transliteration using Dirichlet Mixture
Latent Semantic Transliteration using Dirichlet MixtureLatent Semantic Transliteration using Dirichlet Mixture
Latent Semantic Transliteration using Dirichlet Mixture
 
Scaling and High Performance Storage System: LeoFS
Scaling and High Performance Storage System: LeoFSScaling and High Performance Storage System: LeoFS
Scaling and High Performance Storage System: LeoFS
 
Latent Class Transliteration based on Source Language Origin
Latent Class Transliteration based on Source Language OriginLatent Class Transliteration based on Source Language Origin
Latent Class Transliteration based on Source Language Origin
 
Unsupervised Extraction of Attributes and Their Values from Product Description
Unsupervised Extraction of Attributes and Their Values from Product DescriptionUnsupervised Extraction of Attributes and Their Values from Product Description
Unsupervised Extraction of Attributes and Their Values from Product Description
 
[RakutenTechConf2013] [LT] Giving Life to your IDEAS to Survive in Evolving Era
[RakutenTechConf2013] [LT] Giving Life to your IDEAS to Survive in Evolving Era[RakutenTechConf2013] [LT] Giving Life to your IDEAS to Survive in Evolving Era
[RakutenTechConf2013] [LT] Giving Life to your IDEAS to Survive in Evolving Era
 
[RakutenTechConf2013] [D-3_2] Counting Big Data by Streaming Algorithms
[RakutenTechConf2013] [D-3_2] Counting Big Databy Streaming Algorithms[RakutenTechConf2013] [D-3_2] Counting Big Databy Streaming Algorithms
[RakutenTechConf2013] [D-3_2] Counting Big Data by Streaming Algorithms
 
[RakutenTechConf2013][C-4_3] Our Goals and Activities at Rakuten Institute o...
[RakutenTechConf2013][C-4_3] Our Goals and Activities at Rakuten Institute o...[RakutenTechConf2013][C-4_3] Our Goals and Activities at Rakuten Institute o...
[RakutenTechConf2013][C-4_3] Our Goals and Activities at Rakuten Institute o...
 
Purchase prediction by statistical analysis (統計技術を用いた商品購買予測)
Purchase prediction by statistical analysis (統計技術を用いた商品購買予測)Purchase prediction by statistical analysis (統計技術を用いた商品購買予測)
Purchase prediction by statistical analysis (統計技術を用いた商品購買予測)
 

Similaire à The Egison Programming Language

[Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Langua...
[Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Langua...[Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Langua...
[Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Langua...Rakuten Group, Inc.
 
Introduction to Elixir
Introduction to ElixirIntroduction to Elixir
Introduction to ElixirDiacode
 
Implementing Conceptual Search in Solr using LSA and Word2Vec: Presented by S...
Implementing Conceptual Search in Solr using LSA and Word2Vec: Presented by S...Implementing Conceptual Search in Solr using LSA and Word2Vec: Presented by S...
Implementing Conceptual Search in Solr using LSA and Word2Vec: Presented by S...Lucidworks
 
Programming in python Unit-1 Part-1
Programming in python Unit-1 Part-1Programming in python Unit-1 Part-1
Programming in python Unit-1 Part-1Vikram Nandini
 
MATLAB - The Need to Know Basics
MATLAB - The Need to Know BasicsMATLAB - The Need to Know Basics
MATLAB - The Need to Know BasicsSTEM Course Prep
 
Class[3][5th jun] [three js]
Class[3][5th jun] [three js]Class[3][5th jun] [three js]
Class[3][5th jun] [three js]Saajid Akram
 
NLP Bootcamp 2018 : Representation Learning of text for NLP
NLP Bootcamp 2018 : Representation Learning of text for NLPNLP Bootcamp 2018 : Representation Learning of text for NLP
NLP Bootcamp 2018 : Representation Learning of text for NLPAnuj Gupta
 
Scratch for intermediates course
Scratch for intermediates courseScratch for intermediates course
Scratch for intermediates courseMatthew Parry
 
Hub102 - JS - Lesson3
Hub102 - JS - Lesson3Hub102 - JS - Lesson3
Hub102 - JS - Lesson3Tiểu Hổ
 
Data structure and algorithm.
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm. Abdul salam
 
Data Structures 2007
Data Structures 2007Data Structures 2007
Data Structures 2007Sanjay Goel
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#Hawkman Academy
 
The Ring programming language version 1.10 book - Part 7 of 212
The Ring programming language version 1.10 book - Part 7 of 212The Ring programming language version 1.10 book - Part 7 of 212
The Ring programming language version 1.10 book - Part 7 of 212Mahmoud Samir Fayed
 

Similaire à The Egison Programming Language (20)

[Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Langua...
[Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Langua...[Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Langua...
[Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Langua...
 
Ruby Egison
Ruby EgisonRuby Egison
Ruby Egison
 
Introduction to Elixir
Introduction to ElixirIntroduction to Elixir
Introduction to Elixir
 
Implementing Conceptual Search in Solr using LSA and Word2Vec: Presented by S...
Implementing Conceptual Search in Solr using LSA and Word2Vec: Presented by S...Implementing Conceptual Search in Solr using LSA and Word2Vec: Presented by S...
Implementing Conceptual Search in Solr using LSA and Word2Vec: Presented by S...
 
Programming in python Unit-1 Part-1
Programming in python Unit-1 Part-1Programming in python Unit-1 Part-1
Programming in python Unit-1 Part-1
 
MATLAB - The Need to Know Basics
MATLAB - The Need to Know BasicsMATLAB - The Need to Know Basics
MATLAB - The Need to Know Basics
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Class[3][5th jun] [three js]
Class[3][5th jun] [three js]Class[3][5th jun] [three js]
Class[3][5th jun] [three js]
 
NLP Bootcamp 2018 : Representation Learning of text for NLP
NLP Bootcamp 2018 : Representation Learning of text for NLPNLP Bootcamp 2018 : Representation Learning of text for NLP
NLP Bootcamp 2018 : Representation Learning of text for NLP
 
Scratch for intermediates course
Scratch for intermediates courseScratch for intermediates course
Scratch for intermediates course
 
FULL DOCUMENT.docx
FULL DOCUMENT.docxFULL DOCUMENT.docx
FULL DOCUMENT.docx
 
Hub102 - JS - Lesson3
Hub102 - JS - Lesson3Hub102 - JS - Lesson3
Hub102 - JS - Lesson3
 
Lecture 1 (bce-7)
Lecture   1 (bce-7)Lecture   1 (bce-7)
Lecture 1 (bce-7)
 
Data structure and algorithm.
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm.
 
Data Structures 2007
Data Structures 2007Data Structures 2007
Data Structures 2007
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#
 
Apex code (Salesforce)
Apex code (Salesforce)Apex code (Salesforce)
Apex code (Salesforce)
 
Google code search
Google code searchGoogle code search
Google code search
 
NLP Bootcamp
NLP BootcampNLP Bootcamp
NLP Bootcamp
 
The Ring programming language version 1.10 book - Part 7 of 212
The Ring programming language version 1.10 book - Part 7 of 212The Ring programming language version 1.10 book - Part 7 of 212
The Ring programming language version 1.10 book - Part 7 of 212
 

Plus de Rakuten Group, Inc.

コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話Rakuten Group, Inc.
 
楽天における安全な秘匿情報管理への道のり
楽天における安全な秘匿情報管理への道のり楽天における安全な秘匿情報管理への道のり
楽天における安全な秘匿情報管理への道のりRakuten Group, Inc.
 
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...Rakuten Group, Inc.
 
DataSkillCultureを浸透させる楽天の取り組み
DataSkillCultureを浸透させる楽天の取り組みDataSkillCultureを浸透させる楽天の取り組み
DataSkillCultureを浸透させる楽天の取り組みRakuten Group, Inc.
 
大規模なリアルタイム監視の導入と展開
大規模なリアルタイム監視の導入と展開大規模なリアルタイム監視の導入と展開
大規模なリアルタイム監視の導入と展開Rakuten Group, Inc.
 
楽天における大規模データベースの運用
楽天における大規模データベースの運用楽天における大規模データベースの運用
楽天における大規模データベースの運用Rakuten Group, Inc.
 
楽天サービスを支えるネットワークインフラストラクチャー
楽天サービスを支えるネットワークインフラストラクチャー楽天サービスを支えるネットワークインフラストラクチャー
楽天サービスを支えるネットワークインフラストラクチャーRakuten Group, Inc.
 
楽天の規模とクラウドプラットフォーム統括部の役割
楽天の規模とクラウドプラットフォーム統括部の役割楽天の規模とクラウドプラットフォーム統括部の役割
楽天の規模とクラウドプラットフォーム統括部の役割Rakuten Group, Inc.
 
Rakuten Services and Infrastructure Team.pdf
Rakuten Services and Infrastructure Team.pdfRakuten Services and Infrastructure Team.pdf
Rakuten Services and Infrastructure Team.pdfRakuten Group, Inc.
 
The Data Platform Administration Handling the 100 PB.pdf
The Data Platform Administration Handling the 100 PB.pdfThe Data Platform Administration Handling the 100 PB.pdf
The Data Platform Administration Handling the 100 PB.pdfRakuten Group, Inc.
 
Supporting Internal Customers as Technical Account Managers.pdf
Supporting Internal Customers as Technical Account Managers.pdfSupporting Internal Customers as Technical Account Managers.pdf
Supporting Internal Customers as Technical Account Managers.pdfRakuten Group, Inc.
 
Making Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdfMaking Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdfRakuten Group, Inc.
 
How We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdfHow We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdfRakuten Group, Inc.
 
Travel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech infoTravel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech infoRakuten Group, Inc.
 
Travel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech infoTravel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech infoRakuten Group, Inc.
 
Introduction of GORA API Group technology
Introduction of GORA API Group technologyIntroduction of GORA API Group technology
Introduction of GORA API Group technologyRakuten Group, Inc.
 
100PBを越えるデータプラットフォームの実情
100PBを越えるデータプラットフォームの実情100PBを越えるデータプラットフォームの実情
100PBを越えるデータプラットフォームの実情Rakuten Group, Inc.
 
社内エンジニアを支えるテクニカルアカウントマネージャー
社内エンジニアを支えるテクニカルアカウントマネージャー社内エンジニアを支えるテクニカルアカウントマネージャー
社内エンジニアを支えるテクニカルアカウントマネージャーRakuten Group, Inc.
 

Plus de Rakuten Group, Inc. (20)

コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
 
楽天における安全な秘匿情報管理への道のり
楽天における安全な秘匿情報管理への道のり楽天における安全な秘匿情報管理への道のり
楽天における安全な秘匿情報管理への道のり
 
What Makes Software Green?
What Makes Software Green?What Makes Software Green?
What Makes Software Green?
 
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...
 
DataSkillCultureを浸透させる楽天の取り組み
DataSkillCultureを浸透させる楽天の取り組みDataSkillCultureを浸透させる楽天の取り組み
DataSkillCultureを浸透させる楽天の取り組み
 
大規模なリアルタイム監視の導入と展開
大規模なリアルタイム監視の導入と展開大規模なリアルタイム監視の導入と展開
大規模なリアルタイム監視の導入と展開
 
楽天における大規模データベースの運用
楽天における大規模データベースの運用楽天における大規模データベースの運用
楽天における大規模データベースの運用
 
楽天サービスを支えるネットワークインフラストラクチャー
楽天サービスを支えるネットワークインフラストラクチャー楽天サービスを支えるネットワークインフラストラクチャー
楽天サービスを支えるネットワークインフラストラクチャー
 
楽天の規模とクラウドプラットフォーム統括部の役割
楽天の規模とクラウドプラットフォーム統括部の役割楽天の規模とクラウドプラットフォーム統括部の役割
楽天の規模とクラウドプラットフォーム統括部の役割
 
Rakuten Services and Infrastructure Team.pdf
Rakuten Services and Infrastructure Team.pdfRakuten Services and Infrastructure Team.pdf
Rakuten Services and Infrastructure Team.pdf
 
The Data Platform Administration Handling the 100 PB.pdf
The Data Platform Administration Handling the 100 PB.pdfThe Data Platform Administration Handling the 100 PB.pdf
The Data Platform Administration Handling the 100 PB.pdf
 
Supporting Internal Customers as Technical Account Managers.pdf
Supporting Internal Customers as Technical Account Managers.pdfSupporting Internal Customers as Technical Account Managers.pdf
Supporting Internal Customers as Technical Account Managers.pdf
 
Making Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdfMaking Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdf
 
How We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdfHow We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdf
 
Travel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech infoTravel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech info
 
Travel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech infoTravel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech info
 
OWASPTop10_Introduction
OWASPTop10_IntroductionOWASPTop10_Introduction
OWASPTop10_Introduction
 
Introduction of GORA API Group technology
Introduction of GORA API Group technologyIntroduction of GORA API Group technology
Introduction of GORA API Group technology
 
100PBを越えるデータプラットフォームの実情
100PBを越えるデータプラットフォームの実情100PBを越えるデータプラットフォームの実情
100PBを越えるデータプラットフォームの実情
 
社内エンジニアを支えるテクニカルアカウントマネージャー
社内エンジニアを支えるテクニカルアカウントマネージャー社内エンジニアを支えるテクニカルアカウントマネージャー
社内エンジニアを支えるテクニカルアカウントマネージャー
 

Dernier

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

The Egison Programming Language

  • 1. The Egison Programming Language Vol.01 Mar/28/2014 Satoshi Egi Rakuten Institute of Technology http://rit.rakuten.co.jp/
  • 2. 2 Profile of Egison Paradigm Pattern-matching-oriented, Pure functional Author Satoshi Egi License MIT Version 3.3.4 (2014/03/28) First Released 2011/5/24 Filename Extension .egi Implemented in Haskell (about 3,400 lines) Egison is the programming language I’ve created.
  • 3. 3 Motivation I’d like to create a programming language that directly represents human’s intuition. Function modularity Type system Pattern matching Egison (current) Egison next version Function modularity Type system Pattern matching Lisp (before Scheme) Scheme ML, OCaml, Haskell
  • 4. 4 Egison in one minute Egison is the world's first programming language that realized non-linear pattern-matching with backtracking. (match-all xs (multiset integer) [<cons $x <cons ,x _>> x]) Egison Enumerate the elements of the collection ‘xs’ that appear more than twice pairs = [] (1..n).each do |i| (i..n).each do |j| if xs[i] == xs[j] pair = xs[i] end end end Ruby
  • 6. 6 The ‘match-all’ expression Target Matcher Pattern Expression executed when pattern matching succeed Result Meaning: Pattern match against the “target” as the “matcher” with the “pattern” and return all results of pattern matching.
  • 7. 7 The ‘match-all’ expression Target Pattern-match against the target data {1 1 2 3 2}
  • 8. 8 The ‘match-all’ expression MatcherTarget Pattern-match against the target data {1 1 2 3 2} as the multiset of integers
  • 9. 9 The ‘match-all’ expression Target Matcher Pattern Pattern-match against the target data {1 1 2 3 2} as the multiset of integers with the pattern <cons $x <cons ,x _>>
  • 10. 10 The ‘match-all’ expression Target Matcher Pattern Expression executed when pattern matching succeed Pattern-match against the target data {1 1 2 3 2} as the multiset of integers with the pattern <cons $x <cons ,x _>> and return the value bound to x.
  • 11. 11 The ‘match-all’ expression Target Matcher Pattern Expression executed when pattern matching succeed Result Pattern-match against the target data {1 1 2 3 2} as the multiset of integers with the pattern <cons $x <cons ,x _>> and return the value bound to x.
  • 12. 12 The ‘cons’ pattern constructor Divide a collection into an element and a collection of rest of elements.
  • 13. 13 The ‘cons’ pattern constructor The meaning of ‘cons’ changes for each matcher Divide a collection into an element and a collection of rest of elements.
  • 14. 14 The nested ‘cons’ pattern constructor Extracting two elements using the ‘cons’ patterns.
  • 15. 15 Non-linear patterns Elements that appear twice Two same head elements We can deal with the multiple occurrences of the same variables in a pattern.
  • 16. 16 The ‘join’ pattern constructor Divide a collection into two collections.
  • 17. 17 Playing with the ‘join’ pattern constructor Enumerate all two combination of elements.
  • 20. 20 The first application of Egison Match as a set of cards
  • 21. 21 The first application of Egison Pattern for straight flash
  • 22. 22 The pattern for straight flush
  • 23. 23 The pattern for straight flush Same suit with $s
  • 24. 24 The pattern for straight flush Same suit with $s Numbers are serial from $n
  • 25. 25 The pattern for straight flush Same suit with $s Numbers are serial from $n We can write any expression after ‘,’
  • 26. 26 The first application of Egison Pattern for two pair
  • 27. 27 The pattern for two pair
  • 28. 28 The pattern for two pair Matches with any suit Matches with any card
  • 29. 29 The pattern for two pair Matches with any suit Matches with any card Same number with $m Same number with $n
  • 30. 30 The pattern for two pair Matches with any suit Matches with any card Same number with $m Same number with $n Non-linear patterns have very strong power
  • 31. 31 The first application of Egison Non-linear patterns enables to represent all hands in a single pattern
  • 32. 32 The first application of Egison Egisonists can write this code in 2 minutes! Non-linear patterns enables to represent all hands in a single pattern
  • 33. 33 Java version public static boolean hasPair(Card[] cards) { for (int i = 0; i <= 4 ;i++) { for (int j = i + 1 ; j <= 4 ; j++) { if (cards[i] == (cards[j])) { return true; } return false; } } } Just finding a pair of cards is already complex. I found a poker-hand evaluator in Java more than 200 lines of code. http://www.codeproject.com/Articles/38821/Make-a-poker-hand-evalutator-in-Java
  • 35. 35 More complex example, Mahjong Two same tiles Three consecutive tiles Three same tiles
  • 36. 36 More complex example, Mahjong Two same tiles Three consecutive tiles Three same tiles Seven twins or one twin + four shuntsu or kohtsu
  • 37. 37 More complex example, Mahjong Two same tiles Three consecutive tiles Three same tiles Seven twins or one twin + four shuntsu or kohtsu Pattern modularization makes programming more simple!
  • 38. 38 One More Exciting Demonstration
  • 41. 41 Beautiful example on elementary mathematics Pattern matching against an infinite collection
  • 42. 42 This sample is on the homepage of Egison
  • 43. 43 Egison design policy Beautiful and Elegant -> Simple
  • 45. 45 What we will be able to do with Egison • Access data in new elegant ways • The most elegant query language • Able to access lists, sets, graphs, trees or any other data in a unified way • Analyze data in new elegant ways • Provide a way to access various algorithm and data structures in a unified way • Implement new interesting applications e.g. • Natural language processing, New programming languages, Mathematical expression handling, Image processing
  • 46. 46 What we will be able to do with Egison • Access data in new elegant ways • The most elegant query language • Able to access lists, sets, graphs, trees or any other data in a unified way • Analyze data in new elegant ways • Provide a way to access various algorithm and data structures in a unified way • Implement new interesting applications e.g. • Natural language processing, New programming languages, Mathematical expression handling, Image processing Stage1 Stage2
  • 47. 47 What we will be able to do with Egison • Access data in new elegant ways • The most elegant query language • Able to access lists, sets, graphs, trees or any other data in a unified way • Analyze data in new elegant ways • Provide a way to access various algorithm and data structures in a unified way • Implement new interesting applications e.g. • Natural language processing, New programming languages, Mathematical expression handling, Image processing Stage1 Stage2
  • 48. 48 Query example • Query that returns twitter users who are followed by “__Egi” but not follow back “__Egi”. id integer name string User: from_id integer to_id Integer Follow:
  • 49. 49 SQL version • Complex and difficult to understand • Complex where clause contains “NOT EXIST” • Subquery
  • 50. 50 Egison version • Very Simple • No where clauses • No subquery
  • 51. 51 Egison version • Very Simple • No where clauses • No subquery Joining 4 tables
  • 52. 52 Egison version • Very Simple • No where clauses • No subquery Joining 4 tables 1. Get id of “__Egi”
  • 53. 53 Egison version • Very Simple • No where clauses • No subquery Joining 4 tables 1. Get id of “__Egi” 2. Followed by ‘uid’
  • 54. 54 Egison version • Very Simple • No where clauses • No subquery Joining 4 tables 1. Get id of “__Egi” 2. Followed by ‘uid’ 3. But not follow backnot
  • 55. 55 Egison version • Very Simple • No where clauses • No subquery Joining 4 tables 1. Get id of “__Egi” 2. Followed by ‘uid’ 3. But not follow backnot 4. Get name of ‘fid’
  • 56. 56 Egison version • Very Simple • No where clauses • No subquery Joining 4 tables 1. Get id of “__Egi” 2. Followed by ‘uid’ 3. But not follow backnot 4. Get name of ‘fid’ Return the results
  • 57. 57 Egison version • Very Simple • No where clauses • No subquery Joining 4 tables 1. Get id of “__Egi” 2. Followed by ‘uid’ 3. But not follow backnot 4. Get name of ‘fid’ Return the results We can run this query against data in SQLite!
  • 58. 58 GUI frontend • We’ll provide GUI for intuitive data access • Data access for even non-engineers • Engineers can concentrate on data analysis Very Easy!
  • 59. 59 What we will be able to do with Egison • Access data in new elegant ways • The most elegant query language • Able to access lists, sets, graphs, trees or any other data in a unified way • Analyze data in new elegant ways • Provide a way to access various algorithm and data structures in a unified way • Implement new interesting applications e.g. • Natural language processing, New programming languages, Mathematical expression handling, Image processing Stage1 Stage2
  • 60. 60 Database in the next age In future, databases will be embedded in programming languages and hidden. We will be able to handle databases directly and easily as arrays and hashes in existing languages. The pattern-matching of Egison will play a necessary role for this future.
  • 61. 61 The other funny plans • Access data in new elegant ways • The most elegant query language • Able to access lists, sets, graphs, trees or any other data in a unified way • Analyze data in new elegant ways • Provide a way to access various algorithm and data structures in a unified way • Implement new interesting applications e.g. • Natural language processing, New programming languages, Mathematical expression handling, Image processing Stage1 Stage2
  • 62. 62 Egison has wide range of applications • Data mining • Work as the most elegant query language • Natural Language Processing • Enable to handle complex syntax structures intuitively as humans do in their mind • New Programming Languages • Mathematical expression handling • Enable to handle complex structures easily • Enable to handle various mathematical notion directly Egison is an inevitable and necessary innovation in the history of computer science
  • 66. 66 Installer of Egison and ‘egison-tutorial’ • Egison can be installed on Mac, Windows and Linux. • We’ve prepared a package for Mac • Download it from http://www.egison.org Install me Egison and please try ‘egison-tutorial’! Get following commands! • egison • egison-tutorial
  • 70. 70 Egison as the programming language Function modularity Type system Pattern matching Egison (current) Egison next version Function modularity Type system Pattern matching Lisp (before Scheme) Scheme ML, OCaml, Haskell Make Egison the perfect programming language.
  • 71. 71 Extending other languages • Ruby https://github.com/egison/egison-ruby • Python (planning) • Haskell (planning)
  • 73. 73 Database support I appreciate your request for support ! We will extend support for high speed data storages as the backend of Egison.
  • 74. 74 Thank you! Please visit our website! http://www.egison.org Follow us in Twitter @Egison_Lang Let’s talk and collaborate with us! satoshi.egi@mail.rakuten.com