Welcome Java & Python programmers

While Field is built by and around the needs of programming digital artists, many of the things that they need are really the same things that programmers in general are interested in. This short page recontextualizes other parts of the documentation on this site for that community.

Jython, not Python

The most important thing to realize is that Field is fundamentally a Java application with a Jython environment embedded in it. Jython is the Java implementation of the Python language. Jython's central gambit is to trade incompatibility with Python libraries that have native C parts for full and completely seamless integration with the Java runtime. Many Python libraries work just great; but all Java libraries work in a very complete sense — you can access classes in them (including subclassing them), instantiate them, "overload" operators concerning them and so on. It's really quite a trick — they suddenly become first class members of the Python environment.

This in turns means two things:

  • Python programmers will have to watch out, because it's possible that a library dear to their heart won't run in Field. But they might suddenly be interested in Java libraries in a way that they weren't before.
  • Java programmers should get excited because they can now use a wonderfully well designed language, ideal, in our opinion for the "page of code" that stitches together their own Java code-bases. In Field they can assemble, explore and test their Java live.

The Jython community has currently released a Python 2.5-ish version and Field will generally track Jython betas in order to get all of the latest language things.

Selected Documentation pages

First of all, where to actually get it: the beta binary release page.

As a Python or Java programmer the next thing that you'll be interested in is the Plugin manager — because this is where you'll add Java classes (.jar, trees of .class and .jar and trees containing source code) and Python modules. There's a nice little video walkthrough of how to point Eclipse and Field at each other.

Of course, you'd also should take a good look at The Text Editor — which is where you'll be writing code in Field. The canvas is where you create the elements that contain code.

Because it is in some way the open source text-based programming digital art environment Field has special support for integrating with the Processing environment. Processing's language is "Java-lite", but the tutorial is probably a good place to start with Field if you are a Java programmer.

Don't miss the autocomplete but please be aware that Field 'completes' by evaluation rather than analysis. This typically allows for much more detailed and relevant completion and inspection in a "live-coding" scenario, but can trip you up if you activate completion on expressions with side-effects. What this means is that completion on someOldVector3. knows all about the contents of this Vector3 as well as its methods (and JavaDocs and even parameter names parsed from the source). This works for Field's classes, your classes and the classes that are in that .jar you just found online. But the nonsensical attempt to complete System.exit(). results in a sudden blank screen (but you should also note that Field saves and commits to a repository automatically on exit).

Also note the documentation for Embedding GUI elements in places — most unusually in the text editor, on the canvas, and for Java programmers, Field's Swing integration. These are things that you certainly can't do with Eclipse.

And, while you most certainly can do this in Eclipse, "real programmers" will almost certainly want to use the Unit Testing feature, at least for some values of "real". Java programmers will also be interested in Field's support for dynamic class reloading.

Both Python and Java programmers will be interested in some of the minimal python library that Field comes with — LazyFunctionalHelpers, KeyframingInCode, GeneratorExamples, SimpleLinearAlgebra. Python programmers will see an example of just how flexible Python can be (and can, of course, help us make it better); Java programmers will see some syntax that might rock their worlds (and can, of course, be used concretely with their own classes). Java programmers can also extend some of these mechanisms to better handle their own personal Java interfaces and abstractions.

Under the hood, programmers will probably want to scan RunningField. Java programmers can use Field not just to talk about their own codebases, but embedded inside their own codebases. We'll be looking at extending the documentation on this use (which is actually dominant inside OpenEnded's studios) shortly. At the very least you might want to launch Field from the command line.

Finally, of course, there's the main jumping off point for almost all of the documentation. Field tries to be small on libraries — there's more than enough between the Python community and the Java community. But you'll find things like a fully featured 2d drawing library (great for when you need a quick graph or visualization of some code); an image processing library and some proof- of-concept level support for other languages (including Scala and JavaScript). These languages can be mixed freely together in the same text editor. We still think that's pretty cool.

Field has been an internal project for 6 years and a quiet open source project amongst friends for one of those. It's been used for all of the technically intensive artworks at http://openendedgroup.com. What we are doing here is firstly making it stable enough and documented enough for others to use in exchange for hearing their ideas and use-cases.

Email field 'at' openendedgroup.com at the first sign of trouble or inspiration. Our nascent Google discussion group is field-development.