Nick Sabalausky wrote: > "Walter Bright" <newshou...@digitalmars.com> wrote in message > news:i4kjdp$2o9...@digitalmars.com... >> Nick Sabalausky wrote: >>> Yea. If Java's design philosophy were a valid one, there would never have >>> been any reason to move beyond Altair-style programming (ie, entering >>> machine code (not asm) in binary, one byte at a time, via physical toggle >>> switches). You *can* do anything you need like that (It's >>> Turing-complete!). >> >> Yeah, and I've seen OOP done in C, and it works. It's just awful. I've >> even seen OOP done in assembler (Optlink!). > > I've seen high-precision PI calculation done in MS batch: > > http://thedailywtf.com/Articles/Stupid-Coding-Tricks-A-Batch-of-Pi.aspx > > And Adam Ruppe did cgi in Asm: > > http://www.arsdnet.net/cgi-bin/a.out > > And some massochist did a compile-time raytracer in C++: > > http://ompf.org/forum/viewtopic.php?t=1556 > > Yea, I know that had already been done in D, but D's compile-time processing > doesn't suck :)
Don't forget the perl regex to check for a prime number: perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/' [number] http://montreal.pm.org/tech/neil_kandalgaonkar.shtml