Re: [pygame] teaching resources

2017-03-18 Thread Daniel Foerster
In particular, "A Newbie Guide to pygame" is woefully outdated. Honestly,
it was outdated enough back when I was reading it for the first time in
2011 that I made a version with a bunch of comments correcting its advice.
I don't use Pygame much these days, but it'd be great if someone who is
would make a replacement.

On Sat, Mar 18, 2017 at 5:46 AM, Ian Mallett  wrote:

> On Sat, Mar 18, 2017 at 4:20 AM, René Dudfield  wrote:
>
>> Whilst there are now more than a dozen books, and video series in many
>> languages for teaching pygame, I'd like to include a new section on the
>> website for educational resources for teachers. Or even better, to be able
>> to point to an existing resource.  Not particularly for 'pygame', but for
>> digital education in general, or at least python related. I wonder if you
>> have any thoughts on this?
>>
> ​This sounds awfully non-orthogonal to various current movements to bring
> CS education to the masses (which typically means coding instead, alas, but
> yet). Honestly, I'm not sure how valuable a new resource here would
> be--surely, there are educational sites for teaching, and same but specific
> for Python?
>
> What makes sense to me would be a section specifically on using pygame. We
> already have something of this sort (I know; I've been
> looking-at/sprucing-up the current tutorials), but these are largely dated,
> and don't span the whole of what pygame has to offer. They're also
> text-dense, which is apparently not a popular way to learn things anymore.
>
>
>> Anything else I should link to?
>>
> ​What would have been most helpful for me when I learned pygame would have
> been some solid foundation to build on. I offer my pygame hello world
> 
> and pygame-GL-2 hello world
> 
> as minimal, best-practices, public-domain resources (links have been stable
> for years, but mirroring would be ideal).
>
> Ian​
>


Re: [pygame] pygame with SDL2 proposal

2017-03-18 Thread bw

Hi, thanks for inviting me to opine. :)

I like it. But "import pygumm" looks a lot more handsome than "import 
pygame2". Seriously.


Having had much recent experience with a SDL2 implementation (pypy, 
CFFI, plus all the SDL2 libs), I found that I would really like to see 
in the next generation:


1. CFFI wrapper. It is Python, which any of us can write, and it exposes 
all of the SDL2 API to programmers, not just what the C developers 
choose to expose. This would make pygame superbly extensible. And it 
would allow easy ad hoc inclusion of third-party prebuilt libs, 
something that is a fairly high bar to hurdle in pygame gen 1.


2. CFFI would also make pygame compatible with pypy, something which is 
sorely needed in my opinion. One can use optimization tricks to 
compensate for CPython's speed limit, but one cannot do many things that 
are computationally intensive without farming out to a third-party 
opaque library. pypy could let coders do a lot more in Python, when a 
full blown physics/geometry/numeric/scientific opaque lib is overkill.


3. I had acquired the problem of a slower Rect in pypy, however, because 
pygame has a pyd and I'm not spiffy enough to port it to anything but 
Python. If CFFI and pypy are an option worthy of consideration, Rect 
would be best done in a shared library. Rect is truly a workhorse, and 
pypy Rects can't compete with pygame Rects under heavy usage of Rect() 
and inflate and move, etc. In pygame most of my time is spent in blit(). 
In pypy most of my time is spent in Rect, because the class is 100% 
Python except for the four-slot CFFI data structure.


See what can be done with CFFI and pypy here:
http://pygame.org/project/2957
https://bitbucket.org/gummbum/gsdl2

I made a number of releases and games And a few drop-in tests "import 
gsdl2 as pygame", but it ain't perfect. However, I wasn't trying hard 
for software rendering compatibility, I was shooting for the new texture 
features. As expected, I discovered that all of the software-blit 
optimization tricks that I solved in gummworld2 were no longer needed.


Sounds like a few of you have already put a lot of thought and 
discussion into the next gen, and I understand this is something 
completely different. I certainly don't propose gsdl2 as a new code 
base. But it would be grand if choose to use CFFI. I have no stake in 
seeing my code transform into a butterfly, but if parts of it are useful 
then good.


Also, an acceptable alternative might be to provide CFFI-compatible 
shared libs so that people who want to use pypy have that choice, even 
if they do not have the nice pygame API available. If so, anybody could 
write a pygame-like API just like I did, and it doesn't need to be 
maintained by the pygame core developers.



On 3/18/2017 5:02 AM, René Dudfield wrote:

Hello,

so, I've spent some more time reading source code, and investigating 
SDL2 and the options a lot.


I *think* this plan below could be the best way forward for us.

tldr;
 * have a single source SDL1, and SDL2 code base with a compile time 
option. (like we have single source py2 and py3).

 * move bitbucket/pygame repo to github/pygame.


Rather than reimplementing everything, and introducing lots of 
compatibility bugs, Instead I think a gradual approach would work 
better. I'm starting to think that perhaps pygame_sdl2 by Tom, is not 
such a great way forward (for the pygame project, I think it was 
necessary and good for Ren'Py).


A big breaking change is kind of silly for how little resources we 
have. Python 3 managed to pull it off... after a decade, and with 
massive resources having poured into it. And it only took off once 
they put compatibility code back in. Here's the thread where some 
discussion has been happening.

https://bitbucket.org/pygame/pygame/issues/174/pygame-20-the-sdl2-edition


What we do have is some patches to get the current code base working 
with SDL2.

https://bitbucket.org/llindstrom/pygame-1.10-patch

I think it should be possible with some work to improve an SDL2 
compatibility layer, so that pygame code base can work with either (as 
a compile time option). Then newer APIs can be introduced in time, in 
a non break-every-program kind of way. Also, it's been proven that 
'hardware' blitting does not need to break SDL1 API compatibility to 
use hardware accelerated APIs (Angle, SDL_gpu, [insert 4 or 5 other 
projects], ...).


Having a pygame2, or whatever separate repo would also make 
maintenance harder. Since for the foreseeable future, we will likely 
need to do maintenance releases for this anyway (at least I want to!, 
and I know other users of pygame will).


---

For pip uploads, they would continue to be for SDL1, until we can 
finish the SDL2 changes, and it works better. There would be no new 
additions until compatibility is mostly there.


The work would progress by slowly adding in compatibility changes 
whilst keeping pygame working. By keeping the SDL2 patch set as is, 
and 

Re: [pygame] No confirm instructions sent?

2017-03-18 Thread bw

Hi, again.

4:35 AM UTC, Internal Server Error

I filled in every field, and selected the image. I tried to click that 
Continue button just right...but alas. :)



On 3/17/2017 10:31 PM, René Dudfield wrote:

Hi again,

that's fixed now.

cheers,

On Fri, Mar 17, 2017 at 4:30 AM, bw > wrote:


Okie dokie. I confirmed that I can't see the project in my project
list. And I don't see any way to search, so I dug through the
libraries tag and didn't see it in there, either.

I just tried again and met the same error. The time was 3:26 AM UTC.

On 3/16/2017 9:11 AM, B W wrote:

The project name is HUD Light.

On Thu, Mar 16, 2017 at 9:09 AM, B W > wrote:

I did upload a png along with the project entry. Maybe that
is the part that failed. When I refreshed my projects, I
didn't see the new one in the list. I will check again later
when I have access.

On Thu, Mar 16, 2017 at 1:28 AM, René Dudfield
> wrote:

It looks like the new project saved... but there's no
image. Did you upload an image?

I didn't see an error in the logs, and I just made a new
project myself with no troubles. Can you give me any
other info?

cheers,


On Thu, Mar 16, 2017 at 5:48 AM, bw
> wrote:

It worked! Thanks.

Now I am getting Internal Server Error when I try to
create a new project. =)


On 3/15/2017 4:49 AM, René Dudfield wrote:

Sorry about that. Yes, that's fixed now.

cheers,

On Wed, Mar 15, 2017 at 5:12 AM, bw
> wrote:

