Skip to content
EntityQ1391724· pop 14· linked from 36 articles

Factor (язык программирования)

Sign in to save

programming language

Source code

Factor is a concatenative, stack-based programming language with high-level features including dynamic types, extensible syntax, macros, and garbage collection. On a practical side, Factor has a full-featured library, supports many different platforms, and has been extensively documented. The implementation is fully compiled for performance, while still supporting interactive development. Factor applications are portable between all common platforms. Factor can deploy stand-alone applications on all platforms. Full source code for the Factor project is available under a BSD license. If you have a build environment set up, then you can build Factor from git. These scripts will attempt to compile the Factor binary and bootstrap from a boot image stored on factorcode.org. Unix: make and then ./factor -i=boot.unix-x86.64.image Windows: nmake /f Nmakefile and then factor.com -i=boot.windows-x86.64.image or factor.com -i=boot.windows-arm.64.image for ARM64 You can download a Factor binary from the grid on The nightly builds are usually a better experience than the point releases. The current stable version of Factor uses GTK2 and gtkglext . On Debian 13 “Trixie” and newer Ubuntu releases (25.10 “Questing Quokka” and the 26.04 “Resolute Raccoon” development branch), the gtkglext library is no longer available in the official repositories. Factor's GUI depends on this library, so a fresh install cannot start the GUI on these systems. You can install the libgtkglext1 .deb package from a previous Ubuntu release (e.g. 25.04 “Plucky Pangolin”) and manually add symbolic links expected by Factor: The development branch of Factor has switched from GTK2 to GTK3 for the GUI backend. If you're building or running a binary from the development branch, make sure the GTK3 development library is installed. The Factor environment includes extensive reference documentation and a short "cookbook" to help you get started. The best way to read the documentation is in the UI; press F1 in the UI listener to open the help browser tool. You can also browse the documentation online. You can also write scripts that can be run from the terminal, by putting !/path/to/factor at the top of your scripts and making them executable. During Factor's lifetime, source code has lived in many repositories. Unfortunately, the first import in Git did not keep history. History has been partially recreated from what could be salvaged. Due to the nature of Git, it's only possible to add history without disturbing upstream work, by using replace objects. These need to be manually fetched, or need to be explicitly added to your git remote configuration.

Excerpt from the source-code README · 9,041 chars · not written by Vinony

Wikidata facts

Official website
factorcode.org
Show 8 more facts
inception
2003-01-01
copyright license
BSD licenses
influenced by
Self
software version identifier
0.101
source code repository URL
github.com/factor/factor
typing discipline
dynamic typing
programmed in
Factor
programming paradigm
stack-oriented programming
Sources (7)

via Wikidata · CC0

Article · Русский

Factor — это динамически типизированный конкатенативный язык программирования, чья разработка и реализация ведётся Славой Пестовым. Основное влияние на язык Factor оказали языки программирования Joy, Forth, Lisp и Self. Автор определяет Factor как «практический стековый язык программирования», важными факторами, определяющими направление его развития, являются производительность, богатство выразительных средств (при сохранении ясности и согласованности) и создание достаточно всеобъемлющей стандартной библиотеки. Подобно другим конкатенативным языкам, Factor имеет постфиксный синтаксис, что означает, что аргументы функции пишут перед её именем. Например, Hello world в языке Factor это: "Hello world" print Фактор — язык с динамической типизацией, и уникальной объектной системой, близкой к CLOS. В Факторе есть небольшой набор базовых типов, а пользователи и стандартная библиотека могут создавать собственные классы используя кортежи и другие механизмы. Фактор поддерживает наследование. Помимо классов, являющихся кортежами имеются и другие механизмы создания классов; Factor поддерживает предикатные классы (подмножества некоего класса, для которых соблюдается условие-предикат) и классы объединения. Встроенные составные типы данных Фактора включают векторы фиксированной и переменной длины и хеш-таблицы. Подобно таким языкам, как Common Lisp и Python, Фактор поддерживает богатый набор арифметических типов данных: простые целые, целые неограниченной длины, числа с плавающей запятой. Комплексные числа, дроби (рациональные числа) реализованы в стандартной библиотеке. Также стандартная библиотека реализует связные списки, массивы статически типизированных значений и другие структуры данных. Одна из главных целей Фактора — применение в итеративной разработке через тестирование, поэтому ядро Фактора можно рассматривать как безопасный диалект Форта. Хотя Фактор — динамически типизируемый язык, компилятор имеет доступ к глубине стека слова (функции).

Abstract from DBpedia / Wikipedia · CC BY-SA