|
![](/i/fill.gif) |
OK, so most people think of a compiler as this thing that turns your
source code into executable code. But hey, a compiler is a program too!
And, apparently, it can have bugs too.
Now I don't know if you can do this with, say, GCC, but currently I'm
looking at the commit list for GHC. For the most part it's quite dull.
But every now and then something makes me smile.
For example, one comment reads:
"Darn, but TcDeriv is complicated, when type families get in on
the act! This patch makes GeneralisedNewtypeDeriving work
properly for type families. I think."
I LOLed! :-D
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
Orchid XP v8 wrote:
> For example, one comment reads:
>
> "Darn, but TcDeriv is complicated, when type families get in on
> the act! This patch makes GeneralisedNewtypeDeriving work
> properly for type families. I think."
>
> I LOLed! :-D
...I spent my evening wading through the commit logs for my compiler?
Jesus I need to get out more! o_O
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hey, neat bug. Somebody posted a program that can be made 2.5 *times*
slower by renaming some functions. (!!)
The glitch, it turns out, is because the compiler automatically inserts
an error handler into the function, and it prints out the function's
name. Having a sufficiently long function name tips the function's "cost
estimate" over the maximum limit for being inlined. So the function
doesn't get inlined, and consequently runs much slower.
Heh. Starting to understand why building a production compiler is so
damned hard... ;-)
Post a reply to this message
|
![](/i/fill.gif) |