Saturday, July 18, 2009

A new direction for Reia: Peridot?

I've always viewed Reia as what I hoped to become a spiritual successor for Ruby in the same way that Ruby was the spiritual successor of Perl. Talking with one of my roommates he pointed out that pearls and rubies are the birthstones of June and July respectively, so an interesting name for the spiritual successor of Ruby would be Peridot. If I had the chance to do it all over again, I'd probably would've named Reia as Peridot instead, but as it stands I've already built up a decent degree of mindshare around "Reia" so renaming the language probably isn't practical. I'll come back to Peridot in a bit.

When I first started using Erlang one of the first things I wanted to do was give it a Ruby-like syntax. It seems like two of the biggest reasons people starting out in Erlang reject it is because of the ugly syntax and single assignment. Lately I've been wondering if there would be value in a language which is semantically identical to Erlang except with destructive assignment and a Ruby-like syntax. Lisp Flavored Erlang has seen a lot of interest and is a much simpler undertaking than Reia because it merely provides an alternative syntax and doesn't try to add new and complex semantics to the language. Perhaps there's a niche for a "Ruby-flavored Erlang" which provides a Ruby-like syntax, destructive assignment, and possibly a bit of syntactic sugar while preserving the underlying semantics of Erlang and not trying to add anything new.

With Reia in its current form I feel like I've bit off a bit more than I can chew. Worse, for the past few months I've been stuck on a particularly difficult problem and also very busy. I feel like perhaps I've bit off a bit more than I can chew implementing Reia, and some bad decisions in the initial compiler design plus my frustration with Erlang syntax have left me wanting to rewrite the compiler as a self-hosted implementation. But I don't think Reia as a language is ready for that yet.

Another thing that has popped onto the scene is neotoma, a Parsing Expression Grammar-based parser generator for Erlang. Ever since I began implementing interopolated strings in Reia I have longed for something like this. I have hacked and kludged my way along implementing interpolating with leex and yecc, but a PEG would solve the issue completely and allow for nested interpolated strings of the sort Ruby supports. This has left me wanting to rewrite the scanner/parser for Reia using neotoma instead.

So what to do? How should I proceed? The idea of a simpler Reia has certainly been bouncing around in my head for awhile. I am seriously thinking of reinventing Reia as something more like Erlang, then continuing on to add things like an object system in a new language: Peridot. There are a number of interesting things this would allow. First, Reia would effectively provide a subset of what's in Peridot, and most Reia programs would be valid Peridot programs. In that regard, Reia would work something like RPython and would make a great bootstrap language for implementing Peridot. A reduced Reia would be much easier to get to production quality than one which incorporates all of the elaborate features I've currently tried to implement. And it would once and for all put to rest the complaints about Erlang syntax and single assignment.

I'm interested to hear what people think about this proposal.

23 comments:

Donovan said...
This comment has been removed by the author.
Donovan said...

I think that if neotoma is going to provide significant benefits, then there is a justified reason for developing Peridot. I am a recent graduate and I am very interested in develpoing new languages; I'm intererested in contributing on Reia/Peridot for the experience and simply as a academic pursuit.

Thomas Lindgren said...

An aside: wouldn't it be easier to take care of interpolated strings in a separate rewrite pass after parsing?

grant rettke said...

You are a scientist. Be open to considering what you have learned and changing direction. *You* are the one funding this project, right? So, you can and should do whatever you like without worrying too much about it.

vk said...

I don't see myself writing anything useful in Reia as it is today. it is doo different from Erlang and it changes too much. But, I'd definitely look into a ruby-like-syntax for almost-regular-erlang as it is much lesser risk. After all I can always convert it to Erlan syntax. It can even be automated.

Unknown said...

First, kudos for undertaking such an ambitious project.

Second, I think any language that can provide beam with a cleaner (in this case Ruby like) functional syntax, even with single assignment, would be a huge success.

Whatever you do, make sure you are content with where the project is going because its a huge investment of your time.

caioariede said...

I think that you can just rewrite the parser, if neotoma provides significant benefits (like Donovan wrote).

Can you point or write something about your frustrations with Erlang syntax during compiler development?

* I like "Reia" name. :D

good luck!

@caioariede

Anonymous said...

I think this is a great idea. I would be very interested in using, and contributing to, a simplified Reia if the project took on this direction. I also think saving the more complex semantic additions for Peridot is wise.

luismarianoguerra said...

hi, I just found your blog from the erlang mailing list, you could help me with my project if you want ;)

it satisfies some of your requirements (except that the syntax is influenced by python/javascript)

I would love to hear your opinion about my (new/experimental) language.

luismarianoguerra said...

I forgot the url :P

http://marianoguerra.com.ar/efene

Unknown said...

Surveillancekart | CCTV System
cctv installation services
best home security camera system
cctv camera for home
Pestveda | Pest Control
Termite control

cyber Fire and security said...

CCTV Systems are beneficial for both residential and commercial properties. CCTV, security camera systems CCTV installation London or suppliers for systems in UK.
CCTV Installers London
CCTV installation London
Burglar alarms London
CCTV installers London
CCTV Companies London
CCTV cameras London

Archana The best Call Girl said...

********************************************************************************************************
Hi friends ! I'm Archana Kumari. I like to have bed relationship with different persons rather than with a single man for the whole of life. Not only is this my notion , but also is this fact that the secret organs are made for enjoyment. Please follow me on the links given bellow.


Call Girls in Mumbai
Call Girls in Puri
Call girls in Cuttack

Call girls in Bhubaneswar
Call girls in Gurgaon
Call girls in Gurgaon

Call girls in Jaipur
Call girls in Jaipur
Call girls in Jaipur

If you are interested in me and my ideology ,then you are invited to my bed. Just go ahead !
***********************************************************************************************************

Archana The best Call Girl said...

********************************************************************************************************
Hi friends ! I'm Archana Kumari. I like to have bed relationship with different persons rather than with a single man for the whole of life. Not only is this my notion , but also is this fact that the secret organs are made for enjoyment. Please follow me on the links given bellow.

Call girls in Jaipur
Call Girls in Mumbai
Call Girls in Bangalore


Call Girl in Mumbai
Call Girl in Puri
Call girl in Cuttack

Call girl in Bhubaneswar
Call girl in Gurgaon
Call girl in Gurgaon

If you are interested in me and my ideology ,then you are invited to my bed. Just go ahead !
***********************************************************************************************************

Archana The best Call Girl said...

********************************************************************************************************
Hi friends ! I'm Archana Kumari. I like to have bed relationship with different persons rather than with a single man for the whole of life. Not only is this my notion , but also is this fact that the secret organs are made for enjoyment. Please follow me on the links given bellow.

Call girls in Jaipur
Call girl in Jaipur
Call girl in Jaipur

Call girl in Jaipur
Call Girl in Mumbai
Call Girl in Bangalore

Escorts in Mumbai
Escorts in Puri
Escorts in Cuttack

If you are interested in me and my ideology ,then you are invited to my bed. Just go ahead !
***********************************************************************************************************

dadyar said...

visit this site
sepidlabkhand

salma said...



شركة تنظيف بيوت بالمدينة المنورة


شركة رش مبيدات بالمدينة المنورة


كشف تسربات المياه بالمدينة المنورة
نقل عفش بالمدينة المنورة
شركة مكافحة الحشرات بالمدينة المنورة

customized gifts for him said...

solid satin pillowcases
farmhouse style pillow covers
home decor pillow patterns
floral embroidered pillow
Baby Girl Nursery Pillow
burlap pillow cases wholesale
floral cushions john lewis
floral designs for pillow cases
vintage pillow person
baby shark pillow case

No #1 Gurgaon Escorts Service Agency-Gurugram said...





The hectic world, a usual silhouette of wrinkled-faces and lack of time & good people make absolute absence of Love in our lives. Only a smile means to exist in the whole world bringing itself a Comet of Love. So it takes you believe onCall Girls in Gurgaonliable to fulfill your lives with real sense of love. Check our other Services...
Russian Call Girls in Gurgaon
Escorts in Gurgaon
Escorts Service in Gurgaon
Female Escorts in Gurgaon
Russian Call Girls in Gurgaon

Jim Harxmon said...

There are lots of article on this site and I really enjoyed reading some of them. This one you shared is my favorite because it has a lot of interesting information about "A new direction for Reia: Peridot". Man, you write all the information very well and it gives us the perspective of someone that really understands what is going on. play pvz online free if you want to experience a zombie strategy game on your PC!

cafeland walkthrough

R1se Hluoluo said...

Siapa sih yang tidak mau memperoleh duit banyak dalam periode pendek? Hingga, tidak bingung apabila banyak orang memilah game gambling dengan tata cara target yang sesuai.

Bisa jadi sebagian warga tidak yakin apabila kemenangan dari game gambling dapat menciptakan keuntungan besar, https://www.markasdomino.com/ sebab lebih banyak hadapi kekalahan dari kemenangan.

izspa.net said...

nice to the posta body massage in hyderabad

leenamonica said...

In Massage Centre in place comprehend the reality that the lifestyle of livingin bangalore without reviving your body once the course of time is as if you were playing with fire.massages for body and soulB2Bmassage end with a happy end. It's a hands-on work to satisfy your desires.