isaacg1 / pyth

Pyth, an extremely concise language. Try it here:
https://pyth.herokuapp.com/
MIT License
263 stars 57 forks source link

Quine Function #118

Closed Maltysen closed 9 years ago

Maltysen commented 9 years ago

The quine function was rejected earlier, but now, with so many open characters/overloads available, want to try again? Or was it the cheapness of it that made us not do it?

isaacg1 commented 9 years ago

What exactly would this function do?

refi64 commented 9 years ago

Print the program's source code!

Maltysen commented 9 years ago

Well i would return it: https://github.com/isaacg1/pyth/pull/19

orlp commented 9 years ago

I'm not sure whether I like this. On one hand it can be used to shorten some golfs, but on the other hand on most of these golfs it's against the rules, and if it's not, it feels like cheating.

isaacg1 commented 9 years ago

One option would be to make a function which, given a string, returns that string, twice, with a " in the middle. If it was .J, a quine would be .J".J

orlp commented 9 years ago

@isaacg1 That sounds incredibly obscure and cheaty. I wouldn't feel comfortable using it in any code golf, because I think it goes against the spirit of code golf.

isaacg1 commented 9 years ago

@orlp Follows the letter but not the spirit, eh? Alright, I'm going to close this. I don't think there's a non-cheating way to do this well.