Welcome GSoC Candidates!

Please welcome this year’s students for the Google Summer of Code!

Edgar Simo:
Edgar is an undergrad in industrial engineering, and has volunteered to create an automated testing suite for SDL.

Martin Lowinski:
Martin is a computer science student studying abroad in Australia. Last year he worked on enhancing SDL 1.2 to take advantage of the multiple processors available on the Playstation 3 during an internship with IBM. This year he’d like to take his knowledge and use it to enhance SDL 1.3 on the Playstation 3.

Jiang Jiang:
Jiang has been working on text encoding, fonts and international input on Mac OS X. He will be applying his expertise on adding IME support to SDL 1.3 on Mac OS X.

Simeon Xenitellis:
Simeon has been working on GTK+ international text input methods, and will be applying those skills to add IME support to SDL 1.3 on X11.

As you can see, we have some talented people and exciting projects lined up for this year’s Summer of Code!

I’ve added a page on the SDL website for the Google Summer of Code projects
and I’ll be adding status updates as the summer progresses:
http://www.libsdl.org/gsoc.php

See ya!
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Many thanks Sam!

Along with Jiang, we will be working on enabling SDL 1.3 applications
to receive input (writing support) in many more scripts than currently
supported.
I will be focusing on X11 and Linux.

Cheers,
SimosOn Thu, May 7, 2009 at 2:06 PM, Sam Lantinga wrote:

Please welcome this year’s students for the Google Summer of Code!

Edgar Simo:
Edgar is an undergrad in industrial engineering, and has volunteered to create an automated testing suite for SDL.

Martin Lowinski:
Martin is a computer science student studying abroad in Australia. ?Last year he worked on enhancing SDL 1.2 to take advantage of the multiple processors available on the Playstation 3 during an internship with IBM. ?This year he’d like to take his knowledge and use it to enhance SDL 1.3 on the Playstation 3.

Jiang Jiang:
Jiang has been working on text encoding, fonts and international input on Mac OS X. ?He will be applying his expertise on adding IME support to SDL 1.3 on Mac OS X.

Simeon Xenitellis:
Simeon has been working on GTK+ international text input methods, and will be applying those skills to add IME support to SDL 1.3 on X11.

As you can see, we have some talented people and exciting projects lined up for this year’s Summer of Code!

I’ve added a page on the SDL website for the Google Summer of Code projects
and I’ll be adding status updates as the summer progresses:
? ? ? ?http://www.libsdl.org/gsoc.php

Edgar Simo:
Edgar is an undergrad in industrial engineering, and has volunteered to create an automated testing suite for SDL.

ZOMG! “make check”! You might become my new hero, Edgar! Especially if
you do the event system first… ;-)On Thu, May 7, 2009 at 9:06 AM, Sam Lantinga wrote:


http://pphaneuf.livejournal.com/

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

Some of you may recall me from doing the SDL 1.3 Haptic API, well it was
fun and here I am again. Like last year I’ll also be running a bit
later then other GSoC students due to my university schedule, but I’ll
make up for that again.

Pierre Phaneuf wrote:
| On Thu, May 7, 2009 at 9:06 AM, Sam Lantinga wrote:
|
|> Edgar Simo:
|> Edgar is an undergrad in industrial engineering, and has volunteered
to create an automated testing suite for SDL.
|
| ZOMG! “make check”! You might become my new hero, Edgar! Especially if
| you do the event system first… :wink:

Could do a “make check”, was thinking more of separating it like the
test section though, although make check would also be interesting and
more accessible.

The idea is to try to do as many platform neutral test cases as
possible, comparing API specification vs results. Some simple examples
would be to test blitting and alpha. The idea being that doing platform
neutral test cases will benefit the largest amount of users.

Eventually I guess I’ll have no choice but to make platform-specific
tests, although I’ll try to avoid that as much as possible.

My intention is to wrap it all up in a set of automated bash scripts
that will keep a log and indicate errors, warnings and just general
logging messages. This should then be able to be used to identify the
problems which could be either an issue with user set up or a problem
with SDL itself. Finally the output could be used for finding and
fixing regressions.

If anyone has advice or possible ideas for automated testing, feel free
to spread them here. My experience with automated testing isn’t as good
as I’d like it to be.

Edgar
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkoDSbEACgkQolm4VNX3QTyoRQCg1PhuhfiaANh1L4JXNbVIY/OE
7RgAn2td+8BG1mXPfwpXl685JMmPvyGM
=90eB
-----END PGP SIGNATURE-----

Could do a “make check”, was thinking more of separating it like the
test section though, although make check would also be interesting and
more accessible.

Basically, what I like best is a single command that you can run as
easily as possible (as little previous setup as possible), and gives
you a single pass/fail overall result. You can have more details in
the output, of course, but the very last end of the output should be
either PASS or FAIL (yes, in capital letters!). :wink:

Putting it in the makefile is handy, because you can simply make the
rule that runs the test depend on the test binary, so you can’t screw
up with “one last change, run the test, it passes (but I forgot to
recompile before running it, it would have failed, but a bunch of
other people will get to find out the painful way when they svn
update)”. The tests themselves can be all in one big binary, or in a
suite of binaries run in succession, but you can set it up so that the
overall “make check” will fail if any of them fails, for example, and
you also gain a few freebies like being able to do “make check -j3” to
actually run multiple tests at a time on a multi-core machine (tests
are never fast enough!). If the tests are in multiple binaries, you
can also run just one very easily.

The key idea is that testing before commit saves a lot of time between
all the different people who are impacted by a bad check-in, and the
only way people will do testing is if it’s super-easy. One command to
run before doing the commit is more likely to be used. At work, our
revision control system allows per-directory pre-commit hooks that run
on the client (instead of on the server), so it’s one step further:
it’s IMPOSSIBLE to even commit code that doesn’t pass the tests in
those directories!

The idea is to try to do as many platform neutral test cases as
possible, comparing API specification vs results. ?Some simple examples
would be to test blitting and alpha. ?The idea being that doing platform
neutral test cases will benefit the largest amount of users.

Sounds good!

Eventually I guess I’ll have no choice but to make platform-specific
tests, although I’ll try to avoid that as much as possible.

You might be able to go a long way doing mocking, providing fake
implementations of platform-specific APIs that just check that they
are called in the right order and with the right parameters, returning
canned output (so you can make them appear to “fail” at will to test
error-handling, say). It’s best to do as little mocking as possible,
because it opens the possibility of baking your assumptions in (in the
worst case, you can make a test that verifies that the code is
buggy, by accident!), but when dealing with the kind of APIs that
SDL uses, they seem like a good idea.

If you go to the extreme of mocking, you could actually do things like
test the Windows backend code on Linux (or any other platform), say,
which is pretty awesome for those changes that involve systems where
you do not have access (see the recent WinCE changes, for example, Sam
doesn’t have what’s needed to test this at all, he has to commit on
good faith).

My intention is to wrap it all up in a set of automated bash scripts
that will keep a log and indicate errors, warnings and just general
logging messages. ? This should then be able to be used to identify the
problems which could be either an issue with user set up or a problem
with SDL itself. ?Finally the output could be used for finding and
fixing regressions.

If anyone has advice or possible ideas for automated testing, feel free
to spread them here. ?My experience with automated testing isn’t as good
as I’d like it to be.

