I don't have much interest in current ML techniques, but I'm credited on a deep learning paper with thousands of citations, so it's not a totally uneducated claim. I think it's impossible with the state of the art. So I would propose that if you can get even 1000 lines of Oil's code translating and running correctly with AI, I will award you a big part of my grant. It doesn't show anything that works, and doesn't really make any claims.īut maybe it would be a fun illustration of the limitations of AI. The shell itself is less than 40K lines of code and the translator is ~4-8K lines.Īnd I even have a 50K euro NLNet grant to hire someone!īrief Descriptions of a Python to C++ Translator īut I don't think there is anything interesting in this repo. There are two more things to do before you can use your new extension: compilingĪnd linking it with the Python system.I'm writing a Python to C++ translator for. PyInit_spam, and creation of the module is left to the import machinery.įor details on multi-phase initialization, see PEP 489. (new in Python 3.5), where a PyModuleDef structure is returned from Unlike our spam example, xxmodule uses multi-phase initialization Optionally followed by an import of the module: To add the module to the initialization table, use PyImport_AppendInittab(), When embedding Python, the PyInit_spam() function is not calledĪutomatically unless there’s an entry in the PyImport_Inittab table. So that it then gets inserted into sys.modules. The init function must return the module object to its caller, It may abort with a fatal error forĬertain errors, or return NULL if the module could not be initialized PyModule_Create() returns a pointer to the module object Table (an array of PyMethodDef structures) found in the module definition. Inserts built-in function objects into the newly created module based upon the It calls PyModule_Create(), which returns a module object, and (See below for comments about embedding Python.) When the Python program imports module spam for the first time, Note that PyMODINIT_FUNC declares the function as PyObject * return type,ĭeclares any special linkage declarations required by the platform, and for C++ Static PyObject * spam_system ( PyObject * self, PyObject * args )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |