HOME

TheInfoList



OR:

Gambas is an
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
dialect of the
BASIC programming language Basic or BASIC may refer to: Science and technology * BASIC, a computer programming language * Basic (chemistry), having the properties of a base * Basic access authentication, in HTTP Entertainment * ''Basic'' (film), a 2003 film * Basic, on ...
, and an
integrated development environment An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
that accompanies it. Designed to run on
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
and other
Unix-like A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
computer
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s, its name is a recursive acronym for ''Gambas Almost Means Basic''. Gambas is also the word for
prawn Prawn is a common name for small aquatic crustaceans with an exoskeleton An exoskeleton () . is a skeleton that is on the exterior of an animal in the form of hardened integument, which both supports the body's shape and protects the intern ...
s in the Spanish, French, and Portuguese languages, from which the project's logos are derived.


History

Gambas was developed by the French programmer Benoît Minisini, with its first release coming in 1999. Benoît had grown up with the BASIC language, and decided to make a free software development environment that could quickly and easily make programs with user interfaces. The Gambas 1.x versions were first released on January 4, 2005, and featured an interface made up of several different separate windows for forms and IDE dialogues in a similar fashion to the interface of earlier versions of the
GIMP Gimp or GIMP may refer to: Clothing * Bondage suit, also called a gimp suit, a type of suit used in BDSM * Bondage mask, also called a gimp mask, often worn in conjunction with a gimp suit Embroidery and crafts * Gimp (thread), an ornamental tr ...
. It could also only develop applications using Qt and was more oriented towards the development of applications for
KDE KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that enable collaborative work on its projects. Its products include the KDE Plasma gra ...
. The last release of the 1.x versions was Gambas 1.0.19. The first of the 2.x versions was released on January 2, 2008, after three to four years of development. It featured a major redesign of the interface, now with all forms and functions embedded in a single window, as well as some changes to the Gambas syntax, although for the most part code compatibility was kept. It featured major updates to existing Gambas components as well as the addition of some new ones, such as new components that could use
GTK+ GTK (formerly GIMP ToolKit and GTK+) is a free software cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and proprietary s ...
or SDL for drawing or utilize
OpenGL OpenGL (Open Graphics Library) is a Language-independent specification, cross-language, cross-platform application programming interface (API) for rendering 2D computer graphics, 2D and 3D computer graphics, 3D vector graphics. The API is typic ...
acceleration. Gambas 2.x versions can load up and run Gambas 1.x projects, with occasional incompatibilities; the same is true for Gambas 2.x to 3.x, but not from Gambas 1.x to 3.x. The next major iteration of Gambas, the 3.x versions, was released on December 31, 2011. A 2015 benchmark published on the Gambas website showed Gambas 3.8.90 scripting as being faster to varying degrees than
Perl Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language". Perl was developed ...
5.20.2 and the then-latest 2.7.10 version of Python in many tests. Version 3.16.0 released on April 20, 2021, featured full support for Wayland using the graphical components, as well as parity between the Qt 5 and GTK 3 components.


Features

Gambas is designed to build graphical programs using the Qt (currently Qt 4.x or 5.x since 3.8.0) or the
GTK GTK (formerly GIMP ToolKit and GTK+) is a free software cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both Free software, free and ...
toolkit (GTK 3.x also supported as of 3.6.0); the Gambas IDE is written in Gambas. Gambas includes a GUI designer to aid in creating user interfaces in an event-driven style, but can also make command line applications, as well as
text-based user interface In computing, text-based user interfaces (TUI) (alternately terminal user interfaces, to reflect a dependence upon the properties of computer terminals and not just text), is a retronym describing a type of user interface (UI) common as an ear ...
s using the ncurses toolkit. The Gambas runtime environment is needed to run executables. Functionality is provided by a variety of components, each of which can be selected to provide additional features. Drawing can be provided either through Qt and GTK toolkits, with an additional component which is designed to switch between them. Drawing can also be provided through the Simple DirectMedia Layer (originally version 1.x, with 2.x added as of 3.7.0), which can also be utilized for audio playback through a separate sound component (a component for the OpenAL specification has also been added). GPU acceleration support is available through an
OpenGL OpenGL (Open Graphics Library) is a Language-independent specification, cross-language, cross-platform application programming interface (API) for rendering 2D computer graphics, 2D and 3D computer graphics, 3D vector graphics. The API is typic ...
component, as well as other hardware functionally provided by various other components. There are also components for handling other specialized tasks. With Gambas, developers can also use databases such as MySQL or PostgreSQL, build
KDE KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that enable collaborative work on its projects. Its products include the KDE Plasma gra ...
(Qt) and GNOME GTK applications with DCOP, translate Visual Basic programs to Gambas and run them under Linux, build network solutions, and create CGI web applications. The IDE also includes a tool for the creation of installation packages, supporting GNU Autotools,
slackpkg Slackware is a Linux distribution created by Patrick Volkerding in 1993. Originally based on Softlanding Linux System (SLS), Slackware has been the basis for many other Linux distributions, most notably the first versions of SUSE Linux distribu ...
, pacman,
RPM Revolutions per minute (abbreviated rpm, RPM, rev/min, r/min, or r⋅min−1) is a unit of rotational speed (or rotational frequency) for rotating machines. One revolution per minute is equivalent to hertz. Standards ISO 80000-3:2019 def ...
, and debs (the latter two then tailored for specific distributions such as Fedora/ RHEL/
CentOS CentOS (, from Community Enterprise Operating System; also known as CentOS Linux) is a discontinued Linux distribution that provided a free and open-source community-supported computing platform, functionally compatible with its upstream (softw ...
,
Mageia Mageia is a Linux-based operating system, distributed as free and open-source software. It was forked from the Mandriva Linux distribution. The Greek term () means enchantment, fascination, glamour, wizardry. The first release of the software ...
,
Mandriva Mandriva S.A. was a Public company, public software company specializing in Linux and open-source software. Its corporate headquarters was in Paris, and it had development centers in Metz, France and Curitiba, Brazil. Mandriva, S.A. was the deve ...
,
OpenSUSE openSUSE () is a free and open-source software, free and open-source Linux distribution developed by the openSUSE project. It is offered in two main variations: ''Tumbleweed'', an upstream rolling release distribution, and ''Leap'', a stable r ...
and
Debian Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
,
Ubuntu Ubuntu ( ) is a Linux distribution based on Debian and composed primarily of free and open-source software. Developed by the British company Canonical (company), Canonical and a community of contributors under a Meritocracy, meritocratic gover ...
/ Mint). Support for AppImage building was mainlined with version 3.19.0. Gambas since version 3.2 IDE has integrated profiler and it started to use
just-in-time compilation In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is compilation (of computer code) during execution of a program (at run time) rather than before execution. This may consist of source code transl ...
technology.


Differences from Visual Basic

Gambas is intended to provide a similar experience as developing in Microsoft
Visual Basic Visual Basic is a name for a family of programming languages from Microsoft. It may refer to: * Visual Basic (.NET), the current version of Visual Basic launched in 2002 which runs on .NET * Visual Basic (classic), the original Visual Basic suppo ...
, but it is not a
free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
clone of the popular proprietary program. The author of Gambas makes it clear that there are similarities to Visual Basic, such as syntax for BASIC programs and the integrated development environment; Gambas was written from the start to be a development environment of its own and seeks to improve on the formula. Its
object model In computing, object model has two related but distinct meanings: # The properties of objects in general in a specific computer programming language, technology, notation or methodology that uses them. Examples are the object models of ''Java'', ...
, each class being represented in a file, as well as the archiver to package the program is all inspired by the
Java programming language Java is a high-level, general-purpose, memory-safe, object-oriented programming language. It is intended to let programmers ''write once, run anywhere'' ( WORA), meaning that compiled Java code can run on all platforms that support Jav ...
. Gambas is intended to be an alternative for former Visual Basic developers who have decided to migrate to Linux. There are also other important distinctions between Gambas and Visual Basic. One notable example is that in Gambas array indexes always start with 0, whereas Visual Basic indexes can start with 0 or 1. Gambas also supports the += and -= shorthand not found in classic Visual Basic. Both of these are features of Visual Basic .NET however. Gambas also outlived two other attempts at implementing a Visual Basic style interface for Qt and GTK on Linux, those being HBasic and
GNOME A gnome () is a mythological creature and diminutive spirit in Renaissance magic and alchemy, introduced by Paracelsus in the 16th century and widely adopted by authors, including those of modern fantasy literature. They are typically depict ...
Basic, as well as the platform independent KBasic/Basic for Qt. Similar style IDEs have since been developed as well for
FreeBASIC FreeBASIC is a FOSS, free and open source multiplatform compiler and programming language based on BASIC licensed under the GNU General Public License, GNU GPL for Microsoft Windows, protected-mode MS-DOS (DOS extender), Linux, FreeBSD and Xbox ...
, namely VisualFBEditor, and QB64, namely InForm.


Adoption

Several programs and many forms of example code have been written using and for Gambas. Freecode (formerly Freshmeat) listed 23 applications that were developed using Gambas, while the Gambas wiki listed 82; several other specialized sites list Gambas applications and code. A Gambas written application, named Gambas3 ShowCase, acted as a software center to download or install Gambas 3 applications. It has since been discontinued following the launch of the first party Gambas Software Farm integrated into the IDE since 3.7.1, which contains nearly 500 applications and demos. Several community sites, including community forums and mailing lists, also exist for Gambas. Notable applications written in Gambas include Xt7-player-mpv, a GUI frontend for mpv player contained in a number of Linux software repositories, and I-Nex, a program for displaying hardware data. The comisat Games Collection are early examples of video games written in Gambas.


Availability

Gambas is included in the repositories of a number of
Linux distribution A Linux distribution, often abbreviated as distro, is an operating system that includes the Linux kernel for its kernel functionality. Although the name does not imply product distribution per se, a distro—if distributed on its own—is oft ...
s, such as
Debian Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
, Fedora,
Slackware Slackware is a Linux distribution created by Patrick Volkerding in 1993. Originally based on Softlanding Linux System (SLS), Slackware has been the basis for many other Linux distributions, most notably the first versions of SUSE Linux distr ...
, Arch Linux,
Mageia Mageia is a Linux-based operating system, distributed as free and open-source software. It was forked from the Mandriva Linux distribution. The Greek term () means enchantment, fascination, glamour, wizardry. The first release of the software ...
, PCLinuxOS,
Linux Mint Linux Mint is a community-developed Linux distribution. It is based on Ubuntu and designed for x86-64 based computers; another variant is based on Debian which is named Linux Mint Debian Edition (LMDE) and has both 64-bit and IA-32 support. T ...
and
Ubuntu Ubuntu ( ) is a Linux distribution based on Debian and composed primarily of free and open-source software. Developed by the British company Canonical (company), Canonical and a community of contributors under a Meritocracy, meritocratic gover ...
. A
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
version of Gambas was run under the Cygwin environment, although this version was significantly less tested than its Linux counterparts and was command-line only; Cooperative Linux and derivatives have also been used, as well as specialized Linux
virtual machine In computing, a virtual machine (VM) is the virtualization or emulator, emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve ...
s. An independent contributor, François Gallo, also worked on porting Gambas 3.x to
Mac OS X macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
and
FreeBSD FreeBSD is a free-software Unix-like operating system descended from the Berkeley Software Distribution (BSD). The first version was released in 1993 developed from 386BSD, one of the first fully functional and free Unix clones on affordable ...
, based on using local versions of the X11 system. A build for
Haiku is a type of short form poetry that originated in Japan. Traditional Japanese haiku consist of three phrases composed of 17 Mora (linguistics), morae (called ''On (Japanese prosody), on'' in Japanese) in a 5, 7, 5 pattern; that include a ''kire ...
has also been worked on by Francois Revol. Gambas from version 3.2 can run on
Raspberry Pi Raspberry Pi ( ) is a series of small single-board computers (SBCs) developed in the United Kingdom by the Raspberry Pi Foundation in collaboration with Broadcom Inc., Broadcom. To commercialize the product and support its growing demand, the ...
, and offers
just-in-time compilation In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is compilation (of computer code) during execution of a program (at run time) rather than before execution. This may consist of source code transl ...
there from version 3.12. It can also be run from the cloud using rollApp. In November 2013, the future portability of Gambas was discussed, listing the main concerns being
Linux kernel The Linux kernel is a Free and open-source software, free and open source Unix-like kernel (operating system), kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the k ...
features utilized in the interpreter, components using Linux specific software and libraries, and primarily X11-tying in the Qt, GTK and desktop integration components. However, partly due to the need to upgrade to newer toolkits such as GTK 3 (added as of 3.6.0) and Qt 5 (as of 3.8.0), future versions would be less X11 tied, making projects like Cygwin or utterly native versions on other platforms more possible. Benoît Minisini stated that he intended to "encapsulate" X11 specific code to aid in any attempt to replace it, with the X11 support in the desktop component moved to its own component as of 3.6.0. On October 27, 2016, a screenshot and setup guide was released from the main page for running Gambas fully through Cygwin, including most components, graphical toolkits, and the complete IDE. The relevant patches were mainlined as of version 3.9.2. This replaces the prior recommended method of using freenx forwarding from a Linux server. It has also been successfully run using the Windows Subsystem for Linux. This was usually done using an
X terminal X, or x, is the twenty-fourth letter of the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''ex'' (pronounced ), plural ''exes''."X", ' ...
emulator such Mobaxterm on Windows, as WSL did not support X11 graphics directly until
Windows 11 Windows 11 is a version of Microsoft's Windows NT operating system, released on October 5, 2021, as the successor to Windows 10 (2015). It is available as a free upgrade for devices running Windows 10 that meet the #System requirements, Windo ...
.Windows 11
Gambas-One


Example code

A "Hello, World!" program with graphical user interface. Public Sub Main() Message("Hello, World!") End Program that computes a 100-term polynomial 500000 times, and repeats it ten times (used for
benchmarking Benchmarking is the practice of comparing business processes and performance metrics to industry bests and best practices from other companies. Dimensions typically measured are Project management triangle, quality, time and cost. Benchmarking is ...
). Private Sub Test(X As Float) As Float Dim Mu As Float = 10.0 Dim Pu, Su As Float Dim I, J, N As Integer Dim aPoly As New Float 00 N = 500000 For I = 0 To N - 1 For J = 0 To 99 Mu = (Mu + 2.0) / 2.0 aPoly = Mu Next Su = 0.0 For J = 0 To 99 Su = X * Su + aPoly Next Pu += Su Next Return Pu End Public Sub Main() Dim I as Integer For I = 1 To 10 Print Test(0.2) Next End


See also

*
List of BASIC dialects This is an alphabetical list of BASIC dialects – interpreter (computing), interpreted and compiled variants of the BASIC programming language. Each dialect's platform(s), i.e., the computer models and operating systems, are given in parentheses ...
* Comparison of integrated development environments#BASIC * GNAVI * Lazarus


References


Further reading

* Mark Alexander Bain (Apr 28, 2006)
An Introduction to Gambas
',
Linux Journal ''Linux Journal'' (''LJ'') is an American monthly technology magazine originally published by Specialized System Consultants, Inc. (SSC) in Seattle, Washington since 1994. In December 2006 the publisher changed to Belltown Media, Inc. in Hous ...
, issue 146, June 2006 (in print) * Mark Alexander Bain (Dec 3, 2004)
Gambas speeds database development
', Linux.com * Mark Alexander Bain (Dec 12, 2007)
Creating simple charts with Gambas 2.0
', Linux.com * Fabián Flores Vadell (Nov, 2010)
How to Program with Gambas
'


External links

*
Gambas
on
GitLab GitLab is a software forge primarily developed by GitLab Inc. It is available as a community edition and a commercial edition. History GitLab was created in 2011 by Ukrainian programmer Dmitriy Zaporozhets as a side project written in Rub ...

Gambas documentation

Gambas mailing list

Gambas One
English community
Gambas India
community and source code repo {{Qt BASIC compilers BASIC interpreters BASIC programming language family Free integrated development environments Free software programmed in BASIC Linux integrated development environments Linux programming tools Object-oriented programming languages Procedural programming languages Programming languages created in 1999 Self-hosting software Software that uses Qt Software that uses GTK Software using the GNU General Public License User interface builders