Skip to content

Commit

Permalink
Report for week 4
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Nov 16, 2014
1 parent bda2639 commit 96803d4
Show file tree
Hide file tree
Showing 12 changed files with 505 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -14,6 +14,7 @@ BUILD_ROOT := $(BRANCHDIR)/build

# TODO Get COGNODES values from build/config.yaml→recent
COGNODES := \
mh4x \
m6z3 \
ecf6 \
se9g \
Expand Down Expand Up @@ -96,6 +97,7 @@ node/%.html: node

# Need to figure out a good Makefile abstraction for this:
permapages: page
cp node/mh4x.html page/inline-grant-weekly-report-4.html
cp node/m6z3.html page/inline-grant-weekly-report-3.html
cp node/ecf6.html page/inline-grant-weekly-report-2.html
cp node/se9g.html page/inline-grant-weekly-report-1.html
Expand Down
1 change: 1 addition & 0 deletions branch/bootstrap
Submodule bootstrap added at a346dc
1 change: 1 addition & 0 deletions branch/build
Submodule build added at 4fab7a
1 change: 1 addition & 0 deletions branch/cog
Submodule cog added at c1d9c7
1 change: 1 addition & 0 deletions branch/cogdb
Submodule cogdb added at ef1681
94 changes: 94 additions & 0 deletions index.html
Expand Up @@ -49,6 +49,100 @@ <h1 class="blog-title">The TPF Inline Grant Info Site</h1>
<div class="row">
<div class="col-sm-8 blog-main">
<div class="blog-post">
<h2 class="blog-post-title">Inline Grant Weekly Report #4</h2>
<p class="blog-post-meta">
November 15, 2014 by
<a href="page/ingy-and-david-bio.html">Ingy and David</a>
</p>
<p>The major events of this week were:</p>

<ul>
<li>Wrote <a href="Inline::Module::Tutorial">Inline::Module::Tutorial</a></li>
<li>Added Dist::Zilla support for <a href="Inline::Module">Inline::Module</a></li>
<li>Added Zilla::Dist support for <a href="Inline::Module">Inline::Module</a></li>
<li>Released 2 new example modules based on the above:
<ul>
<li><a href="Alt::Acme::Math::XS::DistZilla">Alt::Acme::Math::XS::DistZilla</a></li>
<li><a href="Alt::Acme::Math::XS::ZillaDist">Alt::Acme::Math::XS::ZillaDist</a></li>
</ul>

</li>
</ul>

<h2>Inline::Module::Tutorial</h2>

<p>This is a work in progress. It explains how to make an XS module using Inline in very basic, specific terms. It only details what we have implemented so far, although there are stub sections for upcoming things. Please give it a read and let us know what you think (in the form of Issues and/or Pull Requests on <a href="https://github.com/ingydotnet/inline-module-pm">https://github.com/ingydotnet/inline-module-pm</a>).</p>

<h2>Dist::Zilla Support</h2>

<p>This is a fun story.</p>

<p>I(ingy) thought I knew how the Dist::Zilla stuff was going to work… I&#39;d simply add these lines to a <code>dist.ini</code>:</p>

<pre><code>[InlineModule]
module = Acme::Math::XS
inline = Acme::Math::XS::Inline
ilsm = Inline::C
</code></pre>

<p>then write a <a href="Dist::Zilla::Plugin::InlineModule">Dist::Zilla::Plugin::InlineModule</a> and make it all work. In the end that&#39;s exactly what happened, although the path was bumpier than expected.</p>

<p>I started by strolling over to #distzilla on IRC and asking ether++ a few dzil related questions. Then leont++ jumped in and wanted to know what was going on. I told him a bit and he thought I was getting some things wrong… So I invited him to start coding with me (PairUp style)!</p>

<p>It took us a few minutes to get on the same page, but eventually we did. We got some basics into the plugin but then had to break for other stuff. When I came back, I got ether to PairUp for a while. Pretty soon we had a new module, just barely working well enough to release and then release the Acme module based off of it.</p>

<p>TeamProgramming++! Thanks ether++ and leont++!</p>

<h2>Zilla::Dist Support</h2>

<p>Once we got DZ supported, supporting ZD was trivial. The only difference is where the data goes. In this case it goes in the <code>Meta</code> file (where all the meta data does):</p>

<pre><code>=zild:
inline:
module: Acme::Math::XS
inline: Acme::Math::XS::Inline
ilsm: Inline::C
</code></pre>

<p>Of course, Zilla::Dist uses that info to generate the same <code>dist.ini</code> section above at <code>make release</code> time.</p>

<h2>Talking About My Generation</h2>

<p>It&#39;s a good time to pause, and realize that the whole of programming is pretty much just the <strong>generation</strong> of one thing from another. Programmers might not think about it that way all the time, but I(ngy) tend to <em>only</em> think about it that way.</p>

<p>When I get frustrated by the ways that I need to manage text to make the computer understand my idea, I often step back and think &quot;What is the world I want to be in right now? How would I rather be doing this?&quot;. If I come up with a killer answer that works wonderfully on almost all levels, I make it so.</p>

<p>I&#39;m not sure what drives other folks to make new modules and languages and tools, but that&#39;s a big part of my MO. Inline is like that and Inline::Module is too. What is the minimal info I need to tell the Perl toolchain to Make It So?</p>

<p><code>&lt;/opinion&gt;</code></p>

<h2>The Acme Example Modules</h2>

<p>We&#39;ve rearranged the Acme::Math::XS git repo a bit. See this for details: <a href="https://github.com/ingydotnet/acme-math-xs-pm/blob/master/About.pod">https://github.com/ingydotnet/acme-math-xs-pm/blob/master/About.pod</a></p>

<p>We&#39;ve made Acme::Math::XS::XS become Acme::Math::XS (and deprecated the former). This is the pure (no Inline) version. It s on the <code>xs</code> branch of the repo. All the Inline::Module versions will be released to CPAN using the <code>Alt</code> names listed in the link above.</p>

<p>It is important to release this code as different modules, even though the code is exactly the same. We want to have proof that the modifications to the various build systems actually work in the wild.</p>

<h2>Next Week</h2>

<p>The next big step is definitely writing tests. Doing this type of work Test First would have caused too much churn early on. We needed to experiment and invent a non-trivial process that didn&#39;t exist. Now that we see it clearly, writing tests (and TDD) is the right choice.</p>

<p>We now have real, usable, open source software on GitHub, so the roadmap and problems will start being expressed as Issues: <a href="https://github.com/ingydotnet/inline-module-pm/issues">https://github.com/ingydotnet/inline-module-pm/issues</a></p>

<p>Finally, we need to convert some real XS modules like:</p>

<ul>
<li>Ingy&#39;s <a href="YAML::XS">YAML::XS</a></li>
<li>David&#39;s <a href="Math::Prime::FastSieve">Math::Prime::FastSieve</a></li>
</ul>

<p>to use Inline::Module. This will happen first under the Alt namespace, then once they pass all tests same as the originals, we can make the real ones use Inline::Module.</p>

<p>I encourage interested people to do the same (but maybe wait until next week to start :).</p>
</div>
<hr />
<div class="blog-post">
<h2 class="blog-post-title">Inline Grant Weekly Report #3</h2>
<p class="blog-post-meta">
November 9, 2014 by
Expand Down
16 changes: 16 additions & 0 deletions js/all.js
Expand Up @@ -1950,6 +1950,22 @@ output += '<p>Name: Inline Grant Weekly Report #3 Type: post Date: November 9, 2
return output;
}

Jemplate.templateMap['mh4x.html'] = function(context) {
if (! context) throw('Jemplate function called without context\n');
var stash = context.stash;
var output = '';

try {
output += '<p>Name: Inline Grant Weekly Report #4 Type: post Date: November 15, 2014</p>\n\n<p>The major events of this week were:</p>\n\n<ul>\n<li>Wrote <a href="Inline::Module::Tutorial">Inline::Module::Tutorial</a></li>\n<li>Added Dist::Zilla support for <a href="Inline::Module">Inline::Module</a></li>\n<li>Added Zilla::Dist support for <a href="Inline::Module">Inline::Module</a></li>\n<li>Released 2 new example modules based on the above:\n<ul>\n<li><a href="Alt::Acme::Math::XS::DistZilla">Alt::Acme::Math::XS::DistZilla</a></li>\n<li><a href="Alt::Acme::Math::XS::ZillaDist">Alt::Acme::Math::XS::ZillaDist</a></li>\n</ul>\n\n</li>\n</ul>\n\n<h2>Inline::Module::Tutorial</h2>\n\n<p>This is a work in progress. It explains how to make an XS module using Inline in very basic, specific terms. It only details what we have implemented so far, although there are stub sections for upcoming things. Please give it a read and let us know what you think (in the form of Issues and/or Pull Requests on <a href="https://github.com/ingydotnet/inline-module-pm">https://github.com/ingydotnet/inline-module-pm</a>).</p>\n\n<h2>Dist::Zilla Support</h2>\n\n<p>This is a fun story.</p>\n\n<p>I(ingy) thought I knew how the Dist::Zilla stuff was going to work… I&#39;d simply add these lines to a <code>dist.ini</code>:</p>\n\n<pre><code>[InlineModule]\nmodule = Acme::Math::XS\ninline = Acme::Math::XS::Inline\nilsm = Inline::C\n</code></pre>\n\n<p>then write a <a href="Dist::Zilla::Plugin::InlineModule">Dist::Zilla::Plugin::InlineModule</a> and make it all work. In the end that&#39;s exactly what happened, although the path was bumpier than expected.</p>\n\n<p>I started by strolling over to #distzilla on IRC and asking ether++ a few dzil related questions. Then leont++ jumped in and wanted to know what was going on. I told him a bit and he thought I was getting some things wrong… So I invited him to start coding with me (PairUp style)!</p>\n\n<p>It took us a few minutes to get on the same page, but eventually we did. We got some basics into the plugin but then had to break for other stuff. When I came back, I got ether to PairUp for a while. Pretty soon we had a new module, just barely working well enough to release and then release the Acme module based off of it.</p>\n\n<p>TeamProgramming++! Thanks ether++ and leont++!</p>\n\n<h2>Zilla::Dist Support</h2>\n\n<p>Once we got DZ supported, supporting ZD was trivial. The only difference is where the data goes. In this case it goes in the <code>Meta</code> file (where all the meta data does):</p>\n\n<pre><code>=zild:\n inline:\n module: Acme::Math::XS\n inline: Acme::Math::XS::Inline\n ilsm: Inline::C\n</code></pre>\n\n<p>Of course, Zilla::Dist uses that info to generate the same <code>dist.ini</code> section above at <code>make release</code> time.</p>\n\n<h2>Talking About My Generation</h2>\n\n<p>It&#39;s a good time to pause, and realize that the whole of programming is pretty much just the <strong>generation</strong> of one thing from another. Programmers might not think about it that way all the time, but I(ngy) tend to <em>only</em> think about it that way.</p>\n\n<p>When I get frustrated by the ways that I need to manage text to make the computer understand my idea, I often step back and think &quot;What is the world I want to be in right now? How would I rather be doing this?&quot;. If I come up with a killer answer that works wonderfully on almost all levels, I make it so.</p>\n\n<p>I&#39;m not sure what drives other folks to make new modules and languages and tools, but that&#39;s a big part of my MO. Inline is like that and Inline::Module is too. What is the minimal info I need to tell the Perl toolchain to Make It So?</p>\n\n<p><code>&lt;/opinion&gt;</code></p>\n\n<h2>The Acme Example Modules</h2>\n\n<p>We&#39;ve rearranged the Acme::Math::XS git repo a bit. See this for details: <a href="https://github.com/ingydotnet/acme-math-xs-pm/blob/master/About.pod">https://github.com/ingydotnet/acme-math-xs-pm/blob/master/About.pod</a></p>\n\n<p>We&#39;ve made Acme::Math::XS::XS become Acme::Math::XS (and deprecated the former). This is the pure (no Inline) version. It s on the <code>xs</code> branch of the repo. All the Inline::Module versions will be released to CPAN using the <code>Alt</code> names listed in the link above.</p>\n\n<p>It is important to release this code as different modules, even though the code is exactly the same. We want to have proof that the modifications to the various build systems actually work in the wild.</p>\n\n<h2>Next Week</h2>\n\n<p>The next big step is definitely writing tests. Doing this type of work Test First would have caused too much churn early on. We needed to experiment and invent a non-trivial process that didn&#39;t exist. Now that we see it clearly, writing tests (and TDD) is the right choice.</p>\n\n<p>We now have real, usable, open source software on GitHub, so the roadmap and problems will start being expressed as Issues: <a href="https://github.com/ingydotnet/inline-module-pm/issues">https://github.com/ingydotnet/inline-module-pm/issues</a></p>\n\n<p>Finally, we need to convert some real XS modules like:</p>\n\n<ul>\n<li>Ingy&#39;s <a href="YAML::XS">YAML::XS</a></li>\n<li>David&#39;s <a href="Math::Prime::FastSieve">Math::Prime::FastSieve</a></li>\n</ul>\n\n<p>to use Inline::Module. This will happen first under the Alt namespace, then once they pass all tests same as the originals, we can make the real ones use Inline::Module.</p>\n\n<p>I encourage interested people to do the same (but maybe wait until next week to start :).</p>\n';
}
catch(e) {
var error = context.set_error(e, output);
throw(error);
}

return output;
}

Jemplate.templateMap['se9g.html'] = function(context) {
if (! context) throw('Jemplate function called without context\n');
var stash = context.stash;
Expand Down
9 changes: 9 additions & 0 deletions js/all.json
@@ -1,6 +1,15 @@
{
"site_title" : "The TPF Inline Grant Info Site",
"nodes" : [
{
"heading" : "Up to date information on The Perl Foundation's 2014 grant for Inline.pm.",
"cogid" : "mh4x",
"type" : "post",
"link" : "inline-grant-weekly-report-4",
"title" : "Inline Grant Weekly Report #4",
"date" : "November 15, 2014",
"site_title" : "The TPF Inline Grant Info Site"
},
{
"heading" : "Up to date information on The Perl Foundation's 2014 grant for Inline.pm.",
"cogid" : "m6z3",
Expand Down
6 changes: 3 additions & 3 deletions node/m6z3.html
Expand Up @@ -50,14 +50,14 @@ <h1 class="blog-title">The TPF Inline Grant Info Site</h1>
<div class="col-sm-8 blog-main">
<div class="blog-post">
<h2 class="blog-post-title">Inline Grant Weekly Report #3</h2>
<p>David and Ingy try to get the weekly report out by Saturday night each week, in order to make the Perl Weekly cut. Last week and this week we failed. Last week was due to unexpected visitors and this week Ingy was wiped out after his Pittsburgh Perl Workshop talk:</p>
<p>David and Ingy try to get the weekly report out by Saturday night each week, in order to make the Perl Weekly cut. Last week and this week, Saturday drifted into Sunday. Last week was due to unexpected visitors and this week Ingy was wiped out after his Pittsburgh Perl Workshop talk:</p>

<p><a href="https://www.youtube.com/watch?v=vDRLIjojlhg">https://www.youtube.com/watch?v=vDRLIjojlhg</a></p>

<p>We had a couple great days of hacking this week. The goal was to get a fully working <a href="Acme::Math::XS">Acme::Math::XS</a>, with these properties:</p>
<p>We had several great days of hacking this week. The goal was to get a fully working <code>Acme::Math::XS</code>, with these properties:</p>

<ul>
<li>Implemented with the new <a href="Inline::Module">Inline::Module</a></li>
<li>Implemented with the new <code>Inline::Module</code></li>
<li>Plain old <code>Makefile.PL</code></li>
<li>Perl module with C code &quot;Inline&quot;</li>
<li><code>perl Makefile.PL &amp;&amp; make test</code> works author side</li>
Expand Down

0 comments on commit 96803d4

Please sign in to comment.