HN user

egi

23 karma

I am the creator of the Egison programming language. http://www.egison.org

Posts1
Comments21
View on HN

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.

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 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]}

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.

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.

I read a slide on OMeta. http://tinlizzie.org/ometa/dls07-slides.pdf Its pattern matching is specialized in expressing pattern matching against lists and trees. Egison aims intuitive expression for a wider range of data types and provide non-linear pattern matching with multiple results on a functional language. Please check a cheat sheet and demo pages on our website. We can get its concepts easily from them. http://www.egison.org/cheatsheet.html http://www.egison.org/demonstrations/poker-hands.html

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.