Re: Beginning C++ in FreeBSD
--Fba/0zbH8Xs+Fj9o
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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 wor=
d,
> > > > phrase, sentence, paragraph, essay, book, or library would be enough
> > > > though.
> > >=20
> > > 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.
> > >=20
> >=20
> > // Turing strikes again:)
> > // Ok. Write this (to be compiled as a shared object) in portable C:
>=20
> 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 :)
>=20
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?
--=20
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
--Fba/0zbH8Xs+Fj9o
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
iD8DBQFAjoiGwo7hT/9lVdwRAv6ZAJ97k18dCerJLu7ziHFsf/Nv8AwlAgCfUG23
AUuYcS7Hcr6UMbOs0BqHOb4=
=yCUQ
-----END PGP SIGNATURE-----
--Fba/0zbH8Xs+Fj9o--
討論串 (同標題文章)
完整討論串 (本文為第 29 之 43 篇):