Gambas
| Gambas | |
|---|---|
| Designed by | Benoît Minisini |
| First appeared | 1999; 26 years ago (1999) |
| Stable release | |
| OS | Linux, FreeBSD; versions for Mac OS X [2] and Haiku [3] drafted; Microsoft Windows through Cygwin and WSL |
| License | GNU GPLv2+ |
| Website | gambaswiki |
| Influenced by | |
| Visual Basic, Java [4] | |
Gambas is an object-oriented dialect of the BASIC programming language, and an integrated development environment that accompanies it.[5] Designed to run on Linux and other Unix-like computer operating systems,[6] its name is a recursive acronym for Gambas Almost Means BASIC. Gambas is also the word for prawns in the Spanish, French, and Portuguese languages, from which the project's logos are derived.
History
[edit ]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.[4]
The Gambas 1.x versions were first released on January 4, 2005,[7] 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. It could also only develop applications using Qt and was more oriented towards the development of applications for KDE.[8] 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+ or SDL for drawing or utilize OpenGL 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.[9] A 2015 benchmark published on the Gambas website showed Gambas 3.8.90 scripting as being faster to varying degrees than Perl 5.20.2 and the then-latest 2.7.10 version of Python in many tests.[10] 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.[11]
Features
[edit ]Gambas is designed to build graphical programs using the Qt (currently Qt 4.x or 5.x since 3.8.0) or the GTK toolkit (GTK 3.x also supported as of 3.6.0); the Gambas IDE is written in Gambas.[12] [13] Gambas includes a GUI designer to aid in creating user interfaces in an event-driven style,[14] but can also make command line applications,[15] as well as text-based user interfaces using the ncurses toolkit.[16] 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.[17] Drawing can be provided either through Qt and GTK toolkits, with an additional component which is designed to switch between them.[18] Drawing can also be provided through the Simple DirectMedia Layer (originally version 1.x, with 2.x added as of 3.7.0),[19] 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 component, as well as other hardware functionally provided by various other components.[18] There are also components for handling other specialized tasks.[17]
With Gambas, developers can also use databases such as MySQL or PostgreSQL, build KDE (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, pacman, RPM, and debs (the latter two then tailored for specific distributions such as Fedora/RHEL/CentOS, Mageia, Mandriva, OpenSUSE and Debian, Ubuntu/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 technology.
Differences from Visual Basic
[edit ]Gambas is intended to provide a similar experience as developing in Microsoft Visual Basic, but it is not a free software clone of the popular proprietary program.[20] [21] 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.[22] [23] [24]
Its object model, each class being represented in a file, as well as the archiver to package the program is all inspired by the Java programming language.[25] 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.[26] 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,[27] [28] those being HBasic[29] [30] and GNOME Basic,[31] [32] as well as the platform independent KBasic/Basic for Qt.[33] [34] Similar style IDEs have since been developed as well for FreeBASIC, namely VisualFBEditor,[35] and QB64, namely InForm.[36]
Adoption
[edit ]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,[37] while the Gambas wiki listed 82;[38] several other specialized sites list Gambas applications and code.[39] [40] [41]
A Gambas written application, named Gambas3 ShowCase, acted as a software center to download or install Gambas 3 applications.[42] 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.[43] [44] Several community sites, including community forums and mailing lists, also exist for Gambas.[45]
Notable applications written in Gambas include Xt7-player-mpv, a GUI frontend for mpv player contained in a number of Linux software repositories,[46] [47] [48] and I-Nex, a program for displaying hardware data.[49] [50] [51] The comisat Games Collection are early examples of video games written in Gambas.[52]
Availability
[edit ]Gambas is included in the repositories of a number of Linux distributions, such as Debian, Fedora, Slackware, Arch Linux, Mageia, PCLinuxOS, Linux Mint and Ubuntu.[53] A Microsoft Windows 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,[54] as well as specialized Linux virtual machines.[55] [56] An independent contributor, François Gallo, also worked on porting Gambas 3.x to Mac OS X and FreeBSD, based on using local versions of the X11 system.[57] A build for Haiku has also been worked on by Francois Revol.[58] Gambas from version 3.2 can run on Raspberry Pi, and offers just-in-time compilation there from version 3.12. It can also be run from the cloud using rollApp.[59]
In November 2013, the future portability of Gambas was discussed, listing the main concerns being Linux kernel 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,[60] 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.[61] [62] The relevant patches were mainlined as of version 3.9.2.[63] This replaces the prior recommended method of using freenx forwarding from a Linux server.[64] It has also been successfully run using the Windows Subsystem for Linux.[65] [66] This was usually done using an X terminal emulator such Mobaxterm on Windows,[67] as WSL did not support X11 graphics directly until Windows 11.[68]
Example code
[edit ]A "Hello, World!" program with graphical user interface.
PublicSubMain() Message("Hello, World!") End
Program that computes a 100-term polynomial 500000 times, and repeats it ten times (used for benchmarking).
PrivateSubTest(XAsFloat)AsFloat DimMuAsFloat=10.0 DimPu,SuAsFloat DimI,J,NAsInteger DimaPolyAsNewFloat[100] N=500000 ForI=0ToN-1 ForJ=0To99 Mu=(Mu+2.0)/2.0 aPoly[J]=Mu Next Su=0.0 ForJ=0To99 Su=X*Su+aPoly[J] Next Pu+=Su Next ReturnPu End PublicSubMain() DimIasInteger ForI=1To10 PrintTest(0.2) Next End
See also
[edit ]References
[edit ]- ^ "Releases · Gambas / gambas · GitLab" . Retrieved 2023年11月15日.
- ^ Gallo, François (2011年06月16日). "Gambas 3 OS X". AllBASIC. Retrieved 2023年09月28日.
- ^ djgpp (March 2021). "Gambas on Haiku?". Haiku . Retrieved 2024年02月25日.
- ^ a b "Gambas Documentation Introduction". Gambas Website. Retrieved 2017年10月09日.
- ^ Huges, Matthew (2015年03月03日). "The BASIC Guide to GAMBAS: All You Need To Know". MakeUseOf. Retrieved 2023年02月11日.
- ^ Upfold, Peter (2008年09月08日). "Gambas — Almost Visual Basic for Linux". FOSSwire. Retrieved 2011年05月07日.
- ^ Cook (2005年01月05日). "Gambas - a BASIC Development Environment". LWN.net. Retrieved 2024年02月25日.
- ^ "Gambas: A Fast Visual Basic for Linux". CodeFez. Archived from the original on 2009年09月09日. Retrieved 2007年04月04日.
- ^ "Gambas 3.0 for BASIC with bug and security fixes". The H. Retrieved 2012年01月05日.
- ^ "Benchmarking". Gambas Website. Retrieved 2018年02月11日.
- ^ "3.16.0 release notes". Gambas Website. Retrieved 2021年02月11日.
- ^ "Frequently Asked Questions". Gambas Documentation. Retrieved 2014年11月17日.
- ^ Larabel, Michael (2013年11月25日). "The Gambas Project: It's Like Visual Basic On Linux". Phoronix . Retrieved 2024年02月25日.
- ^ Upfold, Peter (2008年09月08日). "Gambas - Almost Visual Basic for Linux". FOSSwire. Retrieved 2024年02月25日.
- ^ Ratliff Sr., Gary L. (October 2008). "An Alphabet of Computer Languages: BASIC". PCLinuxOS Magazine. Retrieved 2024年02月25日.
- ^ Dee, Steve (2017年03月27日). "Gambas cli programming: ncurses text based user interface". Captain Bogdit. Retrieved 2023年04月15日.
- ^ a b Fernandez, Daniel (2004年11月11日). "Regarding Gambas". OSNews . Retrieved 2011年05月07日.
- ^ a b "Gambas RAD". Linux.co.uk. Archived from the original on 2011年08月29日. Retrieved 2011年05月07日.
- ^ "Why a new SDL component?". Gambas Mailing List. Archived from the original on 2015年02月09日. Retrieved 2015年02月09日.
- ^ Allen Holm, Joshua (2014年04月24日). "BASIC programming with Gambas for the beginner programmer". Opensource.com . Retrieved 2023年04月05日.
- ^ Akbar, Ade Malsasa (2022年01月28日). "Alternatives to Visual Basic". Ubuntu Buzz. Retrieved 2024年03月10日.
- ^ Mark Alexander Bain (2008年08月28日). "Gambas -- Almost Visual Basic on Linux". Suite101.
- ^ Frank Wieduwilt (October 2008). "Programming with the Gambas Basic IDE". Linux Pro Magazine. Retrieved 2011年12月10日.
- ^ AWC Electronics. "Physical Computing with Linux: A Rapid Approach using Gambas" . Retrieved 2012年02月18日.
- ^ Emms, Steve (2023年11月11日). "Gambas – development environment and a full powerful development platform". LinuxLinks. Retrieved 2024年02月25日.
- ^ "Differences from Visual Basic". Gambas Website. Retrieved 2020年05月01日.
- ^ "HBasic – Menghadirkan VB di Linux". 2005年12月06日. Retrieved 2023年09月26日.
- ^ "BASIC for Linux". Fredshack. Retrieved 2023年09月26日.
- ^ "HBasic IDE and language". SourceForge . 2007年01月16日. Retrieved 2023年09月26日.
- ^ Macoratti, José Carlos. "VB para Linux". Macoratti.net. Retrieved 2023年09月26日.
- ^ "GB - Basic for GNOME". GNOME . Archived from the original on 2005年02月05日. Retrieved 2023年09月26日.
- ^ Perr, John (2003年01月01日). "BASIC programming with Unix". LinuxFocus . Retrieved 2023年09月26日.
- ^ "KBasic: A VB-Like Rad/IDE For KDE". KDE.news. 29 September 2000. Retrieved 2023年09月27日.
- ^ Tranter, Jeff (2015年08月19日). "Using Qt with Alternative Programming Languages - Part 1". Integrated Computer Solutions. Retrieved 2024年02月25日.
- ^ Speed, Richard (2022年05月06日). "RAD Basic – the Visual Basic 7 that never was – releases third alpha". The Register . Retrieved 2023年03月26日.
FreeBASIC, which implements much of what lurked in Microsoft QuickBASIC (and has a nifty IDE in the form of VisualFBEditor).
- ^ Rogoz, Ivan (2022年04月07日). "Blast from the past - QBasic 4.5". Barn Lab. Retrieved 2023年09月26日.
QB64 comes with a WYSIWYG IDE editor called InForm which brings it closer to everyday use as a quick and dirty language for automation for Windows.
- ^ "23 projects tagged "Gambas"". Freshmeat. Archived from the original on 2013年09月28日. Retrieved 2012年10月28日.
- ^ "Application Repository". Gambas. Archived from the original on 2019年10月26日. Retrieved 2020年05月01日.
- ^ "GAMBAS BASIC Web site". GAMBAS BASIC. Archived from the original on 2011年05月12日. Retrieved 2011年05月07日.
- ^ "Gambas Examples". Piga Software. Retrieved 2011年05月07日.
- ^ Gambas games - Libregamewiki
- ^ "Gambas3 ShowCase". gbWilly. Archived from the original on 2016年01月10日. Retrieved 2013年09月22日.
- ^ Gambas Farm
- ^ Gambas Farm Server Protocol - Gambas Documentation
- ^ "Mailing Lists & Forums". Gambas Web site. Archived from the original on 2021年03月01日. Retrieved 2021年04月04日.
- ^ xt7-player-mpv - linux-APPS.com
- ^ XT7-Player – Best Video Player for Kubuntu / KDE - Ubuntu Handbook
- ^ Xt7-Player Is A Fully Featured Mplayer GUI - Web Upd8
- ^ Szabo, Vincze-Aron. "Getting System Info with I-Nex". Linux Magazine . Retrieved 11 November 2024.
- ^ Akbar, Ade Malsasa (21 April 2015). "I-Nex, An Advanced CPU-Z Hardware Utility for Linux". Ubuntu Buzz. Retrieved 11 November 2024.
- ^ Sneddon, Joey (24 November 2014). "i-Nex – A CPU-Z Hardware Stat Tool for Linux". OMG Ubuntu!. Retrieved 11 November 2024.
- ^ "comisat Games Collection 0.5.2 review". Nixbit. Retrieved 2023年02月08日.
- ^ Buse, Jarret W. (2014年08月18日). "GAMBAS Overview". Linux.org. Retrieved 2024年02月25日.
- ^ Gambas on Windows - Alternative
- ^ Morgan, R. (2014年06月29日). "How to Run Gambas on Windows". Gambas Magazine. Archived from the original on 2016年12月10日.
- ^ Running Gambas Programs in Windows - PigaLore, the Piga Software Wiki
- ^ Gallo, François. "A step forward in Gambas!". gambas-user. Archived from the original on 2017年02月10日. Retrieved 2023年04月07日.
- ^ djgpp (March 2021). "Gambas on Haiku?". Haiku . Retrieved 2024年02月25日.
- ^ New version of Gambas 3.15.2 is already available on rollApp.
- ^ Gambas Future or what kind of Gambas we want Archived 2014年02月27日 at the Wayback Machine, Gambas Mailing List
- ^ Cygwin Install Guide - Gambas Wiki
- ^ gambas3 package - Cygwin website
- ^ Morgan, R. (2014年06月29日). "How to Run Gambas on Windows". Gambas Magazine. Archived from the original on 2016年04月08日.
- ^ How To Run Gambas On Windows - Gambas Wiki
- ^ Dovey, John. "How to run Gambas and Gambas Apps on Windows using WSL". Gambas Wiki. Retrieved 2024年02月25日.
- ^ Gambas on Windows, Gambas-One
- ^ Vasques, Daniel (2023年01月09日). "How To Run Gambas In Ubuntu". Elneson-santafe. Archived from the original on 2023年02月11日. Retrieved 2023年02月11日.
- ^ Windows 11, Gambas-One
Further reading
[edit ]- Mark Alexander Bain (Apr 28, 2006) An Introduction to Gambas , Linux Journal, 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
[edit ]- Official website Edit this at Wikidata
- Gambas on GitLab
- Gambas documentation
- Gambas mailing list Archived 2018年01月27日 at the Wayback Machine
- Gambas One, English community
- Gambas India, community and source code repo
- 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