PDA

View Full Version here: : Linux and Programming


joe_smith
20-02-2014, 02:50 PM
Hi all I just found out about this program called Gambas (http://gambas.sourceforge.net/en/main.html) its a visual basic type program for linux and its pretty cool. version 3 now has transparent forms so you could make a program like Al's Illuminated Reticle for your Linux programs, its pretty good and BASIC is a good easy language to play with.

snowyskiesau
20-02-2014, 04:03 PM
Give BASIC a big miss! Not a good programming language by any measure.

Learn Python instead. Or Ruby, or Perl or ...

Barrykgerdes
20-02-2014, 08:18 PM
Qb64(gl) works well on linux. Reads standard basic/gwbasic/Qbasic programs. but has lots of extra commands for real screens and mouse control. If you don't know how to program in structured languages like C++ then you can use Basic write programs that work in a few minutes.

It actually is C++ with a qbasic IDE

Barry

joe_smith
21-02-2014, 03:24 AM
Have to disagree there ;) it all depends on what you want to do. I agree python and so on are good languages, but most people that would use a programming language to solve problems are "basic" type problems, so BASIC would be fine and just as good as any other programming language. If you are driving a rover on Mars then BASIC will properly not cut it. But if all you want is a simple windows program that converts Miles to Kilometers then BASIC will do just as fine as any other language, and you would still end up with the same answer you needed. Its like going to the shop, you could use a Formula 1 race car and get there faster using the best technology and precision, but a push bike will do the same thing. one is overkill and the other is simple. But the version of BASIC we have today like Microsoft Visual Basic or even Gambas are nowhere near the beginner's all purpose symbolic instruction code it used to be.
Just out of curiosity can you explain a bit more why "Give BASIC a big miss! Not a good programming language by any measure" Why do you think its not good" whats wrong with it as a modern computer language to solve modern day problems?.

Barry that old gwbasic and qbasic brings back memories qbasic was good as it had a compiler, I don't think most people know what its like to use a CLI or even know about it. widows killed all that :) I remember when I was studying computer programming many, many years ago we were using COBOL in DOS and we used to look out the windows, not program in them. I liked programming with C++ in the CLI, but trying to write a windows program with it was insane for me. When Visual basic came out it was so easy to get a program up and running and MS Office was better to use as it had VB scripting in it as well. do miss the good old days in computing it was a good time. working at telecom with the DEC and IBM mainframes, the start of MS Windows then standing in line at night for our copy of "start me up win 95" the birth of the Internet using gopher then the browser wars IE and netscape. the hacking and cracking scene, my old blue IBM XT with twin floppys, my old vic 20, my amiga, my first 486 with my first hard drive, my modem, the old BBS and the wild west Internet days.......... those were the days sure miss them now.

tonybarry
21-02-2014, 06:51 AM
Having used VB6 and .NET (Windows) and RealBasic / Xojo (MacOS and Linux) I am pretty confident that Basic as a language can be useful for most applications.

That said, the tools and code examples for C and C++ are much more prevalent.

Regards,
Tony Barry
who occasionally programs for reward but mostly for necessity.

RickS
21-02-2014, 10:21 AM
The original version of BASIC was missing most of the features required for writing well-designed and maintainable programs of any size more than a few lines of code (basic data types like strings, data structures, functions with parameters, etc.)

Modern dialects of BASIC have many of these features but they are all different (there is an ANSI standard for BASIC but it has minimal coverage). Most BASIC dialects are still weakly typed which is a poor choice for large program development.

Yes, you can write large systems in BASIC but it's hard, they are less likely to be reliable, they are hard to maintain and they won't be very portable.

If you're writing small programs then BASIC is fine, especially if that is what you're familiar with. Beware though... small programs have a habit of growing ;)

Cheers,
Rick.

Barrykgerdes
21-02-2014, 03:30 PM
It always amuses me the number of budding programers that run Basic in its many forms down as a programming language.

There are two parts to programming. The first part is turning an idea into a program or routine that will solve your problem. The second is to translate this into a form that can be read by a computer.

Yes if you want an interface that looks great in windows and has all the bells and whistles that pad out modern programs you need to learn one of the modern structured languages like c++. If you just want to use a computer for what it is also very good at, that is, raw calculations. Basic is the simplest of all languages to use .

Basic is a very forgiving language. You can put your sub routines anywhere, that is if you need a sub routine. You can learn about six or seven simple english commands and you can use basic to solve most of the problems you are likely to come across in science or engineering.

The biggest problem with basic now is that it won't work on modern 64 bit operating systems. That has been overcome by later forms of basic that use the old and familiar qbasic IDE to apply c++ routines.

When it comes to astronomy I have a set of routines that I can solve all the astronomical maths that I have ever needed like generating orbital parameters from sitings of solar system objects. or predicting eclipses etc. It is also great for reading files and extracting information for display in special forms or rewriting data bases in a different format. All these with quite simple easy to read program source code.

Barry

PS I use QB64(gl) these days to read my old basic source and create simple executable programs that work in windows, Linux and even on a Mac.

RickS
21-02-2014, 05:02 PM
I can assure you that many professional programmers and computer scientists feel the same way :)

C is also a terrible language for writing large scale systems. C++ sucks big time too unless used with great discipline and expertise. All languages have strengths and weaknesses, domains where they work well and domains where they don't. Visual Basic is damn fine for writing small Windows GUI applications, but I wouldn't want to write an operating system, a web browser or an accounting system in it.

Actually, I wouldn't want to write an accounting system in any language. That's why I've spent most of my professional life working on system software and embedded systems ;)

Getting back to the original topic, I do agree that Gambas looks like it could be a decent tool for building small astronomy applications if you're a hobbyist programmer.

PS. BASIC is not a good language for scientific programming either. You need well defined floating point arithmetic for that.

Cheers,
Rick.