Inside Look of Math::GSL

| | Comments (0) | TrackBacks (0)
Here is a breakdown of how many lines of code (roughly) are in different languages in the Math::GSL codebase:

  • 280889 lines - XS ( C-like Perl internals autogenerated by SWIG)
  • 60181 lines  - Total Perl (generated by SWIG)
  •  22941  lines- Hand-written Perl 
    •  8617 lines - Tests
    • 13731 lines - POD (this actually includes some Perl implementation, probably <5%). Much of this was autogenerated from the GSL C documentation and reformatted, but it stills needs work, especially in making the POD render to HTML in a more pleasant way.
  • 1112   lines - SWIG
The reason why Math::GSL requires something like SWIG becomes very apparent. The SWIG interface files are roughly 1/280th the length of the raw XS source code. No reasonable  person would be hacking on Perl internals, but not even a reasonable Perl hacker wants to write all that error checking boilerplate cruft. Thanks SWIG!

This was made possible by ripping all Perl code out of the SWIG interface files and putting them in the pod/ directory. It is not strictly POD but a simple naming scheme was key and the majority of the files do happen to be POD, so whatev. And now vim correctly syntax highlights the files! I think there is something to be said for sticking to one language per file. 

0 TrackBacks

Listed below are links to blogs that reference this entry: Inside Look of Math::GSL.

TrackBack URL for this entry:

Leave a comment

About this Entry

This page contains a single entry by Jonathan Leto published on November 14, 2008 1:49 PM.

Post-Mentor-Summit Wrap Up was the previous entry in this blog.

Complex Eigenvalues with Math::GSL is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Screw you, spammers! Clicky Web Analytics