Home Download Buy Blog Forum Support

SublimeREPL

Re: SublimeREPL

Postby xeno.by on Mon Jan 30, 2012 10:04 am

wuub wrote:
C0D312 wrote:Is it cross-platform?


OSX and Linux for now.

At some point probably plink and cygwin/bash on windows.

Any chance this will support native windows terminal? Would be absolutely lovely to have far manager inside sublime.

edit. Also, doskey support would be another great feature.
xeno.by
 
Posts: 104
Joined: Mon Jan 30, 2012 10:03 am
Location: Lausanne, Switzerland

Re: SublimeREPL

Postby wuub on Mon Jan 30, 2012 10:49 am

xeno.by wrote:
wuub wrote:
C0D312 wrote:At some point probably plink and cygwin/bash on windows.

Any chance this will support native windows terminal?


Who knows, maybe... If the pty/pyte version proves to be useful, then I'll probably give the ctypes.windll.kernel32.HELL another go. I looked at what Conque is doing wrt console handling on windows. Saying that it's a mess is an understatement.
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimeREPL

Postby sublimator on Mon Jan 30, 2012 11:46 am

Sweet!

You could paint contiguous characters, grouped by line, of like highlighting, as one region? Dunno about removing borders.

Was briefly pondering a custom font/theme/grammar but it wouldn't be combinatorically feasible. Basically running the ascii set a few times in the font for some fg/bg color combinations, respresented by some nonsense unicode ordinal in the text for the grammar/theme to work.

Terminal emulation really would be a cool thing to have. What did you end up doing or plan to do about the combinatoric explosion of the keybindings?

a custom tmTheme file to emulate terminal colors.


>>> sum(xrange(256))
32640

256 color pallete, with combinations of fg & bg == 32640 colors? You don't really need *all* those color combinations though huh?

I wonder if it would be feasible to allow the the setting of colors directly with view.add_regions?
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: SublimeREPL

Postby sublimator on Mon Jan 30, 2012 11:56 am

http://www.jimloy.com/algebra/gauss.htm

>>> 256*(256-1)/2
32640

sum(xrange(...)) .... Gauss would be rolling in his grave.
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: SublimeREPL

Postby wuub on Mon Jan 30, 2012 12:13 pm

castles_made_of_sand wrote:You could paint contiguous characters, grouped by line, of like highlighting, as one region?

I played with the idea for a while, but decided against it:
1) Its more complicated and I've got enough complexity to deal with already ;)
2) Setting a region for each char is not as slow as you would think. After all how many are there on the screen at once? 1500? 2000? It's usable even if I do a full screen redraw each time a new char comes in. With diff updates it will be even less noticeable.
3) I gain a stable refresh time, colorfulness (or lack of thereof) does not influence redraw times.

Terminal emulation really would be a cool thing to have.

I'm pretty sure that I solved all major problems already (at least on linux). The question is no longer "if" but "when".

Did you know that:
Code: Select all
import os
os.fork()

closes sublime instantly? :)


What did you end up doing or plan to do about the combinatoric explosion of the keybindings?


This: Default.sublime-keymap 473 KB (484 945 bytes) :-D

256 color pallete, with combinations of fg & bg == 32640 colors? You don't really need *all* those color combinations though huh?


I didn't even think about doing xterm-256 this way. Unless John adds another API for setting font fg/bg/style, I'm sticking to TERM=linux and 8fg/8bg colors http://pueblo.sourceforge.net/doc/manua ... codes.html
With text styles even ASCII colors are a lot to handle: fg[8].bg[8].reverse[2].strikethrough[2].underline[2].underscore[2] = 8*8*2^4 = 1024 styles

EDIT: I could probably cut it down, but it's still in the same range.

I wonder if it would be feasible to allow the the setting of colors directly with view.add_regions?


It would simplify things greatly for xterm-256, but for now it's more important to get rid of region borders.
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimeREPL

Postby sublimator on Mon Jan 30, 2012 12:27 pm

wuub wrote: You could paint contiguous characters, grouped by line, of like highlighting, as one region?
I played with the idea for a while, but decided against it:


With the terminal emulator, you just `paint` sections at a time? Just the diffs?

I guess then you'd have to do a bunch of RegionSet operations like subtract if you were to do contigs.

wuub wrote:for now it's more important to get rid of region borders.


That's actually what I was suggesting the above for.


Man, I wish I was on linux to have a play :( I'll definitely help out with any windows stuff.
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: SublimeREPL

Postby wuub on Mon Jan 30, 2012 12:42 pm

With the terminal emulator, you just `paint` sections at a time? Just the diffs?

This pre-pre-pre-alpha repaints whole screens, but process running in a terminal can update a single char if it wants (set_cursor_pos(x,y); print('x')). I would probably do something in a middle: per-line updates.

I guess then you'd have to do a bunch of RegionSet operations like subtract if you were to do contigs.

Yes.

wuub wrote:for now it's more important to get rid of region borders.

That's actually what I was suggesting the above for.


It's only a partial solution. It could work for screens that are mostly one style: ipython, irb, ssh. But anything based on curses would still look like a mess. I think if i had to choose, I prefer black/white version instead.

Man, I wish I was on linux to have a play :( I'll definitely help out with any windows stuff.


Don't despair :) I use windows exclusively at work == I want to make it cross-platform as well. It's just that for this specific purpose I can iterate faster on a platform that has pty module.
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimeREPL

Postby sublimator on Mon Jan 30, 2012 12:48 pm

wuub wrote:It's only a partial solution.


Yeah, I meant for like a slight improvement while you are waiting for Jon.

I actually have a Python implementation of RegionSet if you want. Don't think you do though.

Don't despair :) I use windows exclusively at work


Awesome. I take it all back. I definitely won't help ... haha
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: SublimeREPL

Postby sublimator on Mon Jan 30, 2012 12:52 pm

You know I reckon it'd probably look better without the contigs anyway. At least with the tonnes of outlines it's consistently fucked up eh?

I mean wrt: bordered areas drawing the eye perhaps
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: SublimeREPL

Postby wuub on Mon Jan 30, 2012 1:10 pm

castles_made_of_sand wrote:You know I reckon it'd probably look better without the contigs anyway. At least with the tonnes of outlines it's consistently fucked up eh?
I mean wrt: bordered areas drawing the eye perhaps


My thoughts exactly.
I really hope that Jon will add a sublime.DRAW_RECTANGULAR_NO_BORDER or something similar to add_regions()
Last edited by wuub on Tue Jan 31, 2012 5:26 pm, edited 6 times in total.
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 7 guests