You Can Cuss in Perl

Question: How would you explain what Perl is to a non-programmer?

Larry Wall: Well, people have ideas of what programming is like from the movies and such, but it's not really much like that.  Perl is what we call a scripting language.  It's for doing ad hoc things and just one-off things that you really wouldn't almost think of as being programming problems.  It's a language that is kind of like, you might think of writing a, you know, a ransom note and you're going to grab a newspaper and clip it into little pieces and so you want to find the right text really quickly and then you want to have some way of gluing it all together in the right order and that's kind of what a scripting language is good at, it's good at taking text and gluing it together.

But more than that, I mean, there's many scripting languages in the world, Perl is a little bit special because it is based more on some ideas from the way natural languages work.  My training was in linguistics, as well as computer science, so I've tried to make a language that works on a deep level, like human languages work.  You don't have to know the whole language to use it usefully, you can do baby talk, you can do grown up talk, you can cuss in it, you can write poetry, you can be a playwright, is sort of the idea.

How you use the language is really based on things that are external to the language itself.  So many computer languages try to force you into one way of thinking and Perl is very much the opposite of that approach.  It's kind of like a, well, sometimes Perl has been called the Swiss army chainsaw of the internet, but it's more like a Swiss army machine shop.  It really gives you a lot of tools, some of which are dangerous, but it lets you get your job done very quickly.

Question: How is Perl a “post-modern language”?

Larry Wall:  Well, the way I think of post-modernism, there's, post-modernism, of course, is about having many different views of something; it's about, you know, some people think of it as tearing down the power structures.  But in my experience, the post-modern movement has mostly been about not getting hung up on one particular idea or way of doing things, like modernism tends to do, and instead, sort of picking and choosing from different historical eras—I'm thinking more of architecture, where you can see different architectural features that the architect has used, just because they think they're cool and they can combine, you know, classical and romantic and baroque even, different ideas, and even modern, sure.  But you pick things because they're cool and because they'll be useful, not because somebody says this is the only way to do things.

And so Perl is very similar in the way it has collected features from other languages, things that seem to be distinct ways of doing things and finding a way of meshing those in a pleasing fashion—the same way a poet might take words that are very different from each other and mesh them into a coherent poem. Perl, in that sense, is very, very much, it doesn't have an agenda and it really is not trying to tell you how you're supposed to do your job, it just tries to get out of your way as much as possible. 

Question: Is Perl a good first language to learn for aspiring programmers?

Larry Wall:  In a sense, it's a good first language.  I've known people who learned it as a first language successfully, but that's not its primary purpose.  There are languages that are designed with the purpose of being a good first language, but they tend to run out of steam about the time your programs get interesting.  I think of Perl more as a last language that you would want to learn, that while Perl is like a human language and that you can start with baby talk and you're not expected to, you know, we don't expect a 50-year-old and a 5-year-old to speak with the same diction.  That's fine.  But we expect that when you need to know something, you can learn a new thing and the resources will be there for you to learn as you go.  So, it can be learned as a first language, but we really concentrate on having an expressive language, not an easy-to-learn language.  And sometimes an expressive language is a little harder to learn, but we think it's worth it. 

Perl developer Larry Wall says that, like a human language, you can use Perl in many ways—for baby talk, grownup talk, writing poetry or plays, and even cussing.

How to make a black hole

Here's the science of black holes, from supermassive monsters to ones the size of ping-pong balls.

Videos
  • There's more than one way to make a black hole, says NASA's Michelle Thaller. They're not always formed from dead stars. For example, there are teeny tiny black holes all around us, the result of high-energy cosmic rays slamming into our atmosphere with enough force to cram matter together so densely that no light can escape.
  • CERN is trying to create artificial black holes right now, but don't worry, it's not dangerous. Scientists there are attempting to smash two particles together with such intensity that it creates a black hole that would live for just a millionth of a second.
  • Thaller uses a brilliant analogy involving a rubber sheet, a marble, and an elephant to explain why different black holes have varying densities. Watch and learn!
  • Bonus fact: If the Earth became a black hole, it would be crushed to the size of a ping-pong ball.

Project 100,000: The Vietnam War's cruel and deadly experiment

Military recruits are supposed to be assessed to see whether they're fit for service. What happens when they're not?

Flickr user Tommy Truong79
Politics & Current Affairs
  • During the Vietnam War, Robert McNamara began a program called Project 100,000.
  • The program brought over 300,000 men to Vietnam who failed to meet minimum criteria for military service, both physically and mentally.
  • Project 100,000 recruits were killed in disproportionate numbers and fared worse after their military service than their civilian peers, making the program one of the biggest—and possibly cruelest—mistakes of the Vietnam War.
Keep reading Show less

China’s artificial sun reaches fusion temperature: 100 million degrees

In a breakthrough for nuclear fusion research, scientists at China's Experimental Advanced Superconducting Tokamak (EAST) reactor have produced temperatures necessary for nuclear fusion on Earth.

Credit: EAST Team
Surprising Science
  • The EAST reactor was able to heat hydrogen to temperatures exceeding 100 million degrees Celsius.
  • Nuclear fusion could someday provide the planet with a virtually limitless supply of clean energy.
  • Still, scientists have many other obstacles to pass before fusion technology becomes a viable energy source.
Keep reading Show less