Beginning C++ in FreeBSD

Sergey Zaharchenko doublef at tele-kom.ru
Tue Apr 27 19:22:28 PDT 2004


On Tue, Apr 27, 2004 at 11:28:19AM -0400,
 Rahul Siddharthan probably wrote:
> Sergey Zaharchenko said on Apr 26, 2004 at 15:58:42:
> > > > A single Greek word for which there isn't an equivalent English word,
> > > > phrase, sentence, paragraph, essay, book, or library would be enough
> > > > though.
> > > 
> > > Which has very little relevance to programming languages.  Anything
> > > that can be done in one Turing-complete language can be done in
> > > another Turing-complete language.  The trade-off is in development
> > > time ("expressiveness") and running time.
> > > 
> > 
> > // Turing strikes again:)
> > // Ok. Write this (to be compiled as a shared object) in portable C:
> 
> By "anything" above I meant "taking certain input data and performing
> certain operations to yield a certain output".  As DES points out,
> your program doesn't actually do anything :)
> 

DES only pointed out a compilation problem (?), but my program actually
does something. When made a shared object, it writes a string of
characters to the standard output of the program which links to it or
dlopen()s it. That doesn't fit my definition of `doing nothing'.

You may as well `cin>>' data, perform any calculations required, and
`cout<<' output.

A quick hack to find out the list of files which do nothing in much the
same manner on your machine:

$ find /usr/lib/ -name "*.so*" |xargs grep _init

Still not guessed? All those libs do something at loading time.

Of course, they're not all written in C++. Some might have been written
in C --- but I doubt it's *portable* C. Or can you persuade me of the
contrary?

-- 
DoubleF
It is only the great men who are truly obscene.  If they had not dared
to be obscene, they could never have dared to be great.
		-- Havelock Ellis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-chat/attachments/20040427/c2f968fc/attachment.bin


More information about the freebsd-chat mailing list