Re: discussion/vote new site (again, but last time from me)

2018-04-30 Thread sebb
On 30 April 2018 at 16:34, Henk P. Penning <penn...@uu.nl> wrote:
> On Mon, 30 Apr 2018, sebb wrote:
>
>> Date: Mon, 30 Apr 2018 14:34:13 +0200
>> From: sebb <seb...@gmail.com>
>> To: general@attic.apache.org
>> Subject: Re: discussion/vote new site (again, but last time from me)
>
>
>> Let's not forget that Jani created the initial JSON file contents.
>> That was quite a bit of work.
>
>
>   True ; big thanks.
>
>> Note that proj-data includes layout in the above list.
>
>
>   Yep, the $proj-data is a (tag->value) html table ;
>   the script computes a table
>
> [ tag => tag_function ( param, ... )
> , ...
> ]
>
>   Then the table is converted to html ; this is straight forward.
>
>>>   -- only 3 substitutions are needed [project-list, title, $proj-data].
>>
>>
>> Additional substitutions of need to be made to create the proj-data as
>> that is a mix of variable data with fixed layout.
>
>
>   Don't understand ; the per/proj html == table + 'postlude'.
>

$proj-data is a mixture of variable data and fixed markup.
These have to be merged.

>>
>>>   and can't be understood unless you look at the code too.
>>
>>
>> In the lua case, the conditional and looping code is buried inside the
>> Perl script.
>
>
>   I'm not religous about the ModelViewControler stuff ;
>   I like stuff in one place (file), if the file is small.
>
>> At present the code generates a Board entry in the table regardless of
>> whether it is a sub-project or not. How would you fix that so it
>> agrees with the existing Attic site?
>
>
>   Ok ; I'll bite ...

I would hope you can fix it as you are the author.

My point was how easy it is for other people to fix.
It may have to be updated by people other than you.

>   If the 'minutes' entry also depends on entry 'subproject'
>   pass it to function 'minutes_url' ; let 'minutes_url'
>   return 'n/a' if subproject is not empty ;
>
> sub minutes_url
>   { my $p = shift or return $NA ; # == 'n/a'
> my $s = shift or return $NA ;
> url "https://whimsy.apache.org/board/minutes/$p.html;, 'Minutes'
>   }
>
>   If you mean the line shouldn't be there at al, I would fix function

Yes, that is what the current site does.
The line is omitted from the table.

>   minutes_url to return undef, and fix the tab-to-table expansion
>   skip entries with and undefined value ; that is one extra line.

But is it clear to the reader what is happening?

>   Nevermind ; anything can be easily fixed.
>   I maintain that the problem is simple,
>   and using a template system is overkill.
>   To me, the split is "controler logic" and "view logic"
>   (as with 'board' example) is confusing and a hindrance.
>
>> It's a well-written script, but it is hard to follow - mainly because
>> it mixes content with presentation.
>
>
>   yea ; that is 6 lines of code ;
>   it makes I only need 1 very simple template,
>   that doesn't change when attributes change.

Of course the template does not change when attributes change.
That is the point of a template.

However the Perl solution means that code has to change when the
conditions for displaying information change.

>   Netto : a big win.

Not to my mind.

>   Groeten,
>
>   HPP
>
>
>    _
> Henk P. Penning, ICT-beta R Uithof MG-403_/ \_
> Faculty of Science, Utrecht UniversityT +31 30 253 4106 / \_/ \
> Leuvenlaan 4, 3584CE Utrecht, NL  F +31 30 253 4553 \_/ \_/
> http://www.staff.science.uu.nl/~penni101/ M penn...@uu.nl \_/


Re: discussion/vote new site (again, but last time from me)

2018-04-30 Thread Henk P. Penning

On Mon, 30 Apr 2018, sebb wrote:


Date: Mon, 30 Apr 2018 14:34:13 +0200
From: sebb <seb...@gmail.com>
To: general@attic.apache.org
Subject: Re: discussion/vote new site (again, but last time from me)



Let's not forget that Jani created the initial JSON file contents.
That was quite a bit of work.


  True ; big thanks.


Note that proj-data includes layout in the above list.


  Yep, the $proj-data is a (tag->value) html table ;
  the script computes a table

