Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've used Clojure to write clj-peg (http://www.lithinos.com/clj-peg/index.html). I then use clj-peg everytime I've needed to process some consistent structure (RTMP/AMF0/AMF3), anytime I want to create a quick DSL (the source markup for my site), and just for fun (looking into writing a markdown grammar).

Macros were essential to what I wanted in a PEG-based system. I wanted to use as few extra characters as possible to increase readability, since fewer characters meant less clutter around the Non-Terminals. I also wanted a custom syntax that leveraged the basic approach of the parent language to minimize the learning curve. Macros allowed me to easily introduce those features inline with the rest of the language.

I've also wanted to use a language that was moving toward platform independence so that my efforts would last longer. Clojure isn't far (a year or so) from being more easily implemented on platforms other than Java. I'm fairly convinced that they'll make it and clj-peg will take advantage of that if it can.

While Common Lisp, among other languages, meets the macro feature, and I developed in Common Lisp for a while, bringing the Java ecosystem into the picture solves other problems I had had with common lisp.

In addition to clj-peg, there are other projects that are in-process, but I'd rather not bring them up here since they don't have the resources that clj-peg currently has.

To sum up: Macros and the Java ecosystem.



This project looks interesting and although I don't have much time to get into it at the moment I'm mainly commenting to create a personal bookmark for it and to thank you for sharing your project.

Please consider moving the project to a hosting site like github which would make it easier to track updates to it and easier to find in the future. Thanks again!


I'll second the github suggestion. clj-peg looks very interesting.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: