If you owned a computer in the 80s, you almost certainly knew BASIC. Each microcomputer came with their own spin on the language, and it wasn’t uncommon to while away a Saturday afternoon copying code from a magazine line by line. The end product would almost always be some kind of game, or an interesting visual effect.
It inspired an entire generation of coders. But BASIC died around the same time the Commodore 64 did, and it wasn’t really replaced. As Windows came on to the scene, it was no longer required to write code in order to use a computer. Even if you wanted to, Windows didn’t really come with a BASIC-like programming language rolled in.
But a handful of people are trying to revive it with a programming language called GAMBAS – Gambas Almost Means Basic, which is available for Linux and FreeBSD. Here’s what you need to know.
What Is GAMBAS
So, let’s start off with a bit of history.
Back in the 1980s, Microsoft was a shade of what it is right now. Few people had computers at home, and those who did tended to have ones made by Amstrad, Atari, and Commodore; the giants of the era.
These didn’t really come with operating systems as we now know them, but rather a minimalist approach to running code from tapes and jumbo-sized floppy disks. They also came with interpreters for a simple, human-readable programming language called BASIC. This allowed programmers of all abilities to make games and applications, and freely distribute them. In many respects, BASIC kickstarted the hobbyist developer market, and can be regarded as a spiritual ancestor to the modern day App Store.
But, then the computer market changed.
Atari, Amstrad and Commodore all went out of business, or pivoted from making hardware, to exclusively software. The computer market transformed from consisting of multiple, smaller players, to just two; Apple and Microsoft. A casualty of this transformation was BASIC.
GAMBAS is a spiritual throwback to this era. But it comes with some key differences.
Firstly, syntactically (meaning, the grammar and structure of the language), it differs significantly to ‘old-school’ BASIC, adopting a similar structure to that of Microsoft’s Visual Basic language. If you’ve used this, GAMBAS will be incredibly familiar to you. If not, you’ll probably have a bit of learning to do.
Secondly, GAMBAS uses an object-oriented approach to programming, where the code is logically organized in ‘real-world’ terms. This is incredibly unusual, given the BASIC languages of yesteryear used a more procedural style, where code is organized in steps to be followed sequentially.
Finally, GAMBAS is more than just a language. It also comes with an IDE (Integrated Development Environment), as well as a toolkit for making rudimentary user environments. It even supports QT, which is the engine behind a dizzying array of Linux applications, as well as SDL, which is the gold-standard of computer graphics engines.
Surprisingly, GAMBAS also comes with a CGI engine, allowing you to make websites. I wouldn’t recommend this though, largely due to it being exceptionally slow, and GAMBAS lacking support common developer tools, including the likes of MongoDB, which is used by a variety of web applications to store data.
How Can I Get It?
Well, this is simple. GAMBAS is currently available for Linux and FreeBSD, and can be downloaded from the repositories of your chosen distro. If you’re using Ubuntu, run
sudo apt-get install gambas3. This will then install over 100 megabytes of data.
If you’re on Windows, you can get it running with a bit of wrestling with Cygwin. It’s probably easier to use a VM, though.
Then, it’s just a matter of diving in, and getting your feet wet. A good place to start is with one of GAMBAS’s many templates, which make it easy for you to start coding without the laborious step of finding libraries and linking them to your project.
Where Can I Learn About It?
GAMBAS is very much a niche language.
As a result, there’s not the same amount of learning material available for it, as there are for other languages. CodeAcademy haven’t (and almost certainly never will) written a GAMBAS course, and there are only two books about the language on amazon.com.
With this respect, your options for learning this language are very limited.
After that, try looking for open-source projects written in the language, and see if you can get a feel for the language from that. Great places to start include BitBucket, and its more popular cousin, Github..
Is It Worth Learning?
If you’re planning on learning a programming language in order to advance your career, GAMBAS shouldn’t be that language. In the real world, hardly anybody uses it as their working language. It just isn’t practical, on so many levels.
Unlike a significant proportion of mainstream programming languages, code written with GAMBAS cannot easily be ported to Windows or OS X. Furthermore, if you decided to learn GAMBAS with an expectation of there being an active, expansive developer community to learn from, you’ll be sorely disappointed.
It’s also immensely impractical. One of the core strengths of Python, for example, is the wealth of libraries available for it, which allow you to do anything from manipulate HTML, to build your own web servers. There’s nothing really like that for GAMBAS.
I can’t even recommend it as a teaching language. Python and Ruby are both cleaner, less opaque and are actually used. There’s also a massive amount of learning material surrounding these languages, unlike GAMBAS, which is relatively limited in that regard.
So, who should learn GAMBAS? Well, if your eyes go misty whenever you think of the hours you spent copying code from magazines in the 80s, you might get a kick out of it.
But everyone else? Just learn Python.
Photo Credits: Commodore Amiga 500 (Quagmire)