Better HN
topnewbestaskshowjobs
Log inSign up

egi

23 karma · joined Aug 18, 2013 (13y ago) · 23 submissions

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

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

Which syntax sugar do you think verbose? I don't think Egison has lots of syntax sugar.

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

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

comment 8y ago · link · parent

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

7.

Show HN: A Ruby gem for very strong pattern-matching(github.com ↗)

1 points · by egi · 12y ago · discuss

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

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/

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

The biggest difference is Egison realizes non-linear pattern matching against unfree data types such as multisets and sets. I've wrote brief comparison here. https://github.com/egison/egison#comparison-with-related-wor... Please check my paper, too. http://arxiv.org/abs/1407.0729

comment 12y ago · link · parent

If you install egison on your machine, ctrl-c should work on your machine. However, ctrl-c does not work online egison currently.

comment 12y ago · link · parent

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

comment 12y ago · link · parent

Thanks! I've fixed that just now.

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

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

comment 12y ago · link · parent

I believe Egison has provided good syntax and semantics for that. We have demonstration pages of various Egison programs that you can edit and run online. Please check them too. http://www.egison.org/demonstrations/poker-hands.html

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

The creator of the language here, ask me anything. Please check my paper recently I put on arXiv.org. http://arxiv.org/abs/1407.0729

comment 12y ago · link · parent

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.