| ||
| Views: 31,314,300 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
12-16-25 02:38 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: 23634 Next: 1109 Since: 12-16-12 Last post: 4146 days ago Last view: 2826 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: 167
Posts: 659/9099 EXP: 60846408 Next: 612166 Since: 07-03-12 From: in a box
Last post: 45 days ago Last view: 7 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: 106
Posts: 187/3145 EXP: 12358499 Next: 313444 Since: 07-07-12 From: Dolphic Island Last post: 3198 days ago Last view: 3196 days ago |
Not a programmer myself, but i've heard few rumors Python beats Java. Not sure if true. |
| Arisotura |
| ||
![]() Star Mario hax Level: 167
Posts: 660/9099 EXP: 60846408 Next: 612166 Since: 07-03-12 From: in a box
Last post: 45 days ago Last view: 7 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: 19 Posts: 19/58 EXP: 30952 Next: 4825 Since: 07-07-12 Last post: 4199 days ago Last view: 4099 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.047 seconds. (2048KB of memory used) MySQL - queries: 27, rows: 210/210, time: 0.019 seconds.
Acmlmboard 2.064 (2018-07-20)© 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |