Murga-Projects Forums
New murgaLua 0.5.5 release !! - Printable Version

+- Murga-Projects Forums (http://www.murga-projects.com/forum)
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: New murgaLua 0.5.5 release !! (/showthread.php?tid=147)


New murgaLua 0.5.5 release !! - JohnMurga - 07-31-2007 06:02 AM

Err ...

I guess this may come as bit of a surprise, but I have decided to cut my losses and make a formal murgaLua release ... There are still a few things I want to work on, and the documentation is currently a joke, but I wanted developers to at least have more of the platform to work on.

This release is also special because it introduces a few incompatibilities with previous releases :
  • ALL the murgaLua file handling fuctions have been removed in favour of LuaFileSystem.
  • The XML interface has changed somewhat, the changes here aren't really dramatic, but I believe it's a bit more useful now :-)
    (Thanks to znarf for some ideas!).

I feel the pain of moving over to LuaFileSystem is more than worth it, but I apologize to those who will now have to change their scripts ...
I promise to keep this kinda shit to a minimum.

So please be careful, this may break your old scripts ...

http://www.murga-projects.com/murgaLua/murgaLua-0.5.5.tar.gz

Either way my current situation (I am still homeless), and my workload are going to make progress over the next few weeks quite hard ...
So I ask you to bare with me and be patient :-)

I am also on holiday for most of this week ...

Anyway, the release can be found here :

(With Intel Mac binaries courtesy of iGame3D - Thanks!!)

And the changes from the last formal release (0.4.1), are as follows :

  • MAJOR changes to the XML API and addition of the lua-iostring library.
  • Fl_Text_Buffer, Fl_Text_Display, Fl_Text_Editor are back and they work now (!).
  • Decent database example and documention for sqLite usage (Uses Fl_Text_* too!).
  • Fixed some build, FLTK issues and misc warnings (fl_ask has been removed).
  • Started re-structuring examples and documentation.
  • Also integrated Copas, LuaLzo and LuaFileSystem.
  • LuaFileSystem now takes over from the previous murgaLua functionality.
  • New function "murgaLua.createFltkTimer()" - Good for responsive animation and stuff.
  • New function "murgaLua.getHostOsName()" returns one of "linux", "windows" or "macos".
  • New function "murgaLua.sleep(miliseconds)" (reliable system level).
  • convertFluidToMurguaLua fixes based on forum feedback.