My first pick would probably be googletest
(http://code.google.com/p/googletest/), since I use that all the time
and I know it works really well, but it’s written in the One True
Language (also known as the Most Evil Language, depending), so it
might not be acceptable (it can test C code, though, and seriously,
who the heck has a C compiler but no C++ compiler?!?). I also commonly
use Boost.Test, but it’s in the same boat of excellent/evilness…

There’s cmockery (http://code.google.com/p/cmockery/), which is pretty
simple, in C, and unlike most others, provides explicit support for
mocking, which might be very handy here, as I mentioned.

CuTest (http://cutest.sourceforge.net/) is all right, although rather
basic, but has the great quality of being tiny and super-easy to drop
right into SDL, so that there wouldn’t be any dependencies to install
for testing (removing hurdles to testing, which is good!).

Check (http://check.sourceforge.net/) is well-used, and most
importantly, widely packaged on Linux distributions, so it’s often
just an “aptitude” or “yum” command away. In the same line of thought,
CPlusTest is bundled with Mac OS X (well, Xcode), but it’s in C++, not
much of a fan of it either.

CUnit (http://cunit.sourceforge.net/) is classic, but I personally
think it’s a bit crazy and too much (a curses UI?!? whoa).

Automated tests are SUPER addictive. Once you have them, it feels
crippling to work on a project that doesn’t (for an example, it’s my
main excuse for why my “efficient waiting for event” patch is not done
yet!). ;-)On Thu, May 7, 2009 at 4:50 PM, Edgar Simo wrote:


http://pphaneuf.livejournal.com/

Basically, what I like best is a single command that you can run as
easily as possible (as little previous setup as possible), and gives
you a single pass/fail overall result. You can have more details in
the output, of course, but the very last end of the output should be
either PASS or FAIL (yes, in capital letters!). :wink:

How exactly do you do that when you’re testing a graphics API? The
blit operation could return the right result code, but the colors might
be all off (how many threads have we seen about issues like that on
here?) and you can only really tell by looking at the screen.

Sure, you could have it programmatically test every pixel to make sure
you get the right value, but that would be a big mess…>----- Original Message ----

From: Pierre Phaneuf
Subject: Re: [SDL] Welcome GSoC Candidates!

Basically, what I like best is a single command that you can run as
easily as possible (as little previous setup as possible), and gives
you a single pass/fail overall result. You can have more details in
the output, of course, but the very last end of the output should be
either PASS or FAIL (yes, in capital letters!). :wink:

How exactly do you do that when you’re testing a graphics API? ?The
blit operation could return the right result code, but the colors might
be all off (how many threads have we seen about issues like that on
here?) and you can only really tell by looking at the screen.

Sure, you could have it programmatically test every pixel to make sure
you get the right value, but that would be a big mess…

You don’t necessarily have to test every pixel individually, you can
use a golden file (say, a PNG of what the result is supposed to be),
which is something that could be easily generalized (picture a
function that takes an SDL_Surface and the filename of an image file,
and tells you if it’s the same thing, or two SDL_Surface, whatever is
most convenient). There’s a bit of a tricky bit where in some
situations, there can be some variance (think of rounding errors in
alpha calculations, for example), but you can add a "close enough"
acceptable variance (this is pretty much required for comparing
floats, for example, pretty much all testing frameworks with an
equality check will have a version for floats with the acceptable
variance). You can do something similar with sound, too.

It might sound messy, but you’ve got to do what you’ve got to do. With
automated tests like that, we would have had fewer of those threads…
;-)On Thu, May 7, 2009 at 6:30 PM, Mason Wheeler wrote:


http://pphaneuf.livejournal.com/

Hi mailinglist,

I will be working on the Playstation3 port which was the result of my
internship last semester. First step will be reviewing the current
code (if you tested the code, please let me know ;)) and to look for a
better way to integrate the SPU code into SDL. At the moment you have to
compile this code separately before you actually can compile SDL with
the ps3 video driver.
But the more important step will be to enhance SDL 1.3 on the PS3.

Cheers, Martin

Sam Lantinga wrote:> Please welcome this year’s students for the Google Summer of Code!

Edgar Simo: Edgar is an undergrad in industrial engineering, and has
volunteered to create an automated testing suite for SDL.

Martin Lowinski: Martin is a computer science student studying abroad
in Australia. Last year he worked on enhancing SDL 1.2 to take
advantage of the multiple processors available on the Playstation 3
during an internship with IBM. This year he’d like to take his
knowledge and use it to enhance SDL 1.3 on the Playstation 3.

Jiang Jiang: Jiang has been working on text encoding, fonts and
international input on Mac OS X. He will be applying his expertise
on adding IME support to SDL 1.3 on Mac OS X.

Simeon Xenitellis: Simeon has been working on GTK+ international text
input methods, and will be applying those skills to add IME support
to SDL 1.3 on X11.

As you can see, we have some talented people and exciting projects
lined up for this year’s Summer of Code!

I’ve added a page on the SDL website for the Google Summer of Code
projects and I’ll be adding status updates as the summer progresses:
http://www.libsdl.org/gsoc.php

See ya! -Sam Lantinga, Founder and President, Galaxy Gameworks LLC
_______________________________________________ SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Basically, what I like best is a single command that you can run as
easily as possible (as little previous setup as possible), and gives
you a single pass/fail overall result. You can have more details in
the output, of course, but the very last end of the output should be
either PASS or FAIL (yes, in capital letters!). :wink:

How exactly do you do that when you’re testing a graphics API? ?The
blit operation could return the right result code, but the colors might
be all off (how many threads have we seen about issues like that on
here?) and you can only really tell by looking at the screen.

Sure, you could have it programmatically test every pixel to make sure
you get the right value, but that would be a big mess…

You don’t necessarily have to test every pixel individually, you can
use a golden file (say, a PNG of what the result is supposed to be),
which is something that could be easily generalized (picture a
function that takes an SDL_Surface and the filename of an image file,
and tells you if it’s the same thing, or two SDL_Surface, whatever is
most convenient). There’s a bit of a tricky bit where in some
situations, there can be some variance (think of rounding errors in
alpha calculations, for example), but you can add a "close enough"
acceptable variance (this is pretty much required for comparing
floats, for example, pretty much all testing frameworks with an
equality check will have a version for floats with the acceptable
variance). You can do something similar with sound, too.

It might sound messy, but you’ve got to do what you’ve got to do. With
automated tests like that, we would have had fewer of those threads…
:wink:

The concept of “close enough” is very important in a project like
this. If you look at the history of X versus the history of Windows
you can see why. X specified things down to a level where you knew
exactly what was going to be produced all the way down to the least
significant bit of every pixel. For example, it told you exactly which
pixels of a line must be touched and which must not be touched. That
was fine back in the '80s. It all started to fall apart when better
hardware acceleration came along. The trouble is that the line drawing
and triangle drawing code in accelerators didn’t always comply with
what X specified. People trying to build X compliant graphics
accelerators faced serious problems trying to stay in compliance. (I
know all about it, I was there.)

Windows always took the “close enough” approach. To Windows a line is
a line and as long as it started on the right pixel and ended on the
right pixel who cares exactly which pixels it touches as long as it is
a line? That attitude allowed graphics accelerators to take many
different approaches.

SDLs graphics API is very small compared to either the X or Windows
API, but still, be very careful to take into account all the different
possible back ends. What matters is that the results look the same,
not that they be the same.

Bob PendletonOn Thu, May 7, 2009 at 6:28 PM, Pierre Phaneuf wrote:

On Thu, May 7, 2009 at 6:30 PM, Mason Wheeler wrote:


http://pphaneuf.livejournal.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


±----------------------------------------------------------

Hi,On Thu, May 7, 2009 at 9:06 PM, Sam Lantinga wrote:

Please welcome this year’s students for the Google Summer of Code!

As Simos said, we are working on a Unicode text input support for SDL
1.3. I’m focus on Mac OS X side, so I will first try to study the
current Cocoa/Quartz code in SDL 1.3.

  • Jiang

Yay! :slight_smile: In Tux Paint we ended up creating our own UI (well, rather,
keystroke-based toggling system) for providing IM for languages that
are more complex than what SDL’s Unicode events could send us.
(We added support for Japanese (Romanized Hiragana & Romanized Katakana),
Korean, Chinese (Traditional) and Thai), so far. By ‘we’, I mean
’other people in the project’ ;^) )

