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

New recipe for the Inline::C Cookbook #56

Closed
rongrw opened this issue Dec 17, 2016 · 17 comments
Closed

New recipe for the Inline::C Cookbook #56

rongrw opened this issue Dec 17, 2016 · 17 comments

Comments

@rongrw
Copy link
Contributor

rongrw commented Dec 17, 2016

Hi all,

Following a recent discussion on the Inline mailing list about accessing Perl variables directly from a C function, I've put together some sample code that I think would be appropriate to add into the Inline::C Cookbook. I've attached a file in plain text format that contains the full recipe.

Would it be possible to add this new recipe into the Cookbook, perhaps under the "Meat & Potatoes" chapter?

Kind Regards,
Ron.

C-Cookbook-entry.txt

@mohawk2
Copy link
Collaborator

mohawk2 commented Jan 15, 2017

Hi Ron, this will probably be easier for the maintainers to process if you actually make a pull request with this?

@wbraswell
Copy link
Contributor

@rongrw
Good job on the new cookbook entry! 👍
I agree with @mohawk2, you should make a pull request.

@rongrw
Copy link
Contributor Author

rongrw commented Jan 16, 2017

I've noticed that the Cookbook is in (.swim) format in the master branch. Sorry for asking these simple questions, but what is the (.swim) format and how do I convert it to (.pod) to ensure the formatting looks correct?

I'm assuming that I would have to add my new recipe into Cookbook.swim in order to create a pull request.

Thank you.

@mohawk2
Copy link
Collaborator

mohawk2 commented Jan 16, 2017

That's a great question! As I recall, you have to install Zilla::Dist and do (I think) zild dist to make a .pm file you could inspect.

If that proves troublesome, then just a best guess at the formatting (since the markup is very easy to cargo-cult from other sections) and a PR is still much easier to deal with.

@rongrw
Copy link
Contributor Author

rongrw commented Jan 20, 2017

Thanks for the suggestion @mohawk2

Another option is to install the Swim module. This module comes with a utility program called "swim" which can convert (.swim) format to (.pod) format as well as other formats. So, in my case, I use the following command:

swim --to=pod Cookbook.swim > Cookbook.pod

@wbraswell
Copy link
Contributor

@rongrw
As part of your documentation update, can you please include the above info (at least) about the Swim module?

@rongrw
Copy link
Contributor Author

rongrw commented Jan 21, 2017

Hi @wbraswell ,

OK, that's fine. Do you think Swim together with the above command should be mentioned in an Appendix in the Cookbook?

@daoswald
Copy link
Collaborator

daoswald commented Jan 21, 2017 via email

@wbraswell
Copy link
Contributor

@rongrw
There is not currently a CONTRIBUTING doc, but per @daoswald 's recommendation, you should go ahead and create one to contain your swim info.

@rongrw
Copy link
Contributor Author

rongrw commented Jan 24, 2017

I have now finished my updates to Cookbook.swim. Also, I'm happy to write up a CONTRIBUTING file as suggested by @daoswald . I'll use Inline's version of this file as a guide.

Thanks for all your suggestions.

@rongrw
Copy link
Contributor Author

rongrw commented Jan 26, 2017

I've now completed the CONTRIBUTING file. As I'm a little unsure with what I've written for this file, I've attached it to this post. If you could have a look at it that would be great. Let me know if it needs any further amendments or additions. Thank you.

CONTRIBUTING.txt

@wbraswell
Copy link
Contributor

@rongrw
Please add info about the IRC chat room to your CONTRIBUTING.txt file
server: irc.perl.org
channel: #inline

@rongrw
Copy link
Contributor Author

rongrw commented Jan 31, 2017

Thank you @wbraswell for your suggestion.

I've added a section titled "IRC Chat Room" to the CONTRIBUTING file. I've also created a pull request now for updating the C-Cookbook.

@perlpunk
Copy link
Collaborator

i think this can be closed since the PR was applied

@rongrw
Copy link
Contributor Author

rongrw commented May 20, 2017

@perlpunk , yes, it's fine to close this issue. Regarding having a CONTRIBUTING file in the repo, do you want me to create a new issue for this? Since I wrote this file back in Jan, I'm happy to do that.
Thank you.

@perlpunk
Copy link
Collaborator

@rongrw yeah, that's probably a good idea.
Since Dist::Zilla is already generating a generic CONTRIBUTING file for CPAN, it shouldn't be a problem to put that file into the repo, along with distribution specific advice.
I'll try to talk to @ingydotnet later

@rongrw
Copy link
Contributor Author

rongrw commented May 20, 2017

OK @perlpunk that's fine. We can use the generated CONTRIBUTING file - I'll then add a section on Swim since it's not obvious how to edit the Inline::C Cookbook file.

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

No branches or pull requests

5 participants