![]() | ||
Views: 26,021,251 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
07-19-25 08:59 PM |
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: 23258 Next: 1485 Since: 12-16-12 Last post: 3996 days ago Last view: 2677 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 hax Level: 166 ![]() Posts: 659/9093 EXP: 59853070 Next: 334616 Since: 07-03-12 From: in a box ![]() Last post: 20 days ago Last view: 1 day 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: 105 ![]() Posts: 187/3145 EXP: 12168592 Next: 93668 Since: 07-07-12 From: Dolphic Island Last post: 3048 days ago Last view: 3046 days ago |
Not a programmer myself, but i've heard few rumors Python beats Java. Not sure if true. |
Arisotura |
| ||
![]() Star Mario hax Level: 166 ![]() Posts: 660/9093 EXP: 59853070 Next: 334616 Since: 07-03-12 From: in a box ![]() Last post: 20 days ago Last view: 1 day 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: 19 Posts: 19/58 EXP: 30476 Next: 5301 Since: 07-07-12 Last post: 4049 days ago Last view: 3950 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.039 seconds. (2048KB of memory used) MySQL - queries: 29, rows: 209/209, time: 0.019 seconds. ![]() © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |