Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C's Big Brother is Lurking !

31 views
Skip to first unread message

Mel Smith

unread,
Apr 19, 2011, 11:40:13 AM4/19/11
to
Hi:

For those of you who wish to use the C language at a slightly higher
level, please drop in to the following newsgroup:

comp.lang.xharbour

The xHarbour language is based on C and uses a variety of C
implementations to compile and link its applications. There are a several
GUI packages (free and commercial) to build your apps.

This language is based on the several xBase languages of ten years ago,
and has brought together the best features of all of them, and exposes
hundreds of C functions in a very easy C-like syntax:

Function main()

local cVrbl := "crackpot" // 'local' vrbl only accessible in
this function

private cAnotherVrbl := "nutcake" // 'private' vrbl avail
here and all functions below

CLS // Clears the terminal screen

? "I'm assessed mentally as : " + cVrbl // kicks up a line
and prints

? "I'm also known as a : " + cAnotherVrbl // kicks up anotyher
line and prints

/*
and of course, there are zillions of non-trivial features using
C and Databases where you can
become quickly productive and make a good living in our
language.
We have about 400 separate tests available for download to
demonstrate the *power* of
this language
*/

return nil

There are native built-in Comix databases available for your use, and a
variety of 'SQL' databases easily linkable to your apps.

You can also include C functions as part of your source code.

So, if you wish to quickly build an application based on C, then
xHarbour is the way to go.

To download the latest implementation of xHarbour:

- Visit www.whosaway.com
- Enter the Password: XHB

Better still, visit www.xharbour.com for support, documentation, and
help on Extended Harbour (xHarbour).


-Mel Smith
webmaster
www.whosaway.com


--
Mel Smith


MikeP

unread,
Apr 19, 2011, 11:46:50 PM4/19/11
to
Mel Smith wrote:
> Hi:
>
> For those of you who wish to use the C language at a slightly
> higher level, please drop in to the following newsgroup:
>
> comp.lang.xharbour
>
> The xHarbour language is based on C

OK, I get it: It's belated April Fools' joke. A NEW language, BASED on C!
Yeah, and I have a bridge to sell you. Nice try, but no cigar: you can
fool some of the people some of the time, and take advantage of nice
people often, but karma is a bitch!


Sourav

unread,
Apr 19, 2011, 11:46:56 PM4/19/11
to
>     Better still, visitwww.xharbour.comfor support, documentation, and

> help on Extended Harbour (xHarbour).
>
> -Mel Smith
> webmasterwww.whosaway.com
>
> --
> Mel Smith

great

Mel Smith

unread,
Apr 20, 2011, 1:45:13 AM4/20/11
to
Mike says:

> OK, I get it: It's belated April Fools' joke. A NEW language, BASED on C!
> Yeah, and I have a bridge to sell you. Nice try, but no cigar: you can
> fool some of the people some of the time, and take advantage of nice
> people often, but karma is a bitch!
>

Mike:

This is no joke !

1. You write your code in xHarbour (using all its features, classes,
functions, librairies).
2. You compile your source program(s) into C-based pcode.
3. You compile this 'C' code into object modules.
4. You link these object modules along with other provided librairies
into a high-speed executable.


xHarbour is relatively new (about ten years old), and has a few
thousand avid programmers making a good living building apps for businesses.
It is 'new' in the sense that the best features of the several xBase
languages (Clipper, dBase, xBase, FoxPro, etc) in existence then were
gathered together, and then those features were implemented into Harbour,
then xHarbour, and expanded over the past ten years. Altho xHarbour in its
bare form is a 'console-based' system, it has several GUI implementations --
some commercial, and a few good ones that are free and are vibrantly active.

I, myself, have built and installed installed several GUI apps and
several console apps at a major structural steel company which controls
their steel beam inventory, does their time-sheet accounting, and provided a
fast, automatic Estimating system for them to quote on major jobs.

These tasks all used xHarbour as the base language.

