Views: 23,034,095 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
11-14-24 10:40 AM |
Guest: |
0 users reading Not hating on Java, but this is awesome! | 1 bot |
Main - Archived forums - SMG hacking tools development - Not hating on Java, but this is awesome! | Hide post layouts | New reply |
SuperNova2150 |
| ||
Member Normal user Level: 17 Posts: 3/49 EXP: 22624 Next: 2119 Since: 12-16-12 Last post: 3749 days ago Last view: 2429 days ago |
https://github.com/natural/java2python
I love the fact that it can convert almost all Java code into Python. I wonder if Whitehole could be eventually converted to Python this way. (not requesting anything NOW, but essentially "putting it on the table".) |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 165 Posts: 659/9047 EXP: 57836660 Next: 1099021 Since: 07-03-12 From: in a box Last post: 18 days ago Last view: 5 days ago |
No.
Python is likely slower than Java. Also, you can't just take Whitehole's code an convert it to Python with that and expect it to work. You'd have to rewrite all the GUI code because there's no Python equivalent to Java's Swing. ____________________ NSMBHD - Kafuka - Jul melonDS the most fruity DS emulator there is zafkflzdasd |
MK7tester |
| ||
Magikoopa I'm back Level: 104 Posts: 187/3145 EXP: 11848112 Next: 14014 Since: 07-07-12 From: Dolphic Island Last post: 2801 days ago Last view: 2799 days ago |
Not a programmer myself, but i've heard few rumors Python beats Java. Not sure if true. |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 165 Posts: 660/9047 EXP: 57836660 Next: 1099021 Since: 07-03-12 From: in a box Last post: 18 days ago Last view: 5 days ago |
If you go by rumors, it is also said that Java is faster than C.
Which would mean Python is faster than C. Which is wrong. Reggie! has an external C(++) library for handling certain tasks, it's there for a reason. Anyway, if you guys don't know, Whitehole already went through a recoding phase, from C# to Java. It's painful and I don't feel like doing it again. And as I said in my previous post, you can't just take Java code and automagically turn it into Python code. The languages have different APIs, requiring several code changes to get the final code working. In short, no. ____________________ NSMBHD - Kafuka - Jul melonDS the most fruity DS emulator there is zafkflzdasd |
xfix |
| ||
Member Normal user Level: 18 Posts: 19/58 EXP: 29673 Next: 224 Since: 07-07-12 Last post: 3802 days ago Last view: 3702 days ago |
First of all, mechanical translations are bad. Second, there is just no reason to port it to Python. None. It works rather well and fast already (ok, I haven't tested). Now as for java2python utility you provided. I have put something more complex than "Hello, world!" and well...
[source=java]public class HelloWorld { public static void main(String[] args) { System.out.printf("Hello, %s!\n", "world"); } }[/source] Simple enough? Yes. This is my translation (without that utility). [source=python]print "Hello, %s!\n" % "world",[/source] Readable, I know. But this tool doesn't do that. [source=python]#!/usr/bin/env python """ generated source for module HelloWorld """ class HelloWorld(object): """ generated source for class HelloWorld """ @classmethod def main(cls, args): """ generated source for method main """ System.out.printf("Hello, %s!\n", "world") if __name__ == '__main__': import sys HelloWorld.main(sys.argv)[/source] What about... no? It doesn't even translate things correctly ( System definitely isn't identifier in Python). The only translator I actually have seen working well is sed to Perl (included with Perl as s2p), but it generates lots of code for edge cases. Oh, and C# <=> VB.NET, but those are similar languages (they just have different syntax). |
Main - Archived forums - SMG hacking tools development - Not hating on Java, but this is awesome! | Hide post layouts | New reply |
Page rendered in 0.024 seconds. (2048KB of memory used) MySQL - queries: 29, rows: 208/208, time: 0.009 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |