Mind Ramblings My Blog

Wrapping up the Integer and Rational PR

Hey folks! Sorry for the delay. This week on 6th, I got free from the internship selections. Good News is that I got selected at Intuit for Summer 2016! Anyways I did wrap up the PR#487 in the remaining time. There were a few memory errors that after some discussion, I was able to solve. I also changed the function signature for sympify. Now it needs an already allocated basic and it is the responsibility of the caller to free it.

Only thing that is yet incomplete is that the SymEngine classes Add, Mul and Pow are converted by default to Basic. This doesn’t cause any bugs but will be clean to have. This is not a big priority now.

I did document the scripts for debugging/development which are valgrind_test.sh, callgrind_test.sh and gdb.sh. But the work flow that is followed for detection of memory leaks/errors is yet unclear. I did not find posts that explained this properly. Only a few posts explained the first part, i.e. suppressing the spurious errors that are caused by the funky way the MRI accesses memory. Nothing beyond that. If you happen to know how this is done(like telling apart the actual memory leaks from the ones that say ‘definitely lost’) please let me know. Everyone can benefit from such a post.

Next Week

The GSoC 2015 is upon completion and I have only 11 days remaining. Within that time, I will port the feature of subs to ruby. First a simple one that will take a symbol and replace that one with the other in an expression. The last few days I will devote to documentation of the wrappers. I will also make a beginner contributing guide for the Ruby extensions.

Commits

  • Used sympify in #coerce method
  • Changed sympify and Klass_of_Basic
  • Refactored for new sympify
  • ADD, MUL & POW now become Basic objs in rbwrappers
  • [ci skip] Documented callgrind_test script
  • [ci skip] Documented valgrind_test script
  • [ci skip] Relocated the debugging scripts to bin/


comments powered by Disqus