![]() |
UPDATED murgaLua build - 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: UPDATED murgaLua build (/showthread.php?tid=264) |
UPDATED murgaLua build - JohnMurga - 01-21-2008 07:21 AM NOTE : This is still a preview build I have relatives visiting for a few days, so the final won't be out until they are gone, however, unless there any bugs these will be the final binaries. Features and download location are the same as for the first build below, except for the following :
Note : The mac build isn't packed properly, so it's a little bigger. Anyway, I took the feedback around the suckyness of menus seriously and have implemented proper callbacks as well as making the Fl_Menu:menu()) functional ... And making "add()" powerful. See the new menu example for new patterns of usage :-) There are a few variables that I neglected mentioning, these contain information about the murgaLua runtime, and you can find them used in the new "about.lua" example. There where a couple of bugs with murgaLua invocation that where caused by the new compiler stub ... One affected all versions and the other just Windows ... However, if you have ANY problems please let me know on this thread with as much info as possible. Many thanks Cheers JohnM The first build ############################################## Here is a preview build of the next stable version of murgaLua. This is mostly a clean and stable release, the new experimental API's are in the experimental release that I'll do after I'm done with this one. I hope to do the proper release of 0.6.0 tomorrow or Monday ... Known Issues with these binaries :
Please give it a go and let me know if you have problems. Have a look at the examples dir for demonstrations of the new features. And finally you can find it here : http://www.murga-projects.com/murgaLua/murgaLua-0.6.PRE-RELEASE.tar.gz RE: UPDATED murgaLua build - iGame3D - 01-21-2008 08:34 AM Found some scrambled text in the tableNavigator, attached. Adding "slider:redraw()" to the pixmap rotation examples slider:callback after the button redraw prevents the artifacts of the image inside the slider border as mentioned earlier. And readme mentions "tools/misc" but there is no "misc" directory. RE: UPDATED murgaLua build - iGame3D - 01-21-2008 08:54 AM In the tableNavigator, selecting the "which is it" line causes a crash Code: examples/tableNavigator.lua:78: bad argument #1 to 'getinfo' (function or level expected)
RE: UPDATED murgaLua build - mikshaw - 01-21-2008 09:26 AM I'm downloading now, but wanted to respond to your post anyway Quote: I took the feedback around the suckyness of menus seriously and have implemented proper callbacks as well as making the Fl_Menu:menu()) functional ... And making "add()" powerful.
That sounds super! I still don't understand how Fl_Menu_Item is used, but maybe that's not important anymore. Quote: Found some scrambled text in the tableNavigator
I've seen them too, but had no idea what to do about it. I guess it might have something to do with certain functions containing text rather than just being part of the binary machine? Quote: In the tableNavigator, selecting the "which is it" line causes a crash
I never noticed that before, and currently have no idea why. Maybe I should take out everything concerning functions, as they don't give you any useful information anyway. I was trying to find a way to display the code of lua functions, but I guess since they're binary it probably will never work.
RE: UPDATED murgaLua build - mikshaw - 01-21-2008 09:33 AM Oh.... which_is_it is a function inside the tableNavigator script. I can't say if that might help in debugging, but perhaps in the future we could make the navigator ignore itself? RE: UPDATED murgaLua build - JohnMurga - 01-21-2008 10:01 AM iGame3D Wrote: Found some scrambled text in the tableNavigator, attached.
Adding "slider:redraw()" to the pixmap rotation examples slider:callback after the button redraw prevents the artifacts of the image inside the slider border as mentioned earlier. And readme mentions "tools/misc" but there is no "misc" directory.
RE: UPDATED murgaLua build - JohnMurga - 01-21-2008 10:07 AM mikshaw Wrote: That sounds super! I still don't understand how Fl_Menu_Item is used, but maybe that's not important anymore.
It isn't that important any more ... But I'll try and document it. mikshaw Wrote: What is ltn12? It's apparently one of the 3rd party packages, but since this is a binary-only release I don't see any docs about it.
ltn12 is part of luaSocket ... Filters and sources ... Why do you ask ? mikshaw Wrote: Quote: Found some scrambled text in the tableNavigator
I've seen them too, but had no idea what to do about it. I guess it might have something to do with certain functions containing text rather than just being part of the binary machine?
The corruption in the screenshot comes from the variable in question having multi-line text in it. RE: UPDATED murgaLua build - mikshaw - 01-21-2008 10:21 AM Quote: ltn12 is part of luaSocket ... Filters and sources ... Why do you ask ?
I was just curious. I don't remember seeing it before. RE: UPDATED murgaLua build - mikshaw - 01-21-2008 12:12 PM I love the way menu creation works now. You can use the same method that worked in previous versions for redundant menus, but now that method can be either replaced or refined very easily with the extended version of add() or with my_menu:menu(my_item):callback(). I wonder if that last option can be done in a more simplified manner...I haven't tested it yet. I can't think of anything murgaLua is missing now (not that I won't in the future, of course, because I'll probably dig and poke at stuff that I have no knowledge of at this time) RE: UPDATED murgaLua build - JohnMurga - 01-21-2008 05:33 PM mikshaw Wrote: I can't think of anything murgaLua is missing now (not that I won't in the future, of course, because I'll probably dig and poke at stuff that I have no knowledge of at this time)
And all this staying as light, or lighter than we are now ... After all this is done I'll start considering version 1.0 :-) But as always I am open to suggestions ... Cheers JohnM RE: UPDATED murgaLua build - Juergen - 01-22-2008 12:07 AM JohnMurga Wrote: There are a few things that on my list :
And all this staying as light, or lighter than we are now ... After all this is done I'll start considering version 1.0 :-) But as always I am open to suggestions ... Cheers JohnM
RE: UPDATED murgaLua build - JohnMurga - 01-22-2008 02:04 AM Juergen Wrote: Is there something wrong with C/Invoke?
Juergen Wrote: Wasn't there a plan to build murgaLua with readline support on Linux?
Juergen Wrote: I don't know if the above topic includes this, but would it be possible to build a dynamic version (still linked statically to fltk, liblua, .....) that is able to load binary modules?
Juergen Wrote: I may be doing a project in the near future, which requires some functionality that doesn't necessarily make sense in murgaLua (like accessing the win32 API, regex, pluto, luaevent, threads....)
Juergen Wrote: If you are looking for features to add: lpeg, pluto and maybe luaevent wouldn't be a bad idea.
RE: UPDATED murgaLua build - mikshaw - 01-22-2008 02:39 AM I just noticed that my kluge for jumbled text only works for strings in functions...silly oversight. I fixed it for (hopefully) all strings by making a change to the lookittable function: Code: elseif type(v)=="string" then my_string=col_str..string.gsub(my_value,"\n"," %* ")
This should join multiline strings into a single line. Quote: The text editor stuff is still missing some methods.
Yeah, I forgot about that. I haven't done anything complex with Fl_Text_* but I did notice that column_widths() is missing, while it isn't that important it can make displays much neater.
RE: UPDATED murgaLua build - JohnMurga - 01-22-2008 08:38 AM JohnMurga Wrote: Juergen Wrote: I don't know if the above topic includes this, but would it be possible to build a dynamic version (still linked statically to fltk, liblua, .....) that is able to load binary modules?
Again, this version should support binary modules, you'd just have to build them for murgaLua ... I'll give it ago later.
RE: UPDATED murgaLua build - Juergen - 01-22-2008 08:58 AM JohnMurga Wrote:
C/Invoke did have some serious issues last time I played with it ... Which was a massive shame as it was something I really wanted.
I have an alternative which is more limited, but that's for the experimental murgaLua version in the coming weeks.
JohnMurga Wrote: Juergen Wrote: Wasn't there a plan to build murgaLua with readline support on Linux?
JohnMurga Wrote: Juergen Wrote: I don't know if the above topic includes this, but would it be possible to build a dynamic version (still linked statically to fltk, liblua, .....) that is able to load binary modules?
O.K. But I was wondering, since on Linux with glibc it isn't really possible to make completely static binaries, it would still work with a dynamic binary where all of the dependencies have been compiled in statically. The C-API is still the same (or did you change the C-API also?). This would remove the need to compile the modules specifically for murgaLua. JohnMurga Wrote: Juergen Wrote: I may be doing a project in the near future, which requires some functionality that doesn't necessarily make sense in murgaLua (like accessing the win32 API, regex, pluto, luaevent, threads....)
I guess it would make sense to write the win32 API part for Windows only ;-) JohnMurga Wrote: Which reminds me ... If you are using murgaLua for any kind of project that would make a good showcase please send some screenshots or something :-)
It will definitely be GPL. The reason for using a scripting language, is that it should be easy to change things. JohnMurga Wrote: Juergen Wrote: If you are looking for features to add: lpeg, pluto and maybe luaevent wouldn't be a bad idea.
If you add the feature of invoking C-API calls, then this will add automatically also the possibility of reading and parsing binary chunks (which is currently an absolute disaster). Of course a bitlib for bit manipulation is also needed to complement this. RE: UPDATED murgaLua build - Juergen - 01-22-2008 09:09 AM JohnMurga Wrote: JohnMurga Wrote: Juergen Wrote: I don't know if the above topic includes this, but would it be possible to build a dynamic version (still linked statically to fltk, liblua, .....) that is able to load binary modules?
Again, this version should support binary modules, you'd just have to build them for murgaLua ... I'll give it ago later.
I was just testing this on Linux and it didn't work. I assumed that it works, but (I may have tested it in the past on Windows) it currently doesn't work on Linux (at least not the way it is expected). RE: UPDATED murgaLua build - JohnMurga - 01-22-2008 09:45 AM Juergen Wrote: I just did a few extra tests and at no point does murgaLua try to open liblua. Although I can make it work when I preload liblua with "LD_PRELOAD". This is good enough and if it works on Windows I have no problems.
MurgaLua would not try to open liblua as it is statically linked, my understanding is that the module would be linked against liblua and would required it to be present whe murgaLua did the loadlib/require ... RE: UPDATED murgaLua build - Juergen - 01-22-2008 09:59 AM JohnMurga Wrote: Juergen Wrote: I just did a few extra tests and at no point does murgaLua try to open liblua. Although I can make it work when I preload liblua with "LD_PRELOAD". This is good enough and if it works on Windows I have no problems.
MurgaLua would not try to open liblua as it is statically linked, my understanding is that the module would be linked against liblua and would required it to be present whe murgaLua did the loadlib/require ...
You are right, the examples I just tested were not explicitly linked against liblua. Normally they don't have to, because they can see the Lua API symbols even when liblua is linked staticall into the lua interpreter binary. Only when the interpreter itself is linked statically (which doesn't really work on glibc) then the modules have to be linked dynamically against liblua or liblua.so has to be preloaded to make the symbols available. RE: UPDATED murgaLua build - iGame3D - 01-24-2008 12:11 PM JohnMurga Wrote: Which reminds me ... If you are using murgaLua for any kind of project that would make a good showcase please send some screenshots or something :-)
RE: UPDATED murgaLua build - Juergen - 01-26-2008 02:38 AM I did a few experiments today and found another missing feature in the fltk binding: The constructors Fl_Pixmap and Fl_Bitmap normally take an array as an argument. It would make sense to change the bindings so that the fltk.Fl_(Pixmap|Bitmap) constructors use a binary string. Juergen RE: UPDATED murgaLua build - mikshaw - 01-26-2008 02:44 AM Bitmaps may be binary, but as far as I know pixmaps are not. X pixmaps, at least, are plain text. RE: UPDATED murgaLua build - JohnMurga - 01-26-2008 02:45 AM Juergen Wrote: I did a few experiments today and found another missing feature in the fltk binding:
The constructors Fl_Pixmap and Fl_Bitmap normally take an array as an argument. It would make sense to change the bindings so that the fltk.Fl_(Pixmap|Bitmap) constructors use a binary string.
Pixmap should be an array, but Bitmap and RGB are binary strings. RE: UPDATED murgaLua build - Juergen - 01-26-2008 05:25 AM JohnMurga Wrote:
Pixmap should be an array, but Bitmap and RGB are binary strings.
Take a look at imageDecodingTest.lua ... This implementation is consistent with the way FLTK does things. Cheers JohnM
RE: UPDATED murgaLua build - JohnMurga - 01-26-2008 06:04 AM Juergen Wrote: You are right. I tried it with an array and it works.
Another question: Is it possible to draw on an offline (not visible) surface and then copy the result?
RE: UPDATED murgaLua build - Juergen - 01-29-2008 01:08 AM JohnMurga Wrote: Juergen Wrote: You are right. I tried it with an array and it works.
Another question: Is it possible to draw on an offline (not visible) surface and then copy the result?
Drawing to a hidden window was the first thing I tested. Unfortunately I only get a segmentation fault when I try to make_current() on the hidden window. RE: UPDATED murgaLua build - jpjacobs - 01-29-2008 01:51 AM when testing the new 0.6, the clockdemo thing throws me this error: Code: /usr/local/bin/murgaLua: [string "murgaLua"]:172: attempt to call field 'sleepMilliseconds' (a nil value)
So i guess this is a bug? RE: UPDATED murgaLua build - JohnMurga - 01-29-2008 08:24 AM jpjacobs Wrote: when testing the new 0.6, the clockdemo thing throws me this error:
Code: /usr/local/bin/murgaLua: [string "murgaLua"]:172: attempt to call field 'sleepMilliseconds' (a nil value)
So i guess this is a bug?
RE: UPDATED murgaLua build - JohnMurga - 01-29-2008 08:50 AM Juergen Wrote: Drawing to a hidden window was the first thing I tested. Unfortunately I only get a segmentation fault when I try to make_current() on the hidden window.
All that stuff is very flaky in FLTK itself ... But I got read_image working, and have an off_screen demo working too. Juergen Wrote: On a side note: You have to call the Fl_Menu_Bar() constructor as fltk.Fl_Menu_Bar(), but you can call the Fl_Pixmap() constructor direct. This is a little bit inconsequential.
Didn't realize that ... Better to be consistent. RE: UPDATED murgaLua build - mikshaw - 01-29-2008 11:30 AM The same behavior is evident with Fl_Tooltip, but it seems to be logical there. Fl_Tooltip is a single entity that affects all tooltips. Perhaps the same can be said about Fl_Pixmap. Contrary to the way Fl_Tooltip works, though, you can access Fl_Pixmap through a pointer to specific pixmap data. murgaLua_ExePath 0.6.0 Windows = nil - iGame3D - 02-10-2008 11:09 AM murgaLua_ExePath 0.6.0 Windows = nil I was trying to get a program compiled on windows but the program can't get past that nil global. about.lua fails when concatenating "murgaLua_ExePath". There's some weirdness with the way lfs will accept windows path delimiters sometimes and not in others. lfs.chdir() requires "/" lfs.dir() accepts "\" and "/" ------- Edit later... Yay I made my compile work. But wow PNG look awful on Windows. Windows version is on the left, this is emulated on Mac, but it looks the same on the real thing. ![]() |