osc luakit

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

osc luakit

frey
according to google, the wiretap includes a LuaKit for OSC
(opensoundcontrol). (if you do a search for 'luakit' it's just about the
only link that shows up, but you can only look at it via the cache.)

unfortunately the wiretap web server appears to be down. i have emailed
the creator of the luakit, but this is kind of urgent so in the meantime
does anyone know of any mirrors or happen to have a copy of it sitting
around somewhere?

cheers
d
--
f r e y
live music with computers
http://www.frey.co.nz

Reply | Threaded
Open this post in threaded view
|

newbie prob with 'require'

frey
ok, i have managed to resurrect the luakit via google's cache, but now
i'm getting another issue. this is the first time i've had to use the
'require' function so it's probably me.

here's what happens:

$ lua test.lua
d:\bin\lua.exe: test.lua:2: attempt to index global `osc' (a boolean value)
stack traceback:
         test.lua:2: in main chunk
         [C]: ?

and here's test.lua:

1| osc = require( 'osc' )
2| p = osc.Message:new()
3| p.address = '/in/foo'
4|...

should osc.lua be returning something? reading the documentation it
looks like it's supposed to just return true or false. if i say
'print(osc)' i get 'true' printed out. so what else might be wrong?

cheers
d
--
f r e y
live music with computers
http://www.frey.co.nz

Reply | Threaded
Open this post in threaded view
|

RE: newbie prob with 'require'

Dolan, Ryanne Thomas (UMR-Student)

Your first line is setting osc = true, since require "osc" returns true.

require "osc";
...

-----Original Message-----
From: [hidden email] on behalf of Damian Stewart
Sent: Sat 5/13/2006 12:21 AM
To: Lua list
Subject: newbie prob with 'require'
 
ok, i have managed to resurrect the luakit via google's cache, but now
i'm getting another issue. this is the first time i've had to use the
'require' function so it's probably me.

here's what happens:

$ lua test.lua
d:\bin\lua.exe: test.lua:2: attempt to index global `osc' (a boolean value)
stack traceback:
         test.lua:2: in main chunk
         [C]: ?

and here's test.lua:

1| osc = require( 'osc' )
2| p = osc.Message:new()
3| p.address = '/in/foo'
4|...

should osc.lua be returning something? reading the documentation it
looks like it's supposed to just return true or false. if i say
'print(osc)' i get 'true' printed out. so what else might be wrong?

cheers
d
--
f r e y
live music with computers
http://www.frey.co.nz




winmail.dat (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: newbie prob with 'require'

frey
Dolan, Ryanne Thomas (UMR-Student) wrote:
> Your first line is setting osc = true, since require "osc" returns true.
>
> require "osc";
> ...

so the namespacing system has changed some time in the last little while
then? i have calls like osc.parseMessage(...) which cause errors because
osc is now nil. dropping the osc. from the start makes them work but
presumably means i have a cluttered namespace..? or is this not a
problem and am i talking nonsense?

--
f r e y
live music with computers
http://www.frey.co.nz

Reply | Threaded
Open this post in threaded view
|

RE: newbie prob with 'require'

Dolan, Ryanne Thomas (UMR-Student)

You are not talking nonsense.  The namespace problem is inherent in the new module system.  The require function basically adds the module's table to the current environment; it does not provide a method for assigning a name to this table before it is created.

-----Original Message-----
From: [hidden email] on behalf of Damian Stewart
Sent: Sat 5/13/2006 2:34 AM
To: Lua list
Subject: Re: newbie prob with 'require'
 
Dolan, Ryanne Thomas (UMR-Student) wrote:
> Your first line is setting osc = true, since require "osc" returns true.
>
> require "osc";
> ...

so the namespacing system has changed some time in the last little while
then? i have calls like osc.parseMessage(...) which cause errors because
osc is now nil. dropping the osc. from the start makes them work but
presumably means i have a cluttered namespace..? or is this not a
problem and am i talking nonsense?

--
f r e y
live music with computers
http://www.frey.co.nz




winmail.dat (4K) Download Attachment