Live data from Hacker News

Sublime Text's Plugin API: It's Python, Sort Of

news.floobits.com

21–30 of 46 posts

Re: Sublime Text's Plugin API: It's Python, Sort Of

#21
post #7
post #3

Earlier quoted context omitted.

I believe only ST 2 on OS X relies on the system python - 2.6 or whatever python happens to be in the path. Sublime 3 ships with python 3.3 on all platforms. edit: If you are asking about the Floobits plugin, ST 2 on OS X shells out to the system python (because of SSL).

> Sublime 3 ships with python 3.3 on all platforms. So does that fix that issue he says in the end is "still open", about select etc not being present on some platforms? (I don't have Windows or GUI Linux available to check).

I added a comment on this page that Package Control patches the select issue on ST2 for Windows (and explains it a little), plus includes shims for _ssl on Linux with details about how it works.

Re: Sublime Text's Plugin API: It's Python, Sort Of

#22
post #12

Earlier quoted context omitted.

Interesting articles, though I'm not sure the critique applies here. It seems rather, ST2 ships with a separate and incomplete python environment. I don't think it 'embeds' python, does it?

Pretty sure the definition of embedding (that at least the article uses) is to call Python from rather than having Python call the other language.

Yes, that's what I also got from it. But still, does ST do that?

Re: Sublime Text's Plugin API: It's Python, Sort Of

#23

Glyph Lefkowitz warned about the dangers of embedding Python a long time ago: https://twistedmatrix.com/users/glyph/rant/extendit.html See also this comment of his on Advogato, which he indirectly referenced in the previous article: http://advogato.org/article/550.html#12

Interesting articles, though I'm not sure the critique applies here. It seems rather, ST2 ships with a separate and incomplete python environment. I don't think it 'embeds' python, does it?

Yes, Sublime Text embeds Python. The Python interpreter is initialized by the Sublime Text binary.

The issues that Floobits ran into were some of the edge-cases related to distributing a compiled version of Python to various operating systems. I wrote a top-level comment on this page about how Package Control patches these issues.

Re: Sublime Text's Plugin API: It's Python, Sort Of

#24
post #13

This is another reason for Jon to release ST as an open source project. The editor is extremely polished at this point, and now only new features and niche issues like Python modules should be added to the core codebase. I imagine that since ST is no longer growing as it was years ago, the future money flow is relatively insignificant. Atom may have more momentum and plugins than Sublime right now, but since the core…

I'd be happy if he made the source open once you have bought it, but you can't redistribute.

Re: Sublime Text's Plugin API: It's Python, Sort Of

#26
post #13

This is another reason for Jon to release ST as an open source project. The editor is extremely polished at this point, and now only new features and niche issues like Python modules should be added to the core codebase. I imagine that since ST is no longer growing as it was years ago, the future money flow is relatively insignificant. Atom may have more momentum and plugins than Sublime right now, but since the core…

I've been using both Atom and Sublime Text 3 "in anger" over the last two months. As good as Atom has become now that it has reached 1.x, I find that the editor I turn to is Sublime. It just works. subl . and poof, it's up in a directory atom . 7 or 8 seconds later it's partly up... I bought ST2 some time ago, and I'd buy ST3 if he pulled the trigger and moved it out of beta... But not if it truly is abandon-ware. I'…

ST3 is still being developed, if slowly. If you use it, I'd encourage you to buy it.

Re: Sublime Text's Plugin API: It's Python, Sort Of

#28

Earlier quoted context omitted.

I've been using both Atom and Sublime Text 3 "in anger" over the last two months. As good as Atom has become now that it has reached 1.x, I find that the editor I turn to is Sublime. It just works. subl . and poof, it's up in a directory atom . 7 or 8 seconds later it's partly up... I bought ST2 some time ago, and I'd buy ST3 if he pulled the trigger and moved it out of beta... But not if it truly is abandon-ware. I'…

ST3 is still being developed, if slowly. If you use it, I'd encourage you to buy it.

As I stated, I've already purchased a license.

A license for ST2 is also a license for ST3 beta. He's stated that when ST3 is out of beta, it'll require a new license which I'll likely purchase.

There isn't anything else to buy right now except what I already have.

https://www.sublimetext.com/buy

Re: Sublime Text's Plugin API: It's Python, Sort Of

#29
post #11

Note that this is mostly an issue for Sublime Text 2. Sublime Text 3, which is in beta, has a much more consistent Python 3 embed. Unfortunately, ST3 is in one of those death-march betas that have been ongoing for years, fragmenting the plugin space. If you write a plugin for ST, you either need to write Python that simultaneously targets Python 2 and Python 3 (possible, but restrictive), or you need to maintain two…

> you either need to write Python that simultaneously targets Python 2 and Python 3

That's what we did for the WakaTime plugin, and it's worked great for us.

https://github.com/wakatime/sublime-wakatime

We did however have to use external python for the common python core instead of just importing the package, mainly because of the lack of ssl support in the embedded python.

Re: Sublime Text's Plugin API: It's Python, Sort Of

#30
post #27

They developed and tested their software on Macs. Yet they offered it to Windows and Linux customers without ever doing any testing on those platforms? Isn't that like saying my React app works on IE-11 so I'm sure it must work on IE-6?

I mean, in the sense that technically when you publish anything on GitHub/npm/PyPI/RubyGems/etc. you're "offering" it to Windows and Linux users – sure. Given that the editor plugin is not a standalone software product being sold, it seems perfectly reasonable to just put it out there and then let people report issues on their platform.
Post reply on HN