Powerbasic Museum 2020-B

IT-Consultant: Charles Pegge => Other PC OS Distributions => General Linux Tips, Links, Comments => Topic started by: Donald Darden on May 01, 2008, 05:35:22 AM

Title: Programming Options for Linux
Post by: Donald Darden on May 01, 2008, 05:35:22 AM
A big complaint about Linux is that it isn't Windows.  Duh, what did you expect?  But that does not mean that it lacks its own attractions, one being that many development tools, languages, and scripting capabilities exist for it, and most of them are free.  That's hard to beat.

This thread will focus on identifying some of these, and imparting some idea of what they are, what they are good for, and how they stack up against other choices.

I will start with these links:

Which Programming Language?
http://www.linuxjournal.com/article/4402

Programming - Free and Open Source Educational Softwarel
http://os.cqu.edu.au/oswins/doc/programming.html

How does your OS compare ?
http://people.freebsd.org/~murray/OS.pdf

Linux Applications – The Reality
http://www.kurups.org/write/applications.html

AWK as an Engineering Tool
http://www.tikmark.com/

Scratching the Surface
http://news.squeak.org/2007/01/23/scratching-the-surface/

Comparison between FreeBSD, Linux and Unix
http://www.quadrahosting.com.au/software/freebsd-linux-windows-comparison.html

All MKS Toolkit Commands
http://www.mkssoftware.com/products/tk/commands.asp

Evolution Of Programming Methodology
http://www.billswrite.com/Cols/Column10.htm

awk
http://wiki.tcl.tk/2695

Programming : Scripting Languages
http://unix.cms.gre.ac.uk/software/scriptlang.html

Freebyte's Guide to... Free Programming
http://www.freebyte.com/programming/

Software : Programming : Languages : Procedural

KBasic
http://www.download32.com/kbasic-i36914.html

Programming
http://www.linux.org/docs/ldp/howto/HOWTO-INDEX/programming.html

Programming Languages and Tools
http://os.cqu.edu.au/oswins/doc/programming.html

REALbasic for Windows, Macintosh and Linux.
http://www.realsoftware.com/

Ruby
http://www2.ruby-lang.org/en/20020102.html

Software : Programming : Languages
http://www.linuxlinks.com/Software/Programming/Languages/

Euphoria
http://www.rapideuphoria.com/

Blassic. The classic basic.
http://blassic.org/
Title: Re: Programming Options for Linux
Post by: Donald Darden on May 01, 2008, 06:54:50 AM
Chipmunk Basic for MacOS, Windows, Linux
http://www.nicholson.com/rhn/basic/

PureBasic for MacOS, Windows, Linux, AmigaOS
http://www.purebasic.com/

Visual Linux BASIC Compilers
http://librenix.com/?inode=4033

wxBasic Programming Language
http://wxbasic.sourceforge.net/

Computers: Programming: Languages: BASIC
http://www.dmoz.org/Computers/Programming/Languages/BASIC/

Liberty BASIC v5.0 for Linux Screenshots
http://basicprogramming.blogspot.com/2006/06/liberty-basic-v50-for-linux.html

Linux Basic
http://www.linuxbasic.net/

Programming : Languages : Procedural
http://www.linuxlinks.com/Software/Programming/Languages/Procedural/index.shtml

Free BASIC Compilers and Interpreters
http://www.thefreecountry.com/compilers/basic.shtml

FreeBasic
http://www.freebasic.net/

