Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 139 lines (111 sloc) 5.207 kB
d63bb5c @bakkdoor add logo to README
authored
1 [![Logo](http://fancy-lang.org/fancy-logo.png)](http://fancy-lang.org)
4e414b3 @bakkdoor Clean up README
authored
2 # The Fancy Programming Language
590c78b @bakkdoor README added
authored
3
b799520 @bakkdoor added travis build status image to readme
authored
4 [![Build Status](https://secure.travis-ci.org/bakkdoor/fancy.png)](http://travis-ci.org/bakkdoor/fancy)
6f33bf2 @bakkdoor added build status indicator to README
authored
5
590c78b @bakkdoor README added
authored
6 ----------------------------------------------------------------------
4e414b3 @bakkdoor Clean up README
authored
7
590c78b @bakkdoor README added
authored
8 Fancy is a dynamic, object-oriented programming language heavily
fff7fc1 @bakkdoor Small fixes to README
authored
9 inspired by Smalltalk, Ruby, Io and Erlang. It supports dynamic code
a33a8f8 @bakkdoor Updated to README
authored
10 evaluation (as in Ruby & Smalltalk), class-based mixins, (simple)
11 pattern matching, runtime introspection & reflection, "monkey
12 patching" and much more. It runs on Rubinius, the Ruby VM, and thus
13 has first-class integration with Ruby's core library and any
0bb56ab @bakkdoor Another update to README (formatting)
authored
14 additional Ruby libraries that run on Rubinius, including most
15 C-extensions.
8e7f416 @dennyabraham convert README to markdown
dennyabraham authored
16
816d804 @bakkdoor Updated README
authored
17 It supports concurrency via the actor-model, including first-class
fff7fc1 @bakkdoor Small fixes to README
authored
18 futures and async message send semantics built into the language,
19 similar to Io.
590c78b @bakkdoor README added
authored
20
8e7f416 @dennyabraham convert README to markdown
dennyabraham authored
21 For a quick feature overview, have a look at `doc/features.md`
aa4c877 @bakkdoor Small update to README: Mention InFancy book.
authored
22 There's also a work-in-progress tutorial/book on Fancy here:
23 https://github.com/fancy-lang/infancy
5001c87 @bakkdoor add GitBook link to README
authored
24 A GitBook version (with PDF, ePub & Mobi formats) is available here:
25 https://www.gitbook.io/book/kary/infancy
4fadee9 @bakkdoor Mentioned doc/features.md in README
authored
26
7347ffd @bakkdoor update README
authored
27 ## Related links
4e414b3 @bakkdoor Clean up README
authored
28 * **Website**: http://www.fancy-lang.org
a7a0ec8 @bakkdoor add link to dev blog
authored
29 * **Blog**: http://bakkdoor.net
4e414b3 @bakkdoor Clean up README
authored
30 * **Mailinglist**: http://groups.google.com/group/fancy-lang
31 * **IRC Channel**: irc://irc.freenode.net:6667/fancy
32 * **IRC Logs**: http://irc.fancy-lang.org
33 * **API Documentation**: http://api.fancy-lang.org
34 * **Related Projects**: https://github.com/fancy-lang
35 * **Twitter**: [@fancy_lang](https://twitter.com/#!/fancy_lang)
36 * **Tutorial**: https://github.com/fancy-lang/infancy
37 * **Videos / Screencasts**: http://www.youtube.com/playlist?list=PLF576B1AD1F5DE1FB
38
39 ## Compiling / Installing from source:
40 ### Dependencies:
a33a8f8 @bakkdoor Updated to README
authored
41 - Rubinius.
95e5a01 @bakkdoor require rbx 2.0 from now on
authored
42 You'll need at least version 2.0.0 for Fancy to work as expected.
43 See http://rubini.us/downloads/ for more information.
c61d2e1 @bakkdoor Updated README to point to Rubinius 1.2.1 release
authored
44 If you want to take advantage of the latest VM improvements, we
45 suggest using rvm and installing rbx-head.
a33a8f8 @bakkdoor Updated to README
authored
46 See http://rvm.beginrescueend.com/ for more information.
ff118f6 @vic Updated README
vic authored
47 - Rake.
0362b5d @goyox86 Remotion of old Makefiles, and addition of some files needed for usin…
goyox86 authored
48 - GNU Bison ( version 2.4 and higher otherwise you will get a Segmentation fault ).
49 - GNU Flex.
50
79cffcb @bakkdoor Updated README with latest features & development status.
authored
51 Given the tools & libraries mentioned above, Fancy _should_ build without problems
52 on most *nix systems. We successfully have built Fancy on Debian & Ubuntu, OpenSuSE
029b3a4 @bakkdoor update README: fancy also runs on OSX 10.7
authored
53 and Mac OS X 10.5, 10.6 & 10.7.
0362b5d @goyox86 Remotion of old Makefiles, and addition of some files needed for usin…
goyox86 authored
54
4e414b3 @bakkdoor Clean up README
authored
55 ### Standard building procedure:
0362b5d @goyox86 Remotion of old Makefiles, and addition of some files needed for usin…
goyox86 authored
56 Building Fancy is just that easy:
79cffcb @bakkdoor Updated README with latest features & development status.
authored
57
8e7f416 @dennyabraham convert README to markdown
dennyabraham authored
58 $ cd <fancy_source_path>
59 $ rake
0362b5d @goyox86 Remotion of old Makefiles, and addition of some files needed for usin…
goyox86 authored
60
a33a8f8 @bakkdoor Updated to README
authored
61 This should go pretty fast. It actually compiles Fancy's standard
62 library and compiler several times. Once via the bootstrap compiler
8e7f416 @dennyabraham convert README to markdown
dennyabraham authored
63 written in Ruby (see `boot/rbx-compiler/`), and then via the self-hosted
64 compiler (see `lib/compiler/`) itself.
2b282b6 @bakkdoor Updated README to mention bootstrapped compiler etc.
authored
65
40eefc1 @bakkdoor Fix spelling in README
authored
66 Once the bootstrapping process is done, you can run the hello world example:
0362b5d @goyox86 Remotion of old Makefiles, and addition of some files needed for usin…
goyox86 authored
67
8e7f416 @dennyabraham convert README to markdown
dennyabraham authored
68 $ ./bin/fancy examples/hello_world.fy
caf6658 @bakkdoor added more information to README file
authored
69
c294f1e @dirk Improve feedback from build system; move parser stuff into separate c…
dirk authored
70 #### Build commands
71 While working on the Fancy core and standard library (files in boot/ and lib/),
72 changes should be automatically picked up by Rake. This means running
73 `rake` will recompile just those changed files.
74
75 ##### Modifying the compiler
76 If you're working on the Fancy language compiler (lib/compiler/ and boot/rbx-compiler/),
77 you should run `rake clean` before running `rake`. This will rebuild the compiler so
78 you can test your changes.
79
80 ##### Modifying the parser
81 If you're working on the Fancy language parser (lib/parser and boot/rbx-compiler/parser),
82 you will need to run `rake clean_all` before running `rake`. This will clean all the
83 parser and compiler stuff.
84
4e414b3 @bakkdoor Clean up README
authored
85 ## Some technical information:
a33a8f8 @bakkdoor Updated to README
authored
86 As the language is running on the Rubinius VM, Fancy shares the same
87 runtime with Ruby. All of Fancy is built upon Ruby objects, so for
88 example when you open the String class in Fancy, it's just Ruby's
89 String class.
ff118f6 @vic Updated README
vic authored
90
0403529 @bakkdoor Update to README, including some minor improvements etc.
authored
91 Because of this, and because in Fancy's standard library (lib/*.fy) we
92 can define methods with the same name as they're defined in Ruby (but
93 taking no arguments), we have decided not to overwrite the Ruby
7808028 @bakkdoor small updates to README
authored
94 methods.
a33a8f8 @bakkdoor Updated to README
authored
95 This ensures that all Ruby libraries for example can use Ruby's
32f6625 Fixed typo in README
Keita Haga authored
96 Kernel#print or any other method in Ruby's kernel and work seamlessly.
0403529 @bakkdoor Update to README, including some minor improvements etc.
authored
97
98 Here's an example:
ff118f6 @vic Updated README
vic authored
99
5f0fd4d @bakkdoor Added Fancy code highlighting to README file
authored
100 ```fancy
91d9e9f @bakkdoor fix code indentation in README
authored
101 class Object {
102 def print {
103 "Print itself to the Console."
104 Console print: self
105 }
106 }
5f0fd4d @bakkdoor Added Fancy code highlighting to README file
authored
107 ```
ff118f6 @vic Updated README
vic authored
108
0403529 @bakkdoor Update to README, including some minor improvements etc.
authored
109 To meet this goal, the Fancy compiler renames Fancy methods taking no
110 arguments (like the previous "print" example) to a method named
111 ":print". Using explicit parens syntax will allow you to invoke any
112 Ruby method.
ff118f6 @vic Updated README
vic authored
113
5f0fd4d @bakkdoor Added Fancy code highlighting to README file
authored
114 ```fancy
91d9e9f @bakkdoor fix code indentation in README
authored
115 someObject print # Will actually invoke the Fancy ":print" method.
116 someObject print() # With explicit parens invokes the Ruby method.
5f0fd4d @bakkdoor Added Fancy code highlighting to README file
authored
117 ```
ff118f6 @vic Updated README
vic authored
118
0403529 @bakkdoor Update to README, including some minor improvements etc.
authored
119 Ruby method invocation supports passing a block variable to Ruby as a proc.
ff118f6 @vic Updated README
vic authored
120
5f0fd4d @bakkdoor Added Fancy code highlighting to README file
authored
121 ```fancy
91d9e9f @bakkdoor fix code indentation in README
authored
122 class Something {
123 def open: block {
124 someRubyMethod(arg0, arg1, &block)
125 }
126 }
127 Something new open: |s| { s work }
128
129 # with this syntax, calling ruby's inject is just as easy.
130 # This example will print the number 6
131 [1, 2, 3] inject(0) |sum, num| { sum + num } println
5f0fd4d @bakkdoor Added Fancy code highlighting to README file
authored
132 ```
ff118f6 @vic Updated README
vic authored
133
4e414b3 @bakkdoor Clean up README
authored
134 ## Copyright:
d549ee6 @bakkdoor update years in copyright notices
authored
135 (C) 2010-2014 Christopher Bertels <chris@fancy-lang.org>
caf6658 @bakkdoor added more information to README file
authored
136
9b28ddc @bakkdoor Update to README regarding license change
authored
137 Fancy is licensed under the terms of the BSD license. For more
ed77f0e @vic Merge remote branch 'bakkdoor/master' into bootstrap
vic authored
138 information on licensing issues have a look at the LICENSE file.
Something went wrong with that request. Please try again.