[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] New egg: physics

From: Richard
Subject: Re: [Chicken-users] New egg: physics
Date: Sat, 17 May 2014 02:27:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Thank you both for your helpful and comprehensive tips. I will amend my setup file and ask for my egg to be added.

I will start using the tools of Chicken for compiling the egg. I was using a Makefile because I saw no reason not to before.

thanks again,
On 05/16/14 04:02, Mario Domenech Goulart wrote:

On Thu, 15 May 2014 18:23:48 -0400 Alex Charlton <address@hidden> wrote:

Richard writes:

I would like to announce my first egg: physics. It is a more high-level
wrapper to the brilliant Chipmunk2D physics library.

Some highlights include:

- The possibility of passing regular Chicken functions as callbacks.
- Using regular Chicken objects as user data.
- Garbage collection.
- The possibility of optionally using 'map' instead of Chipmunk's
iterator functions.

Things left to do are:
- More testing and adding some unit tests.
- Finishing the documentation and adding some examples.

If you want to take a look, the source can be found at:

A more low-level wrapper to Chipmunk is required and can be found at:

The documentation can be found at:

As this is my first egg I might have done things wrongly or suboptimal,
any pointers are welcome.

Plui(j)zer (I'm trying to get rid of that j)
Chicken-users mailing list
Looking good, Plui( )zer!

Have you thought about releasing your egg as an Official Chicken
Extension™? You’re most of the way there, and it makes it a lot easier
for other Chicken users to install, as well as allows the egg to
become a dependency for other eggs. Check out this page for

It seems as though all you’ll need to do is amend your setup file to
add a version,
The versioning thing is a little (?) can of worms.  Strictly speaking,
it is not necessary (i.e., it won't cause errors), as long as your egg
is properly tagged with versions in the source repository.
henrietta-cache [1] will fetch egg sources and save them in a directory
named after tags.  henrietta [2] will provide the version information,
based on the directory named after the tag and _that_ is used by
chicken-install to write versions to .setup-info files that get
installed along with eggs.  So, for eggs that are installed by
chicken-install when it gets eggs from the henrietta server, the version
is always available.  However, for "local" installations (i.e., cd
egg-source-dir; chicken-install), egg versions will be set as "unknown"
if they are not specified in .setup files.  chicken-setup is oblivious
to VCS tags and tag directories -- only henrietta-cache and henrietta
care about them.

I usually provide a version in .setup files to avoid getting my eggs'
versions as "unknown" when I locally install them.  Another reason for
specifying versions in .setup files is that the lack of version
information in .setup files also affects salmonella [3], since it
separates the "fetch" and the "install" steps (to be able to report
status separately for each step).  So, it ends up performing local
installation.  If .setup files contain no version, salmonella will
report their versions as "unknown".

However, versions in .setup files come at a cost: information
duplication.  You have to keep the version information in .setup, in
.release-info _and_ the VCS tag in sync at release time.  That is kinda
painful is usually the cause of version inconsistencies (henrietta-cache
and henrietta don't know about versions in .setup files).



add a bit more information to the meta file, and add a
release-info file. After that, just ask to have your egg added.
Oh, yes.  The .release-info!

On the subject of amending your setup file, you should think about
using Chicken tools for your compilation rather than using a Makefile
(in fact, this might be a requirement for being added to the Coop, I’m
not sure).
In fact it is not, but fiddling with "make" may cause problems for
people who have CHICKEN installed on non-standard locations and for
those who cross-compile eggs.  Unless, of course, you carefully craft
your makefiles, which is quite some work.  The stuff from setup-api
(those things you use in .setup files like, compile, install-extension
etc.)  are hairy (the internals, I mean), but they work in the weirdest
scenarios, as far as I can tell.

The example that’s in that wiki page I linked shows how
this can be done. It will simplify things a fair amount. Additionally,
since your physics.import.scm file is generated from physics.scm,
there’s no real reason to have it in your repo.

And of course, all this goes for your chicken-chipmunk repo as well.

Not sure if you saw it (since it’s not in the egg index) but acorn
might be of interest to you, since it tackles the same problem. From a
cursory glance, it seems as though you have solved some things that it
has not, though:

I look forward to trying your egg out!
Best wishes.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]