Jump to content
  • Advertisement
Sign in to follow this  
jonnymind

A new kid on the block

This topic is 4110 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I am delivering the fifth pre-beta version of the Falcon Programming Language in this days. The Falcon Programming Language is a powerful scripting language written in C++. The virtual machine is fast and compact, and the integration with the host applications is easy and kind. The language itself is quite complete, presenting many functionalities that aren't easily found in other embeddable script engines. Above every other aspect, the engine is completely modular and allows for seamless integration of source Falcon modules, pre-compiled Falcon modules and binary native modules. Falcon is multiplatform (win, linux/freebsd, mac) and internationalized. It comes with some powerful modules, as the regex and configuration parser modules; more modules (xml parsing and SQL db access) are under development. Prebeta-5 is under test in this days, and it will be packaged shortly. I have established this release as the milestone for opening development worldwide to every interested developer. We're searching for coders, but also for users and for people embedding the language in their application. If you are bored of the old things in scripting, give a try at Falcon. I can't swear it will be groundbreaking, but it adresses many issues embedders and script lanaguage users had up to date. If you are interested, visit http://www.falconpl.org and register to the forum, leaving a message there or contacting me. Or you may leave a reply here. Best regards, Giancarlo Niccolai.

Share this post


Link to post
Share on other sites
Advertisement
Looks real nice. Similar to Lua I guess, but better ;). I don't know if Lua has classes, so this seems like a good advantage over it, so, well done!

Share this post


Link to post
Share on other sites
AFAIK, LUA do has classes, but always AFAIK they are implemented just as a meta-grammar for dictionaries of callable items and properties. This makes a bit hard to implement interesting things as super-class references, nested and multiple inheritance, class static data and so on. Let's say Falcon OOP model should a bit wider.

Share this post


Link to post
Share on other sites
It looks pretty good! I might consider this for my next project [smile]
Btw, does your list notation allow step sizes aswell? ie

list1 = list[2:3:10] // 2nd, 5th, 8th
list1 = list[1:2:10] // 1st, 3rd, 5th, 7th, 9th

Share this post


Link to post
Share on other sites
I am not familiar at all with that syntax at all. Provided your example is correct, it seems fairly confusing.

Falcon supports list (and string) ranges (and inverted ranges).

i.e.

a = list[ 1:5 ] // a <- 1st, 2nd, 3rd, 4th
a = list[ 5:2 ] // a <- 5th, 4th, 3rd, 2nd


Ranges can also be cached into variables. I.e. the above is equivalent to

r = [1:5]
a = list[ r ]

Share this post


Link to post
Share on other sites
A little insight from Lua...

Lua is based on tables, which are a lot like hash maps (dictionaries). All values, including functions and tables can be stored in a variable or a table cell. It also supports lexical scoping (unlike Falcon). These combined gives a poor object notion, ie.

object.doStuff = function (arg1, arg2)
return arg1 + arg2 + x
end
object.x = 23

However, it also supports a concept called meta-tables, which allows you to define the behaviour of a table. One use is to define single or multiple inheritance, which can be done quite elegantly once you have the 25 line framework. See the lua-users wiki entry on it.

In general, Lua aims to be very extensible - a class system with single or multiple inheritance is just one example of what can be done easily. And it's entirely your decision if you want everything to be public or some or all member variables and functions of a class to be private.

In fact, I see nothing Falcon has that cannot be easily implemented in Lua. Maybe jonnymind could elaborate on this?

Share this post


Link to post
Share on other sites
About lexical scoping; it is currently supported only under some terms (functions, method and lambda functions have private variables, and possibly also static ones) because "arbitrary scoping" a-la-LUA wasn't liked by the developing group that started the project (mostly, by me) for various reasons. Actually, the compiler scopes the variables at an indefinite level of depth (actually, it does a great deal of effort in de-scoping global vars a-la-python), so adding a scope construct would be a matter of 1-2-3, if the community feels it is important.

I.e. I just committed in the CVS a "def" construct that forces explicit variable declaration, if the scripter so wishes (I still have to write the docs, so don't search for it ;-)

About class inheritance, LUA has enough basic constructs to provide the user with everything it may want to do. Once you have tables and once that you can fill them with anything, including functions, you can do more or less everything. There's no news in that; GTK was written in C, yet it's fully object oriented. An OOP grammar, at a typeless script level, can only make the user more comfortable in operating with some constructs; and possibly be more efficient.

Although Falcon still requires much optimization, as we are in pre-beta, knowing at compiler level the structure of the objects, and having them fixed, allows for more efficient allocation, initialization and method access, at least in theory. I.e. sparse array compression on method/class unique IDS, done on a link step which is already performed in Falcon, may reduce the access time to properties and methods to o(1) (I suppose 2 or 3 direct constant dereferences) while table/dictionary based object models require, theoretically, always a binary scan on the dictionary entries (which may change dynamically at runtime).

However, I am not starting a "this is better than that" war here. Of course, a "version 5" mature product will be better than a "going beta" one under many to every aspect. What I am offering here is an occasion to get into a growing project that may result, eventually, if there is enough interest around it, into a better product than the ones currently available, for some specific tasks, because it was planned and realized to solve some of the problems that made currently existing solutions "hard" to use to some of us.


Share this post


Link to post
Share on other sites
Original post by jonnymind
I am not familiar at all with that syntax at all. Provided your example is correct, it seems fairly confusing.


This is how MATLAB for example handles ranges.

[from:step:to]

[from:1:to] = [from:to]

// From 1 to 10
[0:10]

// From 1 to 10, but only every other
[0:2:10]

// From 1 to 10, but only every third
[0:3:10]

// From 0 to T in N steps:
[0:T/N:T]



Not that confusing really and quite useful. However it's not such a huge drawback if not supported, atleast for game development [smile]

Share this post


Link to post
Share on other sites
OIC. No, Falcon doesn't support this grammar; however, for/to loops have positive or negative step clause, so you can easily iterate like that.

Also, as this feature looks interesting, consider the function rngSelect( a, b, c ) added to our RTL :-). (although actual name may change)

Bests,
jm

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!