Aphid brings embeddable scripting to .Net

C-style language inspired by JavaScript leverages C# and F# and enables building of DSLs

Aphid is bringing embeddable, cross-platform scripting to the .Net world. The C-style language, still in an alpha stage, is inspired by JavaScript but draws from C# and F#, Microsoft's functional language, according to the project's home page on Microsoft's CodePlex project-hosting site.

Developed solely by independent researcher and developer John Leitch, a former security tester at Microsoft, Aphid is named after a small insect, reflecting its status as a small, embeddable scripting language, Leitch said. "The language itself is intended to be kind of a development platform for domain-specific languages," he said.

Leitch has been running Aphid in his lab for some time now. "I use it for expressing grammar for generational fuzzers," generating test cases, he said. Leitch has worked on fuzzer software for PHP. Aphid also could be used for purposes such as building a small game requiring an embeddable scripting language.

One main design goal was to keep Aphid confined to single class library so as to not create "dependency Hell," Leitch explained. The language was designed using .Net Framework principals and also was inspired by Microsoft's LINQ (Language-Integrated Query) technology. "The language itself is very easy to work with and modify," Leitch said.

Documentation for Aphid emphasizes that there are few easily embeddable scripting languages for .Net and those that are available often have complex dependency graphs necessitating inclusion of various packages and assemblies. These languages include IronPython and IronRuby, which require their respective assembIies along with the Dynamic Language Runtime, said Leitch. "They're first-class .Net languages, so they have great interop, but it's hard to justify the inclusion of so many foreign binaries when minimal scripting is needed." A language like Script.Net, meanwhile, has issues with interoperability, according to Leitch.

Aphid supports an impressive number of sophisticated features, including lambda expressions for writing functional code, as well as multithreading, pattern matchup, and pipelining. The language has been only partially released, with features such as the general Aphid interpreter available but not fuzzing capabilities. "Right now I plan on it remaining alpha until I fix a couple of standing bugs. When that will happen depends on my schedule, which is quite full at the moment," Leitch said.

Aphid is currently available via a GNU General Public License (GPL). But Leitch said he may change the license to a more-permissive MIT license to encourage greater use.

This story, "Aphid brings embeddable scripting to .Net," was originally published at InfoWorld.com. Get the first word on what the important tech news really means with the InfoWorld Tech Watch blog. For the latest developments in business technology news, follow InfoWorld.com on Twitter.

From CIO: 8 Free Online Courses to Grow Your Tech Skills
Join the discussion
Be the first to comment on this article. Our Commenting Policies