[OT] Crazy language limit-pushing (Was: Re: Why C++ compiles slowly)

Lutger lutger.blijdestijn at gmail.com
Fri Aug 20 09:42:27 PDT 2010


Nick Sabalausky wrote:

> "Walter Bright" <newshound2 at digitalmars.com> wrote in message
> news:i4kjdp$2o9f$1 at 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



More information about the Digitalmars-d mailing list