Home

My Languages
wxBasic
Py
Euphoria
EE Editor
Win32Lib
Euphoria/Java
Dos32Lib
Llama
mwLib
UnderScore

People
About Me
Charles Cuny
His Evil Twin
Tom Riso

Music
One Ring

Links
Euphoria Home Page
MAZ Sound Tools

Py: A Hybrid Programming Language

The Py Programming Language

Py is a modest structured programming language I'm writing. It's a mixture of Python, C, JavaScript, Basic, and (of course) Euphoria. If you are familiar with any of the above languages, you'll find Py easy to learn. Py is written in Euphoria, a language which I highly recommend. The development of Py grew from my wish list of items for Euphoria.

Py offers the features expected of any modern programming language:

  • Structured
  • Interpreted
  • Automatic garbage collection

Py is also interactive - you can enter code at the command line, with automatic syntax coloring and indenting.

If you use Euphoria, you might be interested to know that Py has:

  • Variables automatically created on assignment
  • No need to declare types
  • No differentiation between function and procedure
  • Sequence comparison uses =, not equal().
  • for / in / do loop structures
  • Namespaces
  • Forward references
  • Pass by reference

What's New

  • January 26. Fixed binder (was mangling code), added compiled versions and instructions on how to interface Py to Win32Lib.
  • January 24. Added the ability to bind programs into a single executable.
  • December 1. Fixed precedence bug, thanks to Tommy Carlier.
  • November 28. Fixed bug, local variables with same name as module variables now scoped correctly.
  • November 18. Routines can now accept variable numbers of arguments. Several bug fixes, added documentation in HTML format.
  • November 9. lots of fixes; added string library and new demo.
  • November 6. Added pass by reference, fixed parsing bug in fractional numbers.
  • November 3. Bugfixes, documentation fixes suggested by Jiri and Falkon. Also added more validation tests to prevent the code from crashing.
  • November 3. Fixed handling of underscore, error messages.
  • November 1. Fixed routine calls from indexed variables, dictionaries now use hybrid (find/binary search) lists, del works dot notation, variables are set to undefined, added 'var' declarations, new version of Ox.
  • October 31. Lots of bugfixes: indexes, division by zero, better diagnostics, line continuation char, backslashes, 'this' variable, Win32Lib support, hex numbers.
  • October 27. Fixed creating of dictionaries, 'in' operator, print, printf and puts (more like C versions), // style comments, traceback on error. Slicing and indexing is now generalized to anything that returns a sequence, not just variables.
  • October 26. Added routine_id, OOP support.
  • October 25. Lots of bugfixes. Namespace works again, dot notation for association lists, and I've added a spiff new syntax-coloring editor. Variables are checked to see if they are initialized before use, and there are more error checks on math operations.
  • October 23. Added namespace changes (mostly untested), bug fixes for parsing numbers. Source version for 2.2b available.
  • October 20. Irv Mullins reported a handful of bugs that I've been able to track down. Kenneth Rhodes also found a problem with loading files under Linux that's been corrected. Updates have been posted.
  • October 19. I've added support for dictionaries (associative lists) via Jiri Babor's code. There are also three versions of Py available for download: one source code, and two executable forms.

Downloading Py

Keep in mind that Py is beta quality software, and undergoing daily development and bug testing. But it's complete enough be useful, and you can do some cool stuff with it.

You have five download options:

  • Euphoria Source Code v3.0a Jan 26, 2000 (168K). This includes the Py source code, binder source, documentation, and some example programs filched from Euphoria. It also comes with Ox, my yacc-ish parser generator I used to build Py, and Fix, a utility for helping bind Euphoria programs that make intensive use of routine_id (like Py).

    You need the Euphoria interpreter to run the source version of Py, which is available free from the Euphoria home page.

  • DOS Executable v3.0a, Jan 26, 2001 (396K). This includes documentation, demos and an executable version of Py and the Py binder. This differs from the compiled version (below) in that it's built using the Euphoria interpreter, so it's about half as slow as the compiled version.

  • Compiled DOS Executable v3.0a, Jan 26, 2001 (416K). This includes documentation, demos and the compiled executables of Py and the Py binder. This has been compiled using the 2.2 alpha-4 version of the Euphoria compiler, using DJGPP. Zoom!

  • Euphoria Win32 Source Code v2.5d Oct 31, 2000 (69K). Same as the DOS32 version, but includes Win32Lib support. Interactive mode is pathetically slow because of console writes.

  • Compiled Linux Executable v2.2, Oct 20, 2000 (148K). Derek Parnell kindly compiled a Linux version, so it's essentially the same as the Compiled DOS version. However, it's compiled with an unregistered version of the Euphoria to C translator, so there's a slight delay before launching.


Back to my home page.
Last updated on Friday, January 26