(Pascal & Go) - Approach to make Custom GH Script Components?

OK, I can do VB and other script languages, but I’m most fluent in Delphi Pascal, so I wonder what it would take to make a Pascal (FPC) or Go(lang) Script component for Grasshopper? Both languages would probably require precompiling when closing the Script component, but anyway.

Is there any example of how the existing VB & Py components were made?

I also wonder if GH definitions are optimized and/or compiled before executed? (how much effort to spend on optimizing component networks, i.e. does it really make much of a difference?). I haven’t yet done any huge GH defs myself so as to be able to test GH’s performance and the significance of optimizing the GH defs, but for future applications I’m interested in GH:s potential for High Performance Computing (HPC) for specific applications.

// Rolf

The ghPython component is open source. You can browse the source here

The VB component comes with Grasshopper itself, which to my knowledge is not open source.

Whenever a part of a definition gets very intensive I start using [Data Dam]…

As long as the language can compile to a .NET assembly, you should be able to create a component. I don’t believe Go language does this. There is a Delphi.NET, but I have no experience with this at all and I’m not even sure if that project is active anymore. That said, this will most likely be a difficult task (i.e. more difficult than learning a different language syntax to write code in.)

Well, I believe you if you say so. :slight_smile:

For developing Rhino/GH plugins perhaps Remobjects Elements could be an alternative. Elements includes C# and “native” Delphi pascal (+ their own additions to the pascal syntax) called Oxygene. I don’t know how well it integrates with RhinoCommon and GrassHopper assemblies though.

// Rolf