On Wed, Jul 8, 2009 at 9:17 AM, David Simmons-Duffin<[email protected]> wrote: > On Jul 8, 2009, at 1:32 AM, Robert Bradshaw wrote: > >>> One possible solution is to just replace the word "object" in the C >>> source with something else throughout. But I'd like to make as few >>> modifications of the C source as possible. Is there an alternate >>> solution? >> >> Yes, you can use the magic c-namespace-renaming quotes. For your >> example. >> >>> I actually have another unrelated question: what is the correct >>> cython >>> syntax for the union statement at the top of this message? Cython >>> doesn't seem to like me putting >>> >>> struct any: >>> objtype type >>> reftype nfref >>> >>> in the middle of a union statement. >> >> Cython doesn't support anonymous structs. Give that struct a name, >> and then you can declare your variable with that type. (The name you >> choose will never actually be used.) > > Thanks, your suggestions worked perfectly. > >> Just out of curiosity, what are you wrapping? It looks like a math >> library of sorts. > > I'm wrapping a program called LiE for doing computations in lie group > representation theory. > > http://www-math.univ-poitiers.fr/~maavl/LiE/ > > This sort of thing is very useful in high energy theoretical physics, > which is what I work on. The typical choice among us theorists for > doing computations is Mathematica (with the exception of collider > simulations, which are run with dedicated programs like Pythia). > However, representation theory is something Mathematica doesn't seem > to know about, and I haven't been able to find a package for it. > > LiE does basically what I want, except that everything is wrapped up > in a custom language that's not very expressive, hard to debug, and > generally unpleasant to use. Python is much lovelier, especially > since the object-oriented-ness is well-suited for writing > mathematics. So I'm doing my best to provide a python interface as an > alternative to LiE's built-in lexer, parser, and interpreter. >
(1) The Sage project (http://sagemath.org) may be very interested in getting your code that wraps LiE when you finish it. Having a Sage <--> Lie interface has been requested feature. (2) Sage itself has substantial functionality for combinatorics of Lie algebras. See, e.g., the talk by Dan Bump that is linked to from here: http://wiki.sagemath.org/days14 -- William _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
