Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Factor (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==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.<ref>{{cite web | url = http://docs.factorcode.org/content/article-ui.html | title = Factor documentation: UI framework | first = Slava | last = Pestov}}</ref> * Bindings to several database libraries, including [[PostgreSQL]] and [[SQLite]].<ref>{{cite web | url = http://docs.factorcode.org/content/article-db.html | title = Factor documentation: Database library | first = Doug | last = Coleman}}</ref> * An [[HTTP]] server and client, with the Furnace web framework.<ref>{{cite web | url = http://docs.factorcode.org/content/article-http.server.html | title = Factor documentation: HTTP server | first = Slava | last = Pestov}}</ref> * Efficient homogeneous arrays of integers, floats and C structs.<ref>{{cite web | url = http://docs.factorcode.org/content/article-specialized-arrays.html | title = Factor documentation: Specialized arrays | first = Slava | last = Pestov}}</ref> * A library implementing regular expressions, generating machine code to do the matching.<ref>{{cite web | url = http://docs.factorcode.org/content/article-regexp.html | title = Factor documentation: Regular expressions | first1 = Doug | last1 = Coleman | first2 = Daniel | last2 = Ehrenberg}}</ref> A [[foreign function interface]] is built into Factor, allowing for communication with [[C (programming language)|C]], [[Objective-C]] and [[Fortran]] programs. There is also support for executing and communicating with shaders written in [[GLSL]].<ref name="dls"/><ref>{{cite web | first = Slava | last = Pestov | url = http://factor-language.blogspot.com/2010/07/overhauling-factors-c-library-interface.html | title = Overhauling Factor's C library interface| date = 28 July 2010 }}</ref> 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 [[system image|image]]-based model, analogous to many [[Smalltalk]] implementations, where compiled code and data are stored in an image.<ref>{{cite web | first = Slava | last = Pestov | url = http://factor-language.blogspot.com/2010/01/factors-bootstrap-process-explained.html | title = Factor's bootstrap process explained| date = 10 January 2010 }}</ref> 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.<ref name="dls"/><ref>{{cite web | first = Slava | last = Pestov | url = http://factor-language.blogspot.com/2008/07/on-shaking-trees.html | title = On shaking trees| date = 5 July 2008 }}</ref> The Factor compiler implements many advanced optimizations and has been used as a target for research in new optimization techniques.<ref name="dls"/><ref>{{cite web|first=Daniel |last=Ehrenberg |title=Closure elimination as constant propagation |url=http://factorcode.org/littledan/abstract.pdf |year=2010 |url-status=dead |archive-url=https://web.archive.org/web/20110726044425/http://factorcode.org/littledan/abstract.pdf |archive-date=2011-07-26 }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)