Home Download Buy Blog Forum Support

Use JavaScript instead of Python for plugins.

Use JavaScript instead of Python for plugins.

Postby steida on Sat Feb 02, 2013 3:39 am

Python 2 or Python 3? Who cares. JavaScript is the right language.
It would boosts SublimeText plugins development.
steida
 
Posts: 3
Joined: Sun Jul 01, 2012 9:23 pm


Re: Use JavaScript instead of Python for plugins.

Postby moloch on Sat Feb 02, 2013 6:16 am

Don't feed the trolls.
moloch
 
Posts: 1
Joined: Sat Feb 02, 2013 6:15 am

Re: Use JavaScript instead of Python for plugins.

Postby sublimator on Sat Feb 02, 2013 10:55 am

@steida

Start porting PyV8 to Python 3.3 :)
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Use JavaScript instead of Python for plugins.

Postby tanepiper on Sat Feb 02, 2013 2:08 pm

castles_made_of_sand wrote:@steida

Start porting PyV8 to Python 3.3 :)


I would say this would be the best option - I am looking to port my Sublime-Nodejs package over, and I would mostly like to script things with JavaScript - but there is no need to embed anything like NodeJS in Sublime Text when there is PyV8.

*However* I would love to see the API fully exposed to PyV8 so you have the full option to script in either Python or JS
tanepiper
 
Posts: 68
Joined: Sun Nov 06, 2011 6:40 am

Re: Use JavaScript instead of Python for plugins.

Postby facelessuser on Sat Feb 02, 2013 5:54 pm

quarnster wrote:F*ck no.

Lol. Javascript isn't really that bad. It can actually be kind of fun. I find the browsers inconsistencies the worse part when working with JS. Take out the browsers, it is actually kind of fun...though I wish regex was better in JS.

With that said, it isn't my scripting language of choice, but I like playing with it on occasions.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Re: Use JavaScript instead of Python for plugins.

Postby sublimator on Sun Feb 03, 2013 4:53 am

Serge needs PyV8 to port Emmet to ST3: https://github.com/sergeche/emmet-sublime

I tried building it once a month or so back but it was beyond my skill/motivation level

You need C++ / boost::python / Python C API knowledge (porting changes from 2.x to 3.x)

boost::python supports python 3.3, but PyV8 also uses some `raw` C extension code
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Use JavaScript instead of Python for plugins.

Postby sublimator on Sun Feb 03, 2013 4:31 pm

Tried again before and this time managed to build PyV8 on Python3.3, though not all the tests are passing, so there's work to be done

As well as Emmet, I had a javascript linter plugin using it, so I'm pretty interesting in getting it running.
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Use JavaScript instead of Python for plugins.

Postby methehack on Mon Feb 04, 2013 8:24 pm

I think supporting JS for plugin dev would be awesome and there'd be huge community support.

Speaking very theoretically and with only the faintest familiarity with the plugin architecture of ST, I would guess it would be possible to write a plugin that bridged the ST plugin python API to JS effectively creating a plugin that allowed for JS plugin dev. It might not even be *that* much of a hack. :)
All take my answer off the air :)
methehack
 
Posts: 1
Joined: Mon Feb 04, 2013 12:56 am

Re: Use JavaScript instead of Python for plugins.

Postby sublimator on Wed Feb 06, 2013 4:06 am

methehack wrote:I would guess it would be possible


Pretty much. The PyV8 author himself is working on the Python 3.3 support now, so it's just a matter of time.
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Next

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 3 guests