MyrmecoX Studio IDE

1. Introduction

MyrmecoX Studio is an Integrated Development Environment (IDE) for internet, enterprise, and wireless applications. MyrmecoX IDE consists of engines, editor, checker, debugger, and compiler. Other features include folder viewer, keyword editor, and configuration. Web Application Stacks include Apache server, Snaml/PHP/Tcl scripting languages, as well as SQLite/MySQL databases.

MyrmecoX IDE is a native Windows Application. However, it supports dynamic languages development such as Snaml/Tcl/PHP on multiple platforms as Linux through VMware.

MyrmecoX Studio 4.0 natively supports Snaml 2.0 with Tcl 8.3, Tcl/Tk 8.4 (thread), Tcl/Tk 8.4 (64-bit Intel EM64T, AMD64); PHP 5.1, Apache 2.0.54, SQLite 2.8/3.2, MySQL 4.1, Libxml/DOM 2.6.11, IPv6, Zlib 1.14, HTTP1.1.

2. Feature List

Editor You can open, edit, and save a source file. It is easy to open multiple files at the same time and switch from one editor window to another by clicking a button at the bottom bar. Editor can highlight keywords and comments with colors. [Editor applied on all languages.]

Checker You can check Snaml code and display errors, usage warnings, and performance improvement in details.

Debugger You can step over execute a Snaml command, step in a procedure, set breakpoints, and watch varibales in this GUI debugger.

Compiler You can generate Snaml bytecode and hide the source code.

Note: Checker, Debugger, and Compiler are applied for Snaml and Tcl 8.3 only.

Viewers Folder viewer is a tree viewer of folder and drivers. You can expand the folder and access file by mouse clicking. Keyword viewer display help information while you type a command. Console viewer display message of console.

Keyword Editor You can add, delete, or modify keywords and their arguments in a keyword database. The keyword database is used to retrive the help information of a command. You can customize keyword database for your own commands.

3. Installation

The installation of MyrmecoX Studio is much easy. Simply click the executable file and follow the instructions to install. You may install following packages for advanced functions.

  • MySQL 4.1 Installation Download

    You can skip the Sign up. To use the samples of MyrmecoX Studio, you need to set the root password to be neatware and port as 4000. It is better for you to install MySQL in its default fold.

  • JRE 1.5 Installation Download

    You need to install J2SE (TM) Runtime Environment 5.0 in its default folder. Otherwise you must change the PATH and CLASSPATH to use the Tclblend.

  • ImageMagick 6.2.4 Installation Download

    Simply install ImageMagick on any folder will work.

4. Usage

Clicking MyrmecoX Studio shortcut on the desktop you launch the Program.

Now you can try the samples in the following steps.

1) Test Snaml and PHP Info Sample

Step one:

    Check the view on the left panel, you can find the MyrmecoX Studio Professional v4.x and the sub-folders.

    Click plus icon you can expand a folder. You do not need to take care of the ide, platform, and uninst folders. The help and license folders include help and license files. The htdocs is the standard document folder on linux server. The Snaml and PHP samples are stored in the snaml sub-folder.

Step two:

    Expand htdocs > snaml > language > php folder and double click info.sml file, you can read a snaml code in editor.

    package require SNAML
    output file $argv0 .php

    First statement loads Snaml package. Second statement outputs result to file with .php postfix.

        _title; quote "Snaml: PHP Test"; title_

    First statement is xhtml header. Second statement is the display on the browser title bar.

        __php { phpinfo(); }

    This is the body of Snaml. __php { ... } specifies that the inside statements are php codes. phpinfo() will show entire environment information of php. The last statement is the end of xhtml.

Step three:

    Click Languages item on the menu, make sure the check is on Snaml. For Tcl or PHP scripts you need to select respective language.

    Then click Build item and select Run and browser, you are going to see a web page with PHP Version 5.0.4 information.