[ tag => tag_function ( param, ... )
, ...
]

  Then the table is converted to html ; this is straight forward.


  -- only 3 substitutions are needed [project-list, title, $proj-data].


Additional substitutions of need to be made to create the proj-data as
that is a mix of variable data with fixed layout.


  Don't understand ; the per/proj html == table + 'postlude'.




  and can't be understood unless you look at the code too.


In the lua case, the conditional and looping code is buried inside the
Perl script.


  I'm not religous about the ModelViewControler stuff ;
  I like stuff in one place (file), if the file is small.


At present the code generates a Board entry in the table regardless of
whether it is a sub-project or not. How would you fix that so it
agrees with the existing Attic site?


  Ok ; I'll bite ...

  If the 'minutes' entry also depends on entry 'subproject'
  pass it to function 'minutes_url' ; let 'minutes_url'
  return 'n/a' if subproject is not empty ;

sub minutes_url
  { my $p = shift or return $NA ; # == 'n/a'
my $s = shift or return $NA ;
url "https://whimsy.apache.org/board/minutes/$p.html;, 'Minutes'
  }

  If you mean the line shouldn't be there at al, I would fix function
  minutes_url to return undef, and fix the tab-to-table expansion
  skip entries with and undefined value ; that is one extra line.

  Nevermind ; anything can be easily fixed.
  I maintain that the problem is simple,
  and using a template system is overkill.
  To me, the split is "controler logic" and "view logic"
  (as with 'board' example) is confusing and a hindrance.


It's a well-written script, but it is hard to follow - mainly because
it mixes content with presentation.


  yea ; that is 6 lines of code ;
  it makes I only need 1 very simple template,
  that doesn't change when attributes change.
  Netto : a big win.

  Groeten,

  HPP

   _
Henk P. Penning, ICT-beta R Uithof MG-403_/ \_
Faculty of Science, Utrecht UniversityT +31 30 253 4106 / \_/ \
Leuvenlaan 4, 3584CE Utrecht, NL  F +31 30 253 4553 \_/ \_/
http://www.staff.science.uu.nl/~penni101/ M penn...@uu.nl \_/


Re: discussion/vote new site (again, but last time from me)

2018-04-30 Thread sebb
On 30 April 2018 at 14:18, Jan Iversen <j...@apache.org> wrote:
>
>
> Sent from my iPad
>
>> On 30 Apr 2018, at 14:34, sebb <seb...@gmail.com> wrote:
>>
>>> On 30 April 2018 at 08:29, Henk P. Penning <penn...@uu.nl> wrote:
>>>> On Sun, 29 Apr 2018, Jan Iversen wrote:
>>>>
>>>> Date: Sun, 29 Apr 2018 19:53:45 +0200
>>>> From: Jan Iversen <j...@apache.org>
>>>> To: general@attic.apache.org
>>>> Subject: discussion/vote new site (again, but last time from me)
>>>>
>>>> Hi.
>>>>
>>>> Based on a suggestion from Henk, I hereby once again try to start a
>>>> discussion/vote on the new site.
>>>
>>>
>>>  Ok ; great ; thanks.
>>>
>>>> We need to select either lua-site or jekyll-site. I strongly believe
>>>> there are no reasons to polish the sites more before selecting, it is
>>>> apparent how both sites will work.
>>>
>>>
>>>  Let me say first that Sebb did a great job perfecting the config
>>>  (json/yaml file) ; since it handles all the past retirements,
>>>  we can be confident that either solution can handle (almost)
>>>  any future case.
>>
>> Let's not forget that Jani created the initial JSON file contents.
>> That was quite a bit of work.
> Thanks, but I honestly am sad that I did not choose another solution, because 
> see what it brought us all, I personally have lately used around the same 
> time it took me to retire 10 projects, which is far more than I signed up to 
> do.
>>
>>>  The problem at hand is simple :
>>>
>>>  -- there is only one 'base' ; all generated pages look the same.
>>>  -- there is only one 'template' : base + project-list (on the right)
>>>  -- there are only 4 (kinds of) pages :
>>> -- index.html  : template + index.txt
>>> -- process.html: template + process.txt
>>> -- resolution.html : template + resolution.txt
>>> -- $project.html   : template + 
>>>where  is generated from the config.
>>
>> Note that proj-data includes layout in the above list.
>>
>>>  -- only 3 substitutions are needed [project-list, title, $proj-data].
>>
>> Additional substitutions of need to be made to create the proj-data as
>> that is a mix of variable data with fixed layout.
>>
>>>  [main point] I think using a template system is, at best, unnecessary.
>>>  Note that the jekyll templates aren't 'easy' (full of if/then/else's),
>>
>> I contend that the Perl version is harder to follow.
> I have problems understanding the jekyll templates. To me it seems the 
> jekyll-site contains many more files (source) than the lua-site, I suppose 
> that adds complexity.

