--
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.
Thank you for pointing that out, I will rectify my design accordingly.
As for the Kernel name clashes, I was hoping that making the class names something like "KernelLoader" would be appropriate and avoid clashes with any core modules while not obscuring important SPICE terminology.
Regards,
Gaurav
Hi Rajith,
That's great! I appreciate you taking time to update us about the progress.
Also since this is a public channel, I guess most of the subscribers would prefer the updates to be on a single thread.
About debugging, yes that's true. Finding the C code segment where it went wrong is tough. I had followed the usual way of commenting and uncommenting the code. I am sure there are better ways. I had opened up an issue to discuss how to detect memory leaks. There are some links there where you might find some tips. I will see if I can find something.
2.1.8 :001 > x = Rational('2/5')
=> (2/5)
2.1.8 :002 > y = Rational('3/7')
=> (3/7)
2.1.8 :005 > X = SymEngine::sympify(x)
=> #<SymEngine::Rational:0x8e71f8c>
2.1.8 :006 > Y = SymEngine::sympify(y)
=> #<SymEngine::Rational:0x8deb8ec>
2.1.8 :007 > i = SymEngine::I
=> #<SymEngine::Constant:0x8ec7ec8>
2.1.8 :008 > Z = X + i*Y
=> #<SymEngine::Complex:0x8de25a8>
2.1.8 :011 > Z = Z - i*Y
=> #<SymEngine::Rational:0x8dd7f18>
2.1.8 :006 > a = 2 + 0i
=> (2+0i)
2.1.8 :008 > A = SymEngine::sympify(a)
=> #<SymEngine::Integer:0x84f38fc>
2.1.8 :009 > a.class
=> Complex
2.1.8 :010 > A.class
=> SymEngine::Integer
a = Complex(2, 3)
a = SymEngine::Complex.new(a)
expect(a).to be_a SymEngine::Complex
expect(a.to_s).to eq('2+3i')
Great, thanks for the update.
Day 4
---------
Sorry for the late update. I'm sending this from mobile, and will be short.
Basically yesterday I worked on both the cwrappers and ruby wrappers. I believe you saw the changes in the respective PRs.
The appveyor fails in .rb because of a version issue with the main repo. I tried by having the hash of the latest commit but it didn't work. I will have to figure it out today. Also will be looking at the new spec formats to familiarize my self and to rewrite the complex spec.
Regards,
Rajith
m = N[ [2, 3, 4], [7, 8, 9] ]
mat = SymEngine::DenseMatrix.new(m)
mat.class # gives "SymEngine::DenseMatrix"
mat = SymEngine::DenseMatrix.new() mat = SymEngine::DenseMatrix.new(SymEngine::DenseMatrix) mat = SymEngine::DenseMatrix.new(NMatrix) mat = SymEngine::DenseMatrix.new(Array) mat = SymEngine::DenseMatrix.new(no_rows, no_columns)
Please let me know if this is okay to go ahead with.
Regards,
Rajith
DenseMatrix.get(row, col) DenseMatrix.set(row, col, SymEngine::Basic) DenseMatrix.inv DenseMatrix.det DenseMatrix.transpose DenseMatrix.submatrix(row_start, col_start, row_end, col_end, row_step, col_step) DenseMatrix.rows DenseMatrix.cols + operator for Matrix and Scalar addition * operator for Matrix and Scalar addition DenseMatrix.to_s DenseMatrix.inspect5 more are left to be wrapped from DenseMatrix which I'm doing tonight. Next week I should be able to finish everything by wrapping SparceMatrix methods and writing the tests.
Hi Abinash,
The blog post for week #5 is available at : https://rajithsays.wordpress.com/2016/06/26/gsoc-wek-5-progress/
In summary, yesterday and today I wrapped several functions:DenseMatrix.get(row, col) DenseMatrix.set(row, col, SymEngine::Basic) DenseMatrix.inv DenseMatrix.det DenseMatrix.transpose DenseMatrix.submatrix(row_start, col_start, row_end, col_end, row_step, col_step) DenseMatrix.rows DenseMatrix.cols + operator for Matrix and Scalar addition * operator for Matrix and Scalar addition DenseMatrix.to_s DenseMatrix.inspect5 more are left to be wrapped from DenseMatrix which I'm doing tonight. Next week I should be able to finish everything by wrapping SparceMatrix methods and writing the tests.
Also, I have the following questions:1. Should the - and ** operators be implemented as well? (The C++ API does not provide this directly). In case I'm implementing it, should it be at CWrapper level or Ruby level?
2. Should we also implement a to_array function? I was wondering whether that would be useful..
3. Should I have 2D arrays (and NMatrix objects) be converted (sympified) to DenseMatrix type with convert() function? I think this would be quite useful.
Math.cos
instead of cos
For this method, the StrPrinter will be extended for a Ruby Printer, which prints the Ruby Equivalent to the SymEngine basics.
i.e. Rational(3,2) for 3/2 etc. and the functions sin, cos etc as Math.sin, Math.cos etc.
After that, calling eval on the generated string is quite straight forward.
Here, a problem I encountered was on defining lambdas with variable number of arguments. I was thinking of sending an array of values to the lambda funciton. i.e. Lambda.call( [var1, var2, etc...] )
I'm hoping to hear from you guys possible alternatives to both options, and issues you see with the approaches.
RajithRegards,The exception handling basically works right now, but I need to make the exceptions thrown in ruby to be more descriptive. So I will be working on that next week (Making proper exceptions in the C++ code, right now, std::runtime_error is used for everything). Looks like exception handling part can be finished on time.Hi guys,The blog post for this week can be found here : https://rajithsays.wordpress.com/2016/07/24/gsoc-week-9-progress/
>>>>>>>>>>>>>> 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.
>>> 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.
RajithAbout the wrap up plan, I hope to wrap up Exceptions and Matrices on both SymEngine and SymEngine.rb repos by the end of the GSoC.Hi,I have been away from home for this week, and will be returning this Sunday. Although I couldn't put together a lot of work this week, I managed to wrap up Exception Handling on SymEngine today. (I will compensate for the lost week after the GSoC period).I have to write a couple of more blog posts too, will also do that on Monday.Regards,
RajithRegards,I am hoping to complete the Exception Handling Ruby Wrapper code by tonight (just have to add some tests there), which will also enable the Parser Ruby Wrapper to be merged.Please let me know your ideas. (I will update the blogpost until I submit it on 22nd Monday)Hi guys,I have written a wrap-up blog post for submission to GSoC.
https://rajithsays.wordpress.com/2016/08/19/gsoc-epilogue/
Then the only code which will stay unmerged will be in the Matrix Ruby Wrapper PR. Realistically, this will be hard to get merged before the deadline on the 23rd. But I will continue work on it, as I'm free.
Hi Rajith,
The report looks very well organised. It shows how much of time and effort you have put into the project. Great work! A couple of improvements that I would like to suggest are:
- Adding the complete text of the links in the table is unnecessary. You can just abbreviate the PRs and add hyperlinks e.g. PR#50
- The comments part seems cramped up. Allot more space to that if you can. Doing the above will help. That will leave you with more place to elaborate.
- The Work Product Submission Guidelines also mention of a "documentation of what and why". While the current report and the reasons for certain design decisions make perfect sense for people involved with the project, it might not be that obvious for people who are new to the project just by going through the report. It would be great to have the relevant documentation within the source code for the parts which are not that obvious. Along with that I would suggest you to extend the Beginner Contributor Guides for the new things that you added, like exception handling, and add a link to that in the report as well.
Let's get the pending PRs wrapped up soon. Mention me when you want it to be reviewed.Thanks a lot for your efforts! 🙂
Regards,Abinash Meher