Step four:

    It is the time to explain the Build item that executes current source script with default.

    The First Group is

    (i) Run is the normal execution of code. You can also run this item simply by clicking the icon button on the toolbar.

    (ii) Run with console launches a program along with a console, so you can use standard input/output in console.

    (iii) Run and browse will execute current code and launch IE to browse the current file name with the postfix of .html or .php. This function can help users to develop web applications with Snaml.

    The Second Group is

    (i) Snaml debugger will launch the debugger, and you can use step in or over to execute Snaml script. Read more details about debugger in the help\tcl\html folder.

    (ii) Snaml compile will generate a .exe file for current Snaml script. You need to pre-install MyrmecoX Runtime to execute this executable program. After clicking the compile a .exe file has been generated in the current folder. Clicking the minus (-) block on the left file browser, the folder will be shrinked. Then click the plus (+) block again, the .exe file will be displayed. Double click the .exe file you can execute the program.

    Important: To generate .exe file for any Snaml script, you need to add following line in front of the Tcl script

    catch {package require SNAML}

    The trick to use the catch makes your Snaml script working for all Snaml core. In MyrmecoX sample codes we have not added this line of code for clarity.

2) Test Snaml and Database Sample

Step one:

    Expand htdocs > snaml > database > sqlite folder and double click sqlitetest.sml file, you can read snaml code in editor.

    Click @ button that is Run and browse, a web page will show "SQLite Test Success!" You can read the PHP code with the SQLite access in detail.

Step two:

    Expand htdocs > database > mysql folder and double click mysqltest.sml file, you can read snaml code in editor.

    Click @ button that is Run and browse, a web page will show "Connect to MySQL Success!" if you have installed MySQL Server successfuly. Here is the PHP statement for MySQL connection.

    __php {
        or die("Could not connect to MySQL");
      print "Connect to MySQL Success!";

    The default port of Apache server is 4000. The generated web page is


3) Test Snaml and AJAX Sample

Step one:

    Expand htdocs > snaml > application > catalog folder and double click snaml-demo.sml file.

    Click @ button that is Run and browse, a web page will show a dialog box.

Step two:

    You can click items under the Catalog box. The database contents will be displayed instantly.

    This is a complex application with SQL database, XML, PHP, and AJAX. You can hack the source code to understand this basic AJAX application.

4) Test Tcl Basic Samples

You need to select the right language for your source execution.

To select Tcl under the Languge item there are Tcl/Tcl [Thread], Tcl [Java tclsh]/Tcl [Java wish], and Tcl [64-bit]/Tcl [64-bit Thread].

Tcl (thread) is for Tcl scripts that apply to thread extensions. Tcl (java) is for Tcl scripts that call java program. Tcl (64-bit) executes Tcl on 64-bit core (Windows 64-bit for EM64T and AMD64).

Step one:

    Simply select Tcl in Language item.

    Expand htdocs > tcl > basic > calculator and double click calculator.tcl. Then click Run or Run with console, there is a big calculator to display.

Step two:

    Try big calculator to see the result of Tcl/Tk script.

Step three:

    To close a source file, click File item and select Close.

Now we can explain the User Interface. It is the menu and toolbar in IDE. To read the short prompt of an icon in the toolbar simply move mouse and stay there for seconds.


(i)New item creates a new file. (ii)Open item opens an existing file. (iii)Save item saves a file. (iv)SaveAs item saves a file with a new name. (v)Close item closes a file.

(i)Print item prints file. (ii)Print Preview item shows the preview of the file. (iii)Page Setup item sets the print page. (iv)Recent file list shows a group of files. (v)Send item sends file through email.


(i)Undo item will undo the last operation. (ii)Cut item will cut a paragraph. (iii)Copy item will copy a paragraph. (iv)Paste item will paste content in the clipboard. (v)Paste special may paste an formatted document. (vi)Clear will clear a paragraph. (vii)Select All will select entire text.

(i)Find item finds a word in the script. (ii)Find Next try to find next word. (iii)Replace will replace the found word.


(i)Date and Time item help you insert a date/time from selected format. (ii)Object item insert an object into the script. You do not need to use it.


There is no need to use this menu for Tcl script because no format on it. (i)Font item sets the font of the script.(ii)Bullet Style item sets the bullet style. (iii)Paragraph item sets the attributes of the paragraph. (iv)Tabs item sets the tab stop position and size.


