News for hackers. Stuff that matters.
Re:Show HN: Transcrypt – Fast, small Python 3.5 to JavaScrip... by S4M on Wednesday February 10, 2016 @04:35PM (#11076241)
I checked your example with solar system. Since it's calling directly document.getElementById, it would not be some valid Python code that I could run independently. Isn't that defeating the purpose of coding in Python first?
Re:Show HN: Transcrypt – Fast, small Python 3.5 to JavaScrip... by JdeH on Wednesday February 10, 2016 @05:46PM (#11076783)
Purpose of Transcrypt is to be able to use Python in the JavaScript world. The call document.getElementById doesn't have meaning outside a browser. For non-gui debugging purposes module org.transcrypt.stubs.browser is present supporting the bare minimum. Of course someone could write a library supporting all kinds of DOM functions. But I don't think it would be very useful. The idea is to be able to do the whole web "chain" in Python. So CPython + a framework on the server, Transcrypt in the Browser (or, generally, JS client).
Re:Show HN: Transcrypt – Fast, small Python 3.5 to JavaScrip... by kevincox on Wednesday February 10, 2016 @05:43PM (#11076759)
It's still valid python code, the libraries are just different.