Week 7 - Array Operations & Segmentation Faults

So, this week I worked on only one thing which is extending support for array operations. Believe me it was really tricky to get it done. The reason being, implementing array operations for all the types and then testing them for several kinds of operations required a lot of effort. However, I would say it was worth it. Overall, I added 3 to 4 new tests which highlighted corner cases. They are now fixed (hopefully). Morever, one interesting thing happened. The tricky part was to support arrays as return values of functions. I was planning to deepcopy the result from function call to a temporary variable. However, Ondrej came up with a nice idea of converting functions (which return arrays) to subroutines and passing the destination array as one of the arguments. This is really cool. We do not copy anything in this process. The destination memory automatically gets filled within the subroutine. To fix a lot of segmentation faults I took the help of gdb for the first time. Yeah, I never used it before just because I underestimated it. I used to write debug prints and then recompile the project again and again. Noob? I know. Well, gdb helps in avoiding that part. Thanks to Ralf for persuading me to use it. That’s all for this week. Next week I will start working on implicit deallocate. Bye!.

MR - !998


Jodhpur, Rajasthan, India