Hi, René. I am getting Internal Server Error
when clicking the Resend Confirmation button. No
other details are provided, and I'm not
receiving a confirmation email. Dunno if you are
looking into this.



On 3/12/2017 1:34 AM, René Dudfield wrote:

Hi,

hopefully a confirmation email arrived for
you now.

cheers,















[pygame] spam report

2017-03-18 Thread René Dudfield
Hello,

it looks like the spammers have finally been stopped(so far).

   - nofollow on links
   - spam classifier for comments
   - check new signups against spam black lists
   - cloudflare web app firewall in front
   - limit number of signup attempts to 4/hour at flask level
   - better email validation
   - block repeated failed attempts at iptables level.
   - bounce email processing

That's without enabling 'newbies can not post for two hours'. I'll see how
this goes over the next week. Fingers crossed it's mostly automated.


cheerio,


[pygame] pygame with SDL2 proposal

2017-03-18 Thread René Dudfield
Hello,

so, I've spent some more time reading source code, and investigating SDL2
and the options a lot.

I *think* this plan below could be the best way forward for us.

tldr;
 * have a single source SDL1, and SDL2 code base with a compile time
option. (like we have single source py2 and py3).
 * move bitbucket/pygame repo to github/pygame.


Rather than reimplementing everything, and introducing lots of
compatibility bugs, Instead I think a gradual approach would work better.
I'm starting to think that perhaps pygame_sdl2 by Tom, is not such a great
way forward (for the pygame project, I think it was necessary and good for
Ren'Py).

A big breaking change is kind of silly for how little resources we have.
Python 3 managed to pull it off... after a decade, and with massive
resources having poured into it. And it only took off once they put
compatibility code back in. Here's the thread where some discussion has
been happening.
https://bitbucket.org/pygame/pygame/issues/174/pygame-20-the-sdl2-edition


What we do have is some patches to get the current code base working with
SDL2.
https://bitbucket.org/llindstrom/pygame-1.10-patch

I think it should be possible with some work to improve an SDL2
compatibility layer, so that pygame code base can work with either (as a
compile time option). Then newer APIs can be introduced in time, in a non
break-every-program kind of way. Also, it's been proven that 'hardware'
blitting does not need to break SDL1 API compatibility to use hardware
accelerated APIs (Angle, SDL_gpu, [insert 4 or 5 other projects], ...).

Having a pygame2, or whatever separate repo would also make maintenance
harder. Since for the foreseeable future, we will likely need to do
maintenance releases for this anyway (at least I want to!, and I know other
users of pygame will).

---

For pip uploads, they would continue to be for SDL1, until we can finish
the SDL2 changes, and it works better. There would be no new additions
until compatibility is mostly there.

The work would progress by slowly adding in compatibility changes whilst
keeping pygame working. By keeping the SDL2 patch set as is, and slowly
reducing the patch set until it is size zero. So we always have a pygame
with sdl2, and a pygame with sdl1 that is producible. Eventually the patch
set will disappear.

---

A pygame2 module would just cause confusion amongst users, and that really
boring 'pygame 1 or pygame 2' type debate would go on, and on like the
"python 2, verses python 3" one did. For me, just avoiding that discussion
for the next decade would be worth it.

Then there would need to be two sets of documentation on the website. And
two sets of tutorials... and... we'd have 2 of everything to *do*, and 2 of
everything for people to look at.

Finally, "import pygame2" looks kind of weird. I've grown used to "import
pygame".

...



I'm keen to get moving on this. I've been trying to get feedback on the
'pygame sdl2 addition' issue for the last month, and the issue has been
open since 2013. So I'd like to put a time limit on this decision for one
more week.

I'd really like to hear back from contributors, and users (everyone).




ps. Interestingly SDL_gfx has an SDL2 release now.
http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/


Re: [pygame] teaching resources

2017-03-18 Thread René Dudfield
On Sat, Mar 18, 2017 at 12:37 PM, Paul Vincent Craven  wrote:

> I've worked on http://programarcadegames.com for about 7 years now. I've
> led hundreds of students through the material, updated it, and improved it
> every week. With the examples, translations,  and videos, I really think it
> is the best quality educational resource for Pygame out there. I know I'm
> biased, but I don't think any other resource has had more editing not had
> more students go through it.
>
>
Definitely, this should go on there.


Re: [pygame] teaching resources

2017-03-18 Thread René Dudfield
On Sat, Mar 18, 2017 at 12:23 PM, Craig Maloney  wrote:

> * René Dudfield (ren...@gmail.com) wrote:
> > Hello,
> >
> > A teacher sent me a photo of a wall showing drawings the kids all made
> with
> > pygame and printed the other day. He did it for a drawing class. Another
> > did a class with 'sound boards', where the kids jumped around on the
> dance
> > mats making 'music'. For me it would be interesting to send her a link
> with
> > resources for teaching music. She also teaches Finnish, and is always
> > interested in finding resources to do that in an interesting way. So if
> > there's something I can link to people by topic, that would be awesome
> > sauce?
>
> I'm wondering if there might be room on the Pygame site for a "uses"
> category to show folks what Pygame could be used for. Perhaps this could
> be incorporated into the "Releases" section? Or it could be a separate,
> curated section where a certain "featured" tag gets placed on a release
> to put it into this menu?
>
>
Great idea!

A "What can you do with pygame?" type section.

Bringing back the 'spotlight' projects would be nice. Project of the
week/month, or something like your featured tag.



> I'd re-state the original question though. Is this looking to highlight
> Pygame's usage as more than just a game library, or is this to highlight
> some of the educational resources that Python offers educators?
>
>
Well, this question was about teaching resources... but yes, it would be
nice to highlight that it can be used for other things than games.

Definitely, I think this is also a good page we should have on there.



>
> --
>   Craig Maloney  (cr...@decafbad.net)  http://decafbad.net
>


Re: [pygame] teaching resources

2017-03-18 Thread René Dudfield
On Sat, Mar 18, 2017 at 11:46 AM, Ian Mallett  wrote:

> On Sat, Mar 18, 2017 at 4:20 AM, René Dudfield  wrote:
>
>> Whilst there are now more than a dozen books, and video series in many
>> languages for teaching pygame, I'd like to include a new section on the
>> website for educational resources for teachers. Or even better, to be able
>> to point to an existing resource.  Not particularly for 'pygame', but for
>> digital education in general, or at least python related. I wonder if you
>> have any thoughts on this?
>>
> ​This sounds awfully non-orthogonal to various current movements to bring
> CS education to the masses (which typically means coding instead, alas, but
> yet). Honestly, I'm not sure how valuable a new resource here would
> be--surely, there are educational sites for teaching, and same but specific
> for Python?
>
>
I'd like to link to these other resources, and have a place to put
resources.


> What makes sense to me would be a section specifically on using pygame. We
> already have something of this sort (I know; I've been
> looking-at/sprucing-up the current tutorials), but these are largely dated,
> and don't span the whole of what pygame has to offer. They're also
> text-dense, which is apparently not a popular way to learn things anymore.
>
>

I think tutorials sections and such are fine for self learning types.  But
for people trying to teach, or do activities as a group, that's a different
style of resource.

For sure, they could do with a run through, to remove the spam, and put the
more high quality ones to the top.



> Anything else I should link to?
>>
> ​What would have been most helpful for me when I learned pygame would have
> been some solid foundation to build on. I offer my pygame hello world
> 
> and pygame-GL-2 hello world
> 
> as minimal, best-practices, public-domain resources (links have been stable
> for years, but mirroring would be ideal).
>
> Ian​
>


Yes, minimal best practices tutorials are probably something we should
point to.

I'd like to have ones that have tests, and also packaging python included
in there for distribution. Also, a pretty well polished full game that we
can point to. I thought solarwolf could have been that, but it's sort of a
bit large perhaps, and the code needs updating to current best practice
python idioms.


Re: [pygame] teaching resources

2017-03-18 Thread Paul Vincent Craven
I've worked on http://programarcadegames.com for about 7 years now. I've
led hundreds of students through the material, updated it, and improved it
every week. With the examples, translations,  and videos, I really think it
is the best quality educational resource for Pygame out there. I know I'm
biased, but I don't think any other resource has had more editing not had
more students go through it.

On Mar 18, 2017 5:20 AM, "René Dudfield"  wrote:

> Hello,
>
> Whilst there are now more than a dozen books, and video series in many
> languages for teaching pygame, I'd like to include a new section on the
> website for educational resources for teachers. Or even better, to be able
> to point to an existing resource.  Not particularly for 'pygame', but for
> digital education in general, or at least python related. I wonder if you
> have any thoughts on this? Maybe there could be some sort of collaboration
> here. Or you could give me some guidance on where to point people?
>
> Is there something existing where resources have some sort of quality
> control? If there's not something good existing, it would nice to find out
> what is required here.
>
> Is this the only thing on the raspberry pi side?
> https://www.raspberrypi.org/resources/teach/
> Are there any places which collect raspberry pi teaching resources in
> other languages (than English)?
> Is this the place for microbit? http://microbit.org/teach/
> Is there some place for python in general?
> Anything else I should link to?
>
> A teacher sent me a photo of a wall showing drawings the kids all made
> with pygame and printed the other day. He did it for a drawing class.
> Another did a class with 'sound boards', where the kids jumped around on
> the dance mats making 'music'. For me it would be interesting to send her a
> link with resources for teaching music. She also teaches Finnish, and is
> always interested in finding resources to do that in an interesting way. So
> if there's something I can link to people by topic, that would be awesome
> sauce?
>
> Next time someone shows me something like "community.computingatschool.o
> rg.uk/resources/4952", rather saying... "chuck it on the wiki!" perhaps
> there's a better more useful answer I can give them?
> Or is that the place to send them? (I'm not sure they'd be interested in
> Japanese/German/etc resources)
>
>
>
>
> best,
>
>


Re: [pygame] teaching resources

2017-03-18 Thread René Dudfield
On Sat, Mar 18, 2017 at 11:36 AM, Radomir Dopieralski 
wrote:

> It's still a work in progress, but there is:
> http://pythonineducation.org/
>

Oh, cool.


Re: [pygame] teaching resources

2017-03-18 Thread Craig Maloney
* René Dudfield (ren...@gmail.com) wrote:
> Hello,
> 
> A teacher sent me a photo of a wall showing drawings the kids all made with
> pygame and printed the other day. He did it for a drawing class. Another
> did a class with 'sound boards', where the kids jumped around on the dance
> mats making 'music'. For me it would be interesting to send her a link with
> resources for teaching music. She also teaches Finnish, and is always
> interested in finding resources to do that in an interesting way. So if
> there's something I can link to people by topic, that would be awesome
> sauce?

I'm wondering if there might be room on the Pygame site for a "uses"
category to show folks what Pygame could be used for. Perhaps this could
be incorporated into the "Releases" section? Or it could be a separate,
curated section where a certain "featured" tag gets placed on a release
to put it into this menu?

I'd re-state the original question though. Is this looking to highlight
Pygame's usage as more than just a game library, or is this to highlight
some of the educational resources that Python offers educators?


--
  Craig Maloney  (cr...@decafbad.net)  http://decafbad.net


Re: [pygame] teaching resources

2017-03-18 Thread Ian Mallett
On Sat, Mar 18, 2017 at 4:20 AM, René Dudfield  wrote:

> Whilst there are now more than a dozen books, and video series in many
> languages for teaching pygame, I'd like to include a new section on the
> website for educational resources for teachers. Or even better, to be able
> to point to an existing resource.  Not particularly for 'pygame', but for
> digital education in general, or at least python related. I wonder if you
> have any thoughts on this?
>
​This sounds awfully non-orthogonal to various current movements to bring
CS education to the masses (which typically means coding instead, alas, but
yet). Honestly, I'm not sure how valuable a new resource here would
be--surely, there are educational sites for teaching, and same but specific
for Python?

What makes sense to me would be a section specifically on using pygame. We
already have something of this sort (I know; I've been
looking-at/sprucing-up the current tutorials), but these are largely dated,
and don't span the whole of what pygame has to offer. They're also
text-dense, which is apparently not a popular way to learn things anymore.


> Anything else I should link to?
>
​What would have been most helpful for me when I learned pygame would have
been some solid foundation to build on. I offer my pygame hello world

and pygame-GL-2 hello world

as minimal, best-practices, public-domain resources (links have been stable
for years, but mirroring would be ideal).

Ian​


Re: [pygame] teaching resources

2017-03-18 Thread Radomir Dopieralski
It's still a work in progress, but there is:
http://pythonineducation.org/

On Sat, 18 Mar 2017 11:20:04 +0100
René Dudfield  wrote:

> Hello,
> 
> Whilst there are now more than a dozen books, and video series in many
> languages for teaching pygame, I'd like to include a new section on
> the website for educational resources for teachers. Or even better,
> to be able to point to an existing resource.  Not particularly for
> 'pygame', but for digital education in general, or at least python
> related. I wonder if you have any thoughts on this? Maybe there could
> be some sort of collaboration here. Or you could give me some
> guidance on where to point people?
> 
> Is there something existing where resources have some sort of quality
> control? If there's not something good existing, it would nice to
> find out what is required here.
> 
> Is this the only thing on the raspberry pi side?
> https://www.raspberrypi.org/resources/teach/
> Are there any places which collect raspberry pi teaching resources in
> other languages (than English)?
> Is this the place for microbit? http://microbit.org/teach/
> Is there some place for python in general?
> Anything else I should link to?
> 
> A teacher sent me a photo of a wall showing drawings the kids all
> made with pygame and printed the other day. He did it for a drawing
> class. Another did a class with 'sound boards', where the kids jumped
> around on the dance mats making 'music'. For me it would be
> interesting to send her a link with resources for teaching music. She
> also teaches Finnish, and is always interested in finding resources
> to do that in an interesting way. So if there's something I can link
> to people by topic, that would be awesome sauce?
> 
> Next time someone shows me something like
> "community.computingatschool.o rg.uk/resources/4952", rather
> saying... "chuck it on the wiki!" perhaps there's a better more
> useful answer I can give them? Or is that the place to send them?
> (I'm not sure they'd be interested in Japanese/German/etc resources)
> 
> 
> 
> 
> best,



-- 
Radomir Dopieralski

-- 
Radomir Dopieralski


[pygame] teaching resources

2017-03-18 Thread René Dudfield
Hello,

Whilst there are now more than a dozen books, and video series in many
languages for teaching pygame, I'd like to include a new section on the
website for educational resources for teachers. Or even better, to be able
to point to an existing resource.  Not particularly for 'pygame', but for
digital education in general, or at least python related. I wonder if you
have any thoughts on this? Maybe there could be some sort of collaboration
here. Or you could give me some guidance on where to point people?

Is there something existing where resources have some sort of quality
control? If there's not something good existing, it would nice to find out
what is required here.

Is this the only thing on the raspberry pi side?
https://www.raspberrypi.org/resources/teach/
Are there any places which collect raspberry pi teaching resources in other
languages (than English)?
Is this the place for microbit? http://microbit.org/teach/
Is there some place for python in general?
Anything else I should link to?

A teacher sent me a photo of a wall showing drawings the kids all made with
pygame and printed the other day. He did it for a drawing class. Another
did a class with 'sound boards', where the kids jumped around on the dance
mats making 'music'. For me it would be interesting to send her a link with
resources for teaching music. She also teaches Finnish, and is always
interested in finding resources to do that in an interesting way. So if
there's something I can link to people by topic, that would be awesome
sauce?

Next time someone shows me something like "community.computingatschool.o
rg.uk/resources/4952", rather saying... "chuck it on the wiki!" perhaps
there's a better more useful answer I can give them?
Or is that the place to send them? (I'm not sure they'd be interested in
Japanese/German/etc resources)




best,