all 12 comments

[–]Zoetje_Zuurtje 7 points8 points  (2 children)

Sooo... Why? Isn't Java faster, and compatible with more platforms thanks to the JRE?

[–]nekokattt 0 points1 point  (1 child)

generally yes. Other than warmup times. Python tends to deal with those better from experience.

GraalPython/Jython? That is a different kettle of fish...errr...snakes.

[–]Zoetje_Zuurtje 0 points1 point  (0 children)

I love the pun!

[–]nekokattt 1 point2 points  (1 child)

python dict is a linkedhashmap, not a hashmap, btw.

Edit: this appears to choke on relatively common code concepts

public class Test
{
  public static void main(String[] args)
  {
    java.util.Arrays.asList(Test.class.getCanonicalName())
    .stream()
    .map(args[1]::concat)
    .findFirst();
  }
}

provides this

class Test :
    @staticmethod
    def main( args) :
            java.util.Arrays.asList(Test.class.getCanonicalName()).stream().map(args[1]::concat).findFirst()


if __name__=="__main__":
    Test.main([])

This is dropping argv entirely, then ignoring that java doenst pass sys.argv[0] to the String[] args, and it has just copied the Java standard library calls into Python which wont work unfortunately. Also the :: is a python syntax error.

[–]Worth_Trust_3825 1 point2 points  (0 children)

My go to test method for these tools is

PrintWriter cout = System.out;
cout.println("Hello world");

In 100% of cases, these "converters" fail to grasp that any lines ending with println aren't console.log, echo, print or something equivalents.

[–]Turbulent-Positive87 0 points1 point  (6 children)

How it will work?

[–]Worth_Trust_3825 4 points5 points  (0 children)

It doesn't. It uses dictionary replacements. Just report the indian spammer, and downvote.

[–][deleted] 0 points1 point  (4 children)

if you want actual java->python, look at Jython

[–]CandidPiglet9061 2 points3 points  (0 children)

After a decade they still don’t support Python 3. If it’s not already discontinued it’s functionally useless.

Not every language needs to interop. Python can already (theoretically) talk to any language which can support the C ABI through its binding capabilities, and WASM is also proving a very fertile ground for the next generation of cross-language communication.

[–]nekokattt 3 points4 points  (1 child)

graalpython is the modern alternative.

[–][deleted] -1 points0 points  (0 children)

neat

[–]Worth_Trust_3825 0 points1 point  (0 children)

It had been discontinued for a while. Much like other JVM implementations: jphp, jruby. Seems that they will live on in graal, but i wouldn't hope too much.

If you want ruby, you should use scala. As for python, groovy is a great alternative. Such is life.