Mahlee interactive shell released
Created 2008-06-22T10:50:29.539Z, last edited 2008-06-22T11:00:16.981Z
This new version of Mahlee™ introduces a simple interactive shell. This version of the shell can be used to explore Mahlee and FOST.3™ systems and is also suitable for experimenting with and learning JavaScript.
I'm still not in a position where I can include source code in this distribution, but I should be able to supply it to anybody who wants a copy — just ask.
This release is still Windows™ only, but some progress has been made with “Mahlee on Rhino” which will support Linux™. Watch this space!
Download
The installer can be downloaded from http://dl.felspar.com/Mahlee%20setup.0.0.3.32186.exe.
Sample session
C:\>"Program Files\Felspar\bin\fhost" FHost - FOST.3 Scripting Host Copyright (C) 1995-2008, Felspar. REPL start up — Press CTRL-z then ENTER to exit >seq = [] >while ( seq.length < 30 ) seq.push( seq.length ) 30 >seq 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29 >Array.prototype.sum = function() { var s = 0; for ( var i = 0; i < this.length; ++i ) s += this[ i ]; return s; } function() { var s = 0; for ( var i = 0; i < this.length; ++i ) s += this[ i ]; return s; } >seq.sum() 435 >Array.prototype.sum = function() { return eval( this.join( '+' ) ); } function() { return eval( this.join( '+' ) ); } >seq.sum() 435 >REPL.prompt = function() { FOSTLib.Now() + " >"; } function() { FOSTLib.Now() + " >"; } >REPL.prompt = function() { return FOSTLib.Now() + " >"; } function() { return FOSTLib.Now() + " >"; } 2008-06-22 10:43:29.005 > 2008-06-22 10:43:31.343 >REPL.last function() { return FOSTLib.Now() + " >"; } 2008-06-22 10:46:32.220 >
Bugs and issues
Use of COM objects
Creating a COM error will produce an error when the result is to be printed. For example:
>fso = FHost.CreateObject( "Scripting.FileSystemObject" ); COM Error Within VARIANT_to_wstring() Details: Description: Unknown COM error - No error message contained in the exception decription. Source: Unknown Error Message: 'Type mismatch.'
The COM object is correctly created however, it just can't be displayed (unless the COM object itself makes special provision for this).
Single threaded
The interactive shell makes use of the single threaded Mahlee™ host, not the multi-threaded one. The API can be explored, but some things of course won't work in exactly the same way.
© 2002-2025 Kirit & Tai Sælensminde. All forum posts are copyright their respective authors.
Licensed under a Creative Commons License. Non-commercial use is fine so long as you provide attribution.