5 ms·
It's true that it's arbitrary; the problem is, there's no non-arbitrary alternative, so it's a weak charge to make. Unless you're going to allow every language
by jerf 16y ago
It's true that it's arbitrary; the problem is, there's no non-arbitrary alternative, so it's a weak charge to make.
Unless you're going to allow every language to converge on simply blasting some bytes into RAM and executing optimized machine-language code and watch all the languages cluster to the exact same location give or take how long it takes to load the machine code, you have to draw some lines about what's a "real" implementation and what isn't. If I were running it, I'd be even more strict and insist that the solutions must be "idiomatic"... and what's idiomatic and what isn't would also be arbitrary, because there is no escape from the "arbitrary". Yet the end result is useful. Not totally determinative, but it's not anywhere near "useless" either.
- akkartik 16y agoCombining your comment and DarkShikari's (http://news.ycombinator.com/item?id=2404278 http://news.ycombinator.com/item?id=2404278), it seems like a good shootout should simply compare the simplest, most idiomatic solution possible in each language.
- stewbrew 16y agoThe problem with a comparison of idiomatic solutions is that they rely in different degrees on what's in their libraries. IIRC the shootout tries to avoid this by comparing similar solutions using the same algorithm that are actually implemented with the interpreter/compiler in question. IMHO that's the more sensible way to do this.
- akkartik 16y agoPerhaps that concern is eliminated with good test programs? As an extreme example, if I wanted to compare how different languages do array slicing it's meaningless to force python to implement array slicing without the [:] operator. But then this whole test program is meaningless anyway. You're right that there's a lot of nuance here, and perhaps there's no better solution. It's not even clear to me if there's a meaningful question to be answered. "This ocean's warmer than that one? What part? In summer or winter? Did you measure near a blue whale's fart?"
- igouy 16y agoIf that's what you'd like to see then please make the measurements and publish the programs for that comparison!
- akkartik 16y agoNo I think I'll just sit here and complain ineffectually, but thanks for the suggestion! I can work on only one thing at a time, but I can complain about many things at once. I think both functions are useful. I wasn't even aware of this particular problem. Now this thread's taught me (and others) to utterly ignore the shootout. That's useful even if nobody builds a replacement.
- igouy 16y agoWhat "particular problem"?
- akkartik 16y agoThat the solutions shown are filtered through an arbitrary set of hoops.
- igouy 16y agoThere's nothing arbitrary about wanting a Python program to work with CPython and Python 3.
- akkartik 16y agoI don't see how your one-line response is addressing the original article's criticisms, especially in the final paragraph. I'm also disappointed that you respond to a rebuttal by switching your argument, without acknowledging whether the rebuttal is correct or not. I'm going to stop responding to this thread.
- igouy 16y ago
- enneff 16y agoThe irony here is that the proposed PyPy benchmark is more Python than the previous CPython-oriented one.
- sambe 16y agoI like your standard but I think the real criticism being made is not that it's arbitrary but that it's arbitrary in different ways for different languages. This starts to look like intentional dishonesty. Another standard closer to the status quo would be "anything portable". Why does one language require portability and not another? What is that actual problem with the example given? There doesn't appear to be one.
- igouy 16y ago> Why does one language require portability and not another? Because more than one language implementation was measured for that language but only one language implementation was measured for the other languages. If only one language implementation was shown for Ruby it would be Ruby 1.9 - not JRuby If only one language implementation was shown for Lua it would be Lua 5.1.4 - not LuaJIT If only one language implementation was shown for Python it would be Python 3 - not PyPy PyPy and LuaJIT are being treated more favourably than other language implementations.