chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Embedding spiffy


From: Peter Bex
Subject: Re: [Chicken-users] Embedding spiffy
Date: Thu, 14 May 2009 11:41:26 +0200
User-agent: Mutt/1.4.2.3i

On Thu, May 14, 2009 at 11:16:00AM +0200, Petter Egesund wrote:
> Hi, I would like to embed spiffy on client-side.
> 
> Is there a way to compile the ssp-files, so I don't have to enclose the 
> chicken environment?

I'm not sure what you mean by "enclose the chicken environment", but
I just tried and it turns out that if you just compile the generated
SSPX file using csc -s file.sspx, and then rename the resulting .so
file to the sspx file (overwriting it), Chicken will load the file
correctly.

It's a bit of a hack, but I hope this will suit your goals.

Remember that if the file modification time of the .ssp file is newer,
the sspx will be regenerated as a textfile again, so you will have to
compile it again.

If this doesn't work you'll have to write a custom request handler.
In Spiffy for Chicken 3 this is done with define-http-resource, in
Spiffy for Chicken 4 there's currently no 1:1 correspondence to that
(and there may never be one), but you can define vhost handlers or
access files and detect the URL that was requested and dispatch
accordingly.  If you need help with this, let me know and I'll see
if I can come up with an example.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Attachment: pgpD_ZiahV5Zz.pgp
Description: PGP signature


reply via email to

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