[Vala] porting python code to genie
- From: Tobias G <tobimensch gmail com>
- To: vala-list gnome org
- Subject: [Vala] porting python code to genie
- Date: Thu, 18 Dec 2014 22:58:38 -0000
Hello,
in the future I might want to port some python projects to genie,
so I played around with a small script to see how far an automatic
transformation from python to genie could go.
The result is here:
https://github.com/tobimensch/py2gs
It's a very crude and rough transformation. It's using a lot of greedy
regex and not really sophisticated in any way. But in many cases
it will still save manual typing labor even in this crude state.
In other cases it may even make the code worse. :-)
I'm not likely to develop this much further. But I think in theory
the sky is the limit. There are complete parsers for python AST,
and pyropes can be used to guess the static types of variables and so on.
I think in it's current state it might help someone who's
going to port from python to genie a bit of work.
Bugs included. Patches welcome.
Greetings
Tobi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]