Monday, May 5, 2014

Text-to-911: What you need to know (FAQ) - CNET

A new option for calling the police:
http://www.cnet.com/news/text-to-911-what-you-need-to-know-faq/?ttag=gpwl

BASIC programming for Linux

BASIC programming with Unix:  - an older article with some interesting history about BASIC. 

FreeBASIC is a free/open source (GPL), BASIC compiler for Microsoft Windows, DOS and Linux. 

 "When used in its "QB" language mode, FreeBASIC provides a high level of support for programs written for QuickBASIC. Many programs written for QuickBASIC will compile and run in this mode with no changes needed. However, for compilation in the FreeBASIC default language mode, most substantial programs will require changes."

"FreeBASIC is a self-hosting compiler which makes use of the GNU binutils programming tools as backends and can produce console, graphical/GUI executables, dynamic and static libraries. FreeBASIC fully supports the use of C libraries and has partial C++ library support. "

 

 PureBasic is a modern BASIC programming language. The key features of PureBasic are portability (Windows, Linux, OS X and Raspberry supported with the same source code), the production of very fast and optimized native 32-bit or 64-bit executables and, of course, the very simple BASIC language syntax. 

 
X11-Basic - the syntax is most similar to GFA-Basic on the ATARI-ST. It is a structured dialect with no line numbers. X11-Basic supports complex numbers, big integers and big integer mathematics.

X11-Basic is available for UNIX workstations, Linux, Android, MAC-OSX, as well as for MS-WINDOWS. It is also available for the ATARI ST, TomTom car navigation systems and the Raspberry Pi.

A BASIC compiler is included so that you can make stand-alone binaries out of your programs (on all platforms except for Android). The X11-Basic interpreter is fast and small. 


X11-Basic Documentation  - PDF downloads are available.

 

How to Run BASIC Code in the Linux Terminal (https://www.baeldung.com/linux/basic-run-code-cli): 

Install Dependencies:

Before we can install FreeBASIC, we first need to install its dependencies. In this example, we’re using Ubuntu, though the dependencies may vary on other distributions.

The dependencies are in the default Ubuntu repositories, so we’ll install them using apt-get:

$ sudo apt-get -y install gcc libncurses-dev libtinfo-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev

We use apt-get install to install our space-separated list of packages, using the -y option to confirm prompts during installation.
 

Install FreeBASIC:

After, installing the dependencies, we can download and install FreeBASIC. The latest version of FreeBASIC can be found at https://sourceforge.net/projects/fbc/files/. Let’s download and extract the binary:

$ url='https://sourceforge.net/projects/fbc/files/FreeBASIC-1.10.1/Binaries-Linux/FreeBASIC-1.10.1-ubuntu-22.04-x86_64.tar.gz/download'
$ curl -s -L "${url}" | tar -xz

In this example, we use curl to download the file, using -s to follow redirects and -L to resolve to the correct URL and pipe to the tar command to extract the output.

Now we should have a directory with the format FreeBASIC-{version}-{architecture}. Finally, we can install:

$ cd FreeBASIC-*
$ sudo ./install.sh -i
FreeBASIC compiler successfully installed in /usr/local

Next, we change directories into the download directory and then run the ./install script with -i to install. 

To uninstall FreeBASIC, we can run ./install -u.

 

Category:BASIC - Rosetta Code

As noted on Google+ there is at least one version of BASIC for Linux.
http://rosettacode.org/wiki/Category:BASIC