Difference between revisions of "GSOC 2013 Ideas"

From D Wiki
Jump to: navigation, search
m (PyD)
(PyD)
Line 13: Line 13:
 
==PyD==
 
==PyD==
  
Once remaining issues with shared libraries are resolved, it becomes feasible to use D code from dynamic languages. Clearly it's vital to provide easy path for calling it from Python, as it's used by many scientists, amongst others. Although there's [https://bitbucket.org/ariovistus/pyd/commits/all PyD], the last few years saw rising interest in [http://pypy.org PyPy] because it shows much better performance than CPython. For PyPy, the way to go seems to be generating <tt>extern(C)</tt> wrappers for classes/functions/etc. + [http://cffi.readthedocs.org CFFI bindings] for that C code. First part of this can be reused for producing C++ wrapping code -- this is similar in goals to [http://d.puremagic.com/issues/show_bug.cgi?id=9285 dtoh] but here entities to be wrapped should be explicitly mentioned. Extra benefit of producing C++ bindings is ability to call SWIG on them to support other languages. So, perhaps, C++ is the number one target in this respect.
+
Once remaining issues with shared libraries are resolved, it becomes feasible to use D code from dynamic languages. Clearly it's vital to provide easy path for calling it from Python, as it's used by many scientists, amongst others. Although there's [http://bitbucket.org/ariovistus/pyd/commits/all PyD], the last few years saw rising interest in [http://pypy.org PyPy] because it shows much better performance than CPython. For PyPy, the way to go seems to be generating <tt>extern(C)</tt> wrappers for classes/functions/etc. + [http://cffi.readthedocs.org CFFI bindings] for that C code. First part of this can be reused for producing C++ wrapping code -- this is similar in goals to [http://d.puremagic.com/issues/show_bug.cgi?id=9285 dtoh] but here entities to be wrapped should be explicitly mentioned. Extra benefit of producing C++ bindings is ability to call SWIG on them to support other languages. So, perhaps, C++ is the number one target in this respect.

Revision as of 15:17, 27 March 2013

Refer to our GSoC 2013 page for details about this project.

LDC

LDC is based on LLVM, so this suggests several small project ideas, like porting some of the LLVM tools/features designed for C/C++ to the D-LDC world. Things like:

  • Perform more static analysis, like abstract compilation or linting (Clang does both);
  • Develop a simple way to compile D for the browser with Emscripten to "asm.js" (this is a very small project);
  • Perform other run-time tests as done by Clang;
  • Use some of the D semantics to improve D code optimization (Walter talks about this all the time);
  • Implement better high level optimizations for D code that uses array ops.

PyD

Once remaining issues with shared libraries are resolved, it becomes feasible to use D code from dynamic languages. Clearly it's vital to provide easy path for calling it from Python, as it's used by many scientists, amongst others. Although there's PyD, the last few years saw rising interest in PyPy because it shows much better performance than CPython. For PyPy, the way to go seems to be generating extern(C) wrappers for classes/functions/etc. + CFFI bindings for that C code. First part of this can be reused for producing C++ wrapping code -- this is similar in goals to dtoh but here entities to be wrapped should be explicitly mentioned. Extra benefit of producing C++ bindings is ability to call SWIG on them to support other languages. So, perhaps, C++ is the number one target in this respect.