TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Pyjaco - Python to JavaScript translator.

68 pointsby d0ugalalmost 13 years ago

6 comments

HerrMonnezzaalmost 13 years ago
This looks great and more advanced than the other Python to JavaScript translators on the market.<p>Last year, I wrote a comparison of the ones I could find, but none of them actually was in very good shape: <a href="http://chargen.blogspot.com/2011/08/survey-of-python-to-javascript.html" rel="nofollow">http://chargen.blogspot.com/2011/08/survey-of-python-to-java...</a>
评论 #4126269 未加载
ch0wnalmost 13 years ago
This is really cool and it's the first time I see this project. Is there still progress going on? The last commit was 3 months ago.<p>Unfortunately, the error reporting of the live demo isn't very helpful at this stage. I quickly ran into some compilation errors:<p><pre><code> syntax not supported (IfExp: &#60;_ast.IfExp object at 0x7f161d834a10&#62;)</code></pre>
评论 #4125876 未加载
caioariedealmost 13 years ago
This is an awesome and exciting project!<p>The unique trouble I found by myself is that list comprehension are not fully supported.<p><pre><code> [x for x in (1, 2, 3, 4) if (x % 2) == 0] </code></pre> This won't work as expected. I opened an issue about this: <a href="https://github.com/chrivers/pyjaco/issues/69" rel="nofollow">https://github.com/chrivers/pyjaco/issues/69</a>
k_bxalmost 13 years ago
&#62; print [] == []<p>True<p>ok, I love this thing already!<p>wow, it also knows about bound-methods <a href="https://gist.github.com/2947907" rel="nofollow">https://gist.github.com/2947907</a> , no need to hack with _.bindAll().
lucian1900almost 13 years ago
It doesn't appear to be further along than Pyjamas.
评论 #4126024 未加载
评论 #4126129 未加载
apgwozalmost 13 years ago
Does this provide a sane way to deal with callbacks? Obviously, in JavaScript you're writing callbacks all the time, and nested defs (think callbacks which call something that requires a callback... repeat) in Python are ugly and annoying. For example, try writing factorial in CPS style sometime in Python.
评论 #4125989 未加载