Scripting with C

By Cameron Laird and Kathryn Soraiz, Unix Insider |  Development 1 comment


While we generally think of C as the prototype industrial language -- hard-edged, high-performance, and dangerous -- numerous projects have attempted to wrap C in a more amiable package. Some were developed more than 20 years ago. Among the survivors still in production are:

  • CINT
  • EiC
  • ElastiC
  • ICI
  • LPC
  • Pike


Our survey excludes interpreters not generally available for Unix systems (such as QNC and Think C), those with limited interactivity (the UPS C interpreter), and interpreters that are moribund. We found software product catalogs listing C interpreters that have been orphaned for several years, but all the following systems are in active development.


CINT

"CINT covers about 95 percent of ANSI C and 85 percent of C++," including its own source code, according to CINT's homepage. CERN, the same international physics laboratory that employed Tim Berners-Lee as he designed the original World Wide Web, currently sponsors CINT.


Masaharu Goto wrote CINT in 1991 while employed by Hewlett-Packard Japan. Now an engineer with Agilent, HP's original testing and measurement business, which HP spun off late last year, he continues his development of CINT.


In 1995, Rene Brun and Fons Rademakers launched the ROOT project at CERN to introduce physicists quickly to the new world of Objects and C++ and to improve their productivity with large-scale data analysis and simulation. After comparison with candidates such as Tcl/Tk and Python, Rademakers and Brun selected CINT in 1996 for ROOT. Like CINT, ROOT is an open source project. CERN uses ROOT to structure analysis of the output from, as Bruns explains, "large Hadron Collider (LHC) experiments that will generate about ten petabytes of data per year in 2005. ROOT is being used in several hundred [particle physics] labs in the world and also in many nonscientific applications that have to analyze very large amounts of data." Finance is one area outside physics where CINT is known to be in production.


ROOT's sponsorship has encouraged CINT to support more of the C++ standard as well as extended runtime-type information, templates, and the robustness essential for interactive operation. "The next phase starting this fall will see major extensions to provide a parallel and distributed data analysis environment in the context of GRID projects both in Europe and in the US," Brun concludes.


CINT is available for most Unixes as well as Win NT. Among interesting recent CINT developments is RDBS, which interfaces to ODBC the way JDBC does.


EiC

"EiC is designed to be a production tool...one of the most complete, freely available C interpreters built to date," writes Edmond J. Breen on the EiC homepage. He's been largely successful: EiC is even getting favorable mention in publications such as Linux Magazine.


Breen designed EiC for easy portability and flexibility between interactive, batch, and embedded applications. EiC includes packaging mechanisms that simplify deployment and convenient mechanisms for interfacing foreign functions. Working programmers welcome its good diagnostics for array violations and other exceptions.


Furthermore, EiC is quite portable. Versions are available for all common platforms, including a recent port to the EPOC-based Psion handhelds. Many EiC developers use it for Web-based applications, and among available modules are those for MySQL and OpenGL. The EiC Website offers useful details about the language and supports three active EiC-related mailing lists.


Among Breen's plans for the near future is C99 compatibility. At the same time, EiC's portability presents one of his most serious, continuing challenges. He will need to recruit others to help with EiC ports so that he can concentrate on the Linux release, while volunteers maintain the generation apparatus specific to the Windows, Solaris, and other versions.


ElastiC

ElastiC is a bit of an outlier among the languages mentioned here. The others mostly have the semantics of C, with relatively minor variations. Marco Pantaleoni's interpreter, by contrast, is more ambitious and challenging. While its syntax is familiar to anyone who knows C, he uses that syntax to express Smalltalk-like metaprogramming, seasoned with closures, object orientation, and other concepts familiar in languages such as Scheme and Python.


ElastiC is younger than the other implementations mentioned here and is more concerned with getting its design right than with details of database extensions or Web-oriented conveniences.

1 comment

    Anonymous 44 weeks ago
    there is a popular C/C++ interpreter and scripting language Ch from www.softintegration.com

      Add a comment

      Post a comment using one of these accounts
      Or join now
      At least 6 characters

      Note: Comment will appear soon after you have activated your account.
      Obscene/spam comments will be removed and accounts suspended.
      The information you submit is subject to our Privacy Policy and Terms of Service.

      ITworld LIVE

      DevelopmentWhite Papers & Webcasts

      White Paper

      HP NonStop SQL Fundamentals whitepaper

      This whitepaper offers a detailed look into the fundamentals of HP NonStop SQL solutions. See how this system delivers unprecedented levels of application availability with fail-safe data integrity and meets the needs of enterprises with large-scale business critical applications.

      White Paper

      Nebraska Medical Center case study

      See how the Nebraska Medical Center implemented a SQL solution to make information more readily available to streamline operations, improve patient care and facilitate medical research with an enterprise solution running on HP NonStop servers.

      White Paper

      Concepts of NonStop SQL/MX

      For DBAs and developers who are familiar with Oracle solutions and want to learn about NonStop SQL/MX, this whitepaper provides an overview of the similarities and differences between the two products-with a specific focus on implementation.

      White Paper

      6 Things Your CIO Needs to Know About Requirements

      If your organization is not predictably successful on technology projects, there is likely an issue in requirements. CIOs must take action and own requirements maturity improvement. There are 6 main things a CIO must know about requirements.

      Webcast On Demand

      User Experience Monitoring

      In this webinar, you will learn hints & tips for improving end-user response times from Forrester Research analyst, Jean-Pierre Garbani.

      Sponsor: Nimsoft

      See more White Papers | Webcasts

      Ask a question

      Ask a Question