franko / luajit-lang-toolkit

A Lua bytecode compiler written in Lua itself for didactic purposes or for new language implementations
Other
655 stars 91 forks source link

Few questions #1

Closed DAddYE closed 9 years ago

DAddYE commented 10 years ago

Hi,

first of all, thx for sharing, looks a super great project that could fit with one I'm doing quite similar (mruby).

I have few questions:

  1. Is this stable? I mean, are there know issues, like bytecode of float etc?
  2. Why an handwritten parser and not the classic lpeg?

Thanks a lot!

franko commented 10 years ago

Ciao Davide,

allore rispondo alle tue domande in Inglese visto che siamo su Github ;-)

Is this stable? I mean, are there know issues, like bytecode of float etc?

I consider the bytecode generator in beta phase. It is stable and finished (excpet a minor couple of things) but probably it does still have some bugs. I hope that if other people use it they will help me to iron out the few remaining bugs. I've also recently introduced an automated test suite to help me better check the new commits doesn't introduce new bugs.

Why an handwritten parser and not the classic lpeg?

The original project, Nyanga, use lpeg grammar and I too I was used lpeg at the beginning. My experience with lpeg was not very good. The reason I drop it to switch to a handwritten parsed is:

and finally a matter of taste: I don't like the lpeg parser. I think that Roberto has made a great job implementing lpeg but I think that handwritten parsers are better in many ways.

DAddYE commented 10 years ago

Thanks a lot, this explain every thing I needed. And yes I agree hand written parser (depends from the hand) are better and yours is (I read it just 20 mins) looks clean concise and easy. So fair enough.

I'm interested in this project because I built a transpiller or source to source / byte code. Since luajit for known reason was my first target I started to look at your project.

My syntax (python family, with optionally typing) right now target go and ruby. It's written in bison (I'm still in prototyping phase) and ruby.

Se ti interessa di più scrivimi una mail (la trovi ovunque) e ti giro qualcosa.

Thanks again buddy!!!