[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Xavante
- From: "Dave Nichols" <dave.nichols@...>
- Date: Mon, 5 Jun 2006 10:33:32 +0100
I would like to help. How?
I've downloaded the Kelper project and that works OK (Lua 5.0).
But trying to run Xavante under 5.1 does not. It responds to the first
request from a browser but in so doing it removes itself from the _reading
list in copas and there is no code to put it back. I don't understand how
moving from 5.0 to 5.1 could have this effect.
I've had to add package.seeall to all the Xavante modules which worries me a
bit as I don't understand the new scoping rules associated with the 5.1
module function.
I've also had to tweak venv as it tries to set the global environment for
require, module and the standard loaders, which under 5.1 are C functions so
its not allowed (why?). I got round this by requiring compat-5.1 and
tweaking that to override the built-in C functions.
Also in venv, I had to tweak clonetable as it could not cope with table
loops. Here is the revised version:
--01/06/06 DCN Modified to handle arbitrary self references
local function clonetable (t,visited)
visited = visited or {}
if visited[t] then return visited[t] end
local newt = {}
visited[t] = newt
for i, v in pairs(t) do
if type(v) == "table" then
newt[i] = clonetable (v, visited)
else
newt[i] = v
end
end
return newt
end
Regards,
Dave Nichols
Match-IT Limited
Tel: 0845 1300 510
Fax: 0845 1300 610
mailto:dave.nichols@make247.com
http://www.make247.com
Email Disclaimer: The contents of this electronic mail message and any
attachments (collectively "this message") are confidential, possibly
privileged and intended only for its addressee ("the addressee"). If
received in error, please delete immediately without disclosing its contents
to anyone. Neither the sender nor its management or employees will in any
way be responsible for any advice, opinion, conclusion or other information
contained in this message or arising from it's disclosure.
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of Andre Carregal
Sent: 02 June 2006 18:45
To: 'Lua list'
Subject: RE: Xavante
> Dave Nichols wrote:
> I'm trying to use Xavante under Lua 5.1 and not getting very far.
> I've done some obvious tweaks to the point where it works for a single
> request, but then stops.
> AFAICT the problem is that the server registered with
> copas.AddServer is not re-inserted in the _reading list after its
completed the
> first request, so copas.step has nothing to do.
> My question is this: Does Xavante actually work or am I flogging a dead
horse?
The horse is alive and well, but grazing on Lua 5.0 pastures... :o)
We are in the process of converting both Copas and Xavante to Lua 5.1, and
you'd be welcome to help us if you wish.
Please consider joining the Kepler list on
http://luaforge.net/mail/?group_id=104
André