Django-hosted aurweb Proposal

Mark Weiman mark.weiman at markzz.com
Mon Feb 18 04:50:00 UTC 2019


On Sat, 2019-02-16 at 21:08 -0500, Eli Schwartz wrote:
> On 2/16/19 8:28 PM, Robin Broda wrote:
> > On 2/17/19 2:21 AM, Kevin Morris wrote:
> > > The major differences between maintaining a PHP vs Django server
> > > would be
> > > that the Django server would be:
> > >
> > >    2.
> > >
> > >    Developed via Python, which has vastly more support and
> > > familiarity than
> > >    PHP within the community.
> > >
> > >    6.
> > >
> > >    Everybody loves Python; there will most likely be many more
> > > code-base
> > >    contributions in Python than in PHP.
> > >
> >
> > This appears like the same point to me.
> > I feel like you're selling this idea really hard on the premise
> > that python == better
> > instead of the hard data points that would favor a django app
> 
> Maybe it's the same point, but I'm sold anyway. ;)
> 
> For context: this django proposal was discussed on IRC a bit, and I
> want
> it just because it would make it easier to work on aurweb. Going one
> step further, ISTR some discussion in the past that we'd like to move
> to
> python anyway.
> 

It would perhaps make it easy for you to work on it, but that's not
true
for someone like me. I would like to contribute more to this project
myself, but if it's moved to django, I will lose all interest as I
have
no desire to learn a framework, let alone one for Python.

Not that a decision like this needs to be decided over just whether
one
person will continue to contribute, but this is a reason I won't touch
archweb myself.

> As for hard data points:
> 
> The AUR4 git-shell backend, notify scripts, and cron jobs which are
> used
> for taking care of the git repositories, maintaining the blacklists,
> etc. were initially implemented in python as mostly standalone from
> the
> web frontend that has existed since 2004.
> 
> So in practice, using django means we could share code between the
> backend and frontend, which is particularly interesting to me given
> the
> recent case of
> https://git.archlinux.org/aurweb.git/commit/?id=f1d109e9b6863d924d2cb20f83e41d7091d62e20
> 

I'm not really sure if the code as is right now would be appropriate
if
we moved to Django. Frameworks have an annoying tendency to cause the
developer to abandon things that are in conflict or redundant to the
framework.

This brings up another point, why not just pull many of those
functions
into PHP? Not that I'm saying it should be done that way (even though
it
can in many cases), I look at this as a non-issue due to the nature of
what those scripts are doing (as in, not generating a web page).

> ...
> 
> On a personal level, I find the idiosyncrasies of php to be less
> intuitive than the idiosyncrasies of python, and probably to blame
> for
> this:
> https://git.archlinux.org/aurweb.git/commit/?id=ac29097ce8585b99ebe7c5d9570b0567236d45f3
> (why is ".=" used for appending instead of "+=" anyway? That thing is
> way too invisible.)
> 

This is because the concept of string concatenation is not really the
same as arithmetic addition. Plus this is something probably inspired
from Perl.

The use of two different operators in this case is actually something
I
really like about PHP over Python.

Plus, that commit looks like it could have easily been overlooked even
if += is used over something like .= . Especially since it can be
quickly read without care and was also written by one of the
maintainers
of the project, causing perhaps the guard of careful reading to go
down.

Mark


More information about the aur-dev mailing list