Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Allison Randal, the chief architect of the Parrot virtual machine (that Perl 6 runs on) has one of the most under-rated views regarding this --

There's an odd misconception in the computing world that writing compilers is hard. This view is fueled by the fact that people don't write compilers very often. People used to think writing CGI code was hard. Well, it is hard, if you do it in C without any tools. I don't know anyone who writes CGI code in C anymore. If we wrote compilers as often as we write shopping carts, or web forums, or wikis, there would be just as many tools available to make the job easy. (And just like web tools, only 10% of them would be worth using. That's evolution in action.)

—Allison Randal, "Parrot Compiler Tools"

Source: http://www.lohutok.net/



Completely true. In fact nothing is hard in the computing world. Everything is doable. And if someone says it's not doable, they are not trying hard enough.


Write a program that determines whether or not any arbitrary program goes into an infinite loop.


You can still try hard and cover many cases where it would go into an infinite loop. And then try even harder and cover even more cases.


And you still won't have written a program that determines whether any arbitrary program goes into an infinite loop.


If we can write a program that translates said arbitrary program into the rules for an n-state, m-symbol turing machine, where n = (2|3|4|5) and m = 2, then yes - we can determine if the program terminates or not.

We can make some fuzzy guesses whether or not the program terminates or not in other state/symbol combinations.

http://en.wikipedia.org/wiki/Busy_beaver

If we ever did write said program that could determine whether any /arbitrary/ program is infinite, then we have solved the halting problem. And that would be quite something.


You're right. I wouldn't have.


> In fact nothing is hard in the computing world.

Allison's point is instead that the combination of the perception that compilers are difficult and the relative paucity of tools to make writing compilers easier is a vicious cycle which writing better tools might fix.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: