Clipper Tutorial: a Guide to Open Source Clipper(s)/Getting Acquainted
Open Source and Licenses
Let's define 'Open Source': it is software distributed with the source code that anybody can study, modify for their own needs and redistribute. It is often also free (it costs nothing). It is linked with the →Copyleft concept.
Harbour, xHarbour and Clip are released under the GNU General Public License (GPL) plus an option that allow the users to distribute the applications they develop under the license they wish (if they were to follow strictly the GPL they would have had to distribute their applications under the GPL). The GPL is the license adopted by the GNU project, and it makes it perhaps the most famous Open Source license because an entire operating system is released under it - the OS that is commonly referred to by the name of its kernel, Linux, and that some people call GNU/Linux. The kernel created by the GNU Project (The Hurd) never got really successful. A modified version of the Linux kernel is the base of the operating system Android.
"what is the GNU Project?" http://www.gnu.org/gnu/thegnuproject.html
"what is the General Public License?" http://www.webopedia.com/TERM/G/GPL.html
"what is Linux?" https://www.linux.com/what-is-linux
"what is the Free Software Foundation?" https://www.techopedia.com/definition/7306/free-software-foundation-fsf
→Free Software Foundation: The Free Software Foundation (FSF) is a 501(c)(3) non-profit organization founded by →Richard Stallman on 4 October 1985 to support the free software movement, which promotes the universal freedom to study, distribute, create, and modify computer software, with the organization's preference for software being distributed under copyleft ("share alike") terms, such as with its own GNU General Public License. The FSF was incorporated in Massachusetts, US, where it is also based.
A letter written by Bill Gates in 1976 provoked a certain clamor. His company, Micro-Soft (at the time spelled differently), was selling a BASIC interpreter for the MITS Altair 8800 and Gates lamented that many were copying it without paying. You can read it here: https://genius.com/Bill-gates-an-open-letter-to-hobbyists-annotated. BASIC however had a great success: computer vendors stored BASIC interpreters' in the computer's ROM. Back in the '80 it was normal to share the source code, at least for simple programs. The microcomputers, or home computers, of the time were simple machines with 8-bit CPUs which shipped with a BASIC interpreter in ROM. Many books, computer magazines (and some electronic magazines too) were publishing the listings of programs.
Also, because there were many different machines and therefore many BASIC dialects, many magazines had columns about this or that computer BASIC, and even existed magazines targeting specific computers: there were Sinclair magazines, Commodore magazines, Atari, Acorn, and so on.
You could, of course, have heard comments like "if it's published in a magazine it must not be good or they would be selling it in a store", but studying the listings was educational.
But then, after the transition to DOS-based machines, BASIC interpreters became more rare and, when graphical user interfaces (like Windows) took over, programming for beginners got harder and more expensive, as for a long time, compilers have been quite pricey and so more difficult to access.
For more informations visit https://www.gnu.org/philosophy/floss-and-foss.html, http://www.fsf.org/licensing/licenses/gpl.html, http://www.linux.org/, https://www.gnu.org/philosophy/open-source-misses-the-point.html, https://www.toptal.com/open-source/developers-guide-to-open-source-licenses.
In addition to the GPL, Clip offers optionally a commercial license. The user can choose which license applies to his installation.
x2c is released under the Apache license (http://web.archive.org/web/20080819175600/http://x2c.dtop.com/LICENSE.txt). The most important software released under the Apache license is Apache, a widely used open source web server - https://w3techs.com/technologies/details/ws-apache/all/all.
X# has its own license, https://www.xsharp.info/licensing/xsharp-compiler-source-code-license
Besides the free distribution of the software source code, there is also the problem of free distribution of documentation. To complement the GPL license, the GNU project introduced the GNU Free Documentation License (https://www.gnu.org/philosophy/using-gfdl.html). Creative Commons (https://creativecommons.org/) built up six different licenses based on four conditions as described at https://creativecommons.org/share-your-work/licensing-types-examples/. This site (Wikibooks) uses the Creative Commons Attribution ShareAlike (CC BY-SA 3.0) license and the GFDL as described at https://en.wikibooks.org/wiki/Wikibooks:Copyrights ()
Some Curiosities, Digressions, and a Little History
There is a website called foxprohistory.org which reports an interview with Wayne Ratliff: http://www.foxprohistory.org/interview_wayne_ratliff.htm (see also http://www.foxprohistory.org/people_began.htm).
The forefathers of dBase were a program called RETRIEVE and later JPLDIS (Jet Propulsion Laboratory Display Information System) used at the California Institute of Technology's Jet Propulsion Laboratory (https://www.jpl.nasa.gov/about/). Jeb Long wrote JPLDIS, and Wayne Ratliff in 1978 used it as an inspiration as he wrote a DBMS for his IMSAI 8080's PTDOS, and he called it Vulcan (because of Star Trek). His intent was to use it to analyse the statistics of football games and bet on the winning teams. He later admitted that programming Vulcan took so much time he only had had time to watch two or three football games. He tried to market Vulcan by himself for $50 each copy but it was not successful. In 1980 he met George Tate, who thought it was profitable and licensed it, founding the company Ashton-Tate http://edesber.com/ashton-tate/ with Hal Lashlee (Ashton was not a person but the maccaw that was the unofficial mascot of the company) and renamed the Vulcan DBMS as dBASE II (for marketing reasons - just like the new price tag of $695).
dBASE II for CP/M and later dBASE III for DOS (which shipped in 1984) were very successful, and so companies started to sell clones of it (in December 1984 Fox Software releases FoxBASE) or compilers for its language like Wordtech Arago Quicksilver, but we'll concentrate on Clipper Winter'84 (released by Nantucket on May 25, 1985) and its developments.
The legend about why the compiler was named "Clipper" is reported at http://www.ghservices.com/gregh/clipper/story.htm. It says the name was chosen because the idea of a compiler for the dBase language was conceived by Barry ReBell and Brian Russell during a lunch in a Malibu restaurant, Nantucket Lighthouse (hence the name of the company), which had pictures of Clipper ships on its napkins. Compare with https://vivaclipper.wordpress.com/tag/barry-rebell/.
But then what's a clipper? A definition translated and adapted from a pair of Italian encyclopaedias reads this way: «sailing vessel with three or five masts, sharp prow, large square sails, gross tonnage of 600-1200» (see https://www.brighthubengineering.com/marine-history/65188-what-is-a-clipper-ship/). (The choice of this name, and of other names such as "Harbour", "Flagship" and "Marinas-GUI", suggests that xBase programmers might have a distinctive maritime vocation).
I've also seen there are some (e)books which discuss these ships (i.e. "The Clipper Ship Era" by Arthur Hamilton Clark, "The Great Clippers" by Jane D. Lyon, "The Book of Old Ships", "Cutty Sark: The Last of the Tea Clippers" by Eric Kentley). Their history is more or less the following. The first ships named clipper were built in Baltimore in 1746 (→Baltimore Clipper). During the War of American Independence, the Baltimore clipper had great development. Other ships later took the name of clipper though there was little similarity with the Baltimore clippers (except for the width of the canopy). From 1840 onwards, clippers became especially famous for the "gold rush" and for the "tea and wool races" (→Clipper route). Although at that time regular steamships were already navigating, clippers maintained slightly higher average speeds of the fastest steamers. In 1854 the clipper →Lightning by →Donald McKay covered the distance from Boston to Liverpool in 13 days, 19 hours and a half (a record time for a vessel), the Flying Cloud covered the distance between New York and San Francisco in 89 days, and another famous clipper, the Melbourne, used to transport passengers, launched in 1875, travelled from England to Australia in 81 days. The golden age of Clippers ended around 1880 and the famous →Cutty Sark, one of the fastest sailing ships of all time, which was launched in 1869 () and could travel 363 miles in 24 hours, is in London and can be visited: http://museums.eu/museum/details/16123/cutty-sark-clipper-ship-royal-museums-greenwich (there are also some videos of it, just search YouTube). The museum sells books on it: https://shop.rmg.co.uk/products/the-cutty-sark-pocket-manual, and there even exist model-building kits. A detailed history is here: http://www.bruzelius.info/Nautica/Ships/Clippers/Cutty_Sark(1869).html.
A few more links to expand on this type of Clipper: http://www.titanic-nautical.com/Clipper-Ships-Wiki.html; the page http://www.ppreservationist.com/Clippership.htm links to many interesting pages about history http://www.ppreservationist.com/Clippership_files/ClippershipHistory.htm a biography of Donald McKay http://www.ppreservationist.com/Clippership_files/Donald%20McKay.htm and lists of these ships can be found at http://www.ppreservationist.com/Clippership_files/TheLists.htm and http://www.bruzelius.info/Nautica/Ships/Clippers/American_clipper_ships.html.
According to my Italian dictionaries, "clipper" has at least two other meanings, one connected with traveling and the other with a different type of waves: "(aviation) big airplane for trans-Atlantic flights" - see http://www.flyingclippers.com/transoceanic.html and "(electronics) electronic device to reduce the amplitude of a wave" - see http://www.daenotes.com/electronics/devices-circuits/clipper-clamper, http://www.daenotes.com/electronics/digital-electronics/clipper-circuits, but but to dwell on these meanings would be digressing too much.
The dBASE IV clone by Fox Software was called FoxPro. Other programs joined the market (dBFast, OnCmd).
On November 18, 1988 Ashton-Tate sued Fox Software because its database programs used a command syntax too similar to that of dBase. They also published an open letter which you can read at https://archive.computerhistory.org/resources/access/text/2017/02/102770637-05-01-acc.pdf. By the end of 1990 Judge Terrence J. Hatter invalidated Ashton-Tate copyright on dBase's interface because it is based on the public domain JPLDIS. If you have a mind for jurisprudence you can read the sentence here: https://law.justia.com/cases/federal/district-courts/FSupp/760/831/1420900/.
Quite a lot changed in the following ten years:
- In the early 90s an ANSI committee (ANSI/X3J19) was formed to to identify the common language features and a standard →xBase.
- In 1992 Microsoft acquired Fox Software. Computer Associates acquired Nantucket, Borland acquired Ashton-Tate and Oracle (after an agreement with WordTech) market SQL-based versions of dBXL and Quicksilver.
- All their products changed their names as Microsoft Windows was becoming predominant: FoxPro became Visual FoxPro, Clipper became CA-Clipper, and had an evolution called Visual Objects, and dBase became Visual dbase.
The May 1998 issue of the Italian magazine PC Professionale contained a review of Borland Visual dBase 7 which started by summarizing its "glorious" history:
«dBase III has been the workhorse of the programmers of the 80s, then gave way to other tools, especially in the transition from MS-DOS to Windows 3.1, but it never left the scene, it even had visual developments. The seventh version of that language, fiercer than ever, is thirty-two bits, supports ActiveX controls, remote SQL databases and a renewed and productive work environment.
It is unusual for programmers who have been in business for several years to never have heard of dBase. The first version of this product was a sort of Visual Basic of the 80s: it freed developers from the complications of accessing database files and the interface was easy to use as it could have been in DOS, thanks to the automatic instructions completion and effective online help. Since then much water has passed under the bridges and dBase programmers had access to a first compiler, graphical interfaces, and even a migration of its syntax to an object oriented approach».
The author, Michele Costabile, noted also that:
«The difference between programmable databases (Access, FoxPro) and traditional development tools (Visual Basic, Delphi) is becoming largely a matter of nuances: the first were born as a language built around a database, and the latter have come to assimilate structurally database support».
Today dBASE™ PLUS 12 (the adjective visual being dropped) is marketed by dBase LLC (https://www.dbase.com/), a company which still sells also a BORLAND dBASE 5.0 FOR DOS repackaged as dBASE CLASSIC™ for $99 (http://dbaseclassic.com/). CA-Visual Objects had a .NET development called Vulcan.NET, whose version 1.0 was released on November 30, 2007. Its successor is X#.
Meantime, according to Dev (a programmers' Italian magazine), the Harbour Project was started by Antonio Linares, author of FiveWin, about 1998 with an original name of Five and that the project started on a CVS server named harbour.joca.es. It had some forks listed at https://harbour.github.io/forks.
More links: https://www.visualdbsee.it, http://www.alaska-software.com/products/clipper-compatibility.cxp, https://www.recitalsoftware.com/, http://www.fship.com/. WinDock (http://www.roessler-software.de/e195/e264/index_ger.html) is a clip4win-compatible Win-API for Harbour and xHarbour. Class(y), Fivewin (https://www.fivetechsoft.com/english/index.php), Clip4Win, TopClass. http://www.ntkproject.com/index.php?language=1, https://www.xailer.com/, https://www.xharbour.com/xharbour-builder.html.
I found the following Facebook groups (which are quite active) related to this topic:
- Harbour MiniGUI
- Harbour Project
- CA-Clipper - Harbour - XBase - Dbase Programmers
- Alaska XBase++ Latinos
Other Sites to Visit & Files to Download
The article on Freshmeat at the address http://freshmeat.sourceforge.net/articles/non-sql-databases-for-linux, Non-SQL Databases for Linux, is a good starting point for our xBase study. See also http://www.linas.org/linux/db-non-sql.html and http://linuxfinances.info/info/xbase.html. If you discover that you like very much xBase, have a look at http://www.oocities.org/tablizer/xbasefan.htm, a page for xBase fans.
The last Harbour installs a Norton Guide file (namely in the path c:\hb32\examples\gfspell\spell.ng): Norton Guide Viewer for Windows by Dave Pearson can be downloaded at his website http://www.davep.org/norton-guides/. The Norton Guide for Clipper 5.3 is browsable as a set of HTML pages at https://harbour.github.io/ng/c53g01c/menu.html.
I will surf to know what's in The Oasis (http://www.the-oasis.net/). They included a link to this Guide and seem to have a large archive of Clipper material.
There is a Wikibook about Harbour, https://en.wikibooks.org/wiki/Application_Development_with_Harbour.
Harbour for beginners by Alexander Kresin (http://www.kresin.ru/en/hrbfaq.html) is a valuable reference.
Giovanni Di Maria's wrote this Harbour How To - Tutorial at http://www.elektrosoft.it/tutorials/harbour-how-to/harbour-how-to.asp, which is the as far as I know the only effort done by an Italian (other than me) at providing to the community informations about Harbour programming. Di Maria did a great job, although perhaps it would be more correct to call it a 'cookbook' and not a 'tutorial' because it lacks explanations.
In Spanish there is still the Manual de Clipper (On line) by Antonio Suárez Jiménez at http://www.elguille.info/Clipper/manual.htm.
Viva Clipper! - Notes of a Clipper Language Student http://vivaclipper.wordpress.com/ (link provided by bpd2000), http://harbourlanguage.blogspot.com/, http://cch4clipper.blogspot.com/ are interesting blogs.
http://www.lnf.infn.it/Calcolo/doc/AppuntiLinux/a2471.html - nanoBase 1997 user manual
http://dollybase.sourceforge.net/. (The reference to the sheep "Dolly", clonated in 1997, looks quite overt...).
DBF Files in Other Languages
Because of the great success of dBase and its, the DBF file format became an industry standard and is so widely used that interfaces for working with it are available for various languages, for example:
- Links for PHP interface:
- https://sourceforge.net/projects/xdb/, http://linux.techass.com/projects/xdb/xbasedocs/xbase_c1.html and http://linux.techass.com/projects/xdb/ Xbase (formerly known as xdb, also formerly known as xBase) is a collection of specifications, programs, utilities and a C++ class library for manipulating Xbase type datafiles and indices.
- https://sourceforge.net/projects/xbase-py/ A Python interface for managing dbf files
- https://sourceforge.net/projects/xbasej/ xBaseJ - xBase Engine for Java
We also have many little utilities for using these files: https://dbfview.com/, http://www.alexnolan.net/software/dbf.htm, https://dbfviewer.com/en/, https://www.dbf2002.com/, http://www.whitetown.com/dbf2sql/ (DBF to SQL Converter allows you to convert your dbf files to SQL script. Personal license $29.95, but cmp. https://www.vlsoftware.net/exportizer/)