Greetings Everyone!
I hope you all are going great. I would like to thank you all for
giving me the opportunity to work under the guidance of
experienced developers in SciRuby to create something which can be
very beneficial to the scientific computing community.
I am Pranav Garg, currently a third year Electronics Engineering undergraduate student from BITS Pilani, Goa, India. I love exploring Machine Learning & Neuroscience (Theoretical and cognitive) and I hope to integrate them for creation of Neural inspired strong Ai.
As per Adithya's suggestion, I have created this thread so that
my progress can be easily tracked by the community. During the
summers I will be working on the creation of a Language
independent plotting library along with Arafat Khan. I am
currently discussing the details for the same with my mentors and
I will update everyone soon with a blog post. I hope to be an
active developer to the library even after the end of GSoC.
Speaking of blog posts, Here is my first post for the summer . Please let me know your thoughts about the same.
Regards
Pranav Garg
Thank you for your post, Pranav. Can you also send this post to
the sciruby blog?
Greetings Again!
My Examinations ended today :P !! Although I haven't posted much.
I have been constantly in touch with Arafat over the last week
about the Architecture of the libraries and we came up with a way
to create two independent libraries, that can later be coalesced
together as discussed in the Matplotlib thread.
To abstract my aspect of the project in a small paragraph (Will write it in detail in the upcoming blog post):
I will be creating a Library that creates static plots which are
saved as images.For which I will be creating the Back-end Layer in
GR Framework written in C++ and bridge it to Ruby (will be
probably using Swig for it). Then I will create An Artist Layer in
Ruby that will consist of all the Important detailed classes.
I am shifting rooms on 13th and traveling on 14th and 15th. I will start my work on 16th. During the first week of work I will be familiarizing myself GR Framework, Ruby [Why's guide , learn Ruby the hard way and Ruby Under a Microscope (Already Started)], Swig and Matplotlib code-base, while trying to implement the back-end renderer functions. Once I get a better idea about it , I will devise a detailed and updated timeline.
Regards
PG
Hello Again!
This is the daily broadcast bringing you the GSoC report for 17 May 2018. Today I worked on the following:
1. I Further looked into the GR Framework documentation and
source code, The amount of documentation and online resources for
the C++ API is proving to be a big hurdle
2. Refreshed my concepts on the Cairo Architecture
3. Created a basic implementation of the Backend Renderer and Figure Canvas in Cairo (https://github.com/pgtgrly/static-rubyplot/commit/85122dec94defb5e49576ebd8b43d778ca879e6d)
The most important aspect in accordance to me, while creating the backend layer was to create functions which are generalized enough that they can be implemented in any plotting library but at the same time provide flexibility. Instead of replicating the MatPlotlib Architecture, I decided to use that as a reference and build upon the same.
On Prasun's suggestion, I wrote a mail to the developer of the GR Framework regarding the possibility of bridging it to Ruby as GR Framework provides an excellent 2D and 3D Plotting Library and is the cross language library that I wanted to implement. GR Framework is already bridged to Julia and Python .Although an excellent suggestion, it would only be feasible if the developer of the GR Framework are able to provide mentor-ship for the same as it is still in development.
Tomorrow I will be Reading up on various methods to create bindings to Ruby as well as create a SWIG binding to the basic Backend that I created today. If time permits I will try to implement a basic Artist layer in Ruby coupled with the bindings. Currently I, Prasun, Sameer and Josef Heinen (The Developer of GR Framework ) are discussing the possibility of bridging GR Framework to Ruby. Which would require me to create a lot of bindings,I will keep the thread updated on the progress.
Regards
Pranav Garg
Hey Sameer,
The idea was to create a C++ Backend bridged to Ruby with GR Framework as our prime candidate. However , looking into GR Framework made me realize that it lacked a lot of documentation and examples that are needed for creation of Renderer and Figure Canvas. For example I am not able to figure out how to specify the FigureCanvas in the same (I have sent a mail to the developer about the same).
Since I did not want to waste development time I have started
working on the code that uses Cairo instead which can be used in
the library that we decided.
With "create a lot of bindings" for GR Framework I am talking about Prasun's idea of Bridging GR Framework to Ruby instead of creating a separate plotting library since GR Framework itself is primarily a plotting library. I would really appreciate it if you and Prasun can talk about it once, I think there has been a bit bit of lapse in communication here.
I will look into FFI and C wrapper thank you (and Pjotr) for the suggestion.
Regards
Pranav Garg
Daily Report 18 May 2018,
I have began the work on porting GR Framework to Ruby. To do so I have read Julia bindings for the same, which have been easily called using the ccall function in Julia. To create Bindings to
Ruby I am currently using a Ruby Standard library "Fiddle". Following the example at http://blog.honeybadger.io/use-any-c-library-from-ruby-via-fiddle-the-ruby-standard-librarys-best-kept-secret/. I tried importing GR Framework snd was successfully able to render the following figure in Ruby using just the code here(https://github.com/pgtgrly/GSOC2018-Sandbox/commit/5e3c6cc9c9ce380d49267c58f570d60721237e63).
I have been facing some issues regarding passing array pointers and parsing certain functions, because of which I am getting the following error:
/usr/lib/ruby/2.3.0/fiddle/cparser.rb:92:in `parse_signature': can't parse the function prototype: gr_surface(int,int,double*,double*,double*,int) (RuntimeError)
from /usr/lib/ruby/2.3.0/fiddle/import.rb:163:in `extern'
from alphatest.rb:20:in `<module:GR>'
from alphatest.rb:6:in `<main>'
I have found the potential solution to the prior (https://stackoverflow.com/questions/19744000/how-to-deal-with-array-pointers-in-ruby-fiddle , https://ruby-doc.org/stdlib-2.0.0/libdoc/fiddle/rdoc/Fiddle/Pointer.html) while I am looking into the python bridge of GR as a reference for the latter(Will probably work with the the importer module in Fiddle). I am also reading up on C Extensions from the Link that Prasun sent me in case Fiddle does not work out.
Regards
Pranav Garg
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev+unsubscribe@googlegroups.com.
Hey Guys,Here is the blog post about my GSoC Adventure so far. Make sure that you click on the hyperlink at the end (Leads to the second half of the post).Regards
On Sat, May 26, 2018 at 2:29 PM, Prasun Anand <prasunan...@gmail.com> wrote:
Nice work! , Arafat.I will try running your code today. I can't wait to read your blog post about your work.Regards,Prasun
On Sat, May 26, 2018 at 11:23 AM, Arafat Khan <arafat....@gmail.com> wrote:
Hi Everyone,Firstly, John the idea of zoom-in, zoom-out that you are mentioning is something that Pranav told me too. I believe the idea you are asking for stems from the default Grapher app in Macbook. I think that accomplishing those is going to be super tricky. I will certainly have to contact experts on that. For now, I am focussing on more immediate problems as mentioned in the timeline.The past whole week has been super amazing. I have been solving this cool problem to help design generalized graphs in Rubyplot with RMagick and it's been going great. I do think that this kind of design is certainly going to take a lot of iterations to make it work out. My concerns primarily come, not just from the attempt at trying my own problem but also being able to make a design that helps Pranav with his own tasks. To be honest, my current priority is to only focus on my own problem and then later I will change the design so as to make it work well for Pranav too.Here are a few things I am doing -> https://github.com/Arafatk/magick-rubyplot1. Adding methods to array class to help out with simple statistics operations2. Added a modest Backend example that's not of much use now but does follow a generalized approach of making a graph with a proper axis, labels, legends, and titles. These have many methods that overload/add to the existing draw features of RMagick.3. Adding additional math methods to the transformation layer.4. Added a ton of beautification features to the artist class, like font size, font colors, data types, colors and lots more.5. The fundamental problem here which is the ability to make sure that the geometry of the graph in such a way that no overlap occurs between Legends, titles, axis lines etc so that is why I am taking so much time to make the code modular and I have many other graph formats in mind. Let's see how this turns out.6. Now that axis and making lines etc is out of the way, I think it will probably be easy to make other graphs too.Right now, I have a ton of code mostly in the form of long program functions etc but the code is mostly spaghetti code and I have added no specs as of now. I would ask you guys to take a look but not today and hopefully, I will ask for review and recommendations by next week. I would also like opinions about aesthetics later.
4. CheckButton -> Buttons with boolean features(on/off) like say show title or not.5. Combo Text Widget-> Showing a dropdown list of options.6. Menu Bar-> With the option to save files in a particular format. Although, I am not exactly sure how I am going to make a pop up inside this for saving etc.7. Error Message dialog boxes
8. Refresh and iterate between images. So this way we could say zoom in and zoom out with a button.For now, I would say that this is more than enough and quite possibly all the features we need for Ruby-Plot. I will be using a small subset of these for my needs. Certainly, it is possible to have a few more features but given the time constraints focussing on more things would not only be frivolous but will also take a ton of time and we can't afford to do that.Regards,Arafat
On Saturday, May 19, 2018 at 5:44:10 AM UTC+5:30, John Woods wrote:I like that you're using something that is part of the Ruby standard library. One rule I've learned over the years is try not to introduce too many new dependencies. I suspect we'll have at least a few for this project, but then it's all the more important to try to use standard library features.On Fri, May 18, 2018 at 5:56 AM Pranav Garg <prana...@gmail.com> wrote:
Daily Report 18 May 2018,
I have began the work on porting GR Framework to Ruby. To do so I have read Julia bindings for the same, which have been easily called using the ccall function in Julia. To create Bindings to
Ruby I am currently using a Ruby Standard library "Fiddle". Following the example at http://blog.honeybadger.io/use-any-c-library-from-ruby-via-fiddle-the-ruby-standard-librarys-best-kept-secret/. I tried importing GR Framework snd was successfully able to render the following figure in Ruby using just the code here(https://github.com/pgtgrly/GSOC2018-Sandbox/commit/5e3c6cc9c9ce380d49267c58f570d60721237e63).
I have been facing some issues regarding passing array pointers and parsing certain functions, because of which I am getting the following error:
/usr/lib/ruby/2.3.0/fiddle/cparser.rb:92:in `parse_signature': can't parse the function prototype: gr_surface(int,int,double*,double*,double*,int) (RuntimeError)
from /usr/lib/ruby/2.3.0/fiddle/import.rb:163:in `extern'
from alphatest.rb:20:in `<module:GR>'
from alphatest.rb:6:in `<main>'
I have found the potential solution to the prior (https://stackoverflow.com/questions/19744000/how-to-deal-with-array-pointers-in-ruby-fiddle , https://ruby-doc.org/stdlib-2.0.0/libdoc/fiddle/rdoc/Fiddle/Pointer.html) while I am looking into the python bridge of GR as a reference for the latter(Will probably work with the the importer module in Fiddle). I am also reading up on C Extensions from the Link that Prasun sent me in case Fiddle does not work out.
Regards
Pranav Garg
Hi Everyone,
Firstly, John the idea of zoom-in, zoom-out that you are mentioning is something that Pranav told me too. I believe the idea you are asking for stems from the default Grapher app in Macbook. I think that accomplishing those is going to be super tricky. I will certainly have to contact experts on that. For now, I am focussing on more immediate problems as mentioned in the timeline.The past whole week has been super amazing. I have been solving this cool problem to help design generalized graphs in Rubyplot with RMagick and it's been going great. I do think that this kind of design is certainly going to take a lot of iterations to make it work out. My concerns primarily come, not just from the attempt at trying my own problem but also being able to make a design that helps Pranav with his own tasks. To be honest, my current priority is to only focus on my own problem and then later I will change the design so as to make it work well for Pranav too.Here are a few things I am doing -> https://github.com/Arafatk/magick-rubyplot1. Adding methods to array class to help out with simple statistics operations2. Added a modest Backend example that's not of much use now but does follow a generalized approach of making a graph with a proper axis, labels, legends, and titles. These have many methods that overload/add to the existing draw features of RMagick.3. Adding additional math methods to the transformation layer.4. Added a ton of beautification features to the artist class, like font size, font colors, data types, colors and lots more.5. The fundamental problem here which is the ability to make sure that the geometry of the graph in such a way that no overlap occurs between Legends, titles, axis lines etc so that is why I am taking so much time to make the code modular and I have many other graph formats in mind. Let's see how this turns out.6. Now that axis and making lines etc is out of the way, I think it will probably be easy to make other graphs too.Right now, I have a ton of code mostly in the form of long program functions etc but the code is mostly spaghetti code and I have added no specs as of now. I would ask you guys to take a look but not today and hopefully, I will ask for review and recommendations by next week. I would also like opinions about aesthetics later.
4. CheckButton -> Buttons with boolean features(on/off) like say show title or not.5. Combo Text Widget-> Showing a dropdown list of options.6. Menu Bar-> With the option to save files in a particular format. Although, I am not exactly sure how I am going to make a pop up inside this for saving etc.7. Error Message dialog boxes
8. Refresh and iterate between images. So this way we could say zoom in and zoom out with a button.For now, I would say that this is more than enough and quite possibly all the features we need for Ruby-Plot. I will be using a small subset of these for my needs. Certainly, it is possible to have a few more features but given the time constraints focussing on more things would not only be frivolous but will also take a ton of time and we can't afford to do that.Regards,Arafat
On Saturday, May 19, 2018 at 5:44:10 AM UTC+5:30, John Woods wrote:I like that you're using something that is part of the Ruby standard library. One rule I've learned over the years is try not to introduce too many new dependencies. I suspect we'll have at least a few for this project, but then it's all the more important to try to use standard library features.On Fri, May 18, 2018 at 5:56 AM Pranav Garg <prana...@gmail.com> wrote:
Daily Report 18 May 2018,
I have began the work on porting GR Framework to Ruby. To do so I have read Julia bindings for the same, which have been easily called using the ccall function in Julia. To create Bindings to
Ruby I am currently using a Ruby Standard library "Fiddle". Following the example at http://blog.honeybadger.io/use-any-c-library-from-ruby-via-fiddle-the-ruby-standard-librarys-best-kept-secret/. I tried importing GR Framework snd was successfully able to render the following figure in Ruby using just the code here(https://github.com/pgtgrly/GSOC2018-Sandbox/commit/5e3c6cc9c9ce380d49267c58f570d60721237e63).
I have been facing some issues regarding passing array pointers and parsing certain functions, because of which I am getting the following error:
/usr/lib/ruby/2.3.0/fiddle/cparser.rb:92:in `parse_signature': can't parse the function prototype: gr_surface(int,int,double*,double*,double*,int) (RuntimeError)
from /usr/lib/ruby/2.3.0/fiddle/import.rb:163:in `extern'
from alphatest.rb:20:in `<module:GR>'
from alphatest.rb:6:in `<main>'
I have found the potential solution to the prior (https://stackoverflow.com/questions/19744000/how-to-deal-with-array-pointers-in-ruby-fiddle , https://ruby-doc.org/stdlib-2.0.0/libdoc/fiddle/rdoc/Fiddle/Pointer.html) while I am looking into the python bridge of GR as a reference for the latter(Will probably work with the the importer module in Fiddle). I am also reading up on C Extensions from the Link that Prasun sent me in case Fiddle does not work out.
Regards
Pranav Garg
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "SciRuby Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "SciRuby Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "SciRuby Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "SciRuby Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev...@googlegroups.com.