One of the decisions I did make about how to market Felix was that the best
way to improve the language, the libraries, and the tooling, was to actually
use Felix to write some interesting tools. At least when one of my friends
asked yesterday what it could be used for I could give him the link to
felix-lang.org and tell him the webserver was written in Felix.

So now, I want to improve he capabilities of "flx" a bit.

At present, you can write bindings for external C++ libraries,
and you can include fragments of C++ in Felix programs.

But you cannot quite so easily write joint Felix/C++ code,
that is, write some stuff in C++ directly, and some in Felix.

It was always intended that you use C++ for what it's good for
including fast core libraries interfacing to other C++ code,
and use Felix for the "top level" scripting. In fact that is 
precisely the original model for which it was developed:
as a way to rapidly script telco business logic and interface
it to lower level code managing telephone switches.
Example of "business logic": Prepaid phone, conference
call, 911/000 emergency call, hooking up "voice menus".

So now we would like to co-develop, so we can do this:

        flx base.cpp top.cpp script.flx


and have the C++ code compiled too. The interface for that has
been in place for years but it never worked :) It should on
the next commit.

We also want to do this kind of thing:

        flx -c --static -o mylib.lib a.cpp b.cpp c.cpp
        
i.e. we want "flx" to work as a plain old C++ compiler.
[The command line syntax may need some tweaks so flx
can tell what you want it to do :]

The point? How about:

        flx myprog.cpp

works just like Felix. compile link and run program.
Rebuild only needed bits. Use the flx_pkgconfig database
to find linker switches and header file locations.

This is quite easy! Just add something like:

//$$ requires "gmp"

at the top of your program and libgmp gets linked in.
Doesn't interfere with the C++ in any serious way.
A bit smarter, we could "tack on" the required #includes
although the program would not work with C++ then.
One way might be

#ifdef USE_FLX_PKGCONFIG
#include "generated.includes"
#endif

whilst prototyping (replace with the actual includes for
production C++ building).


--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to