Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Getting started with JetBrains Nitra (timjones.tw)
61 points by implmentor on Nov 24, 2014 | hide | past | favorite | 18 comments


If you're interested in stuff like this, be sure to also check out Rascal:

http://www.rascal-mpl.org

The focus is slightly different: Rascal focuses more on automated code transformations and less on being a syntax highlighting service for editors. But Rascal is remarkably powerful and surprisingly accessible.

Basically, Rascal allows you to build Lispy macros in any language. Or to easily parse-and-transform new languages. Or to design entirely new languages and transpile them into something existing. To drive the point home, CoffeeScript, Nimrod and Sass could've easily been built with Rascal.


As the primary author of Nimrod I disagree. ;-) And to be blunt: I know the person has no idea of what he talks about when he uses the word "transpile".


Ha! Honoured to have you reply to my comment, sir :-)

I wonder, what is the primary reason you believe a tool like Rascal couldn't be the engine behind the Nimrod compiler?

(btw, I didn't mean to imply that making the Nimrod compiler is easy in any language - I guess the "easy" word applies more to CoffeeScript and Sass in my previous comment)

Regarding the word "transpile" - that was long the common name given to e.g. the CoffeeScript compiler and only recently got out of fashion for obvious reasons. Mind that not everyone who uses an outdated term is entirely clueless. :-)


"being a syntax highlighting service for editors" - a bit of an understatement for syntax checking and future refactoring capabilities.


I'm not sure that listing all the features Nitra has and Rascal doesn't (or the other way around) is going to help make my point, so you're going to have to do with just one.


Interesting. It looks like it doesn't support type information yet, but it's coming in milestone 2. I started an open-source project called srclib that's creating toolchains to type-analyze and dependency-analyze source code in multiple languages: https://srclib.org/. It might be of interest to folks working with or using Nitra.


Nice! It went a little unnoticed in all the noise, but Facebook's Flow project might be of interest here. Its not "just" an advanced type-checker, but it seems it was intended for IDE tooling as well, but I suspect FB wants to keep that internal for now. There is a project on Github, someone created a VIM plugin based on Flow.


srclib looks interesting, I'll take a look.

Yeah, I've seen tweets saying they're working on the type system right now, and it will arrive in milestone 2; if it's done right, that's a big area where Nitra can differentiate itself from other parser generators.


Reminds ne of Google's project Grok.


Given it's ability to integrate with visual studio, it will be worth watching to see whether someone's able to use it to fix the CUDA integration highlighting/intellisense faults which appeared somewhere after visual studio 2008.


I've pondered whether this could be used to build better navigation and refactoring tools for Delphi than the official Embarcadero ones, which are frankly dire.


Lack of PCL support makes it's applicability quite limited in today's multi-platform world. Hope they will fix this flaw before releasing.

Awesome project nevertheless.


I meant to mention that in the blog post - great point. I really hope PCL support is added. (You could add your support to this issue: https://github.com/JetBrains/Nitra/issues/7)

Whether it happens or not probably depends on how JetBrains themselves plan to use Nitra; hopefully they intend to use it in their cross-platform products.


Downloaded without realising this was a c# project, and requires visual studio. I'm on linux dammit.


Yeah, sorry. I should mention that in the readme. Of course, if Nitra gets cross platform support, that would be even better.


Any idea if it works with Mono?


Nitra is actually written in Nemerle. It is open-source just like C#. So in a true Linux spirit should be compilable from command line.


How does Nitra compare to Xtext?




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

Search: