BASIC (especially "VB" functional equivalents) on Linux
Note: This page may be, for most people, a classic in the category of solving the wrong problem. If you're simply looking for a "visual", novice-friendly programming environment, there are many good non-BASIC choices. Views differ on the matter, but you might start with Python. (The remainder of this page is for the irredeemable "No, I really do want something close to VB / ASP / VB.net" people.)
If you insist on 100% code compatibility with Visual BASIC (any version of that moving target, VB.net, VBScript/ASP, or otherwise, not to mention compatibility with all of its mutually incompatible versions), you're probably out of luck permanently. However, if you want something better than VB that runs on Linux, please read on:
- GAMBAS (GAMBAS Almost Means BASic)
- GNOME BASIC (dead project: see Mono)
- Mono and mbas
- Arrowhead ASP (VB in Java)
- Sun Java System ASP (formerly SunONE ASP, formerly Chilisoft ASP; proprietary)
- StarOffice BASIC aka StarBASIC (in StarOffice and OpenOffice.org)
- KBasic (proprietary)
- GNU/Liberty Basic
- Real BASIC (proprietary)
- Phoenix Object BASIC (proprietary)
- VBIX from Halcyon Software, Inc.: defunct
- [many more]
- [and even more]
GAMBAS (GAMBAS Almost Means BASic)
This project aims at making a graphical development environment based on a Basic interpreter, so that we have a language like Visual Basic under Linux.
The phenomenal quantity of bugs and inconsistencies that makes Visual Basic so delightful persuaded me to start this project ;-)
It seems that Microsoft is aware of the poor quality of its language, as VB .Net is not backward compatible with older versions of Visual Basic. I think they have thrown away the Visual Basic interpreter source code, and that VB .Net is just a .Net runtime compiler whose syntax looks like the Visual Basic one. Well, it's just my own opinion... ;-)
I want to clear up any misunderstanding immediately. Gambas does not try to be compatible with Visual Basic, and will never be. I'm convinced that its syntax and internals are far better than the one's of its proprietary cousin ;-)
I took from Visual Basic what I found useful : the Basic language, the development environment, and the easiness to quickly make programs with user interfaces.
But I dislike the very bad level of common Visual Basic programmers, often due to bad pratices imposed by the bugs and strangeness of this language. So I will try to make Gambas as coherent, logical and reliable as possible, and I hope that Gambas programmers will make effort in return ! ;-)
At the moment, I'm looking for programming help. The kernel of Gambas is now stabilized, if not well documented. There is a component example to help people learning how to write components.
I hope other people will join me to help to increase the possibilities of the language. There is so much to do !
I will try to depict the main features of Gambas and what sets it from the other languages.
Gambas is, before all, a Basic language with object extensions. A program written with Gambas is a set of files. Each file describes a class, in terms of object programming. The class files are compiled, then executed by an interpreter. From this point of view, it is very inspired by Java.
Gambas is made up of the following programs :
* A compiler.
* An interpreter.
* An archiver.
* A graphical user interface component.
* A development environment.
The development environment is written with Gambas itself, so that I can show the abilities of the language. And it is very useful for debugging ! What are the features that set Gambas from the other languages ?
1. A Gambas project is stored under one directory. The
transforms the project directory structure in one sole executable
2. Compiling a project only requires the compilation of the modified classes. Every external reference of a class is solved dynamically at the execution time.
3. Gambas has a component architecture that allows to extend the language. Anyone can write components as shared libraries that dynamically add new native classes to the interpreter. The component architecture will be freely documented as soon as possible.
4. By default, the Gambas interpreter is a text-only program. The component architecture is used for writing the graphical user interface part of the language.
5. As the graphical user interface is implemented as a component, Gambas will be able to be independent of any toolkit ! You will be able to write a program, and choose the toolkit later : GTK+, Qt, etc.
6. I have decided to start implementing the graphical user interface with the Qt toolkit, as it is easier for me. Later, I will write a GTK+ component that will have almost the same interface as the Qt component. I think GTK+ 2.0 will have enough features to be as powerful as Qt 3.0 7. Any window or dialog box can be used like a control. You cannot do such a thing with Visual Basic without using ActiveX (bless you ! I know, I'm a bit allergic too ;-) ).
8. Gambas projects are easily translatable, in any language. Well, to be honest, I'm not sure for Arabic, Japanese and Chinese...
GB - Basic for GNOME
This project is deprecated ...
The Gnome Basic project died a death of stagnation many moons ago. However - the great news is that some of the code, and the hackers live on inside Mono.
Mono is an exciting project that already far surpasses Gnome Basic, it provides large chunks of .Net including an in-progress VB.Net compiler, and a nicely performing JIT. You can find the latest information on mbas the Mono Basic compiler here.
What is Mono?
Mono is a comprehensive open source development platform based on the .NET framework that allows developers to build Linux and cross-platform applications with unprecedented productivity. Mono's .NET implementation is based on the ECMA standards for C# and the Common Language Infrastructure.
Sponsored by Novell, the Mono project has an active and enthusiastic contributing community. Mono includes both developer tools and the infrastructure needed to run .NET client and server applications.
Mono includes a compiler for the C# language, an ECMA-compatible runtime engine (the Common Language Runtime, or CLR),and class libraries. The libraries include Microsoft .NET compatibility libraries (including ADO.NET and ASP.NET), Mono's own and third party class libraries.Gtk#, a set of .NET bindings for the gtk+ toolkit and assorted GNOME libraries can be found in the later. This library allows you to build fully native Gnome application using Mono and includes support for user interfaces built with the Glade interface builder. Furthermore, Mono's runtime can be embedded into applications for simplified packaging and shipping. In addition, the Mono project offers an IDE, debugger, and documentation browser.
mbas: Mono's VisualBasic.NET Compiler.
MonoBASIC (mbas) is a CIL compiler for the VisualBasic.NET language, an extended version of Visual Basic. It's based on the MCS compiler and still in heavy development, though many language features are already supported. See mcs/mbas/
2007 addendum: Mono version 1.2.3 now fully supports VB.NET (Visual BASIC 8.0), in "preview" quality. (There are said to be still some missing methods.) The new MonoDevelop v. 0.1.3 open source IDE will include updated support for the new VB compiler.
ArrowHead ASP Server is a Java Servlet that supports the ASP syntax and the VBScript programming language. It aims to support VBScript version 3.1 and the standard set of COM objects, but has a little ways to go, yet. It is extendable using Java objects and the Server.CreateObject syntax. It has been developed and tested under Apache 2.x and Tomcat 5.0.x, but should run under any Java servlet server.
Sun Java System ASP
Sun Java System Active Server Pages 4.0
Java System Active Server Pages (formerly Sun ONE Active Server Pages) software is a secure, enterprise-class Active Server Pages (ASP) engine for the Sun Java System Web Server (formerly Sun ONE Web Server) and Apache Web server. Java Active Server Pages (ASP) is designed to help organizations deploy new or existing ASP applications within a secure and reliable Web infrastructure, such as the Java System Web Server running on the Solaris Operating System. The new version 4.0, adds support for Microsoft ASP 3.0, VBScript/JScript 5.5, and XML, and includes enhancements to its COM-to-Java technology bridge and integration with popular Web authoring tools, such as Macromedia's Dreamweaver MX and Microsoft FrontPage.
At a Glance
Java System Active Server Pages enables the iForce Secure Web Server Solution for ASP-based Web applications.
- Sun Java System Web Server (formerly Sun ONE Web Server) integration
- Support for VBScript 5.5 and JScript 5.5
- MySQL Database Management System (DBMS)
- Configurable Multi-threading
RESISTANCE IS *NOT* FUTILE
asp2php will take Web pages written for Microsoft's ASP and convert them to PHP. asp2php works mostly on VBScript, but some JScript support has been added. [...]
Which database drivers does asp2php support?
Does asp2php support MS SQL Server?
At this time, no. I do not plan on adding that in because I don't have copies of Windows NT or MS SQL to test it on. Yes, I know you can get trial versions of them, but if I'm going to do this I want to do it legal (full versions). Anyway, there are some alternatives to using PHP/MS-SQL Server support:
- FreeTDS http://www.freetds.org/ will allow you to make connections to MS SQL Server databases through Sybase calls.
- Oracle has a free tool to convert MS SQL Server databases into Oracle. You can find it at http://otn.oracle.com/tech/migration
- ODBC is not a bad idea, but keep in mind that running through an ODBC layer slows things down. I found with the UnixODBC driver,
- Postgres and MySQL seem to go about 1/2 speed.
- Convert your MS SQL Server database to MySQL or another database by creating database links through MS Access.
I have an Access database and want to use PHP. What do I do?
You have two choices. If you run PHP on Windows you can use ODBC. Or there are programs that can convert your Access database into MySQL. You can download that from this link.
Will asp2php handle sessions?
Yes. Asp2php uses the built-in PHP4 session features. Please read the notes section for more info.
Will asp2php convert everything?
No. It's not finished and probably never will be 100% done. But it will do the best it can. If it doesn't convert something you can do those sections by hand or email me the problem and I will try and take care of it when I get a chance.
Will asp2php do COM objects that I made in VB or C?
ASP2PHP does not support COM objects.
From Wikipedia, the free encyclopedia.
StarOffice Basic (also known as StarBasic) is a dialect of Basic that is included with the OpenOffice.org and StarOffice suites of office software. It supports Unicode.
Although StarBasic itself is similar to other dialects of Basic, such as Microsoft's VBA, the API is very different [...].
StarOffice 7 Office Suite - Basic Programmer's Guide, English
Download this book in PDF:
This guide provides an introduction to programming with StarOffice 7 Basic and indicates the possible applications provided by using StarOffice Basic in StarOffice. To get the most out of this book, you should be familiar with other programming languages. Extensive examples are provided to help you quickly develop your own StarOffice Basic programs.
BASIC in UNO and OpenOffice.org:
Basic is a scripting language directly integrated in OpenOffice.org. OpenOffice.org is based on the language independent component model UNO. In the moment it's not possible write components in Basic. But already existing components and the complete OpenOffice.org API based on UNO can be accessed from Basic.
The following list contains some sources that explain how Basic can be used for accessing UNO:
- The general functionality of StarBasic is described in the OpenOffice.org online help system.
- Description of the UNO/Basic language binding: Developers guide , chapter ProfessionalUNO.pdf, paragraph 3.4.4 Basic. This document is part of the UNO Developer Manual. Although only the Basic chapter contains explicit information about UNO programming with Basic, the whole document can also be useful for Basic programmers as a general UNO development overview. * API related information about the Basic programming language: UsingBasic.xml (this DRAFT document will become part of the UNO Developer Manual).
- The Integrated development Environment used to write Basic programs and to design dialogs the can be used from Basic is described in: BasicIDE.xml (this DRAFT document will become part of the UNO Developer Manual).
- Description of the toolkit controls that are used to create Basic dialogs and the corresponding API: ToolkitControls.xml (this DRAFT document will become part of the UNO Developer Manual).
- The organisation of Basic libraries and the corresponding API is described in: BasicLibraries.xml (this DRAFT document will become part of the UNO Developer Manual).
- A simple UNO developers guide can be found here: Tutorial.pdf. This is an older document and refers to the UNO API in StarOffice 5.2 but in general it's still valid for StarOffice 6.0 / OpenOffice.org.
Full featured Object oriented modern BASIC language for Windows and Linux
The third public preview is expected in February 2005. It's almost finished in a way so that it is useable to develop Qt applications with well known BASIC syntax in a modern fashion. It comes with true OO and backward support for vb6 and qbasic, as it is 100% !syntax! compatible.
The Personal Edition is free. KBasic Professional will cost little money.
X11-Basic is a Basic interpreter with full X graphic capability. The syntax is most similar to the old GFA-Basic ATARI-ST implementation. Old GFA-Basic programs should run with only few changes. The actual implementation runs on UNIX workstations (DEC-alpha, HP-UX, FreeBSD, Mac-OSX, CygWin) and Linux-PCs (SuSE, Rethat, Mandrake ...) with the X Window system. The WINDOWS 95/98/NT-Version is still incomplete.
You can use the X11-Basic interpreter as a shell. Also for execution of CGI-Scripts. A pseudo compiler is shipped with the interpreter so that you can make stand-alone binaries out of your programs. You can do any data manipulation and you may use external functions and libraries. At least the X11-Basic interpreter is fast and small.
WSBasic is a basic interpreter written entirely in C++ without the use of lex or yacc. It shows how one can create a compiler or interpreter using some simple classes to parse and/or execute script code. It is a good way to fully understand how a parser/compiler actually works, at least that was the original purpose of this project. Later I added the ability to run shell commands just like in bash scripting and this gives the project also some nice practical use.
Finally a scripting language that has an easy syntax (for some reason bash just doesn't work like I want it too :). If you're also one of those people, like me, who needs to look at the man pages over and over again before being able to write that simple bash script that does not give parse errors, this project is probably worth looking at.
This is a free BASIC interpreter. Is it just another after the so many costly and free interpreters? Well, you can decide, here it goes:
ScriptBasic implements a rich set of instructions that are available under Win32 as well as under Linux/UNIX. Programs written in ScriptBasic are portable unless you work hard to insert some system specific code.
If you miss some functions in the language itself there are external modules that implement several features, like CGI handling, MySQL access, regular expressions, graphical user interface, NT/UNIX specific functions (in case you really need something system dependant) and several others.
If you need some more that is not currently available you can ask for it on the ScriptBasic mailing list or you can easily write your own modules in C. ScriptBasic internals, source code and interfaces are well documented. To get a jump start you can even listen to audio/slide show tutorials. Subscribe to the mailing list now!
ScriptBasic is fast, it generates a compact internal code, which is interpreted. This internal code occupies a single, continuous memory chunk and is usually saved into a cache file. The cache file is automatically checked by ScriptBasic and thus it compiles the source only when needed.
You can also save this code into separate file and deliver it as your application without giving out your source code. This is to protect your intellectual property if you wish to use it. What is more ScriptBasic can be compiled to C and this way you can generate standalone executable on UNIX as well as on Win32 operating systems free of charge.
To program Web application you can use ScriptBasic as a CGI interpreter, but there is even a better way. ScriptBasic is integrated into a standalone webserver that executes ScriptBasic programs in a single process without the CGI overhead lighting fast. Under Windows NT you can install this web server as an NT service and use it several ways. This application named Eszter SB Application Engine is supported by the CGI and the MT module allowing you to use in-memory application and session variables without file read/write overhead.
Finally: ScriptBasic is LGPL. This means that you can use it, alter it, extend it, embed it. The extra L before GPL says that you can embed it even into commercial application that you sell for money. (In that case, however consider the commercial suport delivered by EMMAnet ScriptBasic partners.) Note that some external modules use libraries that have their own licence!
To get more information why we have created another BASIC interpreter and to let us tell you why this is not a JABI (just another BASIC interpreter) see the on-line tutorials with audio support and the documentation.
The GNU/Liberty Basic Compiler Collection (GLBCC) is a suite of tools designed to allow Windows and Linux users to compile Liberty Basic code to a standalone application. GLBCC uses entirely independent and entirely free libraries to generate super small and super fast executables that have no external dependency. The project originally started as a single utility to convert Liberty Basic code to C but quickly became an integrated compiler system.
The GLBCC suite is composed entirely of Free Software and can be downloaded at the download page . There is a great deal of documentation available on installing, using, and contributing to GLBCC at the documentation page . If you have a question about installing or using GLBCC, please consult the appropriate Frequently Asked Question file on the documentation page. If that does not answer your question, you can either post a message to the help forum at the SourceForge page, or if your problem is of a technical nature, you can post to the GLBCC mailing list. Otherwise, you can contact the current maintainer of GLBCC Anthony Liguori .
There has for many years been a strong need for a real compiler for Liberty Basic. Liberty Basic programs traditionally were quite slow and distribution required distributing your code in a tokenized format along with a run time engine, and a bunch of dll's that all together topped 1.5MB. Liberty Basic also does not exist in any form on Linux. The one thing Linux has always seemed to lack, was a simple language for creating GUIs.
Most importantly, this project is a prime example of the why not philosphy. It's a pretty cool concept and it is pretty fun to work on, so why not do it.
Normally, a compiler consists of a pre-processor, a language compiler that generates assembly code, an assembler that generates object files, and a linker that actually generates an executable. GLBCC works by adding another tool that allows Liberty Basic code to be compiled by GCC. This tool is called LBPP. There is also a runtime library that provides all the necessary run time functionality. This library is called libLB. Another tool by the name of GLBCC (GNU/Liberty Basic Common Compiler) is included that acts as a front end to allow for a user friendly development environment.
This project is currently being maintained by Anthony Liguori . For a complete list of all contributors, see the AUTHORS file in the top level of the GLBCC distribution.
The Brandy Basic V Interpreter
What is it?
Brandy is an interpreter for BBC Basic (or Basic V as it is refered to here) that runs under a variety of operating systems. Basic V is the version of Basic supplied with desktop computers running RISC OS. These were originally made by Acorn Computers but are now designed and manufactured by companies such as RiscStation, MicroDigital and Castle Technology.
What does it run on?
The interpreter runs under RISC OS, NetBSD, OpenBSD, reeBSD, Linux, Mac OS X, Amiga OS, DOS using the DJGPP DOS extender and Windows as a console application. The program is written in ANSI C and comes in source form so it should not be difficult to compile it to run under other operating systems.
Brandy is distributed under version 2 of the GNU General Public License.
The current version of the program is 1.16 (January 2004).
REALbasic is the powerful, easy-to-user tool for creating your own software for Windows, Linux, Macintosh.
- Support Standards: SOAP, XML, SSL, HTTP, SMTP, POP, UDP
- Connect to databases: Oracle, Sybase, MySQL, etc.
- Deploy Windows applications with no external DLLs
- Full support for older versions of Windows
- Easy to learn for non-traditional programmers
- Automate MS Office applications to create custom business solutions
- Connect to databases MySQL, Openbase, Filemaker, 4D, etc.
- Write once and deploy native applications for Windows, Linux and Mac
- OOP RAD features deliver high productivity
- Thriving community of third-party plug-ins
Visual Basic Users
- Port existing VB projects with free conversion tool
- Familiar development process, environment
- Similar syntax to VB6
- Easy to learn: built-in Tips and language reference
- Low price: $99.95 for Standard Edition
- Supportive Community: books, magazines, mailing lists
Phoenix Object BASIC
Phoenix Object Basic is the perfect tool for Windows business application developers that want to deploy their skills in mixed Windows and Linux environments:
- Rapid Application Development for Linux and Windows
- Very short learning curve for VB or Access developers
- Fully object-oriented: use inheritance and polymorphism
- Small executables, Fast execution
- Easy to distribute applications
Rapid Application Development for Linux
Phoenix is an object-oriented RAD tool for Linux and Windows. It features the well-known visual design paradigm, where developers can 'paint' controls onto a form and build the functionality by setting object properties and defining object methods.
The Phoenix "GUI" library provides windows, forms, menu's and data aware controls, such as buttons, labels, listboxes and comboboxes, frames, etc. The "DB" library brings you database access, through database, dynaset and recordset objects.
The IDE features a source level debugger with breakpoints and watchpoints, single stepping and animated execution. The IDE is largely programmed in Phoenix Object Basic, so you can modify it to suit your precise needs.
Very short learning curve for VB or Access developers
Phoenix implements a full featured Basic language, that incorporates all the features you have come to expect from a production quality development language:
- User defined datatypes, including objects
- Exception handling with Try ... Catch and Throw
- User defined events
- Enumerated types
- Modular organisation of each project
- Ability to call functions in external libraries
- Ability to create components
Try it yourself, or read more about the language features in the documentation.
Fully object-oriented: use inheritance and polymorphism
Phoenix Object Basic extends the traditional Basic syntax to become fully object-oriented. The TYPE ... END TYPE syntax not just declares a datatype, but a class signature. Type definitions can include regular variable declarations, but also method and event declarations for that class signature.
- Inheritance: A new class signature can inherit from an existing one by using the TYPE ... FROM ... END TYPE syntax. The derived signature can override methods when needed.
- Polymorphism: Objects with a derived signature can be assigned to variables of the parent type; when an overridden method is called on that variable, the derived method is invoked (in C++ terms: a method is always virtual).
Fast execution, small executables
Phoenix compiles the Basic source code to an optimized bytecode representation. The bytecodes are executed by an efficient runtime engine. On a low-end 100Mhz Pentium machine, Phoenix executes in excess of 15,000 lines of code per second.
The executable works with a shared runtime library. This enables individual applications to be stored in small files, all working with one shared copy of the runtime library.
Specialized objects are placed in individual libraries, such as the GUI component library, the database library, etc. Phoenix only loads those libraries that your application needs, reducing memory need and start-up time.
Easy to distribute applications
The core Phoenix engine is all contained in one file and requires no special configuration files or settings. The standard Phoenix distribution further has 3 standard libraries (GUI, file access, database), which again require no configuration files. There are no fees for redistributing these files along with your application.
VBIX by Halcyon Software, Inc.: defunct
Halcyon Software, Inc. used to product a proprietary runtime for Unix platforms (including Linux) equipped with Motif, that allowed Visual BASIC 3.0 applications to be run directly on Unix without change. It also included an IDDE (Integrated Development & Debugging Environment) and a P-code compiler.
The company appears to be defunct. This entry is present to help prevent people wasting time chasing after the product, as that appears to be both obsolete and no longer available. (It is still frequently cited in other online lists of BASIC development tools for Linux.)
From: Jimmy O'Regan (email@example.com)
Subject: Re: [TAG] LILO error: boot.b file too small
Date: Wed, 26 Mar 2003 19:47:15 +0000
How about GB (Gnome Basic), Arrowhead ASP (VB in Java), Chilisoft ASP (or SunONE), ASP2PHP, StarBasic (in OpenOffice.org) and I saw a Qbasic/VB 1 clone around somewhere...
[A Web forum post of mine]
From: Rick Moen (firstname.lastname@example.org)
As long as you're listing those thingies:
BASIC with object extensions using a virtual-machine runtime (thus an interpreter). A compiler, IDE, and other development tools are also provided.
Similar to the Atari ST's Gfa-Basic. BASIC interpreter with full X11 support.
A console-mode BASIC interpreter coded in C++.
A console-mode BASIC interpreter in C.
GNU/Liberty Basic Compiler Collection: http://lbpp.sourceforge.net/
GCC extensions to support compiling Liberty BASIC, including an IDE.
An interpreter for the old BBC Micro's BBC BASIC.
Star Office (and thus OpenOffice.org) offers StarBASIC.
But... can we talk? BASIC is crud. It's always been crud, no matter how many COM/ADO/MTS/DCOM geegaws you pile on top of it. Some of the graphical development environments for it have been nicely done, but none of the Microsoft implementations have had real object orientation, let alone inheritance and other elements of decent, modern language design. None of that stuff can hold a candle to Python.
But, hey: Open source is about free-as-in-freedom. If people insist on eating fast food, they can have it their way.
P.S.: Former VB coder Marc Boorshtein thinks likewise: http://freshmeat.net/articles/view/187/
[RM footnote to this page as a whole: By the way, in case any young'uns are wondering: I correct "Basic" to "BASIC" in most references (above) because the language's name, given to it by creator John Kemeny, is an acronym standing for "Beginners' All-purpose Symbolic Instruction Code".]