Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr/save ascii #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Pr/save ascii #11

wants to merge 2 commits into from

Conversation

ambs
Copy link
Contributor

@ambs ambs commented Aug 17, 2014

Howdy,

So long, but still fighting matrices (unfortunately not petting ducks :-) ).
Now for the real matter, I found it would be nice to have methods to save/load matrices from files.
I know I can slurp a file and use 'new_from_string', but I do not think that to be very efficient (as you need to construct the full string in memory, and then parse it). The same to save...

So, I know I miss tests and documentation. But for now what I want is:

  • if you bless the creation of these methods
  • if you want to change the methods names, or if I can keep them

If everything is good, I'll continue coding, and will poke you again when it is ready.

Cheers

@leto
Copy link
Owner

leto commented Aug 18, 2014

I will review this soon and get back to you

@ambs
Copy link
Contributor Author

ambs commented Dec 27, 2014

Some months later, @leto, do you mind to take a decision on this? :) Thank you!

@leto
Copy link
Owner

leto commented Dec 28, 2014

Oops! Sorry that this fell off my radar, @ambs. Feel free to remind me sooner in the future 😈

I like the functionality of this 👍 but I don't like the function names 👎 Perhaps save_to_file() and new_from_file() ? What was your motivation in putting "ascii" in the name? Otherwise, yes please continue on this track and write some tests and docs, too 🐪

@leto
Copy link
Owner

leto commented Dec 28, 2014

Or emulate the Math::GSL interface that many people are already used to?

https://github.com/leto/math--gsl/blob/master/pod/Matrix.pod#write

https://github.com/leto/math--gsl/blob/master/pod/Matrix.pod#read

@ambs
Copy link
Contributor Author

ambs commented Dec 28, 2014

Hey
I had other things to do, so this fell off my radar too :)

The motivation of using ASCII: sooner or later we might want another serialization format, like Sereal or Storable or ... or even some pack'ed format.

So, I would save write and read for the binary formats when they come.
Maybe use your save_to_file and new_from_file? No idea. Brainstorming is welcome :)

@leto
Copy link
Owner

leto commented Jan 9, 2015

Yeah, I like save_to_file and `new_from_file``, run with it!

@ambs
Copy link
Contributor Author

ambs commented Jan 9, 2015

Nice. Will create tests, then!

@ambs
Copy link
Contributor Author

ambs commented Jan 9, 2015

And here it is :) Have fun!

@leto
Copy link
Owner

leto commented Jan 10, 2015

👍 Can you add something to the ChangeLog?

@ambs
Copy link
Contributor Author

ambs commented Jan 10, 2015

And here it is.

@ambs
Copy link
Contributor Author

ambs commented Jan 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants