Skip to content

Commit

Permalink
Refactor and add week #5
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Nov 23, 2014
1 parent 9755203 commit 0853e34
Show file tree
Hide file tree
Showing 22 changed files with 436 additions and 196 deletions.
47 changes: 15 additions & 32 deletions Makefile
Expand Up @@ -12,15 +12,7 @@ ALL_JSON := js/all.json
COG_ROOT := $(BRANCHDIR)/cog
BUILD_ROOT := $(BRANCHDIR)/build

# TODO Get COGNODES values from build/config.yaml→recent
COGNODES := \
mh4x \
m6z3 \
ecf6 \
se9g \
v3e7 \
y5yq \
y6ut \
include pkg/nodes.mk

ALL_SWIM := $(COGNODES:%=tmp/swim/%.swim)
ALL_YAML := $(COGNODES:%=tmp/yaml/%.yaml)
Expand All @@ -35,35 +27,34 @@ help:
@echo ' branch - Clone branches into branch/'
@echo ' build - Rebuild website'
@echo ' clean - Delete generated content'
@echo ' start - Start web server'
@echo ' stop - Stop web server'
@echo ''
@echo ' branch-status - Check subrepo/branch statuses'
@echo ''

branch: $(SUBDIRS)

# foreach node in COGNODES
# make tmp/swim/id.swim
# make tmp/yaml/id.yaml
# use swim + yaml to make
# tmp/html/id.html template
# render node/id.html
# make index.html
# make css

build: $(SUBDIRS) \
$(ALL_SWIM) \
$(ALL_YAML) \
$(ALL_HTML) \
$(ALL_NODE) \
permapages \
$(SITE_INDEX) \
$(SITE_JS) \
$(ALL_JSON) \
$(SITE_INDEX) \
css/blog.css \
css/cog.css \

clean purge:
rm -fr $(TEMPDIR) $(BRANCHDIR)
rm -fr $(TEMPDIR) $(BRANCHDIR) web.log

start:
@echo 'Run: python -m SimpleHTTPServer &> web.log &'

stop:
kill `ps ax | grep SimpleHTTPServer | grep -v grep | cut -f2 -d' '`

branch-status:
@for d in $(BRANCHDIR)/*; do \
Expand Down Expand Up @@ -95,17 +86,9 @@ node/%.html: node
--post-chomp page.html \
> $@

# 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
cp node/v3e7.html page/inline-module-spec.html
cp node/y5yq.html page/inline-grant-accepted.html
cp node/y6ut.html page/ingy-and-david-bio.html

$(SITE_INDEX):
include pkg/permapages.mk

$(SITE_INDEX): force
tt-render \
--path="$(BUILD_ROOT)/template:$(HTMLDIR)" \
--data=$(ALL_JSON) \
Expand All @@ -114,7 +97,7 @@ $(SITE_INDEX):

#------------------------------------------------------------------------------

$(ALL_JSON):
$(ALL_JSON): force
$(BUILD_ROOT)/bin/all-json > $@

$(SITE_JS): js $(TEMPDIR)/jemplates force
Expand Down
58 changes: 50 additions & 8 deletions index.html
Expand Up @@ -17,10 +17,6 @@
<link href="css/blog.css" rel="stylesheet">
<link href="css/cog.css" rel="stylesheet">

<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="http://getbootstrap.com/assets/js/ie-emulation-modes-warning.js"></script>

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Expand Down Expand Up @@ -49,6 +45,54 @@ <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 #5</h2>
<p class="blog-post-meta">
November 22, 2014 by
<a href="page/ingy-and-david-bio.html">Ingy and David</a>
</p>
<p><strong>Refinement</strong> and <strong>Releases</strong>. Those are the two words I (David) would use to describe what went on this week in the Inline Grant Project.</p>

<h2>Thanks!</h2>

<p>First, we would like to thank those members of the Perl Community who contributed their suggestions, work, and code to the Inline Grant Project. <strong>leont++</strong> presented a strong case (in the form of a cohesive code example) of how to clean up our <code>Makefile.PL</code> by moving work out of a <code>FixupMakefile</code> function, and into a <code>postamble</code> action. Whereas previously the <code>Makefile.PL</code> might have looked like this:</p>

<pre><code>WriteMakefile(
);

FixupMakefile(
);
</code></pre>

<p>Now they look like this:</p>

<pre><code>WriteMakefile(
postamble =&gt; &#123;
inline =&gt; &#123; … &#125;,
&#125;,
);
</code></pre>

<p>which is a lot cleaner because it works within &quot;the Perl toolchain system&quot; instead of layering an additional step into it. This is documented in <a href="Inline::Module::Tutorial">Inline::Module::Tutorial</a>.</p>

<p>We also are receiving help from <strong>ether++</strong> on updating our <a href="Dist::Zilla::Plugin::InlineModule">Dist::Zilla::Plugin::InlineModule</a> plugin to work within this cleaner framework.</p>

<p>Additionally, we released <a href="Module::Install::InlineModule">Module::Install::InlineModule</a>; a plugin to bring <a href="Inline">Inline</a> support to <a href="Module::Install">Module::Install</a> based distributions. So for those keeping score, we now support <a href="ExtUtils::MakeMaker">ExtUtils::MakeMaker</a>, <a href="Dist::Zilla">Dist::Zilla</a>, <a href="Zilla::Dist">Zilla::Dist</a>, and <a href="Module::Install">Module::Install</a> based distributions for <a href="Inline">Inline</a>.</p>

<h2>Modules, Modules, Modules</h2>

<p>We have also released the amazing <a href="Alt::Acme::Math::XS::EUMM">Alt::Acme::Math::XS::EUMM</a> in a new <a href="Module::Install">Module::Install</a> based version. Once again for the benefit of those keeping score, the Inline Grant Project has, to date, spawned eight new modules; some plugins, some proofs of concept, and of course <a href="Inline::Module">Inline::Module</a> itself. Additionally, it has directly contributed to new releases of <a href="Inline">Inline</a>, <a href="Inline::CPP">Inline::CPP</a>, <a href="Inline::C">Inline::C</a>, and many other support modules.</p>

<p>This next week we intend to finish revamping the <a href="Dist::Zilla">Dist::Zilla</a> plugin, tackle <a href="Module::Build">Module::Build</a> support, add more tests, and finally convert a couple of pre-existing CPAN modules to Inline-based modules.</p>

<p>It&#39;s gratifying to see the level of enthusiastic support this project has attracted from the Perl Community. We&#39;re seeing more familiar faces in <code>irc.perl.org#inline</code>, receiving more suggestions, and benefiting more from code contributions than ever before.</p>

<p>As we move across the inchstones leading to the wrapping up of the Inline grant project, we are encouraged by the support that we&#39;ve seen, which demonstrates to us that the end of the grant will only be the beginning of the growth and revitalization of the Inline project.</p>
</div>
<hr />
<div class="blog-post">
<h2 class="blog-post-title">Inline Grant Weekly Report #4</h2>
<p class="blog-post-meta">
November 15, 2014 by
Expand Down Expand Up @@ -355,7 +399,7 @@ <h2 class="blog-post-title">Inline Grant Weekly Report #1</h2>
<p>There&#39;s no need to run <code>make</code> to build the C/C++/XS in <code>blib</code> and then add <code>-b</code> to the <code>prove</code> flags, because this is <strong>Inline</strong>!</p>
</div>
<hr />
<div class="blog-post">
<div class="blog-post">
<h2 class="blog-post-title">Inline Grant Accepted</h2>
<p class="blog-post-meta">
October 20, 2014 by
Expand Down Expand Up @@ -385,7 +429,7 @@ <h2>Welcome to the Inline Grant blog!</h2>
<p>We really want to thank the community for this opportunity to make Perl better!</p>
</div>
<hr />
</div><!-- /.blog-main -->
</div><!-- /.blog-main -->
<div class="col-sm-3 col-sm-offset-1 blog-sidebar">
<div class="sidebar-module sidebar-module-inset">
<h4>About</h4>
Expand Down Expand Up @@ -425,8 +469,6 @@ <h4>Elsewhere</h4>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://getbootstrap.com/dist/js/bootstrap.min.js"></script>
<script src="http://getbootstrap.com/assets/js/docs.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="http://getbootstrap.com/assets/js/ie10-viewport-bug-workaround.js"></script>

<!-- Cog JS
================================================== -->
Expand Down
20 changes: 18 additions & 2 deletions js/all.js
Expand Up @@ -6,7 +6,7 @@ compiled Jemplate templates.
AUTHOR - Ingy döt Net <ingy@cpan.org>
Copyright 2006,2008 Ingy döt Net.
Copyright 2006-2014 Ingy döt Net.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Expand Down Expand Up @@ -1907,7 +1907,7 @@ Jemplate.JSON = {
Template Toolkit. Any changes made to this file will be lost the next
time the templates are compiled.
Copyright 2006-2008 - Ingy döt Net - All rights reserved.
Copyright 2006-2014 - Ingy döt Net - All rights reserved.
*/

var Jemplate;
Expand All @@ -1918,6 +1918,22 @@ if (typeof(exports) == 'object') {
if (typeof(Jemplate) == 'undefined')
throw('Jemplate.js must be loaded before any Jemplate template files');

Jemplate.templateMap['cc8p.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 #5 Type: post Date: November 22, 2014</p>\n\n<p><strong>Refinement</strong> and <strong>Releases</strong>. Those are the two words I (David) would use to describe what went on this week in the Inline Grant Project.</p>\n\n<h2>Thanks!</h2>\n\n<p>First, we would like to thank those members of the Perl Community who contributed their suggestions, work, and code to the Inline Grant Project. <strong>leont++</strong> presented a strong case (in the form of a cohesive code example) of how to clean up our <code>Makefile.PL</code> by moving work out of a <code>FixupMakefile</code> function, and into a <code>postamble</code> action. Whereas previously the <code>Makefile.PL</code> might have looked like this:</p>\n\n<pre><code>WriteMakefile(\n …\n);\n\nFixupMakefile(\n …\n);\n</code></pre>\n\n<p>Now they look like this:</p>\n\n<pre><code>WriteMakefile(\n …\n postamble =&gt; &#123;\n inline =&gt; &#123; … &#125;,\n &#125;,\n);\n</code></pre>\n\n<p>which is a lot cleaner because it works within &quot;the Perl toolchain system&quot; instead of layering an additional step into it. This is documented in <a href="Inline::Module::Tutorial">Inline::Module::Tutorial</a>.</p>\n\n<p>We also are receiving help from <strong>ether++</strong> on updating our <a href="Dist::Zilla::Plugin::InlineModule">Dist::Zilla::Plugin::InlineModule</a> plugin to work within this cleaner framework.</p>\n\n<p>Additionally, we released <a href="Module::Install::InlineModule">Module::Install::InlineModule</a>; a plugin to bring <a href="Inline">Inline</a> support to <a href="Module::Install">Module::Install</a> based distributions. So for those keeping score, we now support <a href="ExtUtils::MakeMaker">ExtUtils::MakeMaker</a>, <a href="Dist::Zilla">Dist::Zilla</a>, <a href="Zilla::Dist">Zilla::Dist</a>, and <a href="Module::Install">Module::Install</a> based distributions for <a href="Inline">Inline</a>.</p>\n\n<h2>Modules, Modules, Modules</h2>\n\n<p>We have also released the amazing <a href="Alt::Acme::Math::XS::EUMM">Alt::Acme::Math::XS::EUMM</a> in a new <a href="Module::Install">Module::Install</a> based version. Once again for the benefit of those keeping score, the Inline Grant Project has, to date, spawned eight new modules; some plugins, some proofs of concept, and of course <a href="Inline::Module">Inline::Module</a> itself. Additionally, it has directly contributed to new releases of <a href="Inline">Inline</a>, <a href="Inline::CPP">Inline::CPP</a>, <a href="Inline::C">Inline::C</a>, and many other support modules.</p>\n\n<p>This next week we intend to finish revamping the <a href="Dist::Zilla">Dist::Zilla</a> plugin, tackle <a href="Module::Build">Module::Build</a> support, add more tests, and finally convert a couple of pre-existing CPAN modules to Inline-based modules.</p>\n\n<p>It&#39;s gratifying to see the level of enthusiastic support this project has attracted from the Perl Community. We&#39;re seeing more familiar faces in <code>irc.perl.org#inline</code>, receiving more suggestions, and benefiting more from code contributions than ever before.</p>\n\n<p>As we move across the inchstones leading to the wrapping up of the Inline grant project, we are encouraged by the support that we&#39;ve seen, which demonstrates to us that the end of the grant will only be the beginning of the growth and revitalization of the Inline project.</p>\n';
}
catch(e) {
var error = context.set_error(e, output);
throw(error);
}

return output;
}

