People Behind Perl : Artur Bergman

We continue our series on the People Behind Perl by interviewing Artur Bergman. Artur is a recent addition to the legion of Perl developers, but he’s already making extremely big waves. Artur picked up the gauntlet of the new threading model introduced in Perl 5.6.0 and has set about making it usable for the ordinary Perl programmer. Here’s what Artur has to say.

Who are you, and what is your day job?

My name is Artur Bergman. I work on a content management system as a system developer/designer at Contiller AB in Sweden. I am usually found on #perl, which is also my only real longstanding contact with the Perl community.

I used to work with Stock Exchange systems, and have designed and programmed a number of trade execution engines in Perl for both stocks, power and interest-rate markets.

How long have you been programming in Perl?

Since ‘95. I needed to make a Web page dynamic, so I had to learn a programming language; it ended up being Perl.

What got you into Perl?

My online friends recommended me to use Perl. I had tried Basic (of course) and C, but I didn’t stick with them.

Why do you still prefer Perl? What other languages apart from Perl do you program in, and how do they compare?

Perl does what I want with a minumum of fuss. I can generally write nice clean code, but when I need to do something clever or impossible I can still do it. I feel like I am making steady progress while programming Perl.

Currently the only other language I use is C; it doesn’t compare! I wouldn’t dream of using C for most stuff I do in Perl; I do dream of using Inline::C to optimize some stuff - I rarely do but it happens.

What sort of things do you do with Perl now? What was the last Perl program you wrote?

Content Mangement, which generally means dealing with text. The last Perl program I wrote was a OODBMS that is based on BerkeleyDB complete with transactions, version and release management, scheduled tasks and monitors. It uses POE, of course.

What got you into Perl development?

I was getting bored. I needed a chellange! I also wanted to refresh my C knowledge. Perl is a very interesting project to work on: the great range of platforms it supports, the large source and the very intelligent people working on it. I have learned a lot during the past three months,

Do you remember the first patch you submitted? Was it applied?

I do not remember it, but yes it was applied and Richard Soderberg found it for me; it was a tiny documentation patch a couple of years ago.

What do you do for Perl development now?

Mainly threading. I have released two modules on CPAN (threads and threads::shared) that give access to Perl’s newer threading system. To make these work I have had to add some stuff to how Perl deals with threads. I am also starting to get involved into attribute stuff, and in my threads path I have stumbled over the regex/Perl interface and been working on making it work better. More work will surely be done in this area.

Why do you work particularly with threads?

People Behind Perl

Interested in reading more from our series of interviews with Perl luminaries? Read our discussion with Nathan Torkington, a long-time Perl developer and mainstay of the Perl community.

Because I have a real need for threads. I have a system that ideally should scale on a SMP system, it should also work both with Win32 and Unix. I am not a great fan of fork(), so I want threads. As Gurusamy Sarathy already provided a lot of the work on USEITHREADS, I decided to try to finish it.

I am very interested in concurrency issues and have worked on and with POE quite a lot.

People often say that threading in Perl is unusable. What do you say to that, and how is it getting better?

Sure, tell that to all the people who use fork() on Win32 for all kinds of stuff!

Actually, I agree. 5.6.1 is very unusable for all kind of complex applications with a lot of external APIs; it is unusable for people on unsafe C libraries. (From what I have been told, Win32 and Digital Unix have safe C libraries, so that might explain why it works better in Win32).

The main problem has been the regex interface and match variables. This has now been solved. A lot of bugs have been fixed and I think 5.8 will be safe enough to start developing applications that are multithreaded. Of course, some people have been working on multithreaded applications since 5.5.3!

What do you envisage Perl 6’s threading model to look like?

We conducted this interview before the State of the Onion, in which Larry confirmed that the threading model would look like ithreads - Simon.

Something very similar to threads.pm/ithreads. I like the idea of only sharing what is explicitly declared to be shared. I think the idea could be taken a stop further, and only guarantee the value of shared variables after a synchronization.

Finally, what’s the best thing about Perl and what’s the worst thing about Perl?

Perl is fun, Perl has CPAN! Bad things? I would like an optional strict typing system.

Tags

Feedback

Something wrong with this article? Help us out by opening an issue or pull request on GitHub