Anonyfox/node-webkit-hipster-seed

Python support

Closed this issue · 6 comments

Would it be possible to get python support added to the workflow?
There exists plenty of Python to Javascript compilers.
If not, how can I add it for myself?

PythonJS seems to be most up to date at the moment.

Seriously, i don't see the point of having python/ruby/... included. Basically you are doing angular app development, which means javascript/coffeescript the whole time. When you want to do something like talking to some files, which you'd use python for, you can skip thinking in "backend" terms alltogether, and just do it in-place with node.js backed-in.

.controller('MyCtrl1', ['$scope', ($scope) ->
  $scope.someContent = require("fs").readFileSync "my_file.txt"
])

... without switching languages or even contexts. That's the point. Or you can do database stuff, requests, .... .

If you want to slow yourself down, you may fork this repo and add it yourself, be it PythonJS or something like node-python. Buuuut ... I highly recommend dropping python. Seems that all the non-JS server scripting languages (python, ruby, perl, php, ...) are becoming abundant more and more. It's a different discussion, sure, but nevertheless I won't include any of them since I see them all as legacy stuff (even though I am a rails developer in my day job). Plus, the usual Frontend-Developer is not used to write python on a daily basis.

There seems to have been a misundestanding.
I'm not asking for Python support in the full sense, all I need is a way to add ./translator.py myscript1.py myscript2.py > ~/myapp.js to the automatic conversions, in much the same way LESS files get converted to css or CoffeeScript to Javascript.
Sorry if it sounded like I was asking for more.
I just happen to like Python and node-webkit and it would be nice if I could combine them.
I do completely understand your point and if you cannot help I will simply start learning CoffeeScript.

Okay. Then have a look at http://brunch.io/plugins.html , and since there is no python plugin listed that works out of the box, feel free to add one, this should be straightforward if you have a transcompiler already. This way you could integrate python easily into the building process.

But again: i won't add it to this project.

if you want python just use the os module to fork a webserver process compiling python in browser environment won't have full capabiltiies that python has over javascript :P like numpy etc won't work 👎 instead fork a process with pythons flask server and use http, much like apache callback... sure it adds latency but you get the goodness of scientific work in python

@Anonyfox i won't call python legacy its still one of the most widely used language ;-) and offers more robust modules and stuff that node/ruby etc are years behind like proper nlp etc etc.. that being said js itself is quite mediocre as a language though ( - Lars Bak ). I can see one wanting to use python but that won't be needed in your seed... Its awesome anyways 💃

@darkyen I call python/ruby/perl/php legacy despite their current usage statistics. The point is simple: serverside scripting languages are completely useless for modern, bleeding edge web development. The next generation of distributed web architectures are already merging client&server into one entity and eliminate the need for any "backend"-development alltogether. Just have a look at https://www.meteor.com/ ... once you "got it", you will understand.

python is a nice beginner language and enjoys usage in isolated academic environments, but that's it. Libraries? Remember Atwood's Law. :)

The feature request is silly, however statements like "python is redundant despite their current useage statistics" , with the example being meteor.js are why the real world relegates non browser js development to "confused hispter" status. Seriously, no.

"python is a nice beginner language and enjoys usage in isolated academic environments, but that's it. "
For someone advocating bleeding edge stateful tech like meteor, thats an awfully behind the times sentiment! Python was around before Javascript, and my money is on it being around long after.