HipHop packaging

[photocommons file=”20020730083218 – Debian.jpg” width=”300″]Of scripting languages used for web applications, PHP is pretty lightweight and fast. It is built to execute quickly and with little overhead, making it easy to scale.

Still, there are places where it could be better. Engineers at Facebook took this challenge and created HipHop. We at the Wikimedia Foundation would love to have HipHop packaged so that we can deploy it on our cluster. And, ultimately, while we realize we might need to do the initial work of packaging HipHop, we don’t want to be the ones responsible for keeping the package up-to-date.

Since I have some experience with packaging PHP applications and am a sometimes-active member of Debian’s PHP maintainers team, I felt this was a natural place for me to jump in.

And, because I’m lazy, the first thing I did was look for any other work on packaging HipHop that had been done. I found James DuPont’s work and built on it. Now it comes time to move this forward.

I’ve already taken his ITP for HipHop.

You’ll note that it depends on two other bugs to get the HipHop patches for curl and libevent included. These were essentially dismissed by both maintainers.

The curl maintainer pointed out that it that patch was un-needed or, at least, needed better a better defense. I can’t really provide that. I’m not sure that I can adapt the HipHop code to the suggested APIs, but I’m willing to try if the HipHop developers aren’t.

The libevent developer pointed out (in response to the Debian bug), that the patch was against an old, unmaintained version of libevent. Newer versions evidently make half of the patch un-needed and the other half needs to be adapted to the newer version of libevent.

I really want to make this happen. I really want Debian (and Debian derivatives like Ubuntu) to have HipHop packages. But I’m not sure how much time I can give to this right now since we’re in the middle of pushing out a new release of MediaWiki. If you can help solve any of the packaging problems mentioned above, please dive in!

WMF is hiring

[photocommons file=”Wikimedia logo family complete.svg” width=”300″ align=”left”]Our Deputy Director, Erik Möller, has posted a list of the open Engineering positions at the WMF that we’re hiring for right now.

If you’ve ever wanted your work to matter, to mean something more than a paycheck and the 9-5 grind, and you have the skill and aptitude for software engineering, product management, or QA, then I don’t know of a place that you can work that a bigger impact than the only non-profit with a website listed in the top 10 websites — an organisation that is dedicated to a bigger vision that we are really trying to achieve instead of something we tell you to get more eyeballs for our ad banners.

Check out our job openings — we even have some non-engineering positions. Unlike the other top web properties, Wikimedia is never going to make you rich with stock options, or a signing bonus, but we’re still small enough where your own work can make a big difference.

A place to grow programmers?

A friend of mine asked me for a job recommendation.  He got the job, so I’ll assume that anything I said about him didn’t hurt him.  Today, I talked to him.  He is managing the JetPack project for Mozilla Labs. After he mentioned it today, I went to look at it.  After poking around a bit, I have to say, it is some exciting stuff.

Jetpack is a project to make it easy to build Firefox 4 add-ons using common web technologies like HTML, JavaScript, and CSS. Our goal is to enable anyone who can build a web site to participate in making the Web a better place to work, communicate, and play. 

I’ve been thinking about some ways to start getting my kids into programming (yes, still).  I believe one of the most important things to start children in programming.  This comes from recalling my own youthful start on a Commodore 64 and then a more “business-y” TRS-80 Model 4p, both of which came with BASIC interpreters, both of which had magazines published for them that were filled with pages of BASIC to type in and run. My parent’s recently gave me back a copy of  BASIC Computer Language: It’s Easier Than You Think!.  This past weekend, in a fit of Father/Son bonding, I installed a copy of SmallBasic and let my son go at it.  He read a few chapters but went straight to the back to type in the castle program.  I had to help him convert the graphics code, but it didn’t take long before he was trying a few different things on there. BASIC is long gone.  Visual Basic is all tied up in the Bill Gates mentality and, as a righteous freetard, I can’t let my son develop those sorts of defaults.  His school is already doing the job well enough by getting them to use PowerPoint. So, instead of BASIC, I think JavaScript — a language that gives instant gratification, is on every desktop, and has sample programs all over the web — is probably as close as I can get to the heady days of programming I remember from my own youth. Why do I want to teach them?  I could give you the pragmatic explanation that dvfmama has: they’ll be surrounded by computers all their lives, they may as well understand how to get them to do things.  And there is that.  It is just part of being a modern, literate person to have some understanding of programming — whether that programming happens on a spreadsheet or a web page.  But more than that, I remember feeling a thrill and thinking “Wow, look what I made the computer do!” Honestly, I don’t want my children to miss out on that thrill. So, I’m gonna take a look at JetPack this weekend.  Let’s see what it can do.

Purely Technical: Normalizing Fullwidth Unicode Characters for Search

Over the past couple of weeks, I’ve been working on MediaWiki’s search functionality. First, I fixed a bug I found with Unicode normalization in the lucene-search extension used by Wikipedia itself. Later, I adapted the normalization that Chinese and Japanese language MediaWiki’s have been doing for full-width characters to all languages. If you’re like me when I started this, you don’t really have a clue what I mean when I say “Fullwidth Latin Characters” even if you know what Unicode is. If you’re familiar with Unicode, you know that the first section is compatible with ASCII. The alphabetical characters contained here are called “halfwidth”. They don’t mix easily with “fullwidth” Japanese and Chinese characters. In order to accomodate the mixture of latinate languages (like English) with these ideogram-based languages there are fullwidth forms available. These fullwidth forms (ABC vs ABC) occupy a different area of the Unicode character set and, if your software doesn’t normalize them, then searching for “Mark” won’t match “Mark”. (And, if you look over the Wikipedia page titled “Latin characters in Unicode”, you’ll find several copies of the alphabet in Unicode space.)

Quick Emacs Tip: Scale fonts in a buffer

Emacs23 includes default keybindings for scaling fonts up or down:

C-x C-+ — scale the current buffer’s face/font up C-x C-+ — scale the current buffer’s face/font down

This is good as far as it goes, but I’d really like something a little easier. So I’ve added the following to my .emacs file:

(global-set-key [(control mouse-4)] (lambda () (interactive)                                        (text-scale-increase 1)))  (global-set-key [(control mouse-5)] (lambda () (interactive)                                        (text-scale-decrease 1)))

Now, if I hold down the control key and scroll the mouse wheel, the font will get larger or smaller. Some other applications (e.g. Firefox) use “Control +” and “Control -” to do something similar along with “Control 0” to return to the default size. You could set these keybindings in Emacs without losing too much (unless you’re used to C-- and C-0 as prefixes, in which case, you still have C-M-- and C-M-0):

(global-set-key [(control ?+)] (lambda () (interactive)                                        (text-scale-increase 1)))  (global-set-key [(control ?-)] (lambda () (interactive)                                        (text-scale-decrease 1)))  (global-set-key [(control ?0)] (lambda () (interactive)                                        (text-scale-increase 0)))

None of this will permanently affect the size of the font, so for the next buffer you open or the next time you start Emacs, you’ll have the same size font you started with. If you want to change the default font size, use M-x customize-face RET default RET instead.

Switching away from Google Reader

I have this “thing” about owning my own data. I probably won’t be a real user of Tim O’Reilly’s Internet OS. I like running my own mail server — not relying on Google for Domains, not giving Google more and more data to feed into their advertising. But I’ve been using Google Reader. I’m not sure what Google is doing with that information, but, well, I can run my own feed reader on the desktop. So I switched to Liferea. Besides nice things like task-bar notifications, integration with — or, with a SMOP, my own GotNoBlog — it allows me to pull RSS feeds that require authentication so that I can read LiveJournal friends-only feeds now. I’ve managed to reclaim a little bit of my data. Hurrah!

Women and Computing

One of the never-ending subjects of Free Software is “Where are the Women?” While I see it as mostly a non-problem — that is, there are some obvious problems that need to be fixed with time, but no one is going to rectify them right now — I’m doing what I can to encourage my daughters and son in the field. In the meantime, The Decline of Women in Computer Science from 1940-1982 has some fascinating anecdotes:

Computing was unique, however, in the sense that the fledgling profession was still in its infancy and had no strong pre-war gender socialization.  This fact must have helped the women in that the returning men lacked programming expertise, and clearly had no expectation of “returning” to a programming job.  The lack of structure in the industry was also a boon to women programmers who wanted to continue working even after they became pregnant and had children.  Most notably, “Computations, Inc., of Harvard, Massachusetts (outside Route 128), formed in 1958 by Elsie Shutt and several other programmer-mothers who worked part-time and largely at home on problems contracted out to them by their former employers, such as Minneapolis-Honeywell and Raytheon”.  These women, widely known as the “Pregnant Programmers” were mentioned by speaker Richard H. Bolt at the M.I.T Symposium on American Women in Science and Engineering in 1964.  Bolt, who was a lecturer in Political Science at M.I.T and also a former Associate Director of the National Science Foundation (NSF) from 1960-1963, also mentioned the following:

“I asked one of the unmarried women, a computer programmer in industry, if she thought a woman’s activities as a mother and homemaker would interfere with her opportunities in a career.  ‘One good thing about programming,’ she said, ‘is that you can work part time.’”

MindStorms tomorrow!

Tomorrow, our adventures into programming Lego Mindstorms begin. It took a little doing, but I managed to get XSLisp compiled and working on my brick. I’ll be posting a HOWTO shortly. For starters, we’re just going to build a simple rover using the program in this paper. You could consider this cheating since I haven’t had time to come up with anything really didactic. That’s ok, though. I don’t want to bore them to tears right out of the gate. Perhaps we’ll take the rover and modify it somehow over time.