This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARGV for_option: "install" do: package_name { | |
require: "lib/package" | |
Fancy::Package install: package_name | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rbx-head > bakkdoor:~/projekte/fancy/fancy-lang[dev]> gem install bson_ext | |
Building native extensions. This could take a while... | |
ERROR: Error installing bson_ext: | |
ERROR: Failed to build gem native extension. | |
/home/bakkdoor/.rvm/rubies/rbx-head/bin/rbx extconf.rb | |
checking for asprintf()... yes | |
checking for ruby/st.h... no | |
checking for st.h... yes | |
checking for ruby/regex.h... no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def arg1: arg1 arg2: arg2 = "default_arg2" arg3: arg3 = "default_arg3" { | |
"arguments are: " println | |
arg1 println | |
arg2 println | |
arg3 println | |
} | |
arg1: "hello" arg2: "world" arg3: "how are you?" | |
arg1: "hello" arg2: "world" | |
arg1: "hello" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiling lib/argv.fy | |
============= :__script__ ============== | |
Arguments: 0 required, 0 total | |
Locals: 0 | |
Stack size: 5 | |
Lines to IP: 1: 0--1, 13: 0-5, 1: 6-12, 35: 13-18, 15: 19-27 | |
0000: push_rubinius | |
0001: push_literal :"for_option:do:" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "mkmf" | |
create_makefile("printer") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============= :__script__ ============== | |
Arguments: 0 required, 0 total | |
Locals: 0 | |
Stack size: 5 | |
Lines to IP: 0: 0-37 | |
0000: push_rubinius | |
0001: push_literal :foo | |
0003: push_literal #<Rubinius::CompiledMethod foo file=rbx/examples/return.fy> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An exception occurred running rbx/loader.rb | |
no method 'suffix?' on nil:NilClass. (NoMethodError) | |
Backtrace: | |
Kernel(NilClass)#suffix? (method_missing) at kernel/delta/kernel.rb:85 | |
Rubinius::CodeLoader#add_feature at kernel/delta/codeloader.rb:75 | |
Rubinius::CodeLoader#require_compiled at kernel/delta/codeloader.rb:45 | |
Rubinius::CodeLoader.require_compiled at kernel/delta/codeloader.rb:87 | |
Object#fancy_require at rbx/fancy_ext/object.rb:45 | |
main.__script__ at raw.rbc:1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bakkdoor:~/projekte/cpp/fancy-lang[rbx_bytecode*]> fancy --rsexp-nice rbx/examples/classes.fnc | |
It's missing "," where there's a "<-" | |
[:exp_list, | |
[:class_def, | |
[:ident, | |
'Person'] | |
[] <- | |
[:exp_list, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mixins in Fancy: | |
def class AClass { | |
self include: AnotherClass; # mixes in AnotherClass defined somewhere else | |
# alternatively you could also write: | |
AClass include: AnotherClass | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Nested classes in Fancy | |
def class Foo { | |
def class Bar { | |
def foobar { | |
"foobar!" println | |
} | |
} | |
}; |