Marc Lehmann <schmorp@...> writes: > On Thu, Jul 18, 2013 at 01:04:26PM +0400, Антон Кочков <anton.kochkov <at> gmail.com> wrote: > > First of all, ncurses have no support for 16M colors palette. Then, > > curses (and ncurses) support up to 1e9 colours - thats quite a bit more > than a measly 16m colours (that's 29.9 bit colour, not quite 30). > > It would definitely be more than sufficient for radare2's purposes. > > > hardcoding ansi codes is not really a crappy way > > First, this is not about ansi codes, this is about the non-ansi codes used > by both urxvt and xterm to change colours. > > In any case, you are free to call it whatever you like, but hardcoding a > command sequence when you can ask a standard library for the code in a > portable way easily alls under "crappy coding" in my book. > > It's exxactly the kind of thing only crappy apps do. Proper apps use > standard mechanisms that have been proven to work for decades and are > available on every unix system. > > Note that the case at hand is much worse: your app hardcodes a command > sequence _and then refuses to use it in a compatible terminal_. If radare2 > would use the xterm sequence it would just work. It would still be crappy > coding, but at least, it would work in two terminals and not just one. > > > see vim sources as an example. > > Vim, of course, does a lot of crappy things, such as not being utf-8 > compatible in a utf-8 terminal by default, by expecting high bits to mean > something other than multibyte character... > > If vim hardcodes the urxvt command sequence to change colours and then > refuses to use it even though the terminal supports it (and support can > be programmatically queried), then calling that "crappy coding" is rather > positive. >
Two years later and even more applications support this: https://gist.github.com/XVilka/8346728 Is there any chance of standardizing this already? Even if this is not standard, I don't see why supporting non-standard escape codes in URxvt is going to be a problem - it's not like it doesn't do that already, take \033]50;FONT\007 for example. Also note that obviously people are not going to use it in "serious" applications, it's mostly for things like colorful commands prompts, ascii art, scripted progress bars etc, all of which falls under "private" usage. I too perceive radare2 relying on such an unofficial extension as a failure (especially that I don't see any reason why it would need support for full RGB color space), but that doesn't make me want having support for this in URxvt any less. _______________________________________________ rxvt-unicode mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode
