Factor programming :

I've just started studying Factor programming language, here are a few of my notes so far.

Table of contents:

Setting-up your editor

I'll be using e-texteditor, because Factor comes with an included TextMate bundle. But be aware that there are unsupported actions under Windows inside the menu.

I've made a special etexteditor.factor file for factor, you'll find it here.

You'll have to create a file ~/.factor-rc. Windows explorer can't create a file that starts with a . , so this little python script will handle the task :

#!/usr/bin/env python
# -*- coding: utf-8 -*-

conf = """USING: namespaces editors.etexteditor ;"""

f = open('.factor-rc','w')
f.write(conf)
f.close()

Put this in your C:\Documents and Settings\user-name directory and run it once, it will then create a .factor-rc.

Now, supposed you have a vocabulary inside work/palindrome and a word palindrome?, just type the following to edit your word definition:

USE: palindrome
\ palindrome? edit

e-texteditor will then be called by Factor, you must see something like this :

etexteditor

Note : I have a problem when editing a word, _e opens the file it is in but also another one called "-n9*" : I really don't know what's that.

Comments
Back to index
blog comments powered by Disqus

Atom feeds