I have made a basic port of the Hugs interpreter. I have used it with a few small example files and it seems to work:
Here is a screen shot of the interpreter loading and running a
script to find "n-queens". The latest version of this hugs includes
a launcher application that sits on the extras bar and allows you
to run hugs without using the epoc command line environment. There
is a screenshot of this environment if you want to see it.
Requirements
The HUGS.EXE binary is about 400K, the haskell prelude and library comes to a whoping 700k, so you'll need at least 1.3Mb free to install this (the extra space comes from some support files that are included). Furthermore, in normal operation the interpreter takes around 1.2 Mb, so make sure you have plenty of free space on drive C. You need the Epoc version of Libc as well, which is less than 100k (versions later than 1.06 include this). You can install the executable and libraries to a CF card if you want (in fact, this is what I do).
Performance
Performance is not too bad, considering. Doing q 8
using the queens from the hugs demos takes about three and a half
minutes on my series 5 (compared with about one minute for an i486-66).
Availability
- Download the zipped Epoc install file: hugs-109.zip (Earlier version - recommended for now). This contains everything you need. This release does not include the demos in an attempt to control the ever-bloating size of the distribution, but you can just copy the demo files from the desktop distribution if you want them. You should delete the launcher configuration files before using this new version, since the format of the launcher file has changed somewhat. Important Note: There seems to be a bug in the latest version (1.09) that causes the interpreter to crash when evaluating some scripts. I will update the release within the next few days with a new version, so you might want to use the previous release, numbered 1.08, for now (the delay is because I cannot reproduce the problem in the debugger, so I will have to use my brain instead, a process that could take a little longer).
- The source code for my changes is here. You will need the OPX from the main distribution to work on the frontend. My own code in this distribution is covered by the GPL, and the Hugs code is covered by the main Hugs licence (there's a copy in the application's help).
Please send me a quick mail if you download this.
Known problems
- Tabs interact badly with backspace in the input routines.
- I have had a report that the interpreter doesn't work at all on the revo, claiming that it cannot find the libraries. I have been unable to reproduce the problem on a colleagues Revo (where it worked perfectly), so I would appreciate any further information on this. Apparently switching to an older version (such as 1.05) solves the problem. This may be related to memory usage - the interinterpreter startup will fail catastrophically if there is not enough storage available.
- The interrupt character is not supported. This means that if the interpreter is caught in an infinite evaluation of some sort there may be no way to stop it short of terminating the application. You can use the task list (Control-System) or the Eikon kill key (Control-Fn-K) to shut the interpreter down if it runs out of control.
- Version 1.09 seems to have a problem with some scripts. I'd advise not using it for now, unless you really have to.
History
Versions previous to 1.07 do not include the Epoc standard C library, which you will need. They also don't include the front end, so you will need the Eshell command line environment to get the most out of them.
- 1.00 - Initial release (1999/07/08).
- 1.01 - Fixed a bug that made long input lines look screwy (1999/07/13).
- 1.02 - Fixed a bug to allow Haskell programs to handle backspace a little better (1999/07/20).
- 1.03 - Completely rewrote the input routines to allow basic command line editing. Added "Pwd" command. (1999/07/30).
- 1.04 - Fixed a minor bug in the backspace handling. (1999/08/10).
- 1.05 - Updated to September 1999 Hugs. Minor documentation and code updates. (1999/11/02).
- 1.06 (source)- Updated to February 2000 Hugs. Slipped in some minor updates to the editing. (2000/03/05).
- 1.07 - added a front end application to allow hugs to be used without the command line shell. (2000/09/22).
- 1.08 - fixed a bug in the front end that meant certain options (most notably Haskell 98 mode) were never passed through to the interpreter. (2000/11/23)
- 1.09 (source) - Updated to the latest version of Hugs, which is the November 2002 Hugs. This release does not include the hierarchical libary - we would need too large a hugs to do so, and this release is already a few hundred K larger than the previous one. To reduce the size of the distribution I have left out the demos. You probably want to delete earlier versions of the configuration file for the launcher before using the new one - the options have changed somewhat. (2003/01/22)
If you download a source distribution, then you should note that it contains only my changes; you will also need the original hugs source to compile it.
Glenn's Home : Epoc / Computer Science Department, Trinity College.