Aug 23, 2011
I have been dabbling a lot with Moose, a solid framework for object oriented programming in Perl. It is remarkably powerful and has transformed the way I look at Perl OO. It is also different enough from object oriented programming in other languages that I needed to create a section for it on coolnamehere.
Oct 5, 2010
One of my big projects over the last year has been a Parrot Babysteps tutorial. One of the more interesting tasks in that tutorial was reading a CSV file in Parrot. I used the HYG Star Catalog as a sample CSV file that was large enough to present some interesting data. This was fun in Parrot, but obviously I thought quite a bit about how I would tackle the problem in a higher level language such as Ruby. Today seems like a good day to find out.
Sep 8, 2010
The Perl world has evolved over the years. Once upon a time, it was a simple glue language that made life easier for system administrators. It’s grown up a lot since then, and now powers much of the Internet. The language has added new features, and the CPAN has made a dizzying number of libraries available.
Dec 9, 2009
Parrot is more than just PIR and PASM. I’m not talking about the ability to use languages like Rakudo written for the Parrot virtual machine. I am also not talking about the ability to write your own language. Both of those are quite nifty, of course. It is fair to say that those two items are probably why you are experimenting with Parrot in the first place. However, the Parrot distribution also ships with an extra language: NQP.
Oct 2, 2009(Updated Apr 12, 2011)
This is part 6 of Parrot Babysteps, my ongoing Parrot PIR tutorial.
This one’s a bit more bloggy than the earlier steps, but that’s just the mood I was in when writing it. You can ignore the commentary and focus on the code if that’s your preference.
Sep 17, 2009(Updated Jul 21, 2010)
This is part 4 of Parrot Babysteps, my ongoing Parrot PIR tutorial.
Jul 11, 2009Parrot is a virtual machine that provides the base for Rakudo and a large number of other languages. I honestly can’t tell you what its virtues are compared to other virtual machines, because I’m just not that well informed. I have been exploring PIR, the Parrot Intermediate Representation language. It’s a lot more low level than what I’m used to, but it is still a lot of fun to play with.
Jul 11, 2009(Updated Jul 11, 2009)
Nice work! You have begun to learn Perl by writing a complete program which gets input from a user and prints output including a modified version of their input. Yes, there is much more to learn, but you have dipped your toes into the pool. Now you can go out there and start learning about the huge and wild world of Perl programming!
Jul 11, 2009(Updated Sep 8, 2010)
This page once contained many links to Perl 6 information as the design notes were being assembled for the newest revision of this language. Those links are painfully out of date now. I’ll streamline instead with a few core ideas:
May 5, 2009(Updated Jul 11, 2009)
Having a program that displays the exact same message every time you run is nice when it comes to being consistent, but not so entertaining as a program. “What does it do?” “It prints out my name.” “Oh.” Let’s make things a little more interesting. We could change the value of
$namein the code, but it might be a little tiresome to do this before showing it to each new person. How about making the program ask for a name? User interaction - a neat idea.
Oct 29, 2007(Updated Jul 11, 2009)
There is more than one way to experiment with Ruby. JRuby is a mature version of Ruby written for the Java Virtual Machine. This gives you a great deal of platform independence, since JRuby will comfortably run anywhere that Java runs. It also provides you with access to Java’s huge standard library. I thought I would take a little time to examine the Jruby implementation, which is nearing a 1.0 release.
Jun 14, 2007(Updated Jul 11, 2009)
This is Part 3 of an ongoing series about writing interactive fiction games in Python. By the end of Part 2 we had created a text-based user interface and explored one way of storing multiple scenes. This part will finally bring the needed glue for the player to move between all of the scenes in the story. In other words, we’ll have a game!
Apr 20, 2007(Updated Jul 11, 2009)
This is the second part of an ongoing series about using Python to create interactive fiction. I hope to show you one fun use of Python while teaching you more about the basics of this language. We started by defining how our game was going to work and creating a set of scenes for play. Next we wrote the code to handle a single round of the game. Today we are going to tie all of our scenes together to make a complete, playable game of interactive fiction. We are going to approach it from an experimental view, playing with different approaches until we find one that makes us happy. Well, one that makes me happy.
Apr 19, 2007(Updated Jul 11, 2009)
I think the next step is to write the code for a single round of the game. We’ll limit ourselves to Scene 1 to stay focussed.
Jan 25, 2007(Updated Jul 11, 2009)
Sometimes it’s helpful to have multiple consoles open. The best example I can think of is when you are logged in to a machine via
ssh. There are other ways, of course. You could try to log in to the server with ‘-X’ so that X11 applications can run on the remote host but display on your computer. That’s not always easy, though. The administrator of the server may not allow X11 forwarding. Your machine may not allow or even understand X11 requests. You could log in to multiple
sshsessions. This is what I did for several years. It works, but it’s not the most convenient approach, since it clutters up your desktop.
screenis a better option.
Apr 30, 2006(Updated Jul 11, 2009)
I had to share a “Eureka!” moment that I recently experienced about REBOL. I never did get around to refining it, but it stands here as a rambling testament of - well, as a testament of my ability to ramble. I might end up refining it later, or I might not. I just didn’t want the thoughts to disappear in air as thoughts are sometimes known to do.
Mar 17, 2006(Updated Jul 11, 2009)
A mountain of standards and specifications have piled on top of XML over the years, but the core language is still pretty easy to get started in. Because it is a markup language rather than a programming language, there aren’t as many new concepts to learn. If you’ve learned HTML in the past, then XML will be familiar.
Mar 17, 2006(Updated Jul 11, 2009)
XML is the core language of the Web. It forms the foundation for nearly everything you read with your browser. You might not know this, though, because of the great number of languages and acronyms you find. Web pages are written in XHTML, news feeds are written in RSS, and many applications communicate to each other with XML-RPC. If you use Google Talk, then you are relying on the Jabber protocol. What do each of these languages have in common? They are all XML languages.
Mar 7, 2005(Updated Jul 11, 2009)
Now we know how to do things, and we know how to choose whether or not we will do something. We’re getting close to having some real skills. We just need to get the understanding of one more concept before we reach the first little plateau of programming knowledge. We need to learn how to do a task more than once. Well, besides just running the script again, but that doesn’t really count.
Feb 28, 2005(Updated Jul 11, 2009)
One thing you like to keep track of on your laptop is how much juice is left in your battery. There’s nothing quite like being in the middle of some insane hacking session and watching as the computer suddenly gets tired and blacks out on you. Of course, I’ve already got a handy battery monitor in my KDE panel, but what if I’m not in KDE? Okay, okay, there are handy battery monitors for nearly every desktop environment out there. That’s not my point, though. My point is that I’d like to explore some basic system stuff using REBOL on an Ubuntu 8.10 system. Got it? Okay, good. Now that we’ve settled this little detail, let’s move on.
Feb 27, 2005(Updated Jul 11, 2009)
In part 1 I gave you a first cautious glance at the REBOL programming language. In part 2 I extended that glance to a peek at the excellent REBOL/View GUI library. Let’s continue learning how to program with Rebol. Today I want to get you started with some structured programming by introducing you to selection structures. Selection structures make it possible to decide whether or not to do something based on a test. Here are a few uses for a simple selection structure.
Jan 4, 2005(Updated Aug 25, 2011)
Let’s admit it. Perl is everywhere. It powers most of the Internet, in one form or another. What? Your site doesn’t use Perl and CGI? Well, what about the administrative scripts that keep it running smoothly when everyone is snug in their beds? Even a fair chunk of Microsoft IIS servers rely on Perl for administrative tasks. I’m not saying that Perl is being used on every site on the Internet, including yours. I’m saying that Perl is probably being used on any random site you happen to look at on the Internet, including yours.
Dec 26, 2004(Updated Jul 11, 2009)
REBOL is the “Relative Expression-Based Object Language”, and it was developed by Carl Sassenrath. Who is Carl Sassenrath? Why, he’s one of the people responsible for the amazing operating system which powered the Amiga computer. What’s the Amiga? Why, the Amiga was only the incredibly robust and cool computer released by the same company that brought the world’s first personal computer, Commodore. What’s Commodore? Stop bothering me, kid. Just take it from a relative old-timer: the Amiga put a whole heck of a lot of power into a consumer-affordable personal computer, and it wasn’t really matched by other computers for a good five or ten years. Nowadays, I look at REBOL and it feels like the first language I’ve come across to take lessons from past languages and apply them in a new context, rather than just reimplement them with different syntax.
Dec 26, 2004(Updated Jul 11, 2009)
I’m sure you thought that getting started was fun, but it really didn’t do anything to show off REBOL. I’d like to go through almost exactly the same process, but this time focussing my attention on REBOL/View. So let’s give it a try!
Dec 26, 2004(Updated Jul 11, 2009)
One of REBOL’s strengths is the rich selection of native datatypes. This selection is part of what makes it so easy to express solutions to your problems, because there is less “mental mapping” to make as you use or create an abstract type to represent an important concept. Learning this selection is also one of the challenges for those who are trying to master the language. I am facing that challenge right now, so I decided to make this table of native REBOL datatypes and how they are expressed.
Dec 22, 2004(Updated Jul 11, 2009)
This is unusual. I’ve come across the first language that I don’t want to tell you about. I don’t know why I want to keep REBOL a secret. It has been very useful even in the limited roles that I have given it so far. The language is consistent and pleasant to work with. It has a richness of datatypes that just can’t be matched by other languages. The GUI library, View, is surprisingly straightforward for simple tasks, and there are excellent libraries like RebGUI to make it just as easy for more elaborate interfaces.
Oct 28, 2004Okay, I’ll be honest. LISP scares the dickens out of me. It’s ancient by the standards of computer languages. The language is completely different from any of the stuff I use in my day-to-day programming. Yet it has all the features of those languages and more. Garbage collection? Got it. The ability to pass functions around as easily as an integer? Done (and not in a cranky C function pointer manner, either).
Oct 1, 2004(Updated Jul 11, 2009)
Thanks to everybody for the positive feedback on the first MIRE. I still have your attention, so I’ll move on to my next exercise. This one is a little more involved than the first, but bear with me - the results should be worth it.
Sep 15, 2004(Updated Jul 11, 2009)
People who come to UNIX (or Linux) from the world of Windows are often disappointed by the apparent clunkiness and lack of unified tools. “Where’s Visual Studio? Where’s C++ Builder? Heck, Notepad would be nice.” These folks are looking all around for an IDE, or Integrated Development Environment. What they don’t realize is that UNIX is an Integrated Development Environment. You can’t get around the fact that this environment was made for geeks, by geeks. That means a lot of the programs that seem so clunky and awkward to the Windows person are, in fact, intended to work together to make development easier. Okay, so they aren’t all pointy-clicky and pretty, but that’s because pointy-clicky and pretty aren’t as important to these particular folks.
Jul 11, 2004(Updated Jul 11, 2004)
There are several different approaches to programming, but the one that is easiest for me to grasp is imperative programming. The imperative approach allows you to tell the computer exactly what you want it to do and how you want it done. The best analogy I can think of is a cooking recipe. You have a list of ingredients and a specific set of instructions to follow. Veer from the recipe and you may not be happy with the results. Veer too far from the recipe and your house could burn down.
Jul 11, 2004
Jun 5, 2004(Updated Jul 11, 2009)
Mar 12, 2004(Updated Jul 11, 2009)
PHP is great. It is easy to learn and easy to use. Of course, it is also easy to make a project that is so amazingly baroque that mere humans have no chance of ever editing it. This is a trait that PHP shares with one of its biggest rivals, Perl. It can be funny to listen to an argument between PHP and Perl folks about why their favorite is the best and the other guy is the worst. The other guy is always “unstructured and unsuitable for real projects”, while the favorite is “fast and expressive”.
Mar 10, 2004(Updated Jul 11, 2009)
This article is intended to provide a casual introduction the CGI programming with the Ruby language. You won’t be an expert when you are done, but you will certainly be ready to explore more on your own, and maybe delve into becoming a Ruby/CGI expert.
Jul 11, 2003(Updated Jul 11, 2004)
Seattle is a city. It may not be as big as Los Angeles or New York, but it is still a city. You do not have an excuse to be bored, even if you are flat broke. My wife and I have lived in Seattle since 1999, and it still feels like we are scraping the surface of what this area has to offer after ten years.
Jun 23, 2003(Updated Jul 11, 2009)
Ruby is an exciting language with a huge number of features that appeal to advanced programmers. You should not let that intimidate you, though. The language is very easy to get started with, and you can work your way into the more arcane corners.
Jun 28, 2002(Updated Jul 11, 2009)
Vim is one of the two major editors of the UNIX world. The other one is Emacs, which I am also quite fond of. Still, it’s hard to beat Vim. It may be awkward, ugly, and hard to use, but there’s just something inescapable about it. Regular expressions are a major part of the editing interface, which gives you a great deal of (admittedly cryptic) power.
Jun 1, 2002(Updated Jul 11, 2009)
I say that I do not have a favorite programming language. If I did have a favorite language, it might be Ruby. I’ve been messing around with it randomly for a few years, and I am continually amazed by how easy it is to build programs with it. Ruby is a delight to work with. I’m not sure how to describe it, because it uses elements from so many great languages. Freak that I am, I’ve gone out and started fiddling with some of the languages that Ruby borrows from so I can use Ruby better.
May 29, 2002(Updated Jul 11, 2009)
What can I say about Perl? I’ve had very little to talk about it on this site over the years, despite the fact that I use Perl on an almost daily basis. It’s not as cute as Ruby, or as clean as Python, but it’s always there. There have been numerous projects that are just plain easier in Perl. I can’t explain it.
Jul 11, 2001(Updated Jul 11, 2009)
Computers are all about programs. If you take the time to learn how to program, then you’re “on the inside” - more than just an ordinary user. The computer will obey your every whim, and you will be able to sneer at “lusers” (loser-users) who have no idea how their computer works. You will make millions of dollars working in your shorts. Beautiful people will throw themselves off of cliffs to be near you. The planet will be yours for the taking!