The Falcon Programming Language
A fast, easy and powerful programming language
Location: Home page >> Falcon wiki
User ID:

Falcon Wiki - Getting started

First things first! You'll need the Falcon language core, engine, command line interpreter and the accessory modules called Feathers. The good news is they come packaged together.

Getting Falcon

You can download the current Falcon version here: http://www.falconpl.org/index.ftd?page_id=official_download.

If you're on MS-Windows, get the most advanced VSx package, unless you plan to develop extensions or embeddings, in which case you should get the package matching your development platform.

If you're on MacOSX, the installer for MacOSX has everything you should need; in case something doesn't work for you, try the procedure suggested for building sources in GNU/Linux, below.

If you're on Solaris, get the package for your architecture available from our partners at BlastWave.

If you're on GNU/Linux, chances are that you have already Falcon installed or available from your distro. Search for packages called falcon or falconpl. If your distro still doesn't ship Falcon, or if it's too outdated for your tastes, get the GNU/Linux TGZ prebuilt binaries. They are made to be extracted on the topmost directory; we usually ship binaries built for x86 and AMD64.

In case of trouble, on UNIX-like systems it may be best to obtain the source package and compile it yourself (which is fairly straight forward). Outside of the standard UNIX-like environment, you'll need CMake. The source package comes with a bash script (build.sh) to simplify the build process, and a comprehensive README explaining how to tweak your build.

Finally, if you want to see Falcon running on a great OS, you should try out AuroraUX, an emerging open source distribution of Open Solaris. It comes with Falcon ready to run.

As most developers would agree, its definitely nice to have grammar highlight and editor support for the language you're working with. If your editor doesn't support Falcon natively (yet), check out the list of supported editors here.

Running Falcon

Falcon command line interface interprets falcon scripts (and pre-compiled modules). From the command prompt, try to invoke the "interactive mode" calling

$ falcon -i

and entering

printl( "Hello world" )

For fun, you can try also to enter some expressions directly, for example: 1+2, a = 10, and so on.

On MS-Windows systems, the Falcon installer registers ".fal" and ".ftd" extensions so that you can double click a script and see it running. Also, you can directly call the script name from the command prompt, as if it was an .exe file. The directory "\tests\samples" contains some samples you may try launching; you can try your own script by firing up notepad (or any text editor) and writing a file like:

> "Hello from Falcon"

And save this as "hello.fal". Double clicking on the file will cause it to be run. Same as calling "c:\> falcon hello.fal"

Notice: if you call falcon.exe without any parameter from the command prompt, it will try to read the program from the standard input stream. It may seem that falcon.exe hangs so try writing something or you can press CTRL+Z and return.

On UNIX-like systems, the procedure is similar, except to have a falcon script immediately runnable, it is necessary to add a proper "#!" directive on the first line (ignored on MS-Windows systems) and add the executive attribute (chmod u+x script.fal), like this:

#!/usr/bin/env falcon

> "Hello world"

And then launching it like

$ chmod u+x hello.fal
$ ./hello.fal

Learning Falcon

Now that you know how to use your new toy, you'll want to know more about the language. The Official Documentation will give you an in-depth understanding of Falcon. For those who prefer to learn by doing, the cookbook may be helpful, but you'll need to integrate it with the core function reference. As with any reference you shouldn't memorize them. Just have a look at them to get an idea of where to look to get more informations on a precise topic. Also, the standard modules, called Feathers provide load-on-demand functionality.

But I want more!

And you can have. The Module list contains Falcon modules officially developed by our community. They follow a different release plan and schedule, as they are developed by our community. Also, you may wish to look at the project list, which displays a list of projects related to Falcon. For example the Falcon module for Apache2 which runs this site.

I want to do my own things!

And you can! -- You may wish to develop a native module to bridge Falcon and your favorite database system, or drive your favorite GUI system. We're writing guides about how to build modules. Quick instructions are contained in the skeleton module. Provided you have a sane development environment, and you have CMake installed (remember to install it also in the system PATH), and with the help of an utility called "falconeer.fal" (shipped with falcon command line) it creates a ready to run native C++ module containing a couple of test functions.

If you plan to embed Falcon in your application to provide some scripting facility, the Embedder's guide gives you extremely well commented step by step guide instructions. Additionally you'll find multiple ready-to-run samples available here

In both cases you'll need to refer to the engine API reference.

What if I am stuck?

Don't worry! We have plenty of people willing to help you moving forward and realize your projects. For the inpatients, you may try to get immediate support in our IRC channel at Freenode. If your question needs a bit more argumentation, you may try to check out newsgroup. Finally, if your question is more direct, you can directly contact the Inner committee, or contact some member (i.e. the lead developer of a module) directly by clicking on his/her name.

Great. Where do I sign?

You don't have to. The best things in life are free, as in free speech, and this project is not an exception. But if you want to join us, you're certainly welcome. Just go on the home page and click on "JOIN NOW". You won't regret!

If you have an interesting project that everyone can benefit from, you may also feel like enter your module or your project to our site. Select "START A PROJECT" from the home page, and start making the difference!

Go To Page...


Elapsed time: 0.035 secs. (VM time 0.028 secs.)