On Fri, Jan 23, 2015 at 3:48 PM, LM <lme...@gmail.com> wrote:
> On Thu, Jan 22, 2015 at 4:25 PM, Daniel Goldman <dgold...@ehdp.com> wrote:
>> Could you explain a little what SDL is, advantages, disadvantages? Sorry for
>> my ignorance. Daniel
>
> SDL is a graphics library that has been ported to several platforms.
> PDCurses already has support for SDL 1.2.x built in.   However, around
> 2012 the SDL developers completely rewrote the library and the new
> versions (SDL 2.x) are not backward compatible with the older ones.
> SDL2 works on Windows, Mac OS X, Linux, BSD, iOS and Android.  You can
> build SDL2 on Linux to work with X or DirectFB (if you want to avoid
> X).  There's also support in the works for Wayland on Linux.  Also
> noticed, SDL2 has some support for clipboard functionality.  Will be
> interesting to see how that works with PDCurses and how well
> applications might be able to share the clipboard.

I am pretty much interested in getting in making PDCurses more
accessible. My experience with SDL2 is that it outloads graphic
processing completely to GPU and you'd still need to understand
some details of textures and 3D programming.

My interest is to make PDCurses accessible from Python. I am not
using C, because I find Python more satisfying to work with for my
non-realtime means. There is a binding that can make experimenting
with C API easier:
http://pysdl2.readthedocs.org/en/latest/modules/sdl2.html to

> The main advantage of using SDL 1.2.x or SDL2 as a back-end for
> PDCurses is portability which is what I'm most interested in.

For portability I'd update / augment build system for PDCurses to
something like SCons, so that it can be compiled it on Windows /
Linux and BSD in the same way.

> working with it.  The nice thing is, as long as one sticks to the
> basic curses API, it should be fairly easy to port applications to
> whichever version of PDcurses or even ncurses someone wants to use.

Is there an official list of this `basic curses API`? Something like
"safe ALSA subset" for curses.

> I'm just getting starting with the SDL 2.x port of PDCurses and I have
> some work to do before I'm satisfied with the port and ready to share
> the code somewhere.

Huh? I agree that dealing with CVS requires too much effort to actually
share the code. That's not the cause with Mercurial and Git, and I'd
actually prefer to see the code available there so that it could be forked
more easily.

>   However, now would definitely be a good time if
> anyone has any input on design issues.  I'm keeping all the SDL 1.2.x
> code and adding the SDL 2.x code based on the preprocessor condition
> (SDL_VERSION_ATLEAST(2, 0, 0)).  As mentioned, I'm looking at using
> the SDL2 clipboard functionality instead of the internal clipboard
> used with SDL 1.2.x.  I'm also experimenting with SDL2_TTF support
> instead of a bitmap font.  Still looking into if/how best to support
> Unicode/UTF-8 and any suggestions in that area would be appreciated.

The problem with .ttf fonts I faced is that it is hard to find exactly
monospace fonts on Windows. Here are the gory details and a test code
https://code.google.com/p/pyglet/issues/detail?id=744

For Linux I didn't even started.

Basically I started making an interface in pyglet when I couldn't get
curses compile for Windows (including PDcurses), not speaking making
it work with Python. So, issue with upgrading the build toolchain and
accessing the code is very actual.

> Mark Hessling wrote:
>>I started my own port about 6 months ago, but other higher priority things 
>>got in the way and I didn't get very far :-(
>
> If you have any useful tips or ideas from the port you started, please
> let me know.
>
> When I have something I feel is stable and well tested, I'll be sure
> to post here about it.

It is absolutely ok to release as early as possible and maintain some
kind of page with progress http://buildbot.pypy.org/numpy-status/latest.html
This way people can join and help on the way.
-- 
anatoly t.

Reply via email to