Re: [Wikitech-l] request for Git statistics (or, "don't stand back, I don't know regular expressions")

2012-07-05 Thread Mark Holmquist

(Also, this isn't counting people who contribute to the mobile projects
on GitHub, and really the final monthly report stat ought to.  I don't
quickly see a way to ask "how many unique contributors submitted unique
pull requests to a https://github.com/wikimedia/ repo in June?" on
GitHub, though, so I'll put that off till next month.)


I was bored, so I made you a Python script this time :)

It's attached, it takes a year and month as its arguments, and fetches 
all the repos at github/wikimedia, then fetches their pull requests, and 
then finally checks to see which pull requests match the month you 
specified. Something like


$ ./githubunique 2012 06 # should give "3 unique contributors"

And yes, most months only have very few contributors, but anything we 
can do to increase the count :)



It also doesn't count people who are making operations changes, or
Wikimedia site configuration changes, or are packaging debs, etc, etc.
It would be awesome to see stats for those as well. I have a feeling
that we have more contributors then the record ;).


This should be as simple as removing the "project:^mediawiki.*" bit from 
the previous bash script. I'm not sure if there are other bots to 
exclude in that case, though, so I'll leave it up to someone more versed 
with the rest of Gerrit (Ryan?)


If there are other github repositories *not* in the wikimedia github 
account, it shouldn't be hard to add those to the consideration in this 
script.


P.S., a word to the wise: don't try to parse github's API requests with 
bash, it's just not worth it.


P.P.S., for those who like unified counts, adding this python script to 
the end of the previous bash script should be easy enough, so you could 
get all of the contributors (95!) in one command if you wanted.


--
Mark Holmquist
Contractor, Wikimedia Foundation
mtrac...@member.fsf.org
http://marktraceur.info
#!/usr/bin/env python

import urllib2
import json
import datetime
import sys

reposurl = 'https://api.github.com/users/wikimedia/repos'
pullbaseurl = 'https://api.github.com/repos/wikimedia/'
pullafterurl = '/pulls?state='

year = sys.argv[1]
month = sys.argv[2]

text = urllib2.urlopen( reposurl ).read()
repos = json.loads( text )
uniqs = {}

for repo in repos:
for state in ['open', 'closed']:
pullurl = pullbaseurl + repo['name'] + pullafterurl + state
text = urllib2.urlopen( pullurl ).read()
pulls = json.loads( text )
for pull in pulls:
pulldate = pull['created_at'][0:7].split( '-' )
if pulldate[0] != year or pulldate[1] != month:
continue
uniqs[pull['head']['repo']['owner']['login']] = True

count = 0
for uniq in uniqs.keys():
print uniq
count += 1

print str( count ) + ' unique contributors in that month.'
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] request for Git statistics (or, "don't stand back, I don't know regular expressions")

2012-07-05 Thread Ryan Lane
> (Also, this isn't counting people who contribute to the mobile projects
> on GitHub, and really the final monthly report stat ought to.  I don't
> quickly see a way to ask "how many unique contributors submitted unique
> pull requests to a https://github.com/wikimedia/ repo in June?" on
> GitHub, though, so I'll put that off till next month.)
>

It also doesn't count people who are making operations changes, or
Wikimedia site configuration changes, or are packaging debs, etc, etc.
It would be awesome to see stats for those as well. I have a feeling
that we have more contributors then the record ;).

- Ryan

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] request for Git statistics (or, "don't stand back, I don't know regular expressions")

2012-07-05 Thread Sumana Harihareswara
On 07/05/2012 07:40 PM, Mark Holmquist wrote:
>> So, 92 unique committers in June.  Which is way better than Ohloh has
>> been saying, yay.
> 
> I'd like to confirm that number, 92 unique contributors in June is
> absolutely correct. I've also scriptified my method, so now I can do
> multiple months.
> 
> Month   | Unique contributors
> +
> July so far | 60
> +
> June| 92
> +
> May | 77
> +
> April   | 67
> +
> March   | 34
> +
> February| 2

Thanks for that, Mark!  Yeah, that's also way better than Ohloh thinks
.  I've gone back and updated the
April and May months of the engineering report on mediawiki.org, e.g.,
https://www.mediawiki.org/wiki/Wikimedia_engineering_report/2012/May .

> A note or two: July is high because we have a lot of regular committers,
> I suppose. You could confirm that by graphing how many contributors are
> added by adding on one day at a time. My guess is you'll get a nice
> steep line at first that tapers out to nearly 0 at the end of 30 days.
> Also, I'm sure the earlier months have inadequate sample sizes to be
> relevant, since the extensions had to take some time to transfer over,
> and apparently February was just for testing.
> 
> Of course, the coolest thing is that each month so far has seen at least
> 10 additional contributors! :)

That is indeed a great thing to see!  And, based on the monthly reports,
I believe the most unique committers we ever had in a month was 100,
including people making localisation commits - January 2012.  So I infer
that we are recovering nicely from the transition cost of the Git move.

(Also, this isn't counting people who contribute to the mobile projects
on GitHub, and really the final monthly report stat ought to.  I don't
quickly see a way to ask "how many unique contributors submitted unique
pull requests to a https://github.com/wikimedia/ repo in June?" on
GitHub, though, so I'll put that off till next month.)

-- 
Sumana Harihareswara
Engineering Community Manager
Wikimedia Foundation

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Gerrit 2.4 upgrade this evening

2012-07-05 Thread Chad
On Thu, Jul 5, 2012 at 7:04 PM, Chad  wrote:
> On Thu, Jul 5, 2012 at 1:57 PM, Chad  wrote:
>> Hi,
>>
>> Just giving everyone a head's up that we'll be upgrading Gerrit this evening
>> from 2.3 to 2.4.2.
>>
>> We're not expecting any extensive downtime for Gerrit, but we've scheduled
>> a one-hour window from 23:00-00:00 UTC tonight (7-8pm EDT, 4-5pm PDT).
>>
>> The big feature I'm excited about in 2.4 is the new "Rebase" button, which
>> will hopefully make it easier to rebase your changes against your branch
>> without having to download the change first.
>>
>> If you're interested, the release notes for 2.4 and 2.4.1 are:
>> http://gerrit-documentation.googlecode.com/svn/ReleaseNotes/ReleaseNotes-2.4.html
>> http://gerrit-documentation.googlecode.com/svn/ReleaseNotes/ReleaseNotes-2.4.1.html
>>
>> 2.4.2 was a security release and only fixed one issue, but here's the notice
>> for that: 
>> https://groups.google.com/d/msg/repo-discuss/CTFM8KTIe34/otuuE74s__wJ
>>
>> I'll send a reminder (and spam IRC) right before we begin the upgrade
>> process, and again when we're done. Please let me know if you have
>> any questions.
>>
>> -Chad
>
> We're now shutting down Gerrit for the 2.4.2 upgrade. I
> will let everyone know when we're done.
>

Well, we pushed it a little bit closer to the full hour than I would've
liked (hit a couple of bumps due to config mistakes on my part),
but Gerrit is back up and running now :)

-Chad

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] request for Git statistics (or, "don't stand back, I don't know regular expressions")

2012-07-05 Thread Mark Holmquist

So, 92 unique committers in June.  Which is way better than Ohloh has
been saying, yay.


I'd like to confirm that number, 92 unique contributors in June is 
absolutely correct. I've also scriptified my method, so now I can do 
multiple months.


Month   | Unique contributors
+
July so far | 60
+
June| 92
+
May | 77
+
April   | 67
+
March   | 34
+
February| 2

A note or two: July is high because we have a lot of regular committers, 
I suppose. You could confirm that by graphing how many contributors are 
added by adding on one day at a time. My guess is you'll get a nice 
steep line at first that tapers out to nearly 0 at the end of 30 days. 
Also, I'm sure the earlier months have inadequate sample sizes to be 
relevant, since the extensions had to take some time to transfer over, 
and apparently February was just for testing.


Of course, the coolest thing is that each month so far has seen at least 
10 additional contributors! :)


The script I used to generate it is attached (since it's only 1.1 kb). 
If you have a sane SSH setup already, you should be able to make it 
executable and do


$ ./gerunique "ssh -p 29418 gerrit.wikimedia.org" 0d 30d

and get the number of contributors for the past 30 days. It will 
also give you some friendly notifications, though they're largely for 
debugging.


The first option can be described as "how you would ssh into gerrit if 
you had to", and it's provided for the convenience of those people (like 
me) whose local username doesn't match their remote username.


Cheers,

--
Mark Holmquist
Contractor, Wikimedia Foundation
mtrac...@member.fsf.org
http://marktraceur.info
#!/bin/bash
# Script that will count the number of unique contributors to mediawiki
# projects in a specified month.
# Pass in the command you use to ssh into gerrit, the first day you want to
# include in the calculation, and the last day you want to include.

SSH=$1
EOM=$2
SOM=$3
FILTERS="age:$EOM -age:$SOM status:merged project:^mediawiki.* -owner:L10n-bot"
REMOTECOMM="gerrit query"
TMPFILE=`mktemp`
TTMPFILE=`mktemp`
CURLEN=500
RSK=""
N=0

while [ $CURLEN -eq 500 ]; do
let N=$N+1
LFILT=$FILTERS
if [ "$RSK" != "" ]; then
LFILT="$FILTERS resume_sortkey:$RSK"
fi
FRCOMM="$REMOTECOMM '$LFILT'"
echo "Getting $N"
$SSH "$REMOTECOMM '$LFILT'" > $TTMPFILE
echo "Got it."
CURLEN=`grep 'name:' < $TTMPFILE | wc -l`
cat $TMPFILE >> $TTMPFILE
grep 'name:' < $TTMPFILE | sort -u > $TMPFILE
echo "Currently have" `wc -l < $TMPFILE`
echo "$CURLEN results in that fetch."
RSK=`grep sortKey $TTMPFILE | tail -c 17`
echo "Next sort starts at $RSK."
done

TOTAL=`wc -l < $TMPFILE`
echo "$TOTAL total unique contributors."
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] getting Jenkins to run basic automated tests on commits to extensions

2012-07-05 Thread Chad
On Thu, Jul 5, 2012 at 7:06 PM, Roan Kattouw  wrote:
> On Thu, Jul 5, 2012 at 2:11 PM, Chad  wrote:
>> Yes, but we can't even get people to type `php -l` before pushing,
>> which is why having Jenkins do this for us is crucial.
>>
> Yes, I don't disagree that jshint should be run by Jenkins. AIUI
> Timo's work to make jshint work on the command line is prep work for
> exactly that.
>

Ah, I misunderstood you. Thought you meant "so people can
run it before uploading" which no one will ever do ;-)

-Chad

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] getting Jenkins to run basic automated tests on commits to extensions

2012-07-05 Thread Roan Kattouw
On Thu, Jul 5, 2012 at 2:11 PM, Chad  wrote:
> Yes, but we can't even get people to type `php -l` before pushing,
> which is why having Jenkins do this for us is crucial.
>
Yes, I don't disagree that jshint should be run by Jenkins. AIUI
Timo's work to make jshint work on the command line is prep work for
exactly that.

Roan

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Gerrit 2.4 upgrade this evening

2012-07-05 Thread Chad
On Thu, Jul 5, 2012 at 1:57 PM, Chad  wrote:
> Hi,
>
> Just giving everyone a head's up that we'll be upgrading Gerrit this evening
> from 2.3 to 2.4.2.
>
> We're not expecting any extensive downtime for Gerrit, but we've scheduled
> a one-hour window from 23:00-00:00 UTC tonight (7-8pm EDT, 4-5pm PDT).
>
> The big feature I'm excited about in 2.4 is the new "Rebase" button, which
> will hopefully make it easier to rebase your changes against your branch
> without having to download the change first.
>
> If you're interested, the release notes for 2.4 and 2.4.1 are:
> http://gerrit-documentation.googlecode.com/svn/ReleaseNotes/ReleaseNotes-2.4.html
> http://gerrit-documentation.googlecode.com/svn/ReleaseNotes/ReleaseNotes-2.4.1.html
>
> 2.4.2 was a security release and only fixed one issue, but here's the notice
> for that: 
> https://groups.google.com/d/msg/repo-discuss/CTFM8KTIe34/otuuE74s__wJ
>
> I'll send a reminder (and spam IRC) right before we begin the upgrade
> process, and again when we're done. Please let me know if you have
> any questions.
>
> -Chad

We're now shutting down Gerrit for the 2.4.2 upgrade. I
will let everyone know when we're done.

-Chad

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] getting Jenkins to run basic automated tests on commits to extensions

2012-07-05 Thread Chad
On Thu, Jul 5, 2012 at 5:06 PM, Roan Kattouw  wrote:
> On Thu, Jul 5, 2012 at 1:37 PM, Jon Robson  wrote:
>> If we do this running jslint on JavaScript would also be great. I have a
>> git hook I stole from Yuvi that I'm currently using. Would be great to have
>> Jenkins do this check for me as well...
> I believe Timo is already working on getting jshint working on the
> command line. There's a few commits to .jshint and .jshintignore
> (IIRC) that are currently pending review.
>

Yes, but we can't even get people to type `php -l` before pushing,
which is why having Jenkins do this for us is crucial.

-Chad

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] getting Jenkins to run basic automated tests on commits to extensions

2012-07-05 Thread Roan Kattouw
On Thu, Jul 5, 2012 at 1:37 PM, Jon Robson  wrote:
> If we do this running jslint on JavaScript would also be great. I have a
> git hook I stole from Yuvi that I'm currently using. Would be great to have
> Jenkins do this check for me as well...
I believe Timo is already working on getting jshint working on the
command line. There's a few commits to .jshint and .jshintignore
(IIRC) that are currently pending review.

Roan

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] getting Jenkins to run basic automated tests on commits to extensions

2012-07-05 Thread Jon Robson
If we do this running jslint on JavaScript would also be great. I have a
git hook I stole from Yuvi that I'm currently using. Would be great to have
Jenkins do this check for me as well...
On Jul 5, 2012 1:32 PM, "Mark Holmquist"  wrote:

> Would it be fairly easy for you to get Jenkins to automatically PHP
>> lint-check new commits to extensions?  Code reviewers would thank you!
>>
>
> Also having unit tests get run automatically, and creating whatever
> necessary documentation for enabling developers to create consistent unit
> tests that *can* be run automatically, would be extremely helpful.
>
> --
> Mark Holmquist
> Contractor, Wikimedia Foundation
> mtrac...@member.fsf.org
> http://marktraceur.info
>
>
>
> __**_
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/**mailman/listinfo/wikitech-l
>
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] getting Jenkins to run basic automated tests on commits to extensions

2012-07-05 Thread Jeroen De Dauw
Hey,

+2.

Right now the Wikidata team is spending a lot of time manually running the
tests, so it'd be absolutely fantastic if this could be done automatically.

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] getting Jenkins to run basic automated tests on commits to extensions

2012-07-05 Thread Mark Holmquist

Would it be fairly easy for you to get Jenkins to automatically PHP
lint-check new commits to extensions?  Code reviewers would thank you!


Also having unit tests get run automatically, and creating whatever 
necessary documentation for enabling developers to create consistent 
unit tests that *can* be run automatically, would be extremely helpful.


--
Mark Holmquist
Contractor, Wikimedia Foundation
mtrac...@member.fsf.org
http://marktraceur.info



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


[Wikitech-l] getting Jenkins to run basic automated tests on commits to extensions

2012-07-05 Thread Sumana Harihareswara
Antoine:

Would it be fairly easy for you to get Jenkins to automatically PHP
lint-check new commits to extensions?  Code reviewers would thank you!

-- 
Sumana Harihareswara
Engineering Community Manager
Wikimedia Foundation

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] request for Git statistics (or, "don't stand back, I don't know regular expressions")

2012-07-05 Thread Sumana Harihareswara
On 07/04/2012 10:52 PM, Sumana Harihareswara wrote:
> For use in our monthly report, due to come out tomorrow
> 
> https://www.mediawiki.org/wiki/Wikimedia_engineering_report/2012/June
> 
> I'd like to know how many unique contributors ("owners") had commits
> merged into the mediawiki & mediawiki/* Gerrit projects between June
> 1-30 inclusive.  I've had luck in using "age:4d -age:34d status:merged
> project:^mediawiki.* -owner:L10n-bot" as a search on
> https://gerrit.wikimedia.org to get a big paginated table of all the
> commits (and then I figure I'd look for all the unique owner names and
> count them), but when I try that on the command line as
> 
>   ssh -p 29418 gerrit.wikimedia.org gerrit query 'age:4d -age:34d
> status:merged project:^mediawiki.* -owner:L10n-bot'
> 
> I get the error "fatal: "-age:34d" is not a valid option".
> 
> I'll accept either help in running this query correctly so I get the
> giant table on the command line so I can gin up the status myself, or I
> will simply accept a number if you want to do my homework for me. :-)
> 

Got help from Mark Holmquist and advice from Giovanni Luca Ciampaglia --
needed to use double quote marks.  Mark wrote:


> It's because you've passed in that string (which was good) as one argument to 
> the SSH command, which is then read as multiple arguments on the remote 
> server. This works for me, adding double quotes around the remote command:
> 
> ssh -p 29418 gerrit.wikimedia.org "gerrit query 'age:4d -age:34d 
> status:merged project:^mediawiki.* -owner:L10n-bot'" 

Mark then also wrote:

> Hm, the SSH interface only returns 500 at a time, and won't accept limit: 
> keywords to the contrary. I've hacked together some results, but I wouldn't 
> recommend reproducing it by hand. I could write up a script with minimal 
> effort, I think.

It took 3 queries but he got all 1401 results.  And with that:

$ grep 'name:' wmf-results.txt | sort -u | wc -l
92

So, 92 unique committers in June.  Which is way better than Ohloh has
been saying, yay.

-- 
Sumana Harihareswara
Engineering Community Manager
Wikimedia Foundation

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


[Wikitech-l] Gerrit 2.4 upgrade this evening

2012-07-05 Thread Chad
Hi,

Just giving everyone a head's up that we'll be upgrading Gerrit this evening
from 2.3 to 2.4.2.

We're not expecting any extensive downtime for Gerrit, but we've scheduled
a one-hour window from 23:00-00:00 UTC tonight (7-8pm EDT, 4-5pm PDT).

The big feature I'm excited about in 2.4 is the new "Rebase" button, which
will hopefully make it easier to rebase your changes against your branch
without having to download the change first.

If you're interested, the release notes for 2.4 and 2.4.1 are:
http://gerrit-documentation.googlecode.com/svn/ReleaseNotes/ReleaseNotes-2.4.html
http://gerrit-documentation.googlecode.com/svn/ReleaseNotes/ReleaseNotes-2.4.1.html

2.4.2 was a security release and only fixed one issue, but here's the notice
for that: https://groups.google.com/d/msg/repo-discuss/CTFM8KTIe34/otuuE74s__wJ

I'll send a reminder (and spam IRC) right before we begin the upgrade
process, and again when we're done. Please let me know if you have
any questions.

-Chad

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread Daniel Friesen
On Thu, 05 Jul 2012 01:01:13 -0700, Antoine Musso   
wrote:



Hello,

PHP 5.3.0, released in June 2009, introduced namespacing, a feature we
have never used yet since we were still supporting 5.2.

Jeroen submitted https://gerrit.wikimedia.org/r/14181 which use
namespaces. Since that is, to my knowledge, the first patch that
introduce namespace, I am opening this thread so we discuss about
namespace introduction in MediaWiki.

PHP doc http://php.net/manual/en/language.namespaces.php

Thoughts?



I maintain that use of namespaces should be on a case-by-case basis. Only  
used if there's a significant advantage to using namespaces for some code.  
eg: A component with a huge pile of small classes for pieces of the  
component.


In this case, I don't see a good reason to use a generic MW namespace.

--
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Take a lesson from dreamhoststatus.com

2012-07-05 Thread Liangent
On Thu, Jul 5, 2012 at 10:12 PM, Thomas Morton
 wrote:
> Like...
>
> This: http://status.wikimedia.org/?
>

And Jidanni doesn't like it because it requires JavaScript.

> :)
>
> Tom

-Liangent

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


[Wikitech-l] midsummer updates from GSoC students?

2012-07-05 Thread Sumana Harihareswara
Akshay Chugh on the Convention Extension:
http://lists.wikimedia.org/pipermail/wikitech-l/2012-June/061362.html
(looks like the Wikimania 2013 organizers are working with him to make
it work for them!)

Ashish Dubey on realtime collaborative editing:
http://ashishdubey.info/blog/2012/7/5/realtimeve-first-demo.html (new demo!)

Aaron Pramana on the watchlist: http://mw-watchlist.tumblr.com/

Nischay Nahata on SMW optimization: https://greensmw.wordpress.com/


I'd love to hear more from:

Robin Pepermans on Incubator:
https://gerrit.wikimedia.org/r/#/q/owner:SPQRobin,n,z

Platonides on the native uploading app:
http://thread.gmane.org/gmane.org.wikimedia.wikilovesmonuments/2641/

Harry Burt on TranslateSVG:
https://www.mediawiki.org/wiki/Extension:TranslateSvg/2.0

Ankur Anand on UploadWizard: https://gerrit.wikimedia.org/r/#/dashboard/144

Suhas Rao, on OpenStackManager:
https://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/suhasmonk/1

Robin, Platonides, Harry, Ankur, and Suhas: please reply to this thread
with updates on how you've been doing.  If you're running into any
obstacles, please speak up!

-- 
Sumana Harihareswara
Engineering Community Manager
Wikimedia Foundation

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Take a lesson from dreamhoststatus.com

2012-07-05 Thread Thomas Morton
Like...

This: http://status.wikimedia.org/?

:)

Tom


On 5 July 2012 15:09,  wrote:

> On http://wikitech.wikimedia.org/view/Main_Page there is a link to
> "Current status" which doesn't show what is currently causing Wikipedia
> to be down.
>
> I suggest you take a lesson from
> http://www.dreamhost.com/ adding a separate
> http://www.dreamhoststatus.com/ and make lots of links to it...
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


[Wikitech-l] Take a lesson from dreamhoststatus.com

2012-07-05 Thread jidanni
On http://wikitech.wikimedia.org/view/Main_Page there is a link to
"Current status" which doesn't show what is currently causing Wikipedia
to be down.

I suggest you take a lesson from
http://www.dreamhost.com/ adding a separate
http://www.dreamhoststatus.com/ and make lots of links to it...

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread Max Semenik
On 05.07.2012, 14:58 Chad wrote:

> On Thu, Jul 5, 2012 at 5:14 AM, Antoine Musso  wrote:
>> Le 05/07/12 10:58, MZMcBride a écrit :
>>>  believe both of you are referring to (at least) this thread from May 2012
>>> titled "Stance on PHP namespaces?" started by Jeroen De Dauw:
>>> 
>>
>> Oh thanks for finding that thread. Looks like we just talked about the
>> poor choice of \ as a separator and hiphop.
>>
>> The reason I opened this thread is so we give a GO/NOGO about using
>> namespaces.
>>

> NOGO for core. My position hasn't changed in the past month and is
> unlikely to change in the near future.

+1.

-- 
Best regards,
  Max Semenik ([[User:MaxSem]])


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Linux.conf.au CfP deadline about to close

2012-07-05 Thread Sumana Harihareswara
http://linux.conf.au/cfp

Closes in about 24 hours.
-- 
Sumana Harihareswara
Engineering Community Manager
Wikimedia Foundation

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread Jeroen De Dauw
Hey,

> I am probably missing something here, because ... isn't switching from
“User” to “\User” pointless?

I am not suggesting doing this. What started this discussion is me having a
class called Site in the namespace MW. So it's MW\Site rather then MWSite.
(Unless you want to go with just Site and be fucked whenever some other
package just dumping stuff in the top level NS happens to have such a class
as well. Unlikely you say? I remember us having to rename some classes just
for this reason (where PHP itself was the other package).)

> At least it leaves core in a inconsistent state.

It's inconsistent now. Sure everything is in the top level NS, but we're
using different prefix schemes at different places. We have classes
prefixed with MW and we have those without this prefix. In this sense
having a namespace is equivalent to a prefix. Introducing namespaces and
migrating with full compat using aliases is a way to get rid of all the
inconsistencies in the long run. Hmm... maybe I'm being naive here - not
like "long term" arguments seem to have much weight when it comes to MW
design.

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread Christian Aistleitner
Hello Jeroen,

On Thu, Jul 05, 2012 at 12:48:50PM +0200, Jeroen De Dauw wrote:
> > As it would be a pain for extensions to (at the same time/branch)
> > support both:
> > - older MWs without namespaces, and
> > - newer MWs that would use namespaces.
> 
> This is only an issue is we move existing classes from the top level
> namespace into something else.

But wouldn't just that be the natural thing to do, if we decide to
adopt namespaces? I am probably missing something here, because ...
isn't switching from “User” to “\User” pointless?



> Using namespaces for new code does not cause
> hassle for extension developers at all.

That depends on what you mean by “hassle”. At least it leaves core in
a inconsistent state. Some classes using namespaces, some not using
them.
If I were to write extensions for such a core code base (where whether
or not one has to use a namespace is solely determined by the date of
the source file), I'd at least be annoyed.



> Furthermore you can alias class
> names since 5.3, so even if we where to move stuff, it could be done in
> such a way compat is kept.

Yes, of course you can. But as I said it has written pain all over
it. You just move the migration pain from the extensions to core.
Pain nonetheless.



Kind regards,
Christian


-- 
 quelltextlich e.U.  \\  Christian Aistleitner 
   Companies' registry: 360296y in Linz
Christian Aistleitner
Gruendbergstrasze 65aEmail:  christ...@quelltextlich.at
4040 Linz, Austria   Phone:  +43 732 / 26 95 63
 Fax:+43 732 / 26 95 63
 Homepage: http://quelltextlich.at/
---


signature.asc
Description: Digital signature
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread Chad
On Thu, Jul 5, 2012 at 5:14 AM, Antoine Musso  wrote:
> Le 05/07/12 10:58, MZMcBride a écrit :
>>  believe both of you are referring to (at least) this thread from May 2012
>> titled "Stance on PHP namespaces?" started by Jeroen De Dauw:
>> 
>
> Oh thanks for finding that thread. Looks like we just talked about the
> poor choice of \ as a separator and hiphop.
>
> The reason I opened this thread is so we give a GO/NOGO about using
> namespaces.
>

NOGO for core. My position hasn't changed in the past month and is
unlikely to change in the near future.

-Chad

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread Jeroen De Dauw
Hey,

> As it would be a pain for extensions to (at the same time/branch)
> support both:
> - older MWs without namespaces, and
> - newer MWs that would use namespaces.

This is only an issue is we move existing classes from the top level
namespace into something else. Using namespaces for new code does not cause
hassle for extension developers at all. Furthermore you can alias class
names since 5.3, so even if we where to move stuff, it could be done in
such a way compat is kept.

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread Christian Aistleitner
Hello,

On Thu, Jul 05, 2012 at 11:14:48AM +0200, Antoine Musso wrote:
> The reason I opened this thread is so we give a GO/NOGO about using
> namespaces.

NOGO.

As it would be a pain for extensions to (at the same time/branch)
support both:
- older MWs without namespaces, and 
- newer MWs that would use namespaces.

Besides, PHP's namespace syntax is not remarkably smooth.

Kind regards,
Christian


-- 
 quelltextlich e.U.  \\  Christian Aistleitner 
   Companies' registry: 360296y in Linz
Christian Aistleitner
Gruendbergstrasze 65aEmail:  christ...@quelltextlich.at
4040 Linz, Austria   Phone:  +43 732 / 26 95 63
 Fax:+43 732 / 26 95 63
 Homepage: http://quelltextlich.at/
---


signature.asc
Description: Digital signature
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread Jeroen De Dauw
Hey,

> PHP 5.3.0, released in June 2009, introduced namespacing, a feature we
> have never used yet since we were still supporting 5.2.

MediaWiki 1.20 dropped support with 5.2 - there already is 5.3 code in core.

> The reason I opened this thread is so we give a GO/NOGO about using
namespaces.

My opinion on this subject is that we probably should have guidelines on
how to use and not use them, as we do with other language features. After
having used namespaces myself at several places now, I see absolutely no
reason to not allow developers that want to use them to use them in new
code. I'd be good if the guidelines mentioned to not needlessly update
existing code, especially if it breaks compatibility.

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread Antoine Musso
Le 05/07/12 10:58, MZMcBride a écrit :
>  believe both of you are referring to (at least) this thread from May 2012
> titled "Stance on PHP namespaces?" started by Jeroen De Dauw:
> 

Oh thanks for finding that thread. Looks like we just talked about the
poor choice of \ as a separator and hiphop.

The reason I opened this thread is so we give a GO/NOGO about using
namespaces.

-- 
Antoine "hashar" Musso




___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread MZMcBride
Max Semenik wrote:
> On 05.07.2012, 12:01 Antoine wrote:
>> PHP 5.3.0, released in June 2009, introduced namespacing, a feature we
>> have never used yet since we were still supporting 5.2.
> 
>> Jeroen submitted https://gerrit.wikimedia.org/r/14181 which use
>> namespaces. Since that is, to my knowledge, the first patch that
>> introduce namespace, I am opening this thread so we discuss about
>> namespace introduction in MediaWiki.
> 
>> PHP doc http://php.net/manual/en/language.namespaces.php
> 
> I think namespaces were discussed recently and we decided that we don't want
> to use them yet.

K. Peachey wrote:
> Haven't we already discussed this like ten million times around?

I believe both of you are referring to (at least) this thread from May 2012
titled "Stance on PHP namespaces?" started by Jeroen De Dauw:


Not sure why neither of you could come up with a mailing list cite, though I
agree that re-hashing this discussion is silly. Someone should write a
guideline on mediawiki.org, as Chad suggested in May.

MZMcBride



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread Max Semenik
On 05.07.2012, 12:01 Antoine wrote:

> Hello,

> PHP 5.3.0, released in June 2009, introduced namespacing, a feature we
> have never used yet since we were still supporting 5.2.

> Jeroen submitted https://gerrit.wikimedia.org/r/14181 which use
> namespaces. Since that is, to my knowledge, the first patch that
> introduce namespace, I am opening this thread so we discuss about
> namespace introduction in MediaWiki.

> PHP doc http://php.net/manual/en/language.namespaces.php

> Thoughts?


I think namespaces were discussed recently and we decided that we don't want
to use them yet.

-- 
Best regards,
  Max Semenik ([[User:MaxSem]])


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] PHP namespacing and traits

2012-07-05 Thread K. Peachey
Haven't we already discussed this like ten million times around?

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


[Wikitech-l] PHP namespacing and traits

2012-07-05 Thread Antoine Musso
Hello,

PHP 5.3.0, released in June 2009, introduced namespacing, a feature we
have never used yet since we were still supporting 5.2.

Jeroen submitted https://gerrit.wikimedia.org/r/14181 which use
namespaces. Since that is, to my knowledge, the first patch that
introduce namespace, I am opening this thread so we discuss about
namespace introduction in MediaWiki.

PHP doc http://php.net/manual/en/language.namespaces.php

Thoughts?

-- 
Antoine "hashar" Musso



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l