Back to General discussions forum
I have so far been submitting solutions in python alone.
For some reason my solutions are sometimes being autodetected as Lisp or C#.
I have nothing against those languages but it does not reflect the truth.
Özgür, thanks for notifying of this - probably I noticed this also before, but actually it is a bit difficult to tune our trivial "auto-detector".
You can peek into its code if you open this file (it is in JS
but probably most of the cases are clear enough):
it could be seen that it gets wrong way into C#
if (hopefully I remember and understand correctly) amount of
"endline" characters (like semicolons, used in C#
, C++
, Java
) is above certain percentage of total line count.
Probably it is not the best criteria :)
As about getting into LISP
- this seemingly happens on finding (+
or (*
sequences, characteristique for this
language with prefix expression notations. Well, perhaps this also should be tuned somehow better...
So as you now see the mechanism, feel free to suggest improvements... Though this may require testing them on existing solutions in different languages to make sure that languages besides Python do not suffer :)
Thank you Rodion,
I see why my solutions are often being detected as LISP, I write print(*results)
in Python to print results.
Aha! thanks for the hint, let's remove searching for (*
then, probably it won't harm LISP detection much. Hopefully
it's better now.
As for C#
mis-detection, this seems more vague, but I made small change (removed counting closing curly bracket at
the end of line) and we'll see if it's better.
That's true, sorry :) Our Lua Quickstart page says that for Python programmer it may be so familiar that one can start coding straight away. However dealing with strings (search, patterns) may require looking up suitable functions in documentation (and is a bit clumsy in Lua, to my taste, not because language designers were evil, but due to optimization reasons).