int 0x80



gorlist@int0x80:~$ cat news.txt

Happy Birthday Perl!
Today is Perl's 20th birthday!

The cryptic programming language that we all love, was released by Larry Wall on December 18, 1987 (CVS date, was published to the comp.sources.misc newsgroup on February 01, 1988).

You can read it here.

The original manpage:
http://www.isc.org/sources/devel/lang/perl.txt

Take a look at the Perl Timeline

Perl 5.10 was also released today and Perl6 is under constant development.

While we're still at it, a book on Catalyst (Perl's most popular web application framework) was recently published.
0 Comments
Posted on 18 Dec 2007 by gorlist

gnu89
I had an argument about whether gcc uses c89 or gnu89 by default.

Quoting gcc's manpage:
-std=
Determine the language standard. This option is currently only
supported when compiling C or C++. A value for this option must be
provided; possible values are

c89
iso9899:1990
ISO C90 (same as -ansi).

iso9899:199409
ISO C90 as modified in amendment 1.

c99
c9x
iso9899:1999
iso9899:199x
ISO C99. Note that this standard is not yet fully supported;
see for more infor-
mation. The names c9x and iso9899:199x are deprecated.

gnu89
Default, ISO C90 plus GNU extensions (including some C99 fea-
tures).

gnu99
gnu9x
ISO C99 plus GNU extensions. When ISO C99 is fully implemented
in GCC, this will become the default. The name gnu9x is depre-
cated.

The GNU extensions for the C programming language can be found here:
http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html#C-Extensions
0 Comments
Posted on 18 Dec 2007 by gorlist

int main(void)
Quoting the c99 standard:
5.1.2.2.1 Program startup
1 The function called at program startup is named main. The implementation declares no
prototype for this function. It shall be defined with a return type of int and with no
parameters:
int main(void) { /* ... */ }
or with two parameters (referred to here as argc and argv, though any names may be
used, as they are local to the function in which they are declared):
int main(int argc, char *argv[]) { /* ... */ }
or equivalent;9) or in some other implementation-defined manner.

So in C, int main(void) is the only acceptable way of declaring main() in case that it takes no arguments.
In C++, int main() is the equivalent of C's int main(void).

int main() is different from int main(void).
int main() means that it takes an unknown number of arguments, as opposed to int main(void) which means that it takes no arguments.

More here:
http://www.research.att.com/~bs/bs_faq2.html#void-main
http://users.aber.ac.uk/auj/voidmain.shtml
0 Comments
Posted on 15 Dec 2007 by gorlist

Name mangling
After much delay, the first paper is ready.

The title is "Name mangling demystified" and it discusses name mangling, a technique used by compilers in order to support overloading.

Contains GCC and MSVC info.
0 Comments
Posted on 13 Dec 2007 by gorlist

warning: no newline at end of file
Have you ever pondered why gcc complains when you compile a .c file that doesn't end with a newline?

My research led me to the C standard.

Excerpt from "5.1.1.2 Translation phases":

"2. Each instance of a backslash character () immediately followed by a new-line
character is deleted, splicing physical source lines to form logical source lines.
Only the last backslash on any physical source line shall be eligible for being part of such a splice. A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character before any such
splicing takes place."

0 Comments
Posted on 13 Dec 2007 by gorlist

<< Previous 1 2 3 4 5 6 7 8 9 Next >>

Copyright © gorlist 2007-2017