Quantity is not complexity unless there are lots of files.

In any case, the Jekyll solution actually now only has a few more files.
At least 2 of which are documentation.

>>
>>>  and can't be understood unless you look at the code too.
>>
>> In the lua case, the conditional and looping code is buried inside the
>> Perl script.
>>
>>>  [I know, because I had to follow Sebb, as he added more and more ;-]
>>>  With the lua stuff, the 'logic' is in one place.
>>
>> I agree that the logic is in one place, but the presentation is mixed
>> in with it.
>>
>> In the Jekyll case, there is some logic to massage the data in Ruby,
>> but all the presentation logic is in templates.
>>
>> I think that is easier to follow.
> I guess it is more a question of what you are used to use.

I am familiar with Perl; I have written/maintained lots of Perl scripts.
The script is well-written and concise.

The problem is that the script includes a mix of lots of different things.

>>
>> For example, compare how the project page data is generated:
>>
>> http://svn.apache.org/viewvc/attic/site-jekyll/src/_layouts/project.html?view=markup#l35
>>
>> To me it's clear that there is a table with data fields in it.
>> And it's obvious how to omit parts of the output if required.
>>
>> The same structure in the Perl script is mainly generated here AFAICT:
>>
>> http://svn.apache.org/viewvc/attic/site-lua/mk-stuff?view=markup#l211
>>
>> Except that is only part of it.
>>
>> At present the code generates a Board entry in the table regardless of
>> whether it is a sub-project or not. How would you fix that so it
>> agrees with the existing Attic site?
> That was why the board entry was sometimes empty in my json file.

Re: discussion/vote new site (again, but last time from me)

2018-04-30 Thread sebb
On 30 April 2018 at 13:34, sebb <seb...@gmail.com> wrote:
> On 30 April 2018 at 08:29, Henk P. Penning <penn...@uu.nl> wrote:
>> On Sun, 29 Apr 2018, Jan Iversen wrote:
>>
>>> Date: Sun, 29 Apr 2018 19:53:45 +0200
>>> From: Jan Iversen <j...@apache.org>
>>> To: general@attic.apache.org
>>> Subject: discussion/vote new site (again, but last time from me)
>>>
>>> Hi.
>>>
>>> Based on a suggestion from Henk, I hereby once again try to start a
>>> discussion/vote on the new site.
>>
>>
>>   Ok ; great ; thanks.
>>
>>> We need to select either lua-site or jekyll-site. I strongly believe
>>> there are no reasons to polish the sites more before selecting, it is
>>> apparent how both sites will work.
>>
>>
>>   Let me say first that Sebb did a great job perfecting the config
>>   (json/yaml file) ; since it handles all the past retirements,
>>   we can be confident that either solution can handle (almost)
>>   any future case.
>
> Let's not forget that Jani created the initial JSON file contents.
> That was quite a bit of work.
>
>>   The problem at hand is simple :
>>
>>   -- there is only one 'base' ; all generated pages look the same.
>>   -- there is only one 'template' : base + project-list (on the right)
>>   -- there are only 4 (kinds of) pages :
>>  -- index.html  : template + index.txt
>>  -- process.html: template + process.txt
>>  -- resolution.html : template + resolution.txt
>>  -- $project.html   : template + 
>> where  is generated from the config.
>
> Note that proj-data includes layout in the above list.
>
>>   -- only 3 substitutions are needed [project-list, title, $proj-data].
>
> Additional substitutions of need to be made to create the proj-data as
> that is a mix of variable data with fixed layout.
>
>>   [main point] I think using a template system is, at best, unnecessary.
>>   Note that the jekyll templates aren't 'easy' (full of if/then/else's),
>
> I contend that the Perl version is harder to follow.
>
>>   and can't be understood unless you look at the code too.
>
> In the lua case, the conditional and looping code is buried inside the
> Perl script.
>
>>   [I know, because I had to follow Sebb, as he added more and more ;-]
>>   With the lua stuff, the 'logic' is in one place.
>
> I agree that the logic is in one place, but the presentation is mixed
> in with it.
>
> In the Jekyll case, there is some logic to massage the data in Ruby,
> but all the presentation logic is in templates.
>
> I think that is easier to follow.
>
> For example, compare how the project page data is generated:
>
> http://svn.apache.org/viewvc/attic/site-jekyll/src/_layouts/project.html?view=markup#l35
>
> To me it's clear that there is a table with data fields in it.
> And it's obvious how to omit parts of the output if required.
>
> The same structure in the Perl script is mainly generated here AFAICT:
>
> http://svn.apache.org/viewvc/attic/site-lua/mk-stuff?view=markup#l211
>
> Except that is only part of it.
>
> At present the code generates a Board entry in the table regardless of
> whether it is a sub-project or not. How would you fix that so it
> agrees with the existing Attic site?
>
>>   -- the jekyll stuff uses ruby, ant and jekyll ; requiring installs.
>
> I chose Jekyll because it is already used by other projects.
> AFAIK at least Ruby and Ant are available on all the CI nodes.
>
>>  the lua stuff uses only perl and make ; always available,

However it turns out that JSON.pm is not (yet) installed on the Buildbot node.

>>  and more widely used/known.
>
> The Perl script itself is home-grown and not used anywhere else.
>
>>   -- the lua tree looks simpler than the jekyll tree ...
>
> If you are referring to the directory structure that is partly because
> the lua data/ dir contains both data and layout.
>
>>   As the problem is simple, a simple solution is sufficient.
>
> I disagree that the Perl script is simple.
>
> It's a well-written script, but it is hard to follow - mainly because
> it mixes content with presentation.
>
>>> jan I
>>
>>
>>   Regards,
>>
>>   Henk Penning
>>
>>    _
>> Henk P. Penning, ICT-beta R Uithof MG-403_/ \_
>> Faculty of Science, Utrecht UniversityT +31 30 253 4106 / \_/ \
>> Leuvenlaan 4, 3584CE Utrecht, NL  F +31 30 253 4553 \_/ \_/
>> http://www.staff.science.uu.nl/~penni101/ M penn...@uu.nl \_/


Re: discussion/vote new site (again, but last time from me)

2018-04-30 Thread Henk P. Penning

On Sun, 29 Apr 2018, Jan Iversen wrote:


Date: Sun, 29 Apr 2018 19:53:45 +0200
From: Jan Iversen <j...@apache.org>
To: general@attic.apache.org
Subject: discussion/vote new site (again, but last time from me)

Hi.

Based on a suggestion from Henk, I hereby once again try to start a
discussion/vote on the new site.


  Ok ; great ; thanks.


We need to select either lua-site or jekyll-site. I strongly believe
there are no reasons to polish the sites more before selecting, it is
apparent how both sites will work.


  Let me say first that Sebb did a great job perfecting the config
  (json/yaml file) ; since it handles all the past retirements,
  we can be confident that either solution can handle (almost)
  any future case.

  The problem at hand is simple :

  -- there is only one 'base' ; all generated pages look the same.
  -- there is only one 'template' : base + project-list (on the right)
  -- there are only 4 (kinds of) pages :
 -- index.html  : template + index.txt
 -- process.html: template + process.txt
 -- resolution.html : template + resolution.txt
 -- $project.html   : template + 
where  is generated from the config.
  -- only 3 substitutions are needed [project-list, title, $proj-data].

  [main point] I think using a template system is, at best, unnecessary.
  Note that the jekyll templates aren't 'easy' (full of if/then/else's),
  and can't be understood unless you look at the code too.
  [I know, because I had to follow Sebb, as he added more and more ;-]
  With the lua stuff, the 'logic' is in one place.

  -- the jekyll stuff uses ruby, ant and jekyll ; requiring installs.
 the lua stuff uses only perl and make ; always available,
 and more widely used/known.
  -- the lua tree looks simpler than the jekyll tree ...

  As the problem is simple, a simple solution is sufficient.


