view readme.txt @ 189:d0e3a13c1bd9 default tip

Remove old calculator example
author Mike Pavone <pavone@retrodev.com>
date Fri, 07 Oct 2011 00:24:04 -0700
parents 76568becd6d6
children
line wrap: on
line source

Rhope Alpha 2 Readme

Usage
-----

To invoke the Rhope interpreter in interactive mode simply type rhope or ./rhope at the command prompt in the appropriate directory

To run a program, type rhope program.rhope. Files ending in a .rhope extension will be processed using the new parser. Files ending in a .vistxt extension will be processed using the old parser. (Note that on Windows, rhope.exe is compiled without GUI functionality and is a console mode program, rhope_gui.exe is compiled with GUI functionality and is a window mode program)

The DS port always tries to run program.vistxt. Two binaries are provided, rhope.gnm.nds (patched for the Datel Games 'n' Music device) and rhope.nds (unpatched). If you aren't using the Datel device, you need to patch rhope.nds using dlditool for your device (or use an autopatching launcher).

Example Programs
----------------

hello.rhope			The classic "Hello World!" program in Rhope
fib.rhope			Naive recursive fibonacci
calc.rhope			A simple 2 function calculator using the built-in GUI library (only works on Windows and Syllable)
basicweb.rhope			Serves static files over HTTP using the included webserver library
said.rhope			A simple example of using the included web framework (implements Paul Graham's Arc challenge)
pair.rhope			Shows how to define a new object
program.vistxt (DS only)	A simple demo for the DS port. Displays some graphics using a tile layer and a sprite.


Included Libraries
------------------

extendlib.rhope			A number of utility workers written in Rhope
webserver.rhope			A very basic (and incomplete) library for serving data over HTTP
framework.rhope			A basic Web framework (uses webserver.rhope)
dsvideo.vistxt (DS only)	Some utilities for interacting with the DS video hardware

Other Files
-----------

parser.vistxt			The new parser written in Rhope
extendlib.vistxt		Version of extendlib using the old syntax (needed for the parser)
webserver.vistxt		Version of webserver library using the old syntax
framework.vistxt		Version of the web framework using the old syntax

Changes since Alpha 1
---------------------

 - Parser rewritten in Rhope
 - The new parser implements an improved version of the syntax (no more |: and :| and no more positional arguments)
 - New parser supports negative number literals and numbers expressed in hex (e.g. 0x42)
 - Programs using the new parser no longer have to manually initialize global stores using Init Store[]
 - Added a primitive interactive mode to the interpretter
 - The interpretter now supports tail call optimization
 - Get DString@String was implemented in the core interpretter and removed from extendlib for performance
 - Added basic support for checkboxes and dropdowns in the Syllable port
 - Added a "Blueprint" object that allows inspection and modification of object definitions
 - Added a number of methods to the Worker object for constructing new workers to support the new parser
 - Made a basic port to the Nintendo DS
 - Fixed a bug that caused iteration over Dictionary objects to sometimes skip entries
 - Fixed a bug that caused Get DString@File to return incorrect data
 - Fixed a number of memory leaks
 - Fixed a bug in the argument checking code that caused a crash when Rhope was invoked with no arguments
 - Probably fixed other bugs that I've forgotten

Building and Porting
--------------------

Generally speaking you just need to type make -f <makefile for your platform> to build Rhope or on Windows nmake /f <appropriate makefile>. On Syllable you can just type make with no arguments. The DS port is a bit more work. You need to copy the appropriate source files into a copy of the arm9 template from devkitPro and add a few defines to the CFLAGS in the default makefile (namely COMPILE_THREADS=0, NO_NET, CONSOLE and NINTENDO_DS).

Rhope is fairly portable. makefile.linux should work without modification for any platform with pthreads, BSD sockets and GCC. If you define COMPILE_THREADS=0 then Rhope should compile on platforms without pthreads and if you define NO_NET it should compile on platforms without BSD sockets. 

Copying
-------

Rhope is released under a BSD-style license. See copying.txt for the full text of the license.

Notes
-----

The new parser is rather slow. This is particularly noticeable when running programs that use extendlib or the web framework. The new parser is also somewhat light in the error handling department. These issues will be addressed with time.

The current transaction model isn't sufficient for all tasks. Future releases will add options for handling transactions to cover a wider range of uses.

Known Issues
------------

 - Dictionary objects can't have an empty string as a key
 - Can't use the -t switch in interactive mode
 - Statements of the form foo <- bar don't work unless either bar is a parameter of the worker or foo is an output with the new parser
 - statements of the form foo { ... do something ... } don't work with the new parser
 - The interpreter will crash if you try to run a program that doesn't define Main
 - DS port freezes after a while (possibly runs out of memory?)

Contact
-------

Questions? Comments? Bugs? Flames? My email address is: pavone@retrodev.com
You can also join the Rhope mailing list at http://groups.google.com/group/rhope