Magic Mailing List |
|
From: R. Timothy Edwards (tim AT stravinsky DOT jhuapl.edu) Date: Tue Feb 26 2002 - 11:16:42 EST
Dear Steve, > I'm not sure what you mean by interpreters "wrapped around," but I'll look > forward to your demo. I do really like the way Rajit's scheme interpreter > interfaces to magic with so few changes, although I wish it was a standard > scheme interpreter library such as guile. > My preferred style for implementing an EDA tool is > - write the core algorithms and data structures or objects in C (or C++ if > you must) > - expose those objects into the extension language > - Implement as much of the UI in the extension language as possible > (but do speed-critical things such as screen redraws directly in the C > core) > My current favorite set of tools for this are guile and guile-gtk. The "wrapped" version of magic is exactly what you describe in your "preferred style for implementing an EDA tool". And it uses SWIG for the "glue" subroutines between the program core and the interpreter, and the latest version of SWIG supports not only the major popular scripting languages like Tcl, python, and perl, but also (if you get a recent version of SWIG) guile. Ultimately, I would like the magic "make config" to ask if it should compile the interpreter-wrapped version of magic, and if so, prompt for which interpreter(s) it should compile for. Ideally, it would separate the core routines from the SWIG glue routines so you can compile for multiple interpreters, and have the same program run under any of the interpreters (as well as standalone). It requires some work to make sure that any supported scripts are available in all the supported interpreters. I was planning to support Tcl, Python, and Perl, mainly because they similar in syntax enough that it is fairly easy to convert scripts between them. LISP-like languages like SCHEME and guile are different enough that if I wanted to declare either of those as "supported" interpreters, I would have to depend on you and/or Rajit to supply the scripts. Regards, Tim
|
|