skaller wrote:
> On Mon, 2006-10-02 at 14:39 +1000, Jonathan Kelly wrote:
>
>
>> So this is a question about the standard library for felix. I've been
>> looking at lib/std.flx and I understand most of what I'm seeing, but I
>> do get the impression it seems, well, a little bare, but understand that
>> could be just be because felix is quite young.
>>
>
> Yes. Libraries are large and sophisticated and we need *user*
> to drive priorities.
>
> I stuck in stuff I needed. Some was due to trying to code
> the Shootout tests.
>
>
OK, so it's a bit ad hoc at the moment, and the current state of std
isn't some statement about the expected resources required by a felix
programme. (?)
>> So, not being a C++ programmer, what bits of C++ should I be learning
>> about to use felix properly (if there is even such a notion of that at
>> this stage? : )
>>
>
> Constructors/destructors are the main thing, plus some
> understanding of classes and templates.
>
>
I do know c++, but not so as I could get a job, unfortunately. What I
really don't know is the libraries. Is it expected that felix programmes
will define directly c++ code (I guess meaning classes) and interact
with it, or is felix supposed to self sufficient but taking a leg up by
being able to use c++ libraries natively (or almost at least). It did
occur to me that of course the felix class construct was a little thin,
because you have direct access to c++ classes, though I'm not sure if
that's the intention for felix.
>> I was trying to work out how a more external library than std might fit
>> in with felix, so I thought gmp would be a good bet, as there is a
>> module but I don't have it installed yet. So I installed the library and
>> tried one of the felix gmp tests out of the box, expecting it to give
>> some error, and blow me down if it didn't just work.
>>
>
> Yes, that cat surprises me sometimes too :)
>
>
Makes your heart to pitter-pat, even? : )
>> How did it know how
>> to link in the libary, and what the library is?
>>
>
> [EMAIL PROTECTED]:/work/felix/svn/felix/felix/trunk$ cat config/gmpxx.fpc
> requires_slibs: -lgmp
> requires_dlibs: -lgmp
> provides_dlib: -lgmpxx
> provides_slib: -lgmpxx
>
> How does it know these switches? It doesn't**
>
> They're the standard switches
> on a Linux box. It does actually check a couple of things,
> I think this one just checks the header file.
>
> How does it know gmp has to be linked? Thats what
> 'requires' clauses are all about:
>
> module Gmp
> {
> requires gmpxx_h;
> requires package "gmpxx";
>
> This tells the compiler package 'gmpxx' is required
> if you use any function in module Gmp.
>
> If you do, the compiler dutifully prints 'gmpxx' in
> the resource file
>
> myfile.resh
>
> for the program 'myfile'. This is kind of like a cross
> between Windows resources and manifests.
>
> The flx script then reads that
> file using the program 'flx_pkgconfig' which finds
> the config/gmpxx.fpc file cited originally, which tells
> it to link with the given switches.
>
>
I think that's all very cool!
> Microsoft MSVC++ has a pragma something like:
>
> #pragma library gmpxx
>
> but the Felix system is vastly superior:
> it calculates the dependencies based on which you actually
> use, and flx_pkgconfig finds the transitive closure.
>
> //---------------
> **There was some talk of implementing a 'locator' service
> to find libraries. I actually did do one, and I might
> even be using it in one of the configs -- it uses
> the Unix 'locate' command:
>
> lpsrc/flx_config.pak:def locate_file(fname):
>
> Ah yes, I am using it:
>
> [EMAIL PROTECTED]:/work/felix/svn/felix/felix/trunk$ grep locate_file
> lpsrc/*
> lpsrc/flx_config.pak:def locate_file(fname):
> lpsrc/mpi.pak: dir = locate_file("/include/mpi.h")
>
> in the mpi configuration (mpi is Message Passing Interface,
> a library for parallelism by message passing)
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language