Which is best choise from Nape.hx to a CLI language?

60 views
Skip to first unread message

Tiger Chan

unread,
Apr 13, 2016, 11:08:06 PM4/13/16
to Haxe
My first choice is Python, but no luck with that. I got an Error in:
class nape_geom_ConvexResultList:

def skipForward(self,times):
if self.zpp_disp:
raise _HxException((("Error: " + "GeomPoly") + " has been disposed and cannot be used!"))
if (not ((self.zpp_inner.vertices is None))):
if (times > 0):
def _hx_local_1():
nonlocal times
                                          ^

Invalid syntax here

Andy Li

unread,
Apr 14, 2016, 12:14:53 AM4/14/16
to haxe...@googlegroups.com
Look like you're using Python 2.
Since Haxe outputs only Python 3 code, try to run it with Python 3.

Best,
Andy

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Tiger Chan

unread,
Apr 14, 2016, 1:13:05 AM4/14/16
to Haxe
Cool, thank you Andy.

Dion Whitehead Amago

unread,
Apr 14, 2016, 1:40:19 AM4/14/16
to Haxe
Node.js works great with Nape.

Tiger Chan

unread,
Apr 14, 2016, 2:56:31 AM4/14/16
to Haxe
Node.js also is a good idea, but would you mind to share more about your case?

Dion Whitehead Amago

unread,
Apr 14, 2016, 3:22:32 AM4/14/16
to Haxe
I use it to run physics simulations (on a backend server) for a game.

Node.js has a bunch of nice features:

1) It's heavily optimized (V8, SpiderMonkey, etc). My crude benchmarks are about half as fast as C++ (IIRC). 
2) It compiles fast (compared to C++).
3) You can run it in the browser and the server
4) You can run it in e.g. https://aws.amazon.com/lambda/ so you don't have to deal with scaling infrastructure

My original plan was to run it in C++ (for speed) on the backend servers, but then it was fast enough. If the game ever gets huge traction, I'll probably go back to C++ for speed, but until then, it's plenty fast enough.

Tiger Chan

unread,
Apr 14, 2016, 5:26:17 AM4/14/16
to Haxe
Thanks for your case sharing.I am trying to implement my Node.js and Python server then.
Reply all
Reply to author
Forward
0 new messages