[Vala] Array and Matrix types (SOC idea)



Hi,

Adding a module may not be as easy as it seems.

It is not infeasible to add a vala module compiling array and matrix
operations into function calls. The issue is where we put the
implementation of these functions. The dependency on an library other
than GLib is definitely not intended by VALA. but if we put these calls
as static functions in the c code files(as _vala_array_xxx), there will
be plenty of replicas across the entire generated ccode project.

Therefore I tend to retract my proposal on writing these vala compiler
modules. It might be more feasible to do the follows:

1 Implement in C a runtime library implementing all array and matrix
operations, with vapi files.

2 Patch VALA, allowing compiling arithmetic expressions to function
calls.

3 Patch VALA, allow the mapping between functions and arithmetic
operators in vapi bindings.

4 Modify the vapi files, map operator functions to operators, with the
grammar suggested by a friend in the previous mails.

The library also need to be standardized in a formal way so that people
won't re-implement it again and again.

Regards,

Yu

On Thu, 2009-03-26 at 09:34 -0700, Conrad Steenberg wrote:
Hi Michael,

Thanks for the response.

I've used Python + numerical/numpy in various guises since 1996, and
it's great for many things, especially compared to the sluggishness of
Matlab.

A lot of our code needs a little (OK a lot) more speed in the "glue"
parts that usually gets handled by Python, so I end up having to write
Python extensions in C or Pyrex to speed things up. I guess that you
could say that the "organizational" parts of the code is becoming the
bottleneck.

So the get this back on-topic: having support for arrays/matrices with
easy to read operators would allow the use of only one language that is
both fast and productive, especially using the Genie syntax.

Anybody wants to add array and matrix types to Vala as a Google Summer
of Code project? :-)

Cheers,
Conrad


On Wed, 2009-03-25 at 17:40 -0600, Michael Torrie wrote:
Conrad Steenberg wrote:
FWIW I would really like to see this implemented as I write scientific
code every day and would love to use Vala/Genie instead of C++ :-)

This is OT, but most of the scientists around here (at my university)
have all switched away from Fortran and C++ to Python.  They use fast
numeric libraries like scipy, numpy, matlibplot, and other tools.  In
fact a few have replaced MatLab with Python with great success.  Python
may be more appropriate for your use than Vala, in this specific case,
if you feel inclined.

I personally see Vala as a tool to develop and enhance GTK and other
Gnome-based libraries mainly.  In fact I could see future versions of
GTK being written mostly in Vala.  I know that several folks on this
list are using Vala as a main language, though.

I wonder how easy it would be to write python extension modules using
Vala.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]