On Wed, 2006-07-05 at 14:53 -0400, Stephane Le Dorze wrote:
> Hi!
>
> I am currently investigating new languages that would be suitable for
> High level programming in video games (AI, scripting and more…).
>
> The video game community is still stuck in the imperative C/C++ scheme
> and it’s difficult to change minds.
Some companies tried alternatives.
> The main features I am looking for is garbage collection, static
> typing, strict and functional programming style, higher order
> functions, type polymorphism, inference, easy c/c++ integration,
> continuations, etc…
You're looking for Felix :)
To be more precise:
GC: yes (but uses C++ ctor/dtor and manual allocation too)
static typing: yes
functional: yes and no :)
HOFs: yes
polymorphism: first order extensional
(like templates in C++ but properly)
inference: no, deduction only
easy c/c++ integration: yes
continuations: yes
By way of explanation: Felix provides overloading, and deduction
of variable types from initialisers, and function types from
returned values, however function arguments must be annotated.
This compromise is necessary to support overloading easily.
[Yes, overloading is possible with inference, but the algorithms
for doing it are quite hairy and I personally don't understand
the constraints. C# version 2 actually supports both]
Felix provides both procedural/imperative and functional programming.
Functions may not have side-effects (procedures must). Note that
the side-effect free nature of functions doesn't make them pure,
they can still depend on variables in their parents.
Procedures are all candidates for high performance microthreading.
More below.
> (I reasonably could not propose Haskell/Clean/Caml in the industry;
> it’s a too big step and frankly I must admit it’s a bit too complex to
> start pragmatically).
The main obstacle isn't complexity (IMHO) but the need to create
bindings, if not to standard libraries (like OpenGL), then to
inhouse custom libraries.
Felix bindings are generally syntactic lifts, requiring no
semantic logic, since Felix basically uses the C/C++ object
model. There is a tool (flxcc) to create an initial cut
of these bindings: some work is needed to get them into
shape afterwards (flxcc can't handle C macros, for example).
Bindings to SDL, OpenGL, GMP, and other libraries have been
created this way.
> The performance always matters as it is often used as an argument
> counter new language adoption and obviously, could be a problem while
> defining the frontier between the script and the C++ engine.
Ackerman(3,x):
Rankings for ack
felix 14 31.19
felix 13 5.41
gnat 13 9.71
gccopt 13 10.38
ocamlopt 13 13.90
felix 12 1.22
gccopt 12 2.37
ocamlopt 12 2.45
gnat 12 2.45
gjc 12 8.09
I have no idea why it is so fast. All these processors except
ocamlopt are using gcc as a back end. In particular felix
is using gcc (g++) as a back end .. and still blows it out
of the water.
If you get stuck with a performance issue in Felix, you can
usually embed C/C++ code to solve the problem.
> Portability is a must have.
Felix generates ISO Standard C++ (with a couple of caveats).
It builds with gcc and VS2003/VC++7. It should build with
VS2005/VC++8 too except we're having trouble understanding
manifests and where to find the dang run time libraries.
The run time support libraries provide abstractions for
threading, socket I/O, timers, and other stuff on many
platforms, using native high performance techniques such
as epoll (linux), kqueue (OSX/BSD), iocompletion ports (Windows).
> Today Lua and Python are the main script languages but they lack
> safety, speed and easy integration, on the other side, the community
> is big and there are a lot of tools and libraries.
> D language is very, very interesting but lacks Portability and the
> integration is not easy enough.
Walter is a good programmer. However I don't find D that
interesting since it emphasises OO. Felix barely bothers
with OO at the moment: the emphasis is on microthreading,
async I/O, FP, pattern matching, etc.
> I finally found Felix and thought I found the solution!!!
You will not find a complete solution of course.
But you CAN join as a developer and help to build the
kind of system you want.
Oh, BTW, RF and I are both keenly interested in games..
> I really appreciate, the work you’re doing and I really hope Felix to
> be a C++ successor in the long run.
Well unfortunately programming languages take a LONG time to
develop, test, and gain market acceptance.
> As a feedback, I have to tell you that you better work on your
> internet exposure – even in Lambda the ultimate it is difficult to
> find you.
I know. At the moment, we're trying to get 1.1.2 released.
1.1.0 I think is a Debian package, available with Ubuntu Dapper.
I'm no great marketing person! We need that. I find it hard
to promote something when I know about things that need
completing, lurking bugs, etc.
I'm particular, we're still fiddling with the build system
(written in Python) trying to get it to build on all platforms,
and ironing bugs out of the async I/O system: we want the thing
to be 'ready' to use in some applications, and that generally
means networking these days.
> Try to put some entries inside the language shootout for example… (I
> am interested in results even if the benchmark is quite low level and
> imperative-friendly).
Oh, I did. But a certain Isaac Gouy decided he didn't like
me and dropped Felix from the Shootout -- after I worked
very hard with Brent to write all the test cases and make Felix the
leader in most of them.
> Doing so, I am sure you could benefit from a lot of people help, the
> community size matters and is a reason why a language succeeds.
The Shootout would have been an ideal showcase. But it's chicken
and egg: ostensibly Isaac rejected Felix because it doesn't
have enough users.
> Anyway, there is my question:
>
> Is there any time line or roadmap about Felix language development,
> libraries and tools (especially IDE and debugger)?
A written one? No :)
I don't see an IDE as useful, besides, there are other
IDE around which are good, for example on Windows you more
or less have to use Visual Studio .. a plugin would be nice.
On Unix people like Emacs and won't change. (I'm a vim person
myself). Same deal: a plugin for an existing IDE is probably
the way to go.
The closest thing to an IDE is 'flx'. That's a compile
everything automatically and run it script, making
Felix look like Python or some other scripting language.
Debugging tools are needed. There are a number of facets
to this.
1. You can use gdb or Visual Studio as a debugger:
it is compiled C++ code after all.
2. Making the generated code comprehensible is an
ongoing nightmare.
3. Instrumenting the code is something that needs doing
but isn't done, eg put a 'print' at the top of each function
to allow tracing.
4. The driver can monitor certain activity, and has debugging
capabilities already. It would be interesting to add a
TCP/IP service to the driver, to allow real time control
over this kind of debugging. EG you could connect via
telnet or a web browser and monitor and control the
running application.
> Is there any projects using Felix?
RF has an arcade game written using it.
A couple of the tools used by Felix itself are written
in Felix. A simple static page web server is written.
> I tried to install Felix, following wiki procedure
Which is probably out of date now :)
The best place to ask is right here.
In theory you can do (Unix):
./configure
make
make install
Similar on Windows.
The tests are run automatically. Some demos require
./mk demo
and there are a couple of other things you can do.
The best sources are (in order):
* developer CVS
* anon CVS
* release candidate tarball
You need to unpack the tarball first, then erase lpsrc
directory and fetch it from CVS.
BTW: you didn't say what platform(s) you're using.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language