![Page 1: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/1.jpg)
The Pattern-Matching-Oriented Programming Language Egison
Vol.01 Oct/25/2014 Satoshi Egi Rakuten Institute of Technology http://rit.rakuten.co.jp/
- Express Intuition Directly with Essentially New Syntax -
![Page 2: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/2.jpg)
2
Self-Introduction
Name Satoshi Egi (江木 聡志)
Association Rakuten Institute of Technology (楽天技術研究所)
Education Majored in Computer Science at the University of Tokyo
Interests Programming Languages, Automated Reasoning
Website http://www.egison.org/~egi/
![Page 3: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/3.jpg)
3
What is Egison?
Egison is a programming language that realizes non-linear pattern-matching even against data that have no standard form.
(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] ! pairs = pairs + ! xs[i] ! end ! end !end !
Ruby
Non-linear patterns allow multiple occurrences of same variables in a pattern
![Page 4: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/4.jpg)
4
Demonstration: Poker Hands
![Page 5: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/5.jpg)
5
Demonstration: Mahjong
Two same tiles
Three consecutive tiles
Three same tiles
Seven twins or one twin + four shuntsu or kohtsu
![Page 6: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/6.jpg)
6
Demonstration: Prime Numbers
![Page 7: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/7.jpg)
7
Motivation I have created Egison to represent human’s intuition directly.
The word “intuitive” is often used in the meaning “easy to understand”. However intuition itself is not “intuitive” at all. Therefore, the direct representation of intuition is not easy for many people to understand at the beginning.
「直感的」という言葉は「わかりやすい」という意味で使われることが多いですが、直感自体は全く「直感的」なものではありません。それゆえに、直感の直接的な表現は多くの人にとって、最初はわかりやすくありません。
![Page 8: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/8.jpg)
8
Motivation I have created Egison to represent human’s intuition directly.
There are cases that we still need to translate our thoughts for computers. By discovering such cases, analyzing our intuition, and finding their direct representation, I have created a new programming language Egison.
人間の考えをコンピュータ向けに翻訳して記述せねばならない場面は未だにあります。そのような場面を見つけ、自身の直感を分析し、その直接的な表現を見出すことにより、私は新しいプログラミング言語Egisonを作るに至りました。
![Page 9: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/9.jpg)
9
Profile of Egison
Paradigm Pattern-matching-oriented, Purely functional
Author Satoshi Egi
License MIT
Version 3.3.12 (2014/10/25)
First Released 2011/5/24
Filename Extension .egi
Implemented in Haskell (about 3,800 lines)
Egison is open-source software maintained on GitHub. https://github.com/egison/egison
![Page 10: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/10.jpg)
10
Website – Everything about Egison is Here
![Page 11: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/11.jpg)
11
1. Concept of Egison (15 minutes) 2. Play with Egison (5 minutes) 3. Current Status (5 minutes) 4. Future Plan (5 minutes)
Table of Contents
![Page 12: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/12.jpg)
12
The Concept of Egison
![Page 13: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/13.jpg)
13
The ‘match-all’ Expression
Meaning: Pattern match against “{1 2 3}” as a “list of integers” with the pattern “<cons $x $xs>” and return all results of pattern matching.
![Page 14: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/14.jpg)
14
Matchers A matcher specifies the way of pattern-matching.
![Page 15: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/15.jpg)
15
Matchers A matcher specifies the way of pattern-matching.
![Page 16: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/16.jpg)
16
The ‘cons’ Pattern The pattern constructor ‘cons’ divides a collection into an element and the rest.
![Page 17: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/17.jpg)
17
The ‘cons’ Pattern The pattern constructor ‘cons’ divides a collection into an element and the rest.
![Page 18: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/18.jpg)
18
Pattern-Matching with Multiple Results
We can handle pattern-matching with multiple results.
![Page 19: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/19.jpg)
19
The Nested ‘cons’ Pattern
We can extract two elements from a collection with the nested cons pattern.
![Page 20: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/20.jpg)
20
The ‘join’ Pattern
The pattern constructor ‘join’ divides a collection into two collections.
![Page 21: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/21.jpg)
21
Non-Linear Patterns
Patterns that have ‘,’ ahead are called value-patterns. The equality is checked for a value-pattern.
![Page 22: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/22.jpg)
22
Non-Linear Patterns
Patterns that have ‘,’ ahead are called value-patterns. The equality is checked for a value-pattern.
Same number with $x
![Page 23: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/23.jpg)
23
Demonstration: Poker Hands
![Page 24: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/24.jpg)
24
Demonstration: Poker Hands
Pattern for straight flash
![Page 25: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/25.jpg)
25
Demonstration: Poker Hands
Match as a set of cards
Pattern for straight flash
![Page 26: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/26.jpg)
26
The Pattern for Straight Flush
![Page 27: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/27.jpg)
27
The Pattern for Straight Flush
Same suit with $s
![Page 28: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/28.jpg)
28
The Pattern for Straight Flush
Same suit with $s
Numbers are serial from $n
![Page 29: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/29.jpg)
29
The Pattern for Straight Flush
Same suit with $s
Numbers are serial from $n
We can write any expression after ‘,’
![Page 30: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/30.jpg)
30
Demonstration: Poker Hands
Pattern for two pair
![Page 31: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/31.jpg)
31
The Pattern for Two Pair
![Page 32: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/32.jpg)
32
The Pattern for Two Pair
Matches with any suit
Matches with any card
![Page 33: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/33.jpg)
33
The Pattern for Two Pair
Matches with any suit
Matches with any card
Same number with $m
Same number with $n
![Page 34: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/34.jpg)
34
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
![Page 35: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/35.jpg)
35
Demonstration: Poker Hands
Non-linear patterns enables to represent all hands in a single pattern
![Page 36: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/36.jpg)
36
Demonstration: Poker Hands
Egisonists can write this code in 2 minutes!
Non-linear patterns enables to represent all hands in a single pattern
![Page 37: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/37.jpg)
37
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
![Page 38: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/38.jpg)
38
Pattern-Matching with Infinite Results
We can handle pattern-matching with infinite results.
![Page 39: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/39.jpg)
39
Demonstration: Prime Numbers
![Page 40: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/40.jpg)
40
Pattern-Matching against Nested Data Types
We can pattern-match against nested data types such as lists of sets and sets and sets.
![Page 41: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/41.jpg)
41
Pattern Modularization with Lexical Scope
We can modularize patterns with pattern-functions, functions that receive patterns and return a pattern.
![Page 42: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/42.jpg)
42
Pattern Modularization with Lexical Scope
A pattern-function has lexical scoping, patterns can be reused in a program without worry of name clash.
![Page 43: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/43.jpg)
43
Demonstration: Mahjong
![Page 44: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/44.jpg)
44
Demonstration: Mahjong
Two same tiles
Three consecutive tiles
Three same tiles
![Page 45: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/45.jpg)
45
Demonstration: Mahjong
Two same tiles
Three consecutive tiles
Three same tiles
Seven twins or one twin + four shuntsu or kohtsu
![Page 46: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/46.jpg)
46
Demonstration: 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!
![Page 47: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/47.jpg)
47
Play with Egison
![Page 48: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/48.jpg)
48
Collections
![Page 49: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/49.jpg)
49
Infinite Collections
![Page 50: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/50.jpg)
50
Pattern Matching against Infinite Collections
Pattern matching against an infinite collection
![Page 51: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/51.jpg)
51
Twin Prime Code on Homepage of Egison
![Page 52: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/52.jpg)
52
Current Status
![Page 53: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/53.jpg)
53
Egison Website
![Page 54: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/54.jpg)
54
Online Tutorial
![Page 55: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/55.jpg)
55
Online Demonstrations
![Page 56: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/56.jpg)
56
Egison on an Online Media
![Page 57: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/57.jpg)
57
Egison on Hacker News
Egison was actively discussed on Hacker News twice!
![Page 58: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/58.jpg)
58
Egison Article on CodeIQ MAGAZINE
![Page 59: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/59.jpg)
59
Egison will be Taught at the University of Tokyo by Prof. Hagiya
Egison will have a big impact on the academic world, too!
![Page 60: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/60.jpg)
60
Access Map of the Website in Last Half Year (2014/4/23 – 2014/10/23)
Total session is 15,228
![Page 61: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/61.jpg)
61
Growth of Community in This Year (2013/11/15 – 2014/10/25)
• Mailing List Members • Before: 12 – Only my friends • Current: 23 – Communicating in English
• Stargazers on GitHub • Before: 12 – Only my friends • Current: 242 – People from all over the world!
![Page 62: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/62.jpg)
62
Extending Other Languages
![Page 63: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/63.jpg)
63
Poker Hands Analyzer in Ruby
![Page 64: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/64.jpg)
64
Public Response to Ruby Extension
10,466 views, 186 Hatena Bookmarks!
![Page 65: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/65.jpg)
65
RubyKaigi 2014
Recently presented at RubyKaigi 2014!
![Page 66: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/66.jpg)
66
Future Plans - Applications in the Real World -
![Page 67: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/67.jpg)
67
Wide Range of Applications
• Daily programming • Can express complex tasks simply
• Data access and analysis • Work as the most elegant query language • Can access the wide range of data types in a
unified way • Natural language processing, Image
processing • Can handle complex structures intuitively as
humans do in their mind • AI (Mathematical expression handling)
• Can handle various mathematical and abstract notions directly
![Page 68: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/68.jpg)
68
Wide Range of Applications
• Daily programming • Can express complex tasks simply
• Data access and analysis • Work as the most elegant query language • Can access the wide range of data types in a
unified way • Natural language processing, Image
processing • Can handle complex structures intuitively as
humans do in their mind • AI (Mathematical expression handling)
• Can handle various mathematical and abstract notions directly
![Page 69: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/69.jpg)
69
Ideas of Software
• Command line text editor • Command line text editor that uses Egison
pattern-matching instead of regular expressions • Chart analytics tool
• Find patterns in charts (e.g. technical analysis of the financial markets)
• In-memory database with Egison query • Can access the wide range of data types in a
unified way • SQL database client
• Extract data using simple pattern-matching expressions instead of SQL
![Page 70: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/70.jpg)
70
Wide Range of Applications
• Daily programming • Can express complex tasks simply
• Data access and analysis • Work as the most elegant query language • Can access the wide range of data types in a
unified way • Natural language processing, Image
processing • Can handle complex structures intuitively as
humans do in their mind • AI (Mathematical expression handling)
• Can handle various mathematical and abstract notions directly
![Page 71: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/71.jpg)
71
Query Example
• Let’s consider a 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:
![Page 72: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/72.jpg)
72
SQL Version
• Complex and difficult to understand • Complex where clause contains “NOT EXIST” • Subquery
![Page 73: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/73.jpg)
73
Egison Version
• Very Simple • No where clauses • No subquery
![Page 74: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/74.jpg)
74
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 back not 4. Get name of ‘fid’ Return the results
![Page 75: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/75.jpg)
75
GUI Frontend
• We can provide GUI for intuitive data access • Data access for even non-engineers • Engineers can concentrate on data analysis
![Page 76: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/76.jpg)
76
Database in the Next Age
In the future, databases will be embedded and hidden in programming languages.
We will be able to handle databases directly and easily just as arrays and hashes in existing languages.
The pattern-matching of Egison will play a critical role for this future.
![Page 77: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/77.jpg)
77
Wide Range of Applications
• Daily programming • Can express complex tasks simply
• Data access and analysis • Work as the most elegant query language • Can access the wide range of data types in a
unified way • Natural language processing, Image
processing • Can handle complex structures intuitively as
humans do in their mind • AI (Mathematical expression handling)
• Can handle various mathematical and abstract notions directly
![Page 78: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/78.jpg)
78
Wide Range of Applications
• Daily programming • Can express complex tasks simply
• Data access and analysis • Work as the most elegant query language • Can access the wide range of data types in a
unified way • Natural language processing
• Can handle complex structures intuitively as humans do in their mind
• AI (Mathematical expression handling) • Can handle various mathematical and abstract
notions directly
• Programs that find interesting things • Programs that build math theories • Programs that generate programs
![Page 79: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/79.jpg)
79
My Mind Map on Programming Language
![Page 80: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/80.jpg)
80
My Mind Map on Programming Language
![Page 81: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/81.jpg)
81
My Mind Map on Programming Language
Egison is pioneering this field!
![Page 82: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/82.jpg)
82
Improve 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
I am aiming to make Egison the perfect programming language.
![Page 83: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/83.jpg)
83
Improve 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
I am aiming to make Egison the perfect programming language.
![Page 84: [Rakuten TechConf2014] [D-2] The Pattern-Matching-Oriented Programming Language Egison](https://reader034.vdocument.in/reader034/viewer/2022052622/5595a0831a28ab05448b4682/html5/thumbnails/84.jpg)
84
Thank you!
Please visit our website! http://www.egison.org
Follow us in Twitter @Egison_Lang
Let’s talk and collaborate with us! [email protected]