Does Factor have a concurrency model?
Yes, Factor supports explicit, cooperative coroutines. A new thread can be spawned with the word
Does Factor support multiple OS threads?
Currently, no. Factor's threading model works somewhat similarly to Erlang's, with the important difference that there is only one heap, and the runtime (virtual machine) always runs in a single OS thread. The VM isn't currently thread-safe, though it will be made so in the future. Certain language features, such as word properties, currently pose challenges for making Factor thread-safe. Because everything is run in a single OS thread and there is no direct efficiency gain, Factor threads are most useful for things like executing parallel I/O operations that involve waiting.
What's some cool feature of Factor that other languages don't support?
One small feature that comes in handy is the
What kind of foreign function interface does Factor have?
Factor's C FFI loads dynamically linked libraries (.dll, .so or .dylib) at runtime, allowing the user to avoid writing, generating or otherwise messing with C code. To learn more, read the FFI documentation, or consult Elie Chaftari's brief introduction to the FFI.
Factor also has a
Why isn't my code using alien working?
You have to makes sure the appropriate dynamically linked library is being loaded using the word
What kinds of GUI libraries does Factor support?
Factor uses a cross-platform UI library written in Factor itself, using OpenGL and a small amount of native code on each platform. The listener uses this library. See UI. There aren't any bindings to wxWidgets or Gtk yet. Gtk bindings would be doable but somewhat challenging due to their heavy use of macros and complicated structs, and a SWIG binding could be helpful in implementing them. wxWidgets bindings would be impossible right now, as alien does not support C++'s name mangling.
Why isn't Factor in the Computer Language Shootout?
We want to make Factor faster before compiling a submission. Most things are already far faster than scripting languages, but certain things need tweaking.
How do you put a Factor program into a package so it can be run easily?
Factor ships with a deploy tool which creates Mac OS X
To deploy a vocabulary into an application which will run the vocabulary's main word, use the code
USE: ui.tools.deploy "vocab-name" vocab deploy-tool
Does Factor support Unicode?
There is no one meaning to the phrase "Unicode support", but there are a few things that a modern programming language is expected to support in its library: UTF-8/UTF-16 input and output, Unicode collation, Unicode-appropriate casing operations, normalization, strings can hold any Unicode code point, and support for Unicode text rendering in the UI. Of these, Factor supports all but Unicode font rendering, which should be finished before 1.0 comes out.
How do I convert a character to upper or lower case in Unicode?
This isn't a well-defined operation. For example, the ß character becomes SS in upper case. Some letters have context-dependent case mappings. So if you need to change the case of something, use strings, not individual characters. The Factor Unicode library doesn't implement character mapping, because the behavior could only be incorrect. If what you're converting is just ASCII, then there are character conversion routines defined just for that. For case-insensitive comparison, partial collation keys might be appropriate.
Can a vocabulary have sub-vocabularies?
Yes, but there's no real relationship between the main and sub vocabularies. It's just a naming/directory organization thing, and by convention, they're related.
Can I have two words with the same name in different vocabs?
You probably don't want to design a set of vocabularies to have overlapping word names, but sometimes it comes up that you want to use two libraries that use the same word names. In this case, there are two resolution strategies. The simplest, if you only need one of the words which overlaps, is to put the one you want second in the order of the
To access the word
This revision created on Fri, 18 Sep 2015 08:23:20 by AlexIlin (Rollback to 'Fix a typo.')
All content is © 2008-2010 by its respective authors. By adding content to this wiki, you agree to release it under the BSD license.