Having IM stuff “just work” without coding it ourselves will be nice. :wink:
Good luck and thanks!

-bill!
http://www.tuxpaint.org/On Thu, May 07, 2009 at 07:27:03PM +0100, Simos Xenitellis wrote:

Jiang Jiang:
Jiang has been working on text encoding, fonts and international input on Mac OS X. ?He will be applying his expertise on adding IME support to SDL 1.3 on Mac OS X.

Simeon Xenitellis:
Simeon has been working on GTK+ international text input methods, and will be applying those skills to add IME support to SDL 1.3 on X11.

Many thanks Sam!

Along with Jiang, we will be working on enabling SDL 1.3 applications
to receive input (writing support) in many more scripts than currently
supported.
I will be focusing on X11 and Linux.

I just want to add that it is well worth the time of the folks working
on IM support for SDL to take a long, careful, and detailed, looked at
the TUX paint input code. We did that the last time this was worked on
for SDL and learned a lot. IMHO, porting the TUX paint code into SDL
1.3 would go a long way toward solving the problem. The main thing
that I didn’t see a good solution for was how to make the IM work with
the UI for a a specific application. We may need some new SDL events
to coordinate an applications UI with the IM.

Bill, can you comment on what I just said? I believe you have the most
applicable experience.

Bob Pendleton

P.S.

I’m listed as some sort of a mentor for the SDL GSOC projects so I
guess this is official mentoring…On Sun, May 10, 2009 at 11:32 AM, Bill Kendrick wrote:

On Thu, May 07, 2009 at 07:27:03PM +0100, Simos Xenitellis wrote:

Jiang Jiang:
Jiang has been working on text encoding, fonts and international input on Mac OS X. ?He will be applying his expertise on adding IME support to SDL 1.3 on Mac OS X.

Simeon Xenitellis:
Simeon has been working on GTK+ international text input methods, and will be applying those skills to add IME support to SDL 1.3 on X11.

Many thanks Sam!

Along with Jiang, we will be working on enabling SDL 1.3 applications
to receive input (writing support) in many more scripts than currently
supported.
I will be focusing on X11 and Linux.

Yay! :slight_smile: ?In Tux Paint we ended up creating our own UI (well, rather,
keystroke-based toggling system) for providing IM for languages that
are more complex than what SDL’s Unicode events could send us.
(We added support for Japanese (Romanized Hiragana & Romanized Katakana),
Korean, Chinese (Traditional) and Thai), so far. ?By ‘we’, I mean
’other people in the project’ ;^) )

Having IM stuff “just work” without coding it ourselves will be nice. :wink:
Good luck and thanks!

-bill!
http://www.tuxpaint.org/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


±----------------------------------------------------------