Murga-Projects Forums
How to advertise? - 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: How to advertise? (/showthread.php?tid=265)


How to advertise? - mikshaw - 01-21-2008 12:42 PM

To be completely honest, there are very few software projects that I get excited about. I like the Damn Small Linux distribution, and am active on the DSL forums, and I love the fact that there are so many other active and creative Linux distros. But individual applications don't usually excite me unless they perform a task that 1) Everyone else is using an unneccesarily bloated or complex program to accomplish, or 2) No one else is doing. There are currently only a few projects I know of that are doing one or both of those very well, in my opinion, and one of those is murgaLua. MurgaLua is exciting to me because it provides a way to create graphical interfaces that can be anything from a simple GUI for an existing commandline program to a full unique program in itself, and it does it in a very small and fast script that is fully readable and editable. There is no other project that does this both so well and so lightly (and there are only a handful of projects that do it at all). It can also be used as a replacement for the official Lua interpreter in most cases.

So now the question arises: How do we spread this to others, those who maybe have been using Tcl/Tk or Perl or Python, but wishing there was something lighter and simpler for their apps? How might it be possible to get murgaLua known and used to the point where it might even eventually be listed on the tracked packages at distrowatch?

Most of the world, even most of the open source world, has no knowledge of murgaLua, and I think that's sad.


RE: How to advertise? - iGame3D - 01-21-2008 05:31 PM

This has been tempting to me since I first found the program.

I tried to get support for the PPC build at the mac game developers forum early on, no response.
I dropped a link on the kids at openlua.com, but they seem tied up in some kind MMO game they script for.

I've been tempted to post it to versiontracker, it should get a few interested people there,
however I didn't want to jump the gun and get a "What the hell are you doing!??!" email from John.

The forums at Icy North get a lot of views, but very little (like zero) forum feedback.
I could post there and see what rolls in.

A post to the lua list theoretically should do something positive.

I think what I've been waiting for mostly is a solid set of demos/docs.
Your reference script comes to mind.

A couple of the early murgaLua demos were broken by 0.5.5's changes,
and there are some fixes needed in the tutorials.
We should address those before people get stumped.

I'm always curious why John hasn't set up a luaforge or sourceforge for this.

I tried to set up a luaForge project last year and it didn't work, and they didn't get back
to my support request so I went ahead and put everything on sourceforge.

We could always modify that extra lua project I have there and use it for murgaLua support scripts
and docs, that way it at least shows up in a general search there.

Well thats some options and ideas.


RE: How to advertise? - JohnMurga - 01-21-2008 05:51 PM

I thought I'd post a quick response, but I am running late for work ...

I think you are right, the main thing is for me to fix the docs and get some glossy demos out ...

mikshaw's reference script is an awesome demo, and goes a long way.

With that and and nice UIs for the compiler it'll be easier ...

But when I am ready I was going to write an article for the Linux and Windows mags, send it off and see if it gets published ... However, once that happens things will reach critical mass :-)

Anyway, have a nice day guys !

Cheers
JohnM


RE: How to advertise? - asafp - 01-23-2008 04:19 AM

One problem with something like murgalua is it's only as strong as it's weakest link. If one of the components has a problem, all of murgalua is tarnished. Right now, it seems like luasocket is pretty weak. The documentation is scarce and I've found 2 serious problems just in superficial testing. It's hard to overcome that with advertising.

One problem is that no headers are returned on a get request. If you pass it a URL for a site that doesn't exist, luasocket just wretches and heaves. I also tried the coroutine example for luasocket in the 5.1 "Programming in Lua" book and couldn't get it to work at all. Of course, it's a complex example, so it's not too frightening that it doesn't work and it's definitely possible I botched something up. On the other hand, if a powerful technique like efficiently processing multiple http get requests worked, that would be a major selling point for murgalua.


RE: How to advertise? - iGame3D - 01-23-2008 08:45 AM

I think the major benefit of getting the word out is having more people to test and discover where the weak links are. With just a few of us it takes longer to nail these
things down. With a larger group there are more needs and wants and therefore more tests, questions, and observations.

Speaking from my experience with iGame3D where there is basically just two of us working at it year over year which leads to large amounts of time passing between an implemented feature and finding a bug or coming up with various solutions that use that feature.

A solid dedicated group of explorers is priceless or a support headache, depending on what they bring to the table or not.

I haven't touched luasocket in months so your experience above might have taken me two years to get to. Thanks for giving us a heads up.


RE: How to advertise? - JohnMurga - 01-24-2008 07:02 PM

asafp Wrote:
One problem with something like murgalua is it's only as strong as it's weakest link.  If one of the components has a problem, all of murgalua is tarnished.  Right now, it seems like luasocket is pretty weak.  The documentation is scarce and I've found 2 serious problems just in superficial testing.  It's hard to overcome that with advertising.

Yup :-(

That's what I need feedback for :-)

asafp Wrote:
One problem is that no headers are returned on a get request.  If you pass it a URL for a site that doesn't exist, luasocket just wretches and heaves.  I also tried the coroutine example for luasocket in the 5.1 "Programming in Lua" book and couldn't get it to work at all.  Of course, it's a complex example, so it's not too frightening that it doesn't work and it's definitely possible I botched something up.  On the other hand, if a powerful technique like efficiently processing multiple http get requests worked, that would be a major selling point for murgalua.

Have you taken a look at COPAS ? It's in there to help with concurrent networking issues in LuaSocket ...

As for your other issue, it would help if you send me more info (code examples), and I can get it working or fix the bug that breaks it :-)

I would really appreaciate code examples that demostrate problems because it saves me time (which is my most precious commodity right now).

I was thinking of writing a simple multi-threaded HTTP server (with COPAS), is that what you are thinking of ?

Cheers
JohnM


RE: How to advertise? - asafp - 01-25-2008 06:12 AM

I fixed the problem with headers. I had an ipairs loop to process them. I changed it to pairs and everything is cool. Greenhorn mistake.

This luasocket http get request program demonstrates exception occurs if website doesn't exit.

function GetHtml(urlin)
local http=require('socket.http')
local url=require('socket.url')
local ltn12 = require("ltn12")
local mime = require("mime")
local urlname=urlin
local t={}
--print (os.date(),urlname)
local r, c, h, w = http.request {
method = "GET",
headers = {["Useragent"]='Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11',
["Content-Type"] = "application/x-www-form-urlencoded",
["Connection"]="Keep-Alive"},
url = urlname,
redirect = true,
sink = ltn12.sink.table(t)
-- sink = ltn12.sink.file(io.stdout)
}
print ('r=',r)
print ('c=',c)
print ('w=',w)
for k,v in pairs(h) do
print (k,v)
end
return table.concat(t), c, h
end
x=GetHtml('http://whatismyip.com')
x=GetHtml('http://iamabogusurl.com')


RE: How to advertise? - asafp - 01-25-2008 06:27 AM

This is the coroutine download function from the 5.1 "Programming in Lua" book. It gives error "attempt to call global 'receive' (a nil value)".

http=require('socket.http')
function download (host, file)
local c = assert(socket.connect(host, 80))
local count = 0 -- counts number of bytes read
c:send("GET " .. file .. " HTTP/1.0\r\n\r\n")
while true do
local s, status = receive©
print (status, string.len(s))
count = count + string.len(s)
if status == "closed" then break end
end
c:close()
print(file, count)
end
host = "www.w3.org"
download(host, "/TR/html401/html40.txt")

This is the entire coroutine example. It just hangs up.

function download (host, file)
local c = assert(socket.connect(host, 80))
local count = 0 -- counts number of bytes read
c:send("GET " .. file .. " HTTP/1.0\r\n\r\n")
while true do
local s, status = receive©
print (status, string.len(s))
count = count + string.len(s)
if status == "closed" then break end
end
c:close()
print(file, count)
end
threads = {} -- list of all live threads
function get (host, file)
-- create coroutine
local co = coroutine.create(function ()
download(host, file)
end)
-- insert it in the list
table.insert(threads, co)
end
function receive (connection)
connection:timeout(0) -- do not block
local s, status = connection:receive(2^10)
if status == "timeout" then
coroutine.yield(connection)
end
return s, status
end
function dispatcher ()
while true do
local n = table.getn(threads)
if n == 0 then break end -- no more threads to run
local connections = {}
for i=1,n do
local status, res = coroutine.resume(threads[i])
print 'howdy'
if not res then -- thread finished its task?
table.remove(threads, i)
break
else -- timeout
table.insert(connections, res)
end
end
if table.getn(connections) == n then
socket.select(connections)
end
end
end
host = "www.w3.org"
download(host, "/TR/html401/html40.txt")
get(host, "/TR/html401/html40.txt")
get(host,"/TR/2002/REC-xhtml1-20020801/xhtml1.pdf")
get(host,"/TR/REC-html32.html")
get(host,"/TR/2000/REC-DOM-Level-2-Core-20001113/DOM2-Core.txt")
dispatcher() -- main loop


RE: How to advertise? - asafp - 01-25-2008 06:52 AM

John, I'd like to help however I can with the skills that I have.

I am working on client side spider type applications. It would be fantastic to be able to retrieve multiple URLs in a straightforward, reliable, efficient manner. I'm not aware of any programming language (even commercial ones) that let you do this without a lot of complications.


RE: How to advertise? - mikshaw - 01-25-2008 07:33 AM

Have you tried putting the functions above the rest of the commands? Lua (or at least murgaLua) seems to run line-by-line, meaning that if it tries to run receive before the receive function is defined, it will fail.


RE: How to advertise? - asafp - 01-25-2008 08:42 AM

mikshaw Wrote:
Have you tried putting the functions above the rest of the commands? Lua (or at least murgaLua) seems to run line-by-line, meaning that if it tries to run receive before the receive function is defined, it will fail.


I put the receive function first and got "attempt to call method 'timeout' (a nil value)"


RE: How to advertise? - mikshaw - 01-25-2008 09:41 AM

Ahhh.
It looks like timeout is not available in socket.http (or at least not in murgaLua).
There is, however, a socket.http.TIMEOUT constant. It seems that it is stuck at 60?


RE: How to advertise? - JohnMurga - 01-26-2008 02:21 AM

asafp Wrote:
I put the receive function first and got "attempt to call method 'timeout' (a nil value)"


The luasocket docs will tell you that the "timeout()" method was changed to "settimeout()" a while ago ...

Update 1 :

I re-arranged your code and it looks fine, but when I run it I get a "attempt to yield across metamethod/C-call boundary" ... Aha, I have figured that one out now too, the check-links luasocket example fails in the same way.

Update 2 :

Ummm ...
I think the LuaSocket API and LUA have changed enough for this to NOT work.

However, I have a safe way of making LuaSocket work as it should - Expect a reworked example and updated executables in the coming days.

Update 3 :

New binaries are NOT required, and there is a problem with the LuaSocket example, but I think I got asafp's example running WITH co-routines and the CURRENT murgaLua binaries ... More testing and I'll post it tonight.

Cheers
JohnM


RE: How to advertise? - JohnMurga - 01-26-2008 07:03 AM

Hi,

Just updated forum to accept lua scripts (!)

Anyway, here you have working socket co-routines for the existing murgaLua binaries (it'll even work on 0.5.5 I think).

The secret was to read the Lua and LuaSocket documentation, as both have changed somewhat since the example you where using was written.

Cheers
JohnM


RE: How to advertise? - mmburke - 01-31-2008 08:23 AM

This is a somewhat self-serving reply, but read my post on the Lua Workshop (or better yet take a look at http://lua.org/wshop08.html).  I'd be quite interested in having someone give a talk on MurgaLua or a project they were building with MurgaLua.

I've been looking for a long time for something that would let me easily do portable Lua gui programs.  I've looked at IUP and canvas, the lua-cairo bindings, wxLua, etc. and none of them have really fit the bill.  I haven't had a chance yet to do much with MurgaLua (or I'd do a talk...), but from what I've seen, it looks to be exactly what I've been wanting.

Matt


RE: How to advertise? - mikshaw - 01-31-2008 11:11 AM

MurgaLua is without a doubt the easiest way to create a cross-platform graphical user interface. The Lua language is small fast and simple, and FLTK is one of the lightest widget sets available.

I'll be the first to say that I'm not a programmer, but I found it very easy (after a brief period of scratching my head) to pick up Lua, and FLTK, while sometimes a little odd or even buggy, provides all of the most commonly used widgets in an equally simple package. I will never reach the day when I'm not grateful to John Murga for creating this tool.


RE: How to advertise? - iGame3D - 01-31-2008 08:30 PM

I almost talked myself into going to Washington.
Maybe next year with version 1.0 and a better sense of things.

Hopefully someone is in the DC area in July to say murgaLua into the right ears.


RE: How to advertise? - mmburke - 02-01-2008 03:04 AM

iGame3D Wrote:
I almost talked myself into going to Washington.
Maybe next year with version 1.0 and a better sense of things.



Oh, c'mon!  You know what will happen:  you'll get to V1 and say "V2 will be so much nicer, I'll wait..." and then when V2 rolls around you'll say, "but if I wait until V3 then I'll be able to show such and such..."  And it will _NEVER_ happen! Smile

Plus, it will be a great opportunity to recruit new participants, bounce ideas off of other Lua folk, etc., etc.

So why not just give in and come this year!

Matt


RE: How to advertise? - asafp - 02-01-2008 04:06 AM

John, thanks for a working coroutine example. Now I just have to figure out how to put it to practical use. It's nice to have an active user community for an open source project.

The more I get into lua/murgalua, the more I like it.

Just a few rambling thoughts from a greenhorn:

Somewhere I read that lua was sort of a modern version of awk and that struck me as being right on the money. I've got a lot of awk scripts laying around (I'm sure many other people do also) and thought it would be nice if all those scripts could be murgalua scripts and started thinking about writing a murgalua script that would convert the awk scripts to murgalua.

Then, I started thinking about some things that would be nice to have. The first thing would be a split function that works like what is available in awk/python/perl. Now, I know it's not too difficult to code such a thing with existing string and loop functions, but think it could be justified to make it a standard part of murgalua.

1) It wouldn't add much to the size of murgalua.
2) Split is a very common function and certainly has a place in a highly table oriented language like lua. It's a logical compliment to table.concat.
3) It would be "advertising" for those currently coding in awk/pthon/perl and other languages that already have a split function. It would also attract those who aren't really programmers but occasionally write scripts.

I don't have a lot of gripes about lua, but one is ~= for not equal. I'm not a big fan of that. It causes me a great deal of consternation when other languages I use on a regular basis use != and <> for not equal. I know it sounds trivial, but little things like that can stop somebody from learning a new language. Could murgalua accept any of the three variations?

Again, just a few ramblings from the new guy.


RE: How to advertise? - JohnMurga - 02-01-2008 04:08 AM

mmburke Wrote:
Oh, c'mon! You know what will happen: you'll get to V1 and say "V2 will be so much nicer, I'll wait..." and then when V2 rolls around you'll say, "but if I wait until V3 then I'll be able to show such and such..." And it will _NEVER_ happen! Smile

It is funny, I actually lived in Arlington, VA for a while ... So it would have been easy for me to attend at the time - Now that I live in Switzerland its maybe not so easy.

As it is murgaLua is at version 0.6.0 ... So we haven't even reached V1.

mmburke Wrote:
Plus, it will be a great opportunity to recruit new participants, bounce ideas off of other Lua folk, etc., etc.

It would be ...

But there are so many things I want to fix before I get to that point :-)

mmburke Wrote:
So why not just give in and come this year!

I have seriously penciled it in for next year ...

Cheers
JohnM


RE: How to advertise? - JohnMurga - 02-01-2008 04:18 AM

asafp Wrote:
Then, I started thinking about some things that would be nice to have. The first thing would be a split function that works like what is available in awk/python/perl. Now, I know it's not too difficult to code such a thing with existing string and loop functions, but think it could be justified to make it a standard part of murgalua.

I think you should take a look at :

http://lua-users.org/wiki/StringLibraryTutorial

and

http://lua-users.org/wiki/StringRecipes

I had no trouble replacing "split" like functionality ... And to make it more efficient I added the "string file" stuff.

If you are still not convinced after looking at the links, and playing around with stuff like gmatch, then suggest the exact syntax you'd like to see.
Bare in mind I reserve judgment ;-)

asafp Wrote:
I don't have a lot of gripes about lua, but one is ~= for not equal. I'm not a big fan of that. It causes me a great deal of consternation when other languages I use on a regular basis use != and <> for not equal. I know it sounds trivial, but little things like that can stop somebody from learning a new language. Could murgalua accept any of the three variations?

I have to totally agree with you on that, and it is my most common error when writing ANY script in lua ... But at the same time I want the core LUA syntax to remain unchanged, as the whole point is that murgaLua is based on STANDARD lua :-)

You do get used to it ... Take it from me :-(

Cheers
JohnM