Jemplate.templateMap['ecf6.html'] = function(context) {
if (! context) throw('Jemplate function called without context\n');
var stash = context.stash;
Expand Down
79 changes: 37 additions & 42 deletions js/all.json
@@ -1,73 +1,68 @@
{
"node_order" : [
"cc8p",
"mh4x",
"m6z3",
"ecf6",
"se9g",
"v3e7",
"y6ut",
"y5yq"
],
"site_title" : "The TPF Inline Grant Info Site",
"heading" : "Up to date information on The Perl Foundation's 2014 grant for Inline.pm.",
"nodes" : [
{
"heading" : "Up to date information on The Perl Foundation's 2014 grant for Inline.pm.",
"cogid" : "mh4x",
"link" : "inline-grant-weekly-report-5",
"date" : "November 22, 2014",
"type" : "post",
"title" : "Inline Grant Weekly Report #5",
"cogid" : "cc8p"
},
{
"link" : "inline-grant-weekly-report-4",
"title" : "Inline Grant Weekly Report #4",
"date" : "November 15, 2014",
"site_title" : "The TPF Inline Grant Info Site"
"type" : "post",
"title" : "Inline Grant Weekly Report #4",
"cogid" : "mh4x"
},
{
"heading" : "Up to date information on The Perl Foundation's 2014 grant for Inline.pm.",
"cogid" : "m6z3",
"type" : "post",
"link" : "inline-grant-weekly-report-3",
"title" : "Inline Grant Weekly Report #3",
"date" : "November 9, 2014",
"site_title" : "The TPF Inline Grant Info Site"
"type" : "post",
"title" : "Inline Grant Weekly Report #3",
"cogid" : "m6z3"
},
{
"heading" : "Up to date information on The Perl Foundation's 2014 grant for Inline.pm.",
"cogid" : "ecf6",
"link" : "inline-grant-weekly-report-2",
"date" : "November 2, 2014",
"type" : "post",
"site_title" : "The TPF Inline Grant Info Site",
"title" : "Inline Grant Weekly Report #2",
"link" : "inline-grant-weekly-report-2",
"date" : "November 2, 2014"
"cogid" : "ecf6"
},
{
"link" : "inline-grant-weekly-report-1",
"title" : "Inline Grant Weekly Report #1",
"date" : "October 25, 2014",
"site_title" : "The TPF Inline Grant Info Site",
"heading" : "Up to date information on The Perl Foundation's 2014 grant for Inline.pm.",
"type" : "post",
"title" : "Inline Grant Weekly Report #1",
"cogid" : "se9g"
},
{
"title" : "Inline Module Spec",
"link" : "inline-module-spec",
"site_title" : "The TPF Inline Grant Info Site",
"cogid" : "v3e7",
"heading" : "Up to date information on The Perl Foundation's 2014 grant for Inline.pm."
},
{
"title" : "Inline Grant Accepted",
"link" : "inline-grant-accepted",
"date" : "October 20, 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" : "y5yq",
"type" : "post"
"title" : "Inline Module Spec",
"cogid" : "v3e7"
},
{
"link" : "ingy-and-david-bio",
"title" : "Ingy and David Bio",
"site_title" : "The TPF Inline Grant Info Site",
"heading" : "Up to date information on The Perl Foundation's 2014 grant for Inline.pm.",
"cogid" : "y6ut"
},
{
"link" : "inline-grant-accepted",
"date" : "October 20, 2014",
"type" : "post",
"title" : "Inline Grant Accepted",
"cogid" : "y5yq"
}
],
"recent" : [
"m6z3",
"ecf6",
"se9g",
"v3e7",
"y6ut",
"y5yq"
],
"heading" : "Up to date information on The Perl Foundation's 2014 grant for Inline.pm."
]
}

0 comments on commit 0853e34

Please sign in to comment.