Let's see, what is left to say ? Err ... Well, this is what I currently have on my todo list for the future :

  • cinvoke, although I am concerned about how well it works on some platforms, so I may well have to give it a miss :-(
  • Fl_Table ... The issue here is making the Lua implementation easy to use, I am currently working on this one, and it WILL be coming.
  • Misc Fltk binding enhancements - There are a few on the way, like quite a few unimplemented methods, and version 1.1.8 of Fltk is promising to fix MANY OSX and Linux bugs.
  • Although current snapshots seem to increase the size of murgaLua by 100k (!!!!)
  • murgaLua compiler - I actually have a working prototype of this, it uses the new LZO functions and will defenetly be in the next release.
  • The version of sqLite bundled with murgaLua is likely to stay at 3.3.13 until those people make their build system more sensible again.
  • Sound - I never intended murgaLua to have sound support, however, so many people have requested it that I am still looking at this ... I don't want to give murgaLua any more external dependencies or make it much heavier, so it's a bit tough, although I do have basic code for Linux and Windows, so I guess MacOS is the problem here :-(
  • Showcase apps, documentation, and other issues on my roadmap ... Obviously all that hasn't gone away :-)

Anyway, that was a bit long ... I hope everyone is still awake (or that someone got down this far!!).

Cheers
JohnM


RE: New murgaLua 0.5.5 release !! - mikshaw - 07-31-2007 07:02 AM

Looking forward to it....downloading at a blazing 4.3 KB/sec I should have it in no time....

...almost there...

...only 14 minutes to go....

It seems that LuaFileSystem will definitely be worth having to make a few script changes here and there.

fl_ask will be dropped from FLTK anyway, so that's no biggie. Use fl_choice instead, which is more flexible.

First test, replacing murgaLua.readDirectory() with lfs.dir()...

my_files=murgaLua.readDirectory(directory)
or
my_files={}
for i in lfs.dir(directory) do table.insert(my_files,i) end

It may seem more complicated, but lfs.dir gives you control over what goes in the table, or it can be used without building the table at all. I don't know which is more efficient, though: iterating through a table or repeating a function each time you need to check the contents of a directory. The function would definitely be more flexible, since it will update whenever a change is made to the directory.

Now I need to go find out how to replace murgaLua.isFile() and murgaLua.isDirectory()....be back later...


RE: New murgaLua 0.5.5 release !! - chrimo - 07-31-2007 07:57 AM

JohnMurga Wrote:
Err ...
Anyway, that was a bit long ... I hope everyone is still awake (or that someone got down this far!!).

Cheers
JohnM


YEP, that's what I need for the last 14 days of my holidays Big Grin Starting port to OSX(PPC)...

m49svr4169g5:~/prog/lua/murgaLua chrimo$ make macos
cd src && make macos
sh ../tools/embedLuaSocket.sh
sh ../tools/embedMurgaLuaLib.sh macos
make ../bin/murgaLua PLAT=macos
[compiling bind-fltk-ext.cxx]
g++ -fomit-frame-pointer -ffast-math -Os -fexpensive-optimizations -g `fltk-config --use-images --use-forms --cxxflags` -DLUA -Dmacos -c bind-fltk-ext.cxx -o bind-fltk-ext.o
echo [building library murgaLua.a]
[building library murgaLua.a]
rm -f murgaLua.a
ar crs murgaLua.a bind-fltk-ext.o
ranlib murgaLua.a
[compiling murgaLua.cxx]
g++ -fomit-frame-pointer -ffast-math -Os -fexpensive-optimizations -g `fltk-config --use-images --use-forms --cxxflags` -DLUA -Dmacos -c murgaLua.cxx -o murgaLua.o
g++ -fomit-frame-pointer -ffast-math -Os -fexpensive-optimizations -g `fltk-config --use-images --use-forms --cxxflags` -DLUA   -c -o ../3rd-party/tinyxml/tinyxml.o ../3rd-party/tinyxml/tinyxml.cpp
g++ -fomit-frame-pointer -ffast-math -Os -fexpensive-optimizations -g `fltk-config --use-images --use-forms --cxxflags` -DLUA   -c -o ../3rd-party/tinyxml/tinyxmlparser.o ../3rd-party/tinyxml/tinyxmlparser.cpp
g++ -fomit-frame-pointer -ffast-math -Os -fexpensive-optimizations -g `fltk-config --use-images --use-forms --cxxflags` -DLUA   -c -o ../3rd-party/tinyxml/tinyxmlerror.o ../3rd-party/tinyxml/tinyxmlerror.cpp
g++ -fomit-frame-pointer -ffast-math -Os -fexpensive-optimizations -g `fltk-config --use-images --use-forms --cxxflags` -DLUA   -c -o ../3rd-party/tinyxml/tinystr.o ../3rd-party/tinyxml/tinystr.cpp
gcc    -c -o ../3rd-party/luaLZO/minilzo.o ../3rd-party/luaLZO/minilzo.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/auxiliar.o ../3rd-party/luasocket-2.0.1/src/auxiliar.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/except.o ../3rd-party/luasocket-2.0.1/src/except.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/io.o ../3rd-party/luasocket-2.0.1/src/io.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/mime.o ../3rd-party/luasocket-2.0.1/src/mime.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/select.o ../3rd-party/luasocket-2.0.1/src/select.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/timeout.o ../3rd-party/luasocket-2.0.1/src/timeout.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/udp.o ../3rd-party/luasocket-2.0.1/src/udp.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/buffer.o ../3rd-party/luasocket-2.0.1/src/buffer.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/inet.o ../3rd-party/luasocket-2.0.1/src/inet.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/luasocket.o ../3rd-party/luasocket-2.0.1/src/luasocket.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/options.o ../3rd-party/luasocket-2.0.1/src/options.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/tcp.o ../3rd-party/luasocket-2.0.1/src/tcp.c
gcc    -c -o ../3rd-party/luasocket-2.0.1/src/usocket.o ../3rd-party/luasocket-2.0.1/src/usocket.c
g++ murgaLua.o ../3rd-party/tinyxml/tinyxml.o ../3rd-party/tinyxml/tinyxmlparser.o ../3rd-party/tinyxml/tinyxmlerror.o ../3rd-party/tinyxml/tinystr.o ../3rd-party/luaLZO/minilzo.o ../3rd-party/luasocket-2.0.1/src/auxiliar.o ../3rd-party/luasocket-2.0.1/src/except.o ../3rd-party/luasocket-2.0.1/src/io.o ../3rd-party/luasocket-2.0.1/src/mime.o ../3rd-party/luasocket-2.0.1/src/select.o ../3rd-party/luasocket-2.0.1/src/timeout.o ../3rd-party/luasocket-2.0.1/src/udp.o ../3rd-party/luasocket-2.0.1/src/buffer.o ../3rd-party/luasocket-2.0.1/src/inet.o ../3rd-party/luasocket-2.0.1/src/luasocket.o ../3rd-party/luasocket-2.0.1/src/options.o ../3rd-party/luasocket-2.0.1/src/tcp.o ../3rd-party/luasocket-2.0.1/src/usocket.o murgaLua.a -fomit-frame-pointer -ffast-math -Os -fexpensive-optimizations -g `fltk-config --use-images --use-forms --ldstaticflags --libs` /usr/local/lib/liblua.a /usr/local/lib/libsqlite3.a -o ../bin/murgaLua
strip ../bin/murgaLua
../tools/iPakk --lzma-round-inf --lzma-round-n 20 -i ../bin/murgaLua

iPakk v0.27 © 2007, pontscho / fresh!mindworkz

- OS: Apple MacOS X
- arch: PowerPC
- packer: LZMA compressor (based on LZMA SDK 4.43) (pontscho / fresh!mindworkz)
- linker: LZMA/PPC linker for MacOS X (pontscho / fresh!mindworkz)

- LZMA parameters:
  - dictonary size (--lzma-ds): 27
  - fast bytes, minimum (--lzma-fb-min): 64
  - fast bytes, maximum (--lzma-fb-max): 273
  - fast bytes (--lzma-fb): 0
  - filter (--lzma-filter-*): 2
  - round step (--lzma-round-step): 1
  - number of check round (--lzma-round-n, --lzma-round-inf, 0 - "infinite"): 20
   - 64: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 65: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 66: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 67: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 68: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 69: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 70: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 71: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 72: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 73: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 74: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 75: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 76: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 77: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 78: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 79: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 80: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 81: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 82: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - 83: 1673640 -> 482253 (28.81%) bytes (filter: off)
   - optimal number of fast bytes: 64
   - compressing... 1673640 -> 482253 (28.81%) bytes
- Linker parameters:
  - size of stub: 2801
  - linking... size is 485040 bytes
- done.

m49svr4169g5:~/prog/lua/murgaLua chrimo$ bin/murgaLua
MurgaLua Version 0.5.5 (http://www.murga-projects.com/murgaLua/)
MurgaLua & FLTK/XML bindings : Copyright 2006-7 John Murga, GPL license.
Contains lsqlite by T.Dionizio, LuaSocket by D.Nehab and other bindings.
Lua 5.1.1  Copyright © 1994-2006 Lua.org, PUC-Rio
>


My brandnew GPSTracker works  too Big Grin

John - All thanks to you!
Bye
Christian

where can I send my OSX-PPC-Version for further testing ?


RE: New murgaLua 0.5.5 release !! - faughanvale - 07-31-2007 12:31 PM

I've been using murgaLua.sleep(milliseconds) with the PREVIEW version, it worked fine.
In the new 0.5.5 release, it seems the routine is behaving as if it is
murgaLua.sleep(seconds).
Is this right? I would be happier with milliseconds. : )
Thanks again for your help,
Dan


RE: New murgaLua 0.5.5 release !! - iGame3D - 07-31-2007 12:53 PM

chrimo Wrote:
where can I send my OSX-PPC-Version for further testing ?


ooh mail it to bill at igame3d.com


RE: New murgaLua 0.5.5 release !! - JohnMurga - 07-31-2007 05:27 PM

faughanvale Wrote:
I've been using murgaLua.sleep(milliseconds) with the PREVIEW version, it worked fine.
In the new 0.5.5 release, it seems the routine is behaving as if it is
murgaLua.sleep(seconds).
Is this right? I would be happier with milliseconds. : )


Umm ... It works OK for me on my Windows box, I'll try Linux ... What OS are you running ?

I would encourage the use of the murgaLua.createTimer stuff instead though.

chrimo Wrote:
m49svr4169g5:~/prog/lua/murgaLua chrimo$ bin/murgaLua
MurgaLua Version 0.5.5 (http://www.murga-projects.com/murgaLua/)
MurgaLua & FLTK/XML bindings : Copyright 2006-7 John Murga, GPL license.
Contains lsqlite by T.Dionizio, LuaSocket by D.Nehab and other bindings.
Lua 5.1.1 Copyright © 1994-2006 Lua.org, PUC-Rio
>

where can I send my OSX-PPC-Version for further testing ?


Fantastic, out of the box ! :-)

Although I think you are building against an older version of Lua (5.1.1 instead of 5.1.2), but it shouldn't matter too much ...

The current libs we build against are always here :

http://www.murga-projects.com/murgaLua/files/

Feel free to attach the murgaLua OSX-PPC binary to this topic.

Cheers
JohnM


RE: New murgaLua 0.5.5 release !! - chrimo - 07-31-2007 07:48 PM

JohnMurga Wrote:
Fantastic, out of the box ! :-)