I am the webmaster of three web sites, and have an Apache Server beside
me in my office. I use an xHarbour app *solely* as the CGI for each of
these sites.

When (if) you visit my www.whosaway.com site, the password you input
(i.e., xhb) is received by my xharbour app (via Apache), databases are
searched, pages are built live and in real-time, and are sent back from
xHarbour to you via my Apache server. Who needs PHP when we have C and
xHarbour !

I'm definitely *not* one of the gurus that populate our ng
(comp.lang.xharbour), but those that visit there daily (including another
Smith -- David -- no relation) can answer any query you might have.

btw, xHarbour is Open Source, and the whole package can be downloaded
to your site via SVN -- or just go to my whosaway site and get the binary
package, and the source code to examine. You'll note that a good portion of
the functions are written in C itself, and the remainder in xHarbour.

You can, of course, build your own functions, and Classes if you wish.
There are a large variety of contributed librairies to handle a wide variety
of tasks: from scientific thru internet accessing code, thru business
processing thru massive database accessing.


-Mel Smith


Malcolm McLean

unread,
Apr 20, 2011, 3:02:54 AM4/20/11
to
On Apr 20, 8:45 am, "Mel Smith" <med_cutout_syn...@aol.com> wrote:
>
>     xHarbour is relatively new (about ten years old),  and has a few
> thousand avid programmers making a good living building apps for businesses.
> It is 'new' in the sense that the best features of the several xBase
> languages (Clipper, dBase, xBase, FoxPro, etc) in existence then were
> gathered together, and then those features were implemented into Harbour,
> then xHarbour, and expanded over the past ten years.
>
There are zillions of languages, many of them based on C. It's a huge
problem. Part of the solution is to do it in C unless there is a
pressing need to use some other language. The problem is that there
are very often such pressing needs.

Bill Cunningham

unread,
Apr 24, 2011, 4:08:02 PM4/24/11
to

Whatever it is it can't compare to C.

Bill


Mel Smith

unread,
Apr 24, 2011, 10:26:16 PM4/24/11
to
Bill said:


">
> Whatever it is it can't compare to C.

Bill:

The second step of the compilation produces C- Code, which is compiled
into object code, which is linked into an executable (i.e., an .exe)

So, it *is* C -- only a lot more productive and a lot less syntactical
nonsense.

If you want to 'bit-twiddle', you *still can* within xHarbour, or if you
want to be productive and 'sell your warss', its a lot faster and easier.

-Mel Smith


Keith Thompson

unread,
Apr 25, 2011, 1:45:43 AM4/25/11
to
"Mel Smith" <med_cuto...@aol.com> writes:
> Bill said:
>
> ">
>> Whatever it is it can't compare to C.
>
> Bill:
>
> The second step of the compilation produces C- Code, which is compiled
> into object code, which is linked into an executable (i.e., an .exe)
>
> So, it *is* C -- only a lot more productive and a lot less syntactical
> nonsense.

No, it's not C. The fact that it's compiled into a C-like language
doesn't make it C, nor does it make it topical here.

[...]

--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

Malcolm McLean

unread,
Apr 25, 2011, 5:08:55 AM4/25/11
to
On Apr 25, 5:26 am, "Mel Smith" <med_cutout_syn...@aol.com> wrote:
>
>     So, it *is* C -- only a lot more productive and a lot less syntactical
> nonsense.
>
No what you mean is that it will run on any machine that supports a C
compiler.

It's quite common for start-up languages to compile to C for this
reason. However the source language itself doesn't have to be remotely
like C, it could be from the Lisp family of languages or something
entirely of your own invention.


Mel Smith

unread,
Apr 25, 2011, 11:17:19 AM4/25/11
to
Keith said:

>
> No, it's not C. The fact that it's compiled into a C-like language
> doesn't make it C, nor does it make it topical here.
>

Keith:

