egi
egi on Hacker News
Which syntax sugar do you think verbose? I don't think Egison has lots of syntax sugar.
Egison features a customizable pattern-matching facility.
Pattern-matching methods for each data type and pattern can be customizable by users.
There might be a possibility that you thought syntax sugar is not syntax sugar.
Thank you for your comment!
I started to implement a computer algebra system as a killer application of customizable pattern matching of Egison.
It allows users to customize the pattern-method for mathematical expressions from more primitive level than the other computer algebra systems.
Which syntax sugar do you think verbose?
I don't think Egison has lots of syntax sugar.
The calculus for differential forms is a part of Geometric algebra, so I think there is a relation.
Egison's strong point is it can handle tensor-valued p-forms due to its ability to handle both of tensor index notation and differential forms at the same time.
Thank you for your interest!
Here is a link for a new paper that discusses the integration of tensor index notation including the support for differential forms.
https://arxiv.org/abs/1804.03140
Thank you for your comment!
The power of Egison's pattern matching becomes more obvious when we consider more general pattern such as (p, p+ 100) not only (p, p+2).
We can write the first 5 prime pairs whose form is (p, p+100) with a small modification for pattern matching for twin primes.
(take 5
(match-all primes (list integer)
[<join _ <cons $p <join _ <cons ,(+ p 100) _>>>>
[p (+ p 100)]]))
;=>{[3 103] [7 107] [13 113] [31 131] [37 137]}
Posted by
egi on Thursday July 31, 2014 @11:55AM
from the show-hn dept.
I wrote my answer.
1- I'm sorry but I don't know materials for the baby steps to implement pattern matching. However, I think it is not so difficult to compile ordinary pattern matching expression into many nested if expressions, if you have a small language you can manage completely.
2- I think difficulty to implement a pattern matching mechanism is not different for each language.
I think writing a parser may be the hardest work.
By the way, I forgot to paste URL for my interpreter I wrote in the past.
https://github.com/egisatoshi/scheme-meta-interpreter/blob/m...
Lisp is easy to write a parser, and it's because I recommended lisp.
I'm sorry but I think if you would like to implement a language not only use it, it would be better to learn lisp at first.
It is very easy to implement lisp on lisp and modify it as you like.
This is an scheme interpreter I wrote in scheme.
It's extremely short compared with other language.
There are many good textbooks, too.
http://www.scheme.com/tspl4/
Thank you for letting me to know about this issue.
I noticed this problem for the first time.
Our implementation of lazy evaluation is not straight wrap of Haskell.
I'll look into about this.
Why do you think so?
I've created Egison not for text processing, but I think text processing is important application of pattern matching and I'd like to do work for that in future.
If you install egison on your machine, ctrl-c should work on your machine. However, ctrl-c does not work online egison currently.
At first, I tried to extend the existing language.
However, it was difficult because implementation of the Egison pattern-matching has big influence for whole design of a programming language.
I wrote answers for this question and other frequently asked questions on our website.
Please check it too.
http://www.egison.org/faq.html#why-new-language
Thanks! I've fixed that just now.
What you wrote is what I wanted to write.
We call the Egison command on the server limiting code with side-effects via an API server implemeted in Ruby.
All source code on Egison including its website is on GitHub.
Please check them, too.
https://github.com/egison
I’m not planning a javascript extension for now, though I’d like it.
Thank you.
We are providing only an interpreter now.
Egison is not fast and we don't provide benchmark yet.
The development of Egison is currently sponsored by Rakuten and Rakuten Institute of Technology, but a current active developer is only me.
No. I don't refer to the Pattern Calculus when I've implemented Egison.
I've implemented Egison to realize non-linear pattern matching against unfree data types such as sets and multisets.
The Pattern Calculus seems not for that.
Hello! I'm the creator of Egison.
Would you tell me what your project like?
I got an idea of Egison when I was working with logic expressions. Pattern-matching of the existing languages are not strong enough to do what I'd like to do. They can't express pattern-matching against set intuitively. Therefore, I've created Egison.