jan I


  Regards,

  Henk Penning

   _
Henk P. Penning, ICT-beta R Uithof MG-403_/ \_
Faculty of Science, Utrecht UniversityT +31 30 253 4106 / \_/ \
Leuvenlaan 4, 3584CE Utrecht, NL  F +31 30 253 4553 \_/ \_/
http://www.staff.science.uu.nl/~penni101/ M penn...@uu.nl \_/


Re: discussion/vote new site (again, but last time from me)

2018-04-29 Thread Hervé BOUTEMY
Le lundi 30 avril 2018, 03:10:46 CEST sebb a écrit :
> On 29 April 2018 at 18:53, Jan Iversen  wrote:
> > Hi.
> > 
> > Based on a suggestion from Henk, I hereby once again try to start a
> > discussion/vote on the new site.
> > 
> > We need to select either lua-site or jekyll-site. I strongly believe there
> > are no reasons to polish the sites more before selecting, it is apparent
> > how both sites will work.
> I think the following are necessary characteristics:
> - single source of data for each project in an easy to edit format.
> (Not necessarily a single aggregated file)
I have a preference for 1 file per project: I find it easier to maintain

> - standard data format (e.g. JSON or YAML)
> - separation of presentation and data
> - well-defined template language
> - no server-side processing (for the website; the banner is different)
> 
> > I hope sincerely that Henk and Sebb can come to a consensus, so we can
> > avoid a formal vote (remember a -1 will prohibit a solution from being
> > implemented) which are likely to secure that we do not change the site at
> > all.
> > 
> > I have my personal preferred solution, but if Sebb/Henk can come to a
> > consensus, I will support the consensus.
> > 
> > I am not suggesting a time limit, but I will follow the discussion, and
> > add it to the next board report.
> > 
> > I hope more of the community will add a voice to this discussion.
> > 
> > rgds
> > jan I
> > 
> > Sent from my iPad




Re: discussion/vote new site (again, but last time from me)

2018-04-29 Thread Jan Iversen


Sent from my iPad

> On 30 Apr 2018, at 03:10, sebb  wrote:
> 
>> On 29 April 2018 at 18:53, Jan Iversen  wrote:
>> Hi.
>> 
>> Based on a suggestion from Henk, I hereby once again try to start a 
>> discussion/vote on the new site.
>> 
>> We need to select either lua-site or jekyll-site. I strongly believe there 
>> are no reasons to polish the sites more before selecting, it is apparent how 
>> both sites will work.
> 
> I think the following are necessary characteristics:
> - single source of data for each project in an easy to edit format.
> (Not necessarily a single aggregated file)
> - standard data format (e.g. JSON or YAML)
> - separation of presentation and data
> - well-defined template language
> - no server-side processing (for the website; the banner is different)

??? as far as I can see both solutions have the above features, so how can we 
use that to choose between the 2 solutions ?

rgds
jan i
> 
>> I hope sincerely that Henk and Sebb can come to a consensus, so we can avoid 
>> a formal vote (remember a -1 will prohibit a solution from being 
>> implemented) which are likely to secure that we do not change the site at 
>> all.
> 
>> I have my personal preferred solution, but if Sebb/Henk can come to a 
>> consensus, I will support the consensus.
>> 
>> I am not suggesting a time limit, but I will follow the discussion, and add 
>> it to the next board report.
>> 
>> I hope more of the community will add a voice to this discussion.
>> 
>> rgds
>> jan I
>> 
>> Sent from my iPad


discussion/vote new site (again, but last time from me)

2018-04-29 Thread Jan Iversen
Hi.

Based on a suggestion from Henk, I hereby once again try to start a 
discussion/vote on the new site.

We need to select either lua-site or jekyll-site. I strongly believe there are 
no reasons to polish the sites more before selecting, it is apparent how both 
sites will work.

I hope sincerely that Henk and Sebb can come to a consensus, so we can avoid a 
formal vote (remember a -1 will prohibit a solution from being implemented) 
which are likely to secure that we do not change the site at all.

I have my personal preferred solution, but if Sebb/Henk can come to a 
consensus, I will support the consensus.

I am not suggesting a time limit, but I will follow the discussion, and add it 
to the next board report.

I hope more of the community will add a voice to this discussion.

rgds
jan I

Sent from my iPad