beepbeep-3.jar
. This file is runnable and stand-alone, or can be used as a library, so it can be moved around to the location of your choice. If you want to create a Java project that uses BeepBeep, simply include beepbeep-3.jar
in your CLASSPATH and you are ready to begin. In Eclipse, this means opening the Build Path dialog, selecting Add external JARs, and pointing to the location of beepbeep-3.jar
on your machine.main()
method, and type the following:QueueSource
object, and pulls one event from its output. If everything compiles, and running the program prints a single line with the text foo
, then the environment is correctly setup to use BeepBeep.beepbeep-3.jar
even if palettes are included into it. For this reason, palettes are also sensitive to the version of the main JAR that you are using; attempting to load a palette compiled for an older version of BeepBeep may create errors, and vice versa. No problems should occur if the latest versions are used.Function
and Processor
objects that are provided in the system's core. You will learn how to trim, filter and slice event streams, apply functions and sliding windows to events, and so on. Virtually any BeepBeep program involves one of the objects described in this chapter.Processor
objects, such as how to copy them, or call their functions across multiple threads.Processor
and Function
objects, package them into their own palette, and make them interact with other BeepBeep objects.Processor
and Function
objects provided by BeepBeep and its palettes, and which are mentioned somewhere in the book. For each of them, it shows the standard picture used to represent them and provides a short definition.beepbeep-3-tutor.jar
, which can be integrated in a project like all the other JARs mentioned earlier. This library exposes an object called Tutor
. All exercises in the book have a unique name; for example, exercise number 2 of Chapter 2 is called C2E2
. There exist tutor instances for many exercises; you can get the instance of your choice through Tutor
's static method get()
. If a tutor does not exist for an exercise, an exception will be thrown. (At the time of this writing, the tutor is still a work in progress.)Tutor
object for an exercise named TEST
:Processor
object that lets all events pass through; this is done by the aptly named Passthrough
processor. To let the tutor check the answer, it has to be told what are the inputs and the outputs of this processor chain:check
:Trim
processor.Trim
processor discards the first event it receives, the first event to be output is the letter "B" instead of the expected "A".deps
folder in the project's root. The sources can be compiled by simply typing:beepbeep-3.jar
in the folder. In addition, the script generates in the doc
folder the Javadoc documentation for using BeepBeep.14bb8359fabd507642235e81e88e546e0669f7d5
b99ca2f8c6b897821a1e54b73b5bae0fa2dc3214
27043f6175b54b06bf6d17064bcabecc22c9e9ec