Joined April 2013
·
Achievements
74 Karma
0 Total ProTip Views
Forked
Have a project valued enough to be forked by someone else
Charity
Fork and commit to someone's open source project in need
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Python
Would you expect anything less? Have at least one original repo where Python is the dominant language
T-Rex 3
Have at least three original repos where C is the dominant language
T-Rex
Have at least one original repo where C is the dominant language
Epidexipteryx
Have at least one original repo where C++ is the dominant language
Nice trick, thank you for sharing ! One little reserve: at least in C, this fails if the code to toggle contains comments itself:
In this code, you won't kill unicorns, but you will always launch a missile, which is not what was intented.
It only works in C/C++, but I tend to prefer:
You just have to change "1" to "0" to toggle between nice and evil code, and it has no restriction regarding embedded comments.
That said, I'll remember your solution for Java, Javascript and others.