Clipper Tutorial: a Guide to Open Source Clipper(s)/Getting Acquainted
Open Source and LicensesEdit
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. There is a copyright holder, and in this sense, it is different from public domain software.
Harbour, xHarbour and Clip are released under the GNU General Public License (GPL) plus an option that allows 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, making 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 really became successful. A modified version of the Linux kernel is the base of the operating system Android.
These are the essential questions that we need to answer:
- "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.
For more information, 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. Users can choose which license applies to their 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 ()
Software Piracy and Source Code SharingEdit
A letter written by Bill Gates in 1976 provoked a certain clamor. His company, Micro-Soft (which during the years changed its spelling), 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: all the home computer vendors were developing their own BASIC interpreters or licensing one from Microsoft to store in the computer's ROM. The microcomputers, or home computers, of the time thus were simple machines with 8-bit CPUs that shipped with a BASIC interpreter in ROM. Many books, computer magazines (and some electronic magazines too) were publishing the listings of programs: back in the '80, it was normal to share the source code, at least for simple 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 cannot be valid or they would be selling it in a store", but studying the listings was educational. A nice example is described at this URL: http://www.alfonsomartone.itb.it/fztsmo.html (I think it's a very nice read - which also give a sense of the parochialism that existed between fans of different computer brands), I am referring especially to the passage in which they talk about the copying and adaptation of the Totocalcio program listing from a Spectrum magazine. Totocalcio is the Italian system for betting on football matches (here 'football' is the sport which is called 'soccer' in the US, have a look at https://www.britannica.com/story/why-do-some-people-call-football-soccer). We will return to sport betting in a moment, as it was the... kickstart of dBASE development.
But then, after the transition to 16-bit DOS-based machines, BASIC interpreters became more rare (the free Microsoft QBasic interpreter was not automatically installed on Windows 95 or 98 - although it was provided on the CD - and no longer shipped with later versions of Windows; moreover starting with Windows Vista it was no longer supported being a 16-bit DOS application) and programming for beginners got harder and more expensive, as for a long time, compilers have been quite pricey and so more difficult to access (especially if you wished to program a Windows graphical user interfaces), while at the same time distributing interpreted programs seemed less and less 'professional', so to speak.
Meantime the increase in performance allowed the use of the "small" microcomputers (that were growing) for other applications: if the widepread use of audio tapes as mass memory prevented the use of a Commodore 64 or a ZX Spectrum to manage "databases" (and floppy discs too were also limited for these tasks), the decrease in prices and the increase in the capacity of the hard drives has allowed them to do these things.
What do we refer to when we say 'database'?Edit
The word database is used with at least three meanings:
- a collection of data. In our context, these data are recorded in DBF files and, with this meaning, it can happen to hear about "a relation between two databases".
- the collection of data and all its ancillary components. This is the meaning of database when we talk about an "Access database": a .MDB or .ACCDB file that contains the information of the tables, relations, queries, indexes and more.
- a DBMS (Database Management System), that is, a software that manages data stored in database files.
Some Curiosities, Digressions, and a Little HistoryEdit
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 (w: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 Cecil Wayne Ratliff in 1975 began to think of a database system with the intention of processing football game statistics to bet (according to the reports the floor of his house was completely covered with sports pages from newspapers). The following year he got himself an IMSAI 8080 computer kit (for fans of movies of the 80s it is the same computer model appearing in the movie WarGames). Ratliff later admitted that programming his DBMS for the IMSAI 8080's PTDOS operating system (which he called Vulcan - because, in Star Trek, Spock had some power of total recall) took so much time he only had had time to watch two or three football games. The work was slowed down by a couple of floppy drive failures (with corresponding waits of three months to get it back up and running), however, sales began in 1979, after the conversion of Vulcan to the new CP/M operating system. 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 that name was later given to a macaw which became 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 - an increase of 1290% compared to the original Vulcan price of $50).
In 1983 Ratliff became vice-president of Ashton-Tate after discovering that the company was hiding some of the rights she owed to him. The release of dBase III for DOS (which shipped in 1984) confirmed the dominance of dBase II in the CP/M market, 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.
At the time the mouse existed but was not used by anyone outside research centers, and to use dBase one had to issue commands from the keyboard. Later this situation changed as dBase III Plus introduced an Assistant which provided pull-down menus and dBase IV developed the concept with the Control Center. However, several commands could have been saved in a file (which normally had a .prg extension) and then run automatically by dBase. As in all interpreted environments, there were performance issues and, if a programmer had developed a custom application, the need to have the interpreter (dBase itself) on customers' computers. For these reasons, a compiler that would allow programs to run faster and distribute them with less burden became a wish for many dBase developers.
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 their idea of a dBase compiler 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 encyclopedias reads like this: «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 - or that the people at Nantucket have a peculiar sense of humor since dBase is a navigational DBMS).
There are numerous (e)books which discuss these ships (i.e. "The Clipper Ship Era" by Arthur Hamilton Clark, "The Great Clippers" by Jane D. Lyon, "Cutty Sark: The Last of the Tea Clippers" by Eric Kentley, "The Book of Old Ships - From Egyptian Galleys to Clipper Ships" by Henry B. Culver).
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 original 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 are even 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. More software houses and clones joined the market (dBFast, OnCmd). And in the meantime, large quantities of libraries for Clipper were being developed.
Ratliff quit Ashton-Tate and began working on a new DBMS, again called Vulcan and sold by a company called Migent, but Ashton-Tate sued Migent (http://corphist.computerhistory.org/corphist/documents/doc-4464b2d87d241.pdf?PHPSESSID=ccd241...) and, on the same spirit, on November 18, 1988, 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 identify the common language features and define a standard which was to called →xBase.
The Decline of Commercial xBaseEdit
- In 1992 Microsoft acquired Fox Software. Computer Associates acquired Nantucket, Borland acquired Ashton-Tate and Oracle (after an agreement with WordTech) marketed SQL-based versions of dBXL and Quicksilver.
- All the products of the companies above 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 the scion of that language, fiercer than ever, is thirty-two bits, supports ActiveX controls, remote SQL databases and has 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».
However, the programming experience in CA-Visual Objects was profoundly different from that of Clipper and the product has never been very successful. Clipper programmers kept using Clipper as long as possible, using libraries that allowed the creation of Windows executables (the most famous of those libraries were Clip4Win and FiveWin).
Borland had two database products in its catalog: Visual dBase (as we just saw) and Paradox. However some serious financial problems caused by the acquisition of Ashton-Tate cut off its feet: today Paradox is a Corel product and 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/). Visual Objects development was continued by GrafX Software and stopped in 2012 with version 2.8 sp4, it had a .NET development called Vulcan.NET, whose version 1.0 was released on November 30, 2007 and finished in August 2015 at version 4.0. Most of Vulcan.NET's developers started the X# project which came out on 3 July 2017, see https://www.xsharp.info/articles/the-end-of-grafx.
Microsoft continued the development of Visual FoxPro up to version 9 sp2 on 16 October 2007, but never considered it a flagship product, as evidenced by the inclusion in their Office suite of the Access desktop database. The success of MS Office and consequently Access on one hand and the advent of SQL databases on the other blotted out all xBase products from the market.
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. A pair of text-based clones of dBase appeared as well (nanoBase - see its user manual at http://www.lnf.infn.it/Calcolo/doc/AppuntiLinux/a2471.html; DollyBase http://dollybase.sourceforge.net/)
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 DownloadEdit
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 (NG) was the format of the on-line help used by Clipper. A NG Viewer for Windows written by Dave Pearson can be downloaded at his website http://www.davep.org/norton-guides/ and 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.
- Harbour for beginners by Alexander Kresin (http://www.kresin.ru/en/hrbfaq.html) is a valuable reference.
- Giovanni Di Maria's wrote a nice Harbour How To - Tutorial (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's work is excellent, although perhaps it would be more correct to call it a 'cookbook' and not a 'tutorial' because it lacks explanations.
- On the 4th of December Stuart Aitken published a link to a new tutorial, Harbour and HMG Guide: http://www.flamelily.net/index.html - http://www.harbour-guide.com/
- In Spanish is still available 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/ and http://www.mozzarellaincarrozza.it/harbour/page/5/ are interesting blogs.