This is some notes on various issues to do with the implementation of VisLua.
GUI library
There are hundreds of GUI libraries [1], but few good portable, well maintained ones. Here are some options :-
- wxWindows [2]. This is quite a big library but had lots of useful widgets and is quite portable. Platforms supported are [3] :-
- Windows 3.1, Windows 95/98, Windows NT, Windows 2000, Windows ME.
- Linux and other Unix platforms with GTK+.
- Unix with Motif or the free Motif clone Lesstif.
- Mac OS.
- Embedded platforms are being investigated. See the wxUniversal project.
- An OS/2 port is in progress, and you can also compile wxWindows for GTK+ or Motif on OS/2.
- FLTK [4]. Quite compact and fast, as name implies. Not particularly portable. Platforms :-
- X - Unix.
- Win32.
- MAC OS port available.
- Tcl/Tk [5]. Quite portable but limited widget set. Platforms [6] :-
- Windows 95, 98, NT 4.0 (Intel), 2000
- Solaris 2.5, 2.6, 7 (SPARC)
- HP-UX 10.20
- Linux (Intel, Red Hat 5.0+, SuSE 6.0+)
- SGI IRIX 6.3+
- IUP [7] TeCGraf internal. "IUP uses an abstract layout model based on the boxes-and-glue paradigm from the TEX text editor. This model, combined with the dialog-specification language (LED) or with the Lua binding (IupLua) makes the dialog creation task more flexible and independent from the graphics systems resolution."
- Motif.
- Microsoft Windows 95, Microsoft Windows 98, Microsoft Windows NT, and Microsoft Windows 2000.
- FOX [8]. Platforms for version 0.99.193 given below. Seems extremely portable. Don't think the widget set is as large as wxWindows, a worthy competitor! No MacOS port, although reportedly would work under X11 support with (a lot of) work.
- Linux. Any version of Linux should work, on any hardware. FOX is being developed on LINUX.
- FreeBSD. FreeBSD is reported to work.
- SGI IRIX. SGI systems with IRIX 5.3 and up. It can be compiled with GCC or SGI's MIPS Pro C++ compiler.
- SunOS/Solaris. Either Solaris or SunOS. Compiled with GCC or Sun Workshop C++.
- HP-UX. Tested with GCC under HP-UX 9.x and 10.x.
- IBM AIX. Tested with GCC under AIX 4.2.
- DEC Alpha/COMPAQ Tru64. Tested with GCC under Digital Unix 4.0.
- Other UNIX Systems. If you have a reasonable C++ compiler, UNIX, X11, chances are very good you can get FOX to work.
- Microsoft Windows 2000, Windows NT 4.0, Windows 95, Windows 98. Compile either with Visual C++ 6.0, Borland C++ Builder, CYGWIN32, MINGWIN32, and IBM VisualAge? C++ for Windows. Older versions of Visual C++ will work, but you must create your own projects in that case.
- WideStudio [9]. "WideStudio is an integrated development environment(IDE) to build GUI applications for [see below]. This software is free (MIT/X Consortiun Licence)." IDE environment, not natively drawn, comes with gcc included for building projects.
- Linux
- FreeBSD
- SOLARIS
- Windows 95/98/ME, Windows NT,Win2K.
I propose wxWindows is used as it has a large widget set and is very portable. A binding is in progress [10] using a custom binder.
An alternative is that bindings to SWIG are supplied with wxPython [11]. These could be modified for use with LuaSWIG [12], and just updated as wxWindows and wxPython are updated.
Notes on coding style
All code should be as portable and well documented as possible. This needs some further discussion. Most of the code will probably be written in ANSI C, following Lua, to aid portability.
wxWindows has some guidelines on using C++ [13] eg. no templates etc. It may be worth taking note of these guidelines if wxLua is to be used for the GUI and portability is a priority.
Syntax Highlighting
Syntax highlighting for (unmodified) Lua would work in wxLua through the Scintilla editor [14]. Any platforms that don't support Scintilla would can just use a text editor.
Notes on Lua issues
There are some problems with Lua being a language which people like to modify and embed.
- Changing the number type, ie. from double to float.
- Syntax changes, ie. language may have been modified.
These problems could be dealt with by recompiling the wxLua bindings and VisLua debugger bindings to suit the client application. Wrappers to these bindings could allow configuration of any syntax changes.
Debugger
- The Debug Server should be able to use the standard Lua debug library
ldblib.c
to perform any debugging actions.
- GUI is written in Lua using wxLua GUI library.
Structure
See VisLuaGlossary for any confusing terms.
+--------------------------------+
| application (C/C++/Lua/etc) |
| |
+ +-------------------+ +--------+
| | debug server core | | Lua VM |
+-+-------------------+-+--------+
|
| <-- debug link
|
+--------------------------------+
| | debug client core | | Lua VM |
| +-------------------+ +--------|
| |
| debug client w/ UI |
+--------------------------------+
*>8^)-|=< user
Proof of concept
I have knocked up an application so that you can telnet into a Lua session just as though you were running a console. Please give feedback on the dev list, not here.
- Files:wiki_insecure/users/ntrout/vislua/vlds_test.zip
Comments on implementation
- Occasionally comments will be cleared as they are discussed on the VisLua-dev mailing list.
RecentChanges · preferences
edit · history
Last edited February 12, 2003 8:13 pm GMT (diff)