• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Programming Options for Linux

Started by Donald Darden, May 01, 2008, 05:35:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Donald Darden

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/

Donald Darden

#1
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

Marco Pontello

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.
If you checked it years / months ago, re-check it.
The project is progressing very well, it's fully usable, and the forum community is very active and eager to help (more than 3000 users with near 100K posts).

Charles Pegge


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.



Donald Darden

#5
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

Marco Pontello

#6
For anyone used to Paul's JellyFish Pro, there's a corresponding version for FreeBASIC 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.

Donald Darden

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.

Marco Pontello

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.

Charles Pegge

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.

Donald Darden

#10
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.

Donald Darden

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.

Donald Darden

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. 

Marco Pontello

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.

Donald Darden

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.