News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Pages (2): « First < Previous 1 [2] Last »
New murgaLua 0.5.5 release !!
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #11
RE: New murgaLua 0.5.5 release !!

On Slackware Linux i see what faughanvale sees.
0.5 sleeps milliseconds
0.5.5 sleeps seconds

I might also mention that they are both apparently written with milliseconds in mind, as I get this error in both versions when using an improper argument:
/usr/bin/murgaLua-0.5.5: [string "murgaLua"]:155: bad argument #1 to 'sleepMilliseconds' (number expected, got string)

08-01-2007 12:22 AM
Find all posts by this user Quote this message in a reply
observer
Junior Member
**


Posts: 6
Group: Registered
Joined: Aug 2007
Status: Offline
Reputation: 0
Post: #12
RE: New murgaLua 0.5.5 release !!

FWIW. This patch (using usleep instead of nanosleep directly) in luasocket-2.0.1/src/timeout.c seems to work for me (Cygwin, using X11 and not Win32).

Doug@DOUGS_XP ~/murgalua/murgaLua/3rd-party/luasocket-2.0.1/src

$ diff timeout.c.bak timeout.c
19a20
> #include <unistd.h>
21a23
>
198,206c200
< struct timespec t, r;
< t.tv_sec = (int) n;
< n -= t.tv_sec;
< t.tv_nsec = (int) (n * 1000000000);
< if (t.tv_nsec >= 1000000000) t.tv_nsec = 999999999;
< while (nanosleep(&t, &r) != 0) {
< t.tv_sec = r.tv_sec;
< t.tv_nsec = r.tv_nsec;
< }
---
> usleep((useconds_t) n * 1000000 );
221,229c215
< struct timespec t, r;
< t.tv_sec = (int) n;
< n -= t.tv_sec;
< t.tv_nsec = (int) (n * 1000000);
< if (t.tv_nsec >= 1000000000) t.tv_nsec = 999999999;
< while (nanosleep(&t, &r) != 0) {
< t.tv_sec = r.tv_sec;
< t.tv_nsec = r.tv_nsec;
< }
---
> usleep((useconds_t) n * 1000 );

08-03-2007 06:11 AM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #13
RE: New murgaLua 0.5.5 release !!

I know where the bug with sleep is ... I accidentally backed out a good change ...

I am in Yalta on holiday right now, but expect 0.6 to come out some time in the next couple of weeks.

Sorry, no time to write any more, gotta catch some rays ...

Cheers
JohnM

08-04-2007 02:53 AM
Visit this user's website Find all posts by this user Quote this message in a reply
iGame3D
Moderator
***


Posts: 231
Group: Moderators
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #14
RE: New murgaLua 0.5.5 release !!

Sorry for not noticing this earlier but the iPakk phase of the MacOS-Intel build turns it into a PowerPC exeutable.

Not sure what happened there or why, but thought you should know so the next version can avoid this.

08-07-2007 08:05 PM
Visit this user's website Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #15
RE: New murgaLua 0.5.5 release !!

I just stumbled on this a moment ago.
MurgaLua doesn't have an internal version number, as in some way to get the murgaLua version from within murgaLua. If I'm wrong and it does now have this, it didn't before so it won't be of much use until no one uses previous versions anymore.

So anyway, to my point....

You can check for murgaLua version 0.5.5 and newer from a script without causing troubles for older versions by checking for one of the libraries added to 0.5.5. lua filesystem, for example:

Code:
if package.loaded["lfs"] then
  do some lfs.* stuff
else
  do some murgaLua.* stuff
end


This allows you to use both lfs.* and murgaLua.* for file handling in the same script, so the end user does not have to have a particular version of murgaLua or a particular version of a script.

09-06-2007 07:30 AM
Find all posts by this user Quote this message in a reply
Pages (2): « First < Previous 1 [2] Last »
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: