Implementation and Libraries
Factor includes a large standard library, written entirely in the language. These include
- A cross-platform GUI toolkit, built on top of OpenGL and various windowing systems, used for the development environment.
- Bindings to several database libraries, including PostgreSQL and SQLite.
- An HTTP server and client, with the Furnace web framework.
- Efficient homogeneous arrays of integers, floats and C structs.
- A library implementing regular expressions, generating machine code to do the matching.
A foreign function interface is built in to Factor, allowing for communication with C, Objective-C and Fortran programs. There is also support for executing and communicating with shaders written in GLSL.
Factor is implemented in Factor and C++. It was originally bootstrapped from an earlier Java implementation. Today, the parser and the optimizing compiler are written in the language. Certain basic parts of the language are implemented in C++ such as the garbage collector and certain primitives.
Factor uses an image-based model, analogous to many Smalltalk implementations, where compiled code and data are stored in an image. To compile a program, the program is loaded into an image and the image is saved. A special tool assists in the process of creating a minimal image to run a particular program, packaging the result into something that can be deployed as a standalone application.
The Factor compiler implements many advanced optimizations and has been used as a target for research in new optimization techniques.
Read more about this topic: Factor (programming Language)
Famous quotes containing the word libraries:
“To me, nothing can be more important than giving children books, Its better to be giving books to children than drug treatment to them when theyre 15 years old. Did it ever occur to anyone that if you put nice libraries in public schools you wouldnt have to put them in prisons?”
—Fran Lebowitz (20th century)