Science and technology

How I play Tetris on the mainframe

The capability to run Linux on modern mainframes opens doorways to doing every kind of issues on the platform. An Apache HTTP server? Easy! A database? Would you want SQL or NoSQL? Kubernetes? Sure! As I concluded in Linux on the mainframe: Then and now, all the hottest Linux distributions for servers at the moment have variations for the mainframe.

This is nice information for corporations whose mission-critical infrastructures are working on a mainframe, however what for those who simply wish to mess around with one? The first time I acquired a bash shell on an IBM LinuxONE, I put in the irssi chat consumer and confirmed all my associates on IRC the output of /proc/cpuinfo to indicate off that it was an s390x structure system. At first, I used to be at a loss as to what to do subsequent.

Then I assumed it could be enjoyable to make use of this big pc to play a recreation. My first thought was NetHack, however it seems I may set up that with a easy apt set up nethack-console. No, I ought to compile one thing! For each pc structure, you want compilers and interpreters written for that. With over 20 years of Linux on the mainframe, most compilers and interpreters you’d usually anticipate are already ported.

Growing up, one in all my all-time favourite video games was Tetris, so it was the logical selection for my experimentation. I discovered an open supply Tetris recreation written in C referred to as vitetris and gave it a attempt. It was similar to compiling a C program on another Linux server.

First, I wanted to seize some dependencies. The mainframe was working Linux, so I may use my package deal supervisor to install the build requirements, and I used to be effectively on my manner.

Next, it was only a matter of grabbing the code and constructing it:

curl -LO https://github.com/vicgeralds/vitetris/archive/v0.58.0.tar.gz
tar xvf v0.58.0.tar.gz
cd vitetris-0.58.0/
./configure
make

And very quickly, I used to be enjoying my favourite recreation!

./tetris

As I mentioned, it is precisely like constructing another C program on a Linux server, however you are doing it on a mainframe.

Unfortunately, I haven’t got a mainframe in my storage (but). Instead, I’ve carried out all of this on a digital server hosted by Marist College via the IBM LinuxONE Community Cloud program. It offers you free entry to an s390x structure Linux server, together with your selection of the preferred distributions. With this digital server, you could have entry to experiment for 120 days.

If you’re a consultant from an open supply mission that’s contemplating constructing your software for Linux on s390x, there is a program for you, too. When I’m not enjoying Tetris, my precise job at IBM is working with open supply communities to do exactly that. You can put in a request for a everlasting Linux digital server in your group to make use of for growth, whether or not that is doing guide checks to see in case your software will construct or formally including it to your mission’s steady integration system. I like to recommend beginning with the Community Cloud to do some experiments, after which you may fill out this form to get the method of getting a everlasting digital server rolling.

Most Popular

To Top