tinypy++ preview

Skip to first unread message

Andy O'Meara

Mar 13, 2011, 5:50:18 PM3/13/11
to tinypy

Hi everyone!

I've sewn things up enough so that I can distribute a preview look
into what we're growing from tinypy (aka "tinypy++"). Progress slowed
several weeks ago for a couple reasons, but I wanted to post my work
and collect feedback from folks here.

So... SoundSpectrum has a ton of GREAT core source code that I'd
happily roll into this project (as part of the MIT license), but we
don't wish to do all that work if the tinypy group here isn't very
interested in what we're doing with tinypy. Examples are network
code, iimage loading and saving (PNG, JPG, etc), image manipulation,
compression, and file io. So if enough people are excited at the
objectives of tp++, then there's a clear payoff for us putting in all
that work to open source a bunch of our cool stuff. From our point of
view, our core tools would be absorbed into the tinypy source base and
we would just have to do a bunch of renaming. To be clear, all that
extra stuff would exist as C/C++ modules that would be included via
the tp_builtin.h mechanism.

What I'd ask for this work is to ask Phil and the others here to
accept the Xcode/MSVC-centric approach to the package (rather than an
arcane series of scripts that build everything over the command line
and mash everything into single .c files, etc). As for linux support,
I'd be happy if someone made a make file that mimicked what's in the
Xcode/MSVS projects (which would take 15 minutes to any experienced
command line developer). The overall objective here is to provide a
crystal clear and conventional structure to the package so that
newcomer developers have a professional-caliber experience with
tinypy, and with example projects that cover Windows, OS X, and linux,
we'd be covering 99% of everyone out there. For example, when you
download libpng, you expect there to be an example/demo project for
you to study, allowing you to easily see what .c/.cpp you need to add
to your own project. Likewise, we want a commercial developer to
download this project and be up and running in minutes. Or maybe
another way to say all this is, if things are splintered and
fragmented from the start, things are only going to get worse

Without further delay...


If you follow the "Quick Start" in the README.txt, you'll be able to
run julia.py and see it output an image file.

Go tinypy!

Sofia Lemons

Mar 13, 2011, 8:40:05 PM3/13/11
to tin...@googlegroups.com

I'm excited to take a look at this soon. I'd add Eclipse to the list
of possible options for sample projects/building. I'm fine with make,
as well, but thought I'd mention Eclipse as an option as a Unix IDE
and to encourage support of open source tools, rather than tying
people to only proprietary environments on Windows and OSX.

Best wishes,

> --
> You received this message because you are subscribed to the Google Groups "tinypy" group.
> To post to this group, send email to tin...@googlegroups.com.
> To unsubscribe from this group, send email to tinypy+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/tinypy?hl=en.


Mar 14, 2011, 8:16:21 AM3/14/11
to tinypy

Thank you Andy!

I just downloaded it, I'll take a look and try to compile with the VS
And I have no problem with the way you would like to proceed.

I'll give more feed back after learning about the code.

Andy O'Meara

Mar 14, 2011, 1:46:50 PM3/14/11
to tin...@googlegroups.com

Thus far, there isn't *that* much new code (although  I did add a bunch of support code such as tp_buf and the stuff found in tp_support.cpp).

I'll take a moment to list the major items before tinypy++ would be generally usable:

- Create a hybrid ref counting GC subsystem (see the "Primary Features" second of the readme.txt -- no work done on this yet)
- Make util procs that facilitate passing data between tp and the application layer (e.g. CPython's Py_BuildValue(), PyArg_ParseTuple(), etc) streamlining GC control such that it's convenient and tough to leak stuff.  It's paramount that memory management semantics/conventions are easy and tough to screw up.
- Project files for linux (make?) and an Eclipse project -- I regard these as relatively trivial since it's just replicating what's already in the existing Xcode and VS projects
- Major performance revs within tinypy (this is more of a phase 2 item but critical for long term success)

I'd say overall, I've made tinypy a lot more approachable but a lot of work remains.  If someone out there thinks they really "get" the objectives we're shooting for with tinypy++ and are looking for convert their interest into compensation, please email me privately about possible employment.


Mar 15, 2011, 2:36:01 PM3/15/11
to tinypy
I had a bit of problem getting the licensing key for the Free VC++
2010 Express with the FireFox.
I guess it's because I don't allow cookies and Javascript by default,
and even when I allowed them to MS passport.net and all, the
authentication process went into the endless loop ....
So, I finally got the key with Internet Explorler.

In the VC++, I opened up the tinypy.sln file and adjusted a few
properties fir my setup.
1. Additional Include Directories in Tinypy -> property ->
ConfigurationProperty -> C/C++ ->General.
I put the path where I extracted the zip file X:\YYY\tinypy\tinypy
I don't know why but VC++ didn't use the location of header files,
automatically, even I moved headers into "header files".
It's been nearly 10 years since I touched MSVC, so maybe this is

2. Output file in Tinypy -> property -> ConfigurationProperty ->
Linker ->General.
I removed ".." to make it ==> $(OutDir)\$(ProjectName).exe
I did so because VC++ told me to do something about the path for the
linker and compiler being different.

I think I changed something else, but I forgot...

And in the source file, I changed 1 line in main.cpp
FROM: path.AppendVA( "%s%ctp_support", exePath.CStr(),
TO: path.AppendVA( "%stp_support", exePath.CStr());
I did so because I saw 2 back slash in the path.
Maybe it's not necessary but I did when I was having problem
loading .tpc files.
ROM files (py2bx and friends) were not loading because I needed to
copy the tp_support folder in the directory of the executable for the
Debug build.

After these, I got both Debug and Release build producing .exe. :)

I'm now trying to see what's going on when I try tests.py.
It's very interesting to see the internals of C++ with VC++.
For a free version, VC++ Express is pretty good.

Maybe it's a good idea to put the download link to VC++ Express and
which property to change, in the Readme, too.
These are not needed for professional people, but it always helps to
put more information, to entice greater number of talented people into
the project.

More feed back when I get the time to see the code itself with
tests.py. etc.

Thanks, again, Andy for the work!

Reply all
Reply to author
0 new messages