If I use Borland's C to compile each of my modules (say commonly,
several dozen major source .prg files) of my business application, and in
the logging sequence of the build there are no errors in that compilation,
then I *must* be using C ?

Or are you saying that Borland's C compiles all sorts of things that are
*not* C ??

See ??

But may you may wish to call it 'Hi C' for High-level C ??


-Mel Smith


David Resnick

unread,
Apr 25, 2011, 11:28:49 AM4/25/11
to
On Apr 25, 11:17 am, "Mel Smith" <med_cutout_syn...@aol.com> wrote:
> Keith said:
>
>
>
> > No, it's not C.  The fact that it's compiled into a C-like language
> > doesn't make it C, nor does it make it topical here.
>
> Keith:
>
>        If I use Borland's C to compile each of my modules (say commonly,
> several dozen major source .prg files) of my business application, and in
> the logging sequence of the build there are no errors in that compilation,
> then I *must* be using C ?
>
>     Or are you saying that Borland's C compiles all sorts of things that are
> *not* C ??
>
>     See ??

You appear to be making the assertion that: Any generator of C is
topical here, not with regard to discussion of the generated C, but
with regard to the generator. Feels more like simple advocacy of a
not remotely close to C language. Are you saying that discussion of
xHarbour implementation that compiles without a C intermediate form
isn't relevant here, but one that compiles with one is? And do you
actually believe that is somehow sensible, or are you just trolling at
this point?

Mel Smith

unread,
Apr 25, 2011, 11:49:23 AM4/25/11
to
Malcolm said:
>No what you mean is that it will run on any machine that supports a C
>compiler.

No, what I said is that it is compiled to C code, then compiled again by
your C-Compiler to object code

It's quite common for start-up languages to compile to C for this
reason. However the source language itself doesn't have to be remotely
like C, it could be from the Lisp family of languages or something
entirely of your own invention.

But xHarbour is absolutely like C !! Any C programmer, can sit right
down, and go to work ! (without worrying about being hand-cuffed with new,
restrictive syntactical rules)

(After about 11 years, you still call it a 'start-up' language ??? ---
Hmmmmph !)

**************************

aMyArray = ARRAY(12)

amyarray[1]="January" ; AMYARRAY[12] := "December"
AmYArRaY[6] := DATE()

(i.e., you don't get screwed with Upppercase, Lowercase syntax crap,
its all the same array)

or,
aCrap := {3.1415926,"3.14",date(),seconds(),"etcetera")


? aCrap[4] // kickls up a line, shows the seconds since midnite

For I = 1 to 1000000 // a simple loop and counter
// do anything here
Next

or

For i = 1000000 to 1 skip -2
// do anything backwards
next

while lHellFreezesOver // any logical/boolean vrbl or expression
// work away in here until time to exit
EXIT
end


-Mel

Joe Wright

unread,
Apr 25, 2011, 11:56:47 AM4/25/11
to
Hi Mel. Give it up my friend. You know xHarbour is not C. Although
harbour.exe takes source.prg and produces source.c suitable for a standard
C compiler to produce source.exe that doesn't make source.prg a C program.

--
Joe Wright
"If you rob Peter to pay Paul you can depend on the support of Paul."

Mel Smith

unread,
Apr 25, 2011, 12:31:15 PM4/25/11
to
David said:

You appear to be making the assertion that: Any generator of C is
topical here, not with regard to discussion of the generated C, but
with regard to the generator. Feels more like simple advocacy of a
not remotely close to C language. Are you saying that discussion of
xHarbour implementation that compiles without a C intermediate form
isn't relevant here, but one that compiles with one is? And do you
actually believe that is somehow sensible, or are you just trolling at
this point?


David:

Yes, I'm just trolling for converts.

But your comment 'not remotely close' is absolutely false. Pronably,
xHarbour is the closest language to C there is without actually being C
itself. It was created by C experts who were trying (in the late 1990's) to
build a better higher-level language but based on the speed and power of C.
They did it: xHarbour !

... and it is being improved and made ever more powerful every day.

-Mel


David Resnick

unread,
Apr 25, 2011, 12:37:34 PM4/25/11
to
On Apr 25, 12:31 pm, "Mel Smith" <med_cutout_syn...@aol.com> wrote:
>     Yes, I'm just trolling for converts.

Sadly I don't have a killfile.

-David

Malcolm McLean

unread,
Apr 25, 2011, 12:43:55 PM4/25/11
to
On Apr 25, 6:49 pm, "Mel Smith" <med_cutout_syn...@aol.com> wrote:
> Malcolm said:
>
> >No what you mean is that it will run on any machine that supports a C
> >compiler.
>
>     No, what I said is that it is compiled to C code, then compiled again by
> your C-Compiler to object code
>
> It's quite common for start-up languages to compile to C for this
> reason. However the source language itself doesn't have to be remotely
> like C, it could be from the Lisp family of languages or something
> entirely of your own invention.
>
>     But xHarbour is absolutely like C !!   Any C programmer, can sit right
> down, and go to work !   (without worrying about being hand-cuffed with new,
> restrictive syntactical rules)
>
That's also a common pattern, a C-like language, with some
superiority. It does raise the issue of how C-like a language needs to
be before we should call it C - e.g. if we have garbage collection is
that "C with garbage collection" or "not C"?

>
>     (After about 11 years, you still call it a 'start-up' language ???   ---  
> Hmmmmph !)
>
I hadn't heard of xHarbour before this post. That doesn't mean that it
won't become one of the famous languages. But for the moment you need
to piggyback on C compilers to ensure widespread support - a totally
legitimate strategy.

>     **************************
>
>     aMyArray = ARRAY(12)
>
>     amyarray[1]="January" ; AMYARRAY[12] := "December"
>     AmYArRaY[6] := DATE()
>
>     (i.e., you don't get screwed with Upppercase, Lowercase  syntax crap,
> its all the same array)
>

Removing case sensitivity from C is just a small syntactical change.
The arrays also seem to be 1-based - from experience, this is a grief.
But again, just a small change.

>     or,
>     aCrap := {3.1415926,"3.14",date(),seconds(),"etcetera")
>
>     ? aCrap[4]    // kickls up a line, shows the seconds since midnite
>

Not sure what's going on here. Type information seems to be carried
with the object. many languages do this, but not C, and it's quite a
big change. However is aCrap[4] calling seconds(), as you seem to
imply, or is it initialised with the earlier call (as most lanauges
would have it?)


>
>
>     For I = 1 to 1000000    // a simple loop and counter
>         // do anything here
>     Next
>
>     or
>
>     For i = 1000000 to 1 skip -2
>         // do anything backwards
>     next
>

Standard for loops. Almost every language has them.


>
>     while lHellFreezesOver    // any logical/boolean vrbl or expression
>         // work away in here until time to exit
>         EXIT
>     end
>

While loop and a break. Again, almost every language has this
construct. Or is the exit and exit from the program rather than the
loop? Again, we don't know.

There's not much point, in my view, making small cosmetic changes to C
syntax, like next and end as opposed to curly brackets, unless you
want to emphasise that the script is not C. The real difference seems
to be in the typing system. Carrying type information about at runtime
makes it easier to knock up small snippets of code. However in large
programs, there is a problem. Take x = squareroot(y). What happens if
y is negative? Do we get an imaginary? The problem is this tends to be
one of the things which is poorly documented. It's easy to lose track
of exactly what is being passed where.

Mel Smith

unread,
Apr 25, 2011, 12:44:58 PM4/25/11
to
David said:

"Sadly I don't have a killfile.

David:

Don't be concerned. I'll leave you folks alone from now on, and will
only watch, read, and try not to puke :(

-Mel


Kenneth Brody

unread,
Apr 25, 2011, 2:25:07 PM4/25/11
to
On 4/25/2011 11:49 AM, Mel Smith wrote:
> Malcolm said:
>> No what you mean is that it will run on any machine that supports a C
>> compiler.
>
> No, what I said is that it is compiled to C code, then compiled again by
> your C-Compiler to object code

Which means, by definition, that your language is _not_ C. (If it _were_ C,
then why does it need to be "compiled to C code"?)

Perhaps, then, you would suggest that C++ (which was originally implemented
[IIRC] as a C++-to-C translator, which was then passed off to the C
compiler) is also C?

[...]


> But xHarbour is absolutely like C !! Any C programmer, can sit right
> down, and go to work ! (without worrying about being hand-cuffed with new,
> restrictive syntactical rules)
>
> (After about 11 years, you still call it a 'start-up' language ??? ---
> Hmmmmph !)
>
> **************************
>
> aMyArray = ARRAY(12)

Doesn't look like C to me.

> amyarray[1]="January" ; AMYARRAY[12] := "December"
> AmYArRaY[6] := DATE()

That sort of looks kind of like something resembling a C-ish language.

> (i.e., you don't get screwed with Upppercase, Lowercase syntax crap,
> its all the same array)

Then it's definitely not C.

> or,
> aCrap := {3.1415926,"3.14",date(),seconds(),"etcetera")

Nope, not C.

> ? aCrap[4] // kickls up a line, shows the seconds since midnite

Not sure that that means, but it's not C.

> For I = 1 to 1000000 // a simple loop and counter
> // do anything here
> Next

Not C at all.

> or
>
> For i = 1000000 to 1 skip -2
> // do anything backwards
> next

Looks like BASIC to me.

Ah... Maybe the "? aCrap[4]" above is like BASIC's "?" shorthand for PRINT.

> while lHellFreezesOver // any logical/boolean vrbl or expression
> // work away in here until time to exit
> EXIT
> end

Not C.


--
Kenneth Brody

David Resnick

unread,
Apr 25, 2011, 3:00:22 PM4/25/11
to

Had you posted simple off topic language advocacy I wouldn't have
bothered responding. I in general am not interested in being the
topicality police, and sometimes offer off topic advice while also
advising people to look elsewhere for details. But to try and defend
a completely different language as topical to a C group because it is
a front end that in one implementation happens to produce C as topical
here is neither rational nor reasonable. Not a good approach to being
listened to IMHO.

-David

Seebs

unread,
Apr 25, 2011, 9:21:48 PM4/25/11
to
On 2011-04-25, Mel Smith <med_cuto...@aol.com> wrote:
> If I use Borland's C to compile each of my modules (say commonly,
> several dozen major source .prg files) of my business application, and in
> the logging sequence of the build there are no errors in that compilation,
> then I *must* be using C ?

Not really.

> Or are you saying that Borland's C compiles all sorts of things that are
> *not* C ??

There are many translators from other languages to C. That doesn't make
those languages C, even though you eventually compile stuff that started
in them with a C compiler.

> But may you may wish to call it 'Hi C' for High-level C ??

It seems as though you have syntax which isn't C, which is used to create
C code, no?

-s
--
Copyright 2011, all wrongs reversed. Peter Seebach / usenet...@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.

Seebs

unread,
Apr 25, 2011, 9:34:41 PM4/25/11
to
On 2011-04-25, Mel Smith <med_cuto...@aol.com> wrote:
> It's quite common for start-up languages to compile to C for this
> reason. However the source language itself doesn't have to be remotely
> like C, it could be from the Lisp family of languages or something
> entirely of your own invention.

Exactly.

> But xHarbour is absolutely like C !!

"Like" C is not the same thing as "is" C.

> aMyArray = ARRAY(12)

This is not like C. In C, there'd be a semicolon here.

> amyarray[1]="January" ; AMYARRAY[12] := "December"
> AmYArRaY[6] := DATE()

And you are using ":=" for assignment, which is not like C.

> (i.e., you don't get screwed with Upppercase, Lowercase syntax crap,
> its all the same array)

And this is absolutely, totally, unlike C, and contrary to the spirit of
C.

All the examples you show indicate that not only is this language not
C, but that it is actively hostile to the things that C programmers know
and work with. Case sensitivity of identifiers (with rare and specialized
exceptions) has been part of C since K&R and before, and a great deal
of C not only reflects this but *relies* on it.

Whatever you're peddling, it ain't C, and speaking as someone who quite
likes C, I can't easily imagine any programmer liking both this and C.

Ben Bacarisse

unread,
Apr 25, 2011, 10:09:28 PM4/25/11
to
Seebs <usenet...@seebs.net> writes:

> On 2011-04-25, Mel Smith <med_cuto...@aol.com> wrote:
>> It's quite common for start-up languages to compile to C for this
>> reason. However the source language itself doesn't have to be remotely
>> like C, it could be from the Lisp family of languages or something
>> entirely of your own invention.
>
> Exactly.

The paragraph starting "It's quite common..." was written by Malcolm
McLean. Mel Smith (or his Usenet client) has not yet got the hang of
quoting text in replies so you can't tell from the '>' marks who said
what.

<snip>
--
Ben.

Seebs

unread,
Apr 25, 2011, 11:03:14 PM4/25/11
to

>> Exactly.

Argh! That's the second time in the last couple of days I've been bitten
by that (the other in a web forum, so it wasn't a usenet thing there).

Malcolm McLean

unread,
Apr 26, 2011, 2:40:50 AM4/26/11
to
On Apr 26, 4:34 am, Seebs <usenet-nos...@seebs.net> wrote:
>
> All the examples you show indicate that not only is this language not
> C, but that it is actively hostile to the things that C programmers know
> and work with.
>
It's a different language to C, so either it is a superset of C, or in
some cases it makes different decisions to C. That doesn't make it
actively hostile to C, except in the sense that every language is
hostile to every other.

Martin Ambuhl

unread,
Apr 26, 2011, 6:02:50 PM4/26/11
to
On 4/25/2011 11:17 AM, Mel Smith wrote:
> Keith said:
>
>>
>> No, it's not C. The fact that it's compiled into a C-like language
>> doesn't make it C, nor does it make it topical here.
>>
>
> Keith:
>
> If I use Borland's C to compile each of my modules (say commonly,
> several dozen major source .prg files) of my business application, and in
> the logging sequence of the build there are no errors in that compilation,
> then I *must* be using C ?

So what? I will not try to copy Dan Pop's style, but you might benefit
from reading some of his posts. Your business application is not in
itself C. If someone using your application were to post questions here
about how to use it, based on the completely silly idea that because it
is written in C it _is_ C, he would obviously be in the wrong place.

> Or are you saying that Borland's C compiles all sorts of things that are
> *not* C ??

Besides the obvious that BCC also compiles things written in C++, a
language that is not C, you suffer from a confusion which, honestly, I
can't imagine any intelligent person having. Things written in C are
not C. There is a vast array of programming languages, editors, among
many other things, that are written in C and are not C.
Someone who has problems writing C code in implementing a BASIC
interpreter may have C questions. Someone having problems writing a
program for that BASIC does _not_ have a C question.

> See ??

See what? That you are hopelessly confused?

> But may you may wish to call it 'Hi C' for High-level C ??

No, it's not C at all. Get a clue.

>

Keith Thompson

unread,
Apr 26, 2011, 7:34:55 PM4/26/11
to
Martin Ambuhl <mam...@earthlink.net> writes:
> On 4/25/2011 11:17 AM, Mel Smith wrote:
[...]

>> See ??
>
> See what? That you are hopelessly confused?
>
>> But may you may wish to call it 'Hi C' for High-level C ??
>
> No, it's not C at all. Get a clue.

He's already said he's not going to post here anymore.

0 new messages