Neatware MyrmecoX Website directs you to access the MyrmecoX documents on Neatware's website.


You can pickup the right language for your source execution. Snaml and PHP is widely used for web development. Tcl is used for enterprise applications. Tcl (thread) is for Tcl scripts that apply the thread extension. Tcl (java) is for Tcl scripts that call java program. Tcl (64-bit) executes Tcl on 64-bit core.

5) Test Tcl GUI Samples

Step one:

    Goto htdocs > tcl > gui > blt folder. Double click barchart5.tcl.

Step two:

    Make sure the selection of Languages is Tcl. Click Run button. You are going to see a simple barchart.

5. Advanced Use

1) Configuration

The setting property sheet is showed below


The Enable console check makes console show after Run. You can change the startup path to set the default root in the viewer. The Shell path box is not in use at this moment.


You can write current script name and *.sml in the Input files box. Then, you can check the syntax of the script or all the tcl files in the current directory. Warning level drop-dwon box lets you select the warning level. Under the check box of Setting, Disable check disables the function of checker which is the default setting. Quiet check will display short message. Finally, Verbose check will display detail messages.


GUI Debugger allows you debug Snaml code with the source code. It is convenient to set breakpoints, step in/over the code, and watch the value of a variable. For more details please read the Debugger manual. Click GUI Debugger Snaphot to have a breview.

You can apply step in, step over and set breakpoints, to debug Snaml (Tcl8.3) script in a GUI debugger. More detail documents are in the help/tcl/html folder.


When you set the Enable check and fill the Output file name, after the execution of Run, MyrmecoX Studio will generate a .mbc Byte Code file. The default name is the current Snaml name with the .mbc postfix instead of the .sml postfix. You can execute a .tbc file without exposure your source code.


Enable profile allows you to use profile to collect the statistics of the Snaml execution.

2) Edit keywords

You can define your own keyword set. Snaml/Tcl command has the format: command subcommand argument ... . A command may have no subcommand such as puts command. A command with subcommand can specify more operations, for example, file copy , file dirname, etc..

Keyword editor, Move mouse on

An argument could be var, option, and pair in the keyword editor.

    var represents that the argument is a variable or an expression. For example, in the command [set v $e], the keyword is set, its variable v is set to (var Argument1 VARIABLE) and the e is set to (var Argument2 VALUE) in the field (Type Name Value) respectively.

    option represents that the argument is optional. In the Tcl its syntax is ?option?. For example, the puts command has the syntax [puts ?-nonewline? ?channelid? str]. Its keyword is puts. Its options are set to (option OPTION [-nonewline]) and (option OPTION [CHANID]) in the field (Type Name Value) respectively.

    pair represents that the argument is a name and value pair. In the Tcl its syntax is [-title value]. For example, [pack .x -padx 20 -pady 40] where -padx 20 is a name and value pair. Without this pair in a command, the name item has the default value.

    Keyword editor completes keyword operations. You may add a keyword with a sub-keyword and a group of arguments, search a keyword, edit keyword's arguments and comment, or delete a keyword. The command keyword database is used to prompt keyword information.

The Keyword box allows a user input and edit a keyword. Subkeyword field is a combobox that allows you input a subkeyword or select a subkeyword from available list. The Comment box allows you to input or modify the description of a keyword and its subkeyword. The Argument field lists the arguments with form (Item#, Type, Name, Value). You may edit each item in its cells.

A group of buttons complete different operations. Reset button sets the editor to the initial state and clears all setting values. After you input a keyword and click Search button, Keyword editor will try to find the keyword along with its subkeyword and arguments. If a keyword has several subkeywords, clicking the Search button leaving subkey as empty, you may read the list of subkeywords by clicking on dropdown button. Then you can select one subkeyword and do search again to retrive exact arguments.

Add button adds a keyword or a subkeyword and its arguments to the database. Delete button will delete a keyword and all its subkeywords. Close button closes the dialog box and save database to a default file named "_diction.dat".

3) Develop codes for multiple platforms

VMware Player has been used to launch Linux or other OSes under Windows. You can code Snaml, PHP, and Tcl scripts such as AJAX codes under Windows and access them in Linux. After finished Windows coding,