Although I think you are building against an older version of Lua (5.1.1 instead of 5.1.2), but it shouldn't matter too much ...

The current libs we build against are always here :

http://www.murga-projects.com/murgaLua/files/

Feel free to attach the murgaLua OSX-PPC binary to this topic.


Hi,
I've rebuild all new libraries for OSX-PPC now...

m49svr4169g5:~/prog/lua/murgaLua chrimo$ bin/murgaLua
MurgaLua Version 0.5.5 (http://www.murga-projects.com/murgaLua/)
MurgaLua & FLTK/XML bindings : Copyright 2006-7 John Murga, GPL license.
Contains lsqlite by T.Dionizio, LuaSocket by D.Nehab and other bindings.
Lua 5.1.2  Copyright © 1994-2007 Lua.org, PUC-Rio

But sending attachment didn't work with Safari ;-(
Bye
Christian


RE: New murgaLua 0.5.5 release !! - faughanvale - 07-31-2007 08:11 PM

JohnMurga Wrote:

faughanvale Wrote:
I've been using murgaLua.sleep(milliseconds) with the PREVIEW version, it worked fine.
In the new 0.5.5 release, it seems the routine is behaving as if it is
murgaLua.sleep(seconds).
Is this right? I would be happier with milliseconds. : )


Umm ... It works OK for me on my Windows box, I'll try Linux ... What OS are you running ?


My OS is PuppyLinux, 214 on a desktop and 217 on a laptop. The results are repeatable by switching back and forth between PREVIEW and 0.5.5, on either machine.

Thanks for the help. I'll follow your suggestion in the meantime.

Dan


RE: New murgaLua 0.5.5 release !! - JohnMurga - 07-31-2007 11:38 PM

faughanvale Wrote:
My OS is PuppyLinux, 214 on a desktop and 217 on a laptop. The results are repeatable by switching back and forth between PREVIEW and 0.5.5, on either machine.

Thanks for the help. I'll follow your suggestion in the meantime.


Sorry about that ...

mikshaw, iGame3d can you guys confirm this is a bug for you too ? (Linux/Mac)
(I don't have access to my machines for the next few days).

Cheers
JohnM


RE: New murgaLua 0.5.5 release !! - iGame3D - 08-01-2007 12:20 AM

Yeah murgaLua.sleep() is operating with an integer value in seconds.

.05 preview was working with milliseconds


RE: New murgaLua 0.5.5 release !! - mikshaw - 08-01-2007 12:22 AM

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)


RE: New murgaLua 0.5.5 release !! - observer - 08-03-2007 06:11 AM

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 );


RE: New murgaLua 0.5.5 release !! - JohnMurga - 08-04-2007 02:53 AM

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


RE: New murgaLua 0.5.5 release !! - iGame3D - 08-07-2007 08:05 PM

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.


RE: New murgaLua 0.5.5 release !! - mikshaw - 09-06-2007 07:30 AM

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.