Slashdot Mirror


User: hallvar

hallvar's activity in the archive.

Stories
0
Comments
3
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 3

  1. 7 languages in one program on PHP and Perl in One Script? · · Score: 2, Funny

    http://blog.sykosopp.com/2006/02/26/one-file-to-ru le-them-all/

    Embed all your languages, this file can be interpreted or compiled in 7 different coding languages:

    $ php poly.sh.pl.php.tcl.cpp.bf.py.c.lhs.txt
    #I'm a PHP script
    $ python poly.sh.pl.php.tcl.cpp.bf.py.c.lhs.txt
    I'm a Python program.
    $ perl poly.sh.pl.php.tcl.cpp.bf.py.c.lhs.txt
    I'm a Perl program.
    $ tclsh poly.sh.pl.php.tcl.cpp.bf.py.c.lhs.txt
    I'm a tcl script.
    $ sh poly.sh.pl.php.tcl.cpp.bf.py.c.lhs.txt
    I'm a sh script.

    Rename file to compile in C/C++:

    $ gcc p.c -o c;./c
    I'm a C program (C89 with // comments, trigraphs disabled).
    $ g++ p.c -o cp;./cp
    I'm a C++ program, trigraphs disabled.

  2. Re:Suggested mods on MacSaber Turns Your Macbook into a Lightsaber · · Score: 1

    Very nice demo of iAlertU:

    http://www.youtube.com/watch?v=KkAtRfA1UXc

  3. Makes up for a new sport! on Boeing Successfully Tests Anti-Missile Laser · · Score: 1

    So now we can fire missles at airplanes for fun and watch the missles explode in mid-air by the laser!