I’m glad to say that my Google Summer of code project was successful, despite the features that didn’t make it in fwrap by August 17th.
Oh, yeah — if you’re wondering what ‘fwrap’ is, that’s the new name of ‘f2cy’. The rebranding was appropriate since ‘f2cy’ didn’t quite capture all that the utility does. fwrap wraps fortran for a number of languages (C, Cython & Python), so ‘f2cy’ was deemed a misnomer since it seems to wrap fortran just for cython, besides the confusion with ‘f2py’.
fwrap was presented at the SciPy 2009 conference, and I was glad to find a good amount of interest; two (Kyle & Chris) stepped up to work on fwrap once I can get it to a state that’s comprehensible 🙂 They work on a code called ‘clawpack’ at the U-Washington, and want to use fwrap for their ‘pyclaw’ version of clawpack. But I’m getting ahead of myself.
Here’s where you can find the presentation abstract (note that it was written early June — its heavy on promised features that didn’t all make it in fwrap by August 17th), and here are the talk slides. The presentation itself is here.
What’s the state of fwrap? It can handle scalar arguments with aplomb. Assumed-shape arrays are working. Explict-shaped & assumed-size arrays are soon to come. I’m sketching out callbacks as we speak (a feature that Kyle & Chris are particularly interested in).
The parser used by fwrap needs stabilization — some obvious things need work (public/private module attributes), and I’m finding out just how unruly the full Fortran language specification is. The language allows you to be expulsively verbose & clunky (‘integer(kind=FOOBAR), intent(in), dimension(2) :: an_int_array’) — yet difficult to fully parse, since each attribute (‘intent,’ ‘dimension,’ ‘save,’ etc.) can instead be a statement on a line a ways away from the actual ‘integer an_int_array’ line; or you can be cryptic & bug-prone by using the implicit declaration anti-feature well-hated by all those who have ever had a misspelled variable in their code.
The above rant is a long way of saying that there are many little things that fparser chokes on. This is not to be interpreted as a complaint with fparser — I’m grateful for all of Pearu’s work thus far on it, and for his ambition to tackle parsing such a barnacled language. He has graciously opened up fparser to me to work on it, and has allowed us to package fparser with fwrap. Thanks, Pearu!
Anyway, work on fwrap will be a bit slow for the next week or two, as I turn my full attention to my research. But I’m energized and motivated to get the first release out before 2010.