Pez is a Forth dialect based on Atlast, with expanded capabilities and more portability.
Shell C Forth Ruby
Permalink
Failed to load latest commit information.
doc Add a bug to TODO. Apr 5, 2015
lib There is not much to this, but it is a small library for fractions. Jan 4, 2012
m4 I love getting to delete m4 files! Jun 2, 2012
test The tests need this file, or they don't work. Dec 26, 2009
.gitattributes Make GitHub detect *.pez as Forth Mar 26, 2015
.gitignore Keep out the generated file. Jun 13, 2010
INSTALL I suppose we need these. Jul 16, 2009
Makefile.am Gone. Aug 16, 2010
README Version bump, doc update Nov 1, 2009
aclocal.m4 Here I was, worried that adding libtcc to the autotools mess would be a Sep 6, 2011
autogen.sh More autotools cleanup. Mar 14, 2010
config.guess Some of these can be gotten rid of; I am sure of it. Jul 22, 2009
config.sub Some of these can be gotten rid of; I am sure of it. Jul 22, 2009
configure.ac Here I was, worried that adding libtcc to the autotools mess would be a Sep 6, 2011
depcomp Some of these can be gotten rid of; I am sure of it. Jul 22, 2009
doccer.rb rudimentary signature grabber in ruby Dec 13, 2009
install-sh Some of these can be gotten rid of; I am sure of it. Jul 22, 2009
ltmain.sh AUTOMATIC Apr 10, 2010
missing Some of these can be gotten rid of; I am sure of it. Jul 22, 2009
pez.c Attempt to make that memory contiguous. Apr 5, 2015
pez.h Attempt to make that memory contiguous. Apr 5, 2015
pezdef.h A couple of minor error-handling fixes, and make bounds-checking the … Nov 24, 2011
pezmain.c Floats get their own stack. Jul 31, 2010
primdeftest.c Atlast -> Pez Jun 25, 2009
regress.pez New word: rdrop May 29, 2011
st.c Pez hash built-in hashes woo. Mar 14, 2010
st.h Adding P. Moore's hash table implementation, with Ruby's modifications. Mar 14, 2010
type_names This was the stuff I was putting off because it was tedious. Even gen… May 9, 2010
type_primitives.c There was a bug in the handling of floats/doubles when loading/storin… Sep 3, 2010
typegen.pez There was a bug in the handling of floats/doubles when loading/storin… Sep 3, 2010

README

Pez is a small, lightweight, 100% C (for now), embeddable or standalone,
public domain, portable, highly nonstandard dialect of Forth.  It was
originally based on the Atlast system (see doc/CREDITS for more
information), but the feature set has been expanded significantly and
there are flagrant breaks with Forth compatibility.

The primary goal of the Pez project, much like the goal of the Atlast
project, is to bring dead-simple scriptability and dynamism to otherwise
static code, with a focus on user-level scripting of applications.
There are a number of compile-time options for trimming down and
limiting in the case of untrusted input, and also a large number of
OS-level facilities both added and planned.  Pez is also designed to
work well as a stand-alone language for general-purpose coding.  And
it's designed to be fun.

I highly recommend having a look at doc/historic/atlast.pdf, written by
Mr.  Walker in 1990, especially the introduction which is still
shockingly relevant now, about 20 years later.

There are a number of benefits to adding user-level scripting to an
application.  You get a free doman-specific language to expose to users
however you see fit.  You get a free configuration file parser in the
same language as your application's DSL.  You get a dynamic internal
scripting language a la LUA.  You get a safe, plain-text, cross-platform
language for communicating between your applications.  It can even be
used as a complete, full-featured standalone language.  And it's
lightweight to boot:  running on a 64-bit Linux, I'm looking at about 568k
of memory for the REPL for a full system.

Pez has added to the Atlast system a number of features:
* Portability to 64-bit platforms
* A Foreign Function Interface, for dynamically loading libraries to
  interface with system libraries.
* More complete access to standard system calls, such as fork(), exec(),
  etc.
* Regular expression support.
* Garbage collection.
* Numerous small improvements, and more large improvements on the way.  See
  doc/TODO.

I certainly hope that you find this codebase to be as useful and as much
fun as I have.

If you're a Ruby fanatic, by the way, there is also Rupez, which lets
you talk to libpez by means of the fantastic RubyFFI.  See
http://github.com/automatthew/rupez for the code.

Pete Elmore