THE BASICs PAGE
http://basic.mindteq.com/List.asp
Title: Re: Programming Options for Linux
Post by: Marco Pontello on May 01, 2008, 01:24:48 PM
For any BASIC liking developer, and especially the ones used to PB (and eventually waiting for a Linux version of it), I highly recommend FreeBasic (http://www.freebasic.net/).
If you checked it years / months ago, re-check it.
The project is progressing very well, it's fully usable, and the forum community (http://www.freebasic.net/forum/) is very active and eager to help (more than 3000 users with near 100K posts).
Title: Re: Programming Options for Linux
Post by: Charles Pegge on May 01, 2008, 02:37:39 PM

I second that!

It is possible to produce source code which is compatible with both PowerBasic and FreeBasic, if you stick to the fundamentals. But FB is generally stricter with data types and uses a different mechanism for its dynamic strings so extra care is needed when mixing DLLs and programs between the two dialects.

Going between Windows and Linux, FB console programs require little or no changes to the source code. Using window GUIs is a different matter and people rely on standard librariess like wxWidgets and SDL to provide cross-platform compatibility.

Title: Re: Programming Options for Linux
Post by: Edwin Knoppert on May 01, 2008, 02:54:14 PM
mono-project
http://www.mono-project.com/Main_Page
Title: Re: Programming Options for Linux
Post by: Donald Darden on May 02, 2008, 03:28:58 AM
I previously took a look at FreeBasic, even tried to see how compatible it was with PB/CC.  Fact is, it proved to be a challenge to write source code that would work with either PB or FB.  In structure, FB bore a greater resemblance to PB/DOS and QuickBASIC.

I am not trying to say anything negative about FreeBasic, just make some observations about the impression that it made on me.  From what I read, it a superset of the QuickBasic language written in C. 

If you are coming from a background in PowerBasic's PB/CC or PB/Win, you are probably accustomed to working with the provided IDE (Interactive Development Environment), or what some people call the Editor.  In fact, for PB/CC, the IDE is named CCEdit.exe, and for PB/Win, it is called PBEdit.exe.  Some people prefer to use a different Editor or IDE, then call the PowerBasic compilers to do their job in converting the source code into an executable file, or in the case of PB/Win, the optional DLL file.

So you might say that look and feel of PowerBasic is really your experience in the IDE, which provides a Windowed interface and editor, and allows you to preset and customize its behavior.  But FreeBasic is presently lacking its own GUI IDE, so using is like using PowerBasic with an external editor of choice.  You write your source code with your prefered text editor or whatever, then call the FreeBasic compiler to create the final program.

Getting FreeBasic for any OS is as simple as visiting www.freebasic.net and downloading it.  You should check back periodically for updates, as the product is being constantly reviewed and improved.  It usually is downloaded as a compressed file, so you expand it into its own folder.  Then you read the readme.txt file for instructions for installing it to your system.  It comes complete with a manual and lots of examples to get you started.  You should be able to call the compiler by its short name, which is fbc.  This would involve the Start/Run or MSDOS compatibility mode in Windows, or the use of a Terminal Console in Linux.

But let's consider the matter of an IDE for FreeBasic as well.  After all, the IDE gives its own flavor to the development process, and a good one is almost essential for most people.  If you look at the www.freebasic.net website, you will see that there are several available editors for FreeBasic, but at present they are ony offered for the Windows platform.  That's not good news if you are considering using Linux instead.

There is a poster on the forums that is working (or has wored) on a Linux IDE for FreeBasic.  Here is a link to his verson, which I believe is called the Muddy IDE:
http://www.freebasic.net/forum/viewtopic.php?p=99147

I also found a download link to RQ Debugger IDE b455, which is an IDE that supposedly works with Rapid-Q and FreeBasic:
http://www.topshareware.com/RQ-Debugger-IDE-download-39717.htm
The trouble is, that development work on Rapid-Q ceased long ago, and I think this IDE is an orphan. I'm mot even sure if it runs on Linux.

A thread on adapting  Geany or using VIM for a FreeBasic editor (with keyword highlighting):
http://www.freebasic.net/forum/viewtopic.php?p=95589&sid=36f168e021dec727d044a4e12b451487

Some more links for IDEs can be foundhere:
http://os.cqu.edu.au/oswins/doc/programming.html
Title: Re: Programming Options for Linux
Post by: Marco Pontello on May 02, 2008, 03:44:31 AM
For anyone used to Paul's JellyFish Pro (http://www.planetsquires.com/jellyfishpro.htm), there's a corresponding version for FreeBASIC (http://www.planetsquires.com/jellyfishpro_freebasic.htm) that works like a charm.
About the language, it's true that it can be more similar than the good old QuickBASIC than PowerBASIC is, and I think that generally this can be a plus. But very advanced feature aren't surely missing. Now the compiler can switch between various mode, more strict to the old QB (for maximum compatibility), or more modern.
Even the docs are in a very good state now.

I had the experience of porting various console projects from PB/CC to FreeBASIC, and the process was more simple that I expected. Similary, maintaining a single source and compile it both for Windows and Linux (again, I'm speaking about console applications) isn't much of a problem. Definitely a viable option.

A serious plus of FreeBASIC is that it come with a lot of libraries with complete headers and samples, just about ready to use.
Title: Re: Programming Options for Linux
Post by: Donald Darden on May 02, 2008, 04:53:07 AM
Here is a link to some free programming editors and IDEs.  Some of them are open source, meaning source code ought to be available, and some claim to be highly customizable.  Some are Windows-specific, while others don't specify.

Free Programmer's Editors, Integrated Development Environment (IDE), ASCII Text Editors
http://www.thefreecountry.com/programming/editors.shtml

I believe that FreeBasic will catch on far more so than present when a cross-platform IDE for it becomes available.  Until then, it will feel too geeky and awkward to anyone that is accustomed to the PB IDE for all their coding needs.
Title: Re: Programming Options for Linux
Post by: Marco Pontello on May 02, 2008, 11:46:52 AM
Uhm... I think that the PBIde haven't any particular feature that make it really special, so that a lot of Win developer already use something differents. Programmer's editor are very common (and more so under Linux), and it's highly probable, IMHO, that many developers already have a preferred editor that will be more than appy to use, simply adapting it to FreeBASIC: with a syntax file and a couple of parameters to run the compiler and parse the results, is a pretty common and easy job.
Title: Re: Programming Options for Linux
Post by: Charles Pegge on May 02, 2008, 01:50:21 PM
I must confess to preferring very basic IDEs. When dealing with datafiles, batch files, basic code, assembler and scripts at the same time in two operating systems, Homogeneity, becomes important. There are insufficient brain cells remaining to accommodate different IDES. :)

In MS it's the console and Notepad, in Linux its the Bash terminal and Kwrite. In the 90's I developed a DOS based smart editor with automatic hyperlinking which made up for a lack of multiple windows. Unfortunately the XP implementation of DOS broke it, and eventually I got used to windows.

The automatic hyperlinking idea may be worth reincarnation. Something with very few controls to think about.
Title: Re: Programming Options for Linux
Post by: Donald Darden on May 02, 2008, 09:11:34 PM
While you are thinking about IDEs for products that lack them, here is one that comes equipped:  RealBasic

I just got the trial version, and am going to be taking a closer look at it;

http://www.realbasic.com/
http://www.academicsuperstore.com/products/Real+Software?sourcecode=lcg&promocode=0DYR0001&gclid=CJ2L95rAiJMCFQpMGgodRQGWfg
http://en.wikipedia.org/wiki/REALbasic

To show that I am not siding with any particular vendor's products, here is another link for another choice:  KBasic
http://www.kbasic.org/download.html

Hmmm.  A quick glance at RealBasic is promising, and the trial license is good for about 6 months.  But the Gotcha! must be ... the prince.  Yep,  I indicated that I wanted to buy it, and though they offer some package deals, prices start at $500.
You might qualify for an academic license, which is a huge discount, but that means having an academic email address to use when you order.  And you have to pay for each platform that you want it for.

I'm going to leave it on my PC for some comparisons, but KBasic is priced at about $35, and it also looks promising.  I think I will give it a shot first.
Title: Re: Programming Options for Linux
Post by: Donald Darden on May 02, 2008, 11:55:36 PM
I think it is important to clarify some issues here.  First, there are several elusive goals that people probab;y want, but may not be aware of until thay experience them one place and find the lacking in another.

The first is programs that will run on any platform.  By platform, the broadest definition would be totally different computer architectires and operating systems.  But in the narrower sense, it would only pertain to different operating systems on the same or similar computers.  Still, even with the narrower interpretation, there are many issues to resolve, and generally solutions like Java-based applications are slow in execution.

The second goal might be to use one source code that can compile and run on different platforms.  This would require a compiler that can compile to different computer architectures and OSes,  or several compilers that can each take the source code and render an executable program that performs in the same way on  different platforms.  a JIT (Just in Time) compiler might try to fill this need.

Rather than compilers, some resort to interpreters or pseudocode solutions.  The programming language then appears in a scripted (text-based) file and the instructions in it are interpreted, rather than converted into machine-specific instructions that doom the program to only run on one type of computer and under one family of OSes.  Interpreters are slow, and a just-in-time compiler is an attempt to convert it on the fly into faster code, but with some time penalty for the conversion process itself.  WxBasic is an interpretive language, but can create an executable that consists of the scripting part combined with the interpreter,  It looks like an exe file, but runs without an installed interpreter, is still slow because it is an interpretive program, and has significant file size (over 1 MB each) because the interpreter is included in the executable itself.

Another approach is to write source code that is compatible under a number of different compilers, some of those able to work on different platforms.  This requires a lot of standardization of language features, syntax, structure, and capabilities.  Very little of this is going on, as each language and compiler attempts to reach different objectives.  A special case found is in the PowerBasic products, where the intent is to allow the source code to be customized to the specific platform.  A limitation is that PowerBasic presently is only available for Microsoft Windows, and there are no announced plans at present for PowerBasic to attempt to support other platforms.

The next goal is have a common development experience, rather than striving to master multiple environments.  While certain comilers are offered that promise to work under different OSes, that does not mean that each OS gets the same level of support in terms available tools and libraries.  And while there might be really great IDEs offered for, oh let's say Windows, then that does not mean you can find a similar version of that IDE available under the MacOS or Linux.  You might find an IDE that is pretty good, but it will not look, feel, or work in quite the same way.  That puts you back to the point of coping with multiple environments again.
Title: Re: Programming Options for Linux
Post by: Donald Darden on May 03, 2008, 07:31:53 PM
Quote from: Marco Pontello on May 02, 2008, 11:46:52 AM
Uhm... I think that the PBIde haven't any particular feature that make it really special, so that a lot of Win developer already use something differents. Programmer's editor are very common (and more so under Linux), and it's highly probable, IMHO, that many developers already have a preferred editor that will be more than appy to use, simply adapting it to FreeBASIC: with a syntax file and a couple of parameters to run the compiler and parse the results, is a pretty common and easy job.

"Not really special"?  Well. I agree that it doesn't have much in the way of sex appeal, but it is highly functional and well integrated to the compiler, debugger, assembler, and help file system.  It allows you to step the program, set break points, query the contents of variables, explore include files easily, view and modify the registers, view the stacked calls, step in and out of routines, customize fonts and size, have several source files opened at the same time, specify various paths, compile and run from the IDE, and provides generic and in-context help.  It also provides syntax checking and syntax highlighting, and is logically (if somewhat plainly) arranged.  There has been some quibbling about the lack of Project and version control, and there is always someone that finds something they either don't like, or want added to the IDE.  But overall, you don't really need another IDE for PowerBasic, you just have the option to use one if you prefer. 
Title: Re: Programming Options for Linux
Post by: Marco Pontello on May 03, 2008, 07:42:44 PM
Yes, not really special.
The only interesting features are the ones that relate to the debugger, obviously. Among the others, there are none uniques or not accomplished (sometimes better) by other editors.
The debugger iteself it isn't too friendly or advanced, IMHO, compared to other similar tools (Delphi, just to name one), so I don't miss it too much using other editors. I can count on the fingers of my hand the times I had resorted to load a source on PBIde to analyze a particular situation with the debugger.

It may be a subjective thing, but knowing that there are a lot of users that choosed to use other editors, instead of the one include, make me think I'm not the only one witch think so.

Off course this doesn't mean that it isn't usable, or that it can't be found perfectly sufficent by many others developers.
Title: Re: Programming Options for Linux
Post by: Donald Darden on May 03, 2008, 11:51:04 PM
iDE evaluations tend to be highly subjective, and some people develop a preference for one and try to use it wherever they can.  I find that having the debugger can be a great enabler, but there are other methods of diagnosing a problem in the code.    You use the methods that work best for you, and if you don't want to use the IDE that comes with the product, you just learn to do without some features that are not supported by tacked-on IDEs.  But to me, this always tends to give the native IDE an edge.

Title: Re: Programming Options for Linux
Post by: Donald Darden on May 04, 2008, 05:22:26 AM
I finallly had a chance to look at kbasic again.  First, I downloaded and installed the trial Windows version as well, placing it on a virtual install of Windows 2000 Pro.  I want to see how closely the Linux and Windows versions seem to be to each other.

But after using chmod to get permissions set right on the Linux install of kbasic, I still could not get the executable files to run.  I tried calling them from a Terminal Console window, and found that I was getting error messages about some libraries not being loaded.  In looking for these, I only found them online in RPM packages for the Fedora distribution.  Normally, you need a tool like alien to convert from one package form to another, or to install a foreign package.  But alien was not installed on Ubuntu by default.  In trying to install it, I found that I had to mount the alternate install CD for Ubuntu 8.04.  With that done, I was able to get alien, and with it, I tried to install two of the errorred libraries.  But alien by default ignores any included script files, unless you add the parameter --scripts.  I did this, only to get an error, because a found difference in a path statement between Fedora and Ubuntu.

I took a break, then did some more checking online.  Though Ubuntu is listed as one of the distros supported for kbasic, that was Ubuntu 5.  We are currently up to Ubuntu 8.05, and Ubuntu switched from KDE to Gnome for its desktop.  And yes, it appears that the missing code is associated with KDE.

Well, this is the sort of struggle that is going on in the Linux community.  But Ubuntu is a very popular distro (and I really like it), so I decided to run an email over to the people at kbasic and see if they might lend me a hand getting this thing sorted out.  This being a weekend, it may take a few days to get a reply.  Meanwhile, I will see what my own efforts can achieve.
Title: Installing kbasic on Ubuntu
Post by: Donald Darden on May 05, 2008, 09:21:26 PM
Okay, this is what I have so far.  According to the folks at kbasic, their product should install on Ubuntu and work fine, and it is not dependent on either KDE or Gnome, but should work with either.  I haven't tried it with Ubuntu 7.10, but according to one link found, if you use sudo apt-get install libqt4-sql, it should then work.  When you get the kbasic download, it will be a bin file, and you have to change its properties to make it an executable. then enter the terminal mode and use ./installer_kbasic-professional_linux.bin in the folder where you downloaded it to in order to get it to execute.  It sets itself up.

Right now there are a couple of issues.  Under Ubuntu, the symbolic link to libQtGui.so.4 is found to be invalid when you try to run kbide in the /home/[username]/kbasic folder.  But the apt-get command above should have installed the package.  So I am talking to someone at kbasic to find out where kbasic is looking for the symbolic link and see if I can work around this.

The other problem is that with trial 1.6, the kbasic, readme, and uninstaller links that appear on the desktop are all locked.  Gmome can't figure out what the permissions are.  I found I had to use the terminal mode and the sudo command to get superuser privileges, then start using chmod at the kbasic folder and beyond to set privileges and get the locked status cleared.

So right now this is a work in progress, but I am encouraged that the people at kbasic tell me that this should be do-able.  Once we get this resolved, the results will be posted here.
Title: Re: Programming Options for Linux
Post by: Donald Darden on May 06, 2008, 11:51:26 PM
Okay, I have kbasic installed and working on Ubuntu 8.04, and documented that process in a separate thread to make it easier for others to find.  I will try to use this thread for discussing programming options for Linux in more general terms.