Hello Claude and Frank, Hello list,
I understand that Lua seems powerful but I would like to know if in
my case it's more interesting to use Lua instead of PHP.
My work consists in recovering datas from the Web and manipulate
strings with PHP. Then to store this datas in MySQL database.
After what i use another PHP/MySQL script and send datas to PD.
Can you give me 3 goods reasons tu use Lua instead of PHP in my
case ? (speed, more easy to implement in PD, etc ?).
Thanx. ++
Jack
Hallo, Jack hat gesagt: // Jack wrote:
My work consists in recovering datas from the Web and manipulate
strings with PHP. Then to store this datas in MySQL database. After what i use another PHP/MySQL script and send datas to PD.Can you give me 3 goods reasons tu use Lua instead of PHP in my
case ? (speed, more easy to implement in PD, etc ?).
I don't know of an external which adds PHP support inside of Pd. If you are talking about which programming language to choose outside of Pd: I'd choose whatever you feel most comfortable with. Of course one could debate which language is the "better" language, Lua or PHP, but I think, this would be very off-topic here.
Frank Barknecht _ ______footils.org__
Le 20 mars 08 à 15:43, Frank Barknecht a écrit :
Hallo, Jack hat gesagt: // Jack wrote:
My work consists in recovering datas from the Web and manipulate strings with PHP. Then to store this datas in MySQL database. After what i use another PHP/MySQL script and send datas to PD.
Can you give me 3 goods reasons tu use Lua instead of PHP in my case ? (speed, more easy to implement in PD, etc ?).
I don't know of an external which adds PHP support inside of Pd. If you are talking about which programming language to choose outside of Pd: I'd choose whatever you feel most comfortable with. Of course one could debate which language is the "better" language, Lua or PHP, but I think, this would be very off-topic here.
Of course, I selected that with which I am more at ease. :)
In fact, i just want to know if Lua is as at ease as PHP with
Internet, string operation and MySQL.
Lua is well implemented in PD, so i think it's not very off-topic here !
++
Jack
Ciao
Frank Barknecht _
______footils.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Hallo, Jack hat gesagt: // Jack wrote:
Le 20 mars 08 à 15:43, Frank Barknecht a écrit :
I don't know of an external which adds PHP support inside of Pd. If you are talking about which programming language to choose outside of Pd: I'd choose whatever you feel most comfortable with. Of course one could debate which language is the "better" language, Lua or PHP, but I think, this would be very off-topic here.
Of course, I selected that with which I am more at ease. :) In fact, i just want to know if Lua is as at ease as PHP with
Internet, string operation and MySQL. Lua is well implemented in PD, so i think it's not very off-topic here !
Yeah, I meant the more general discussion if Lua altogether is "better" than PHP would be off-topic. Until PHP is available in Pd, the choice between Lua and PHP inside of Pd is easy.
Outside of Pd there's nothing wrong with using PHP for programming. One difference between Lua and many other popular languages like PHP, Python or Perl is, that Lua is not a language which comes with many modules whereas the "P-languages" shine in regard to this and have many ready-to-use library bindings on board. The core Lua however is deliberatly kept small - much like Pd actually!
Core Lua already has powerful string operations, but for MySQL or Socket/Internet programming you need to install separate libraries. The Kepler project would be a good start.
I don't know very much about PHP (I tend to avoid PHP and Perl as much as possible and greatly prefer Python, if I need lots of library bindings) so I cannot comment on how good the PHP libraries are compared to what's available for Lua.
Frank Barknecht _ ______footils.org__
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
Hallo, Jack hat gesagt: // Jack wrote:
Le 20 mars 08 à 15:43, Frank Barknecht a écrit :
I don't know of an external which adds PHP support inside of Pd. If you are talking about which programming language to choose outside of Pd: I'd choose whatever you feel most comfortable with. Of course one could debate which language is the "better" language, Lua or PHP, but I think, this would be very off-topic here.
Of course, I selected that with which I am more at ease. :) In fact, i just want to know if Lua is as at ease as PHP with
Internet, string operation and MySQL. Lua is well implemented in PD, so i think it's not very off-topic here !Yeah, I meant the more general discussion if Lua altogether is "better" than PHP would be off-topic. Until PHP is available in Pd, the choice between Lua and PHP inside of Pd is easy.
Oh, and if you're only interested in speed: The Language Shootout shows Lua as generally being roughly twice as fast and memory friendly than PHP in most cases: http://tinyurl.com/ypgvnf
Lua is 13 times slower than C++, PHP is 23 times slower. (Tcl there is 44 times slower ...)
Frank Barknecht _ ______footils.org__
I think the latency involved in writing data to and from the database will probably prove a much larger bottleneck than the speed of the language that you use, at least if you're trying to read the web pages and use the data in Pd in real-time.
andy
On Thu, Mar 20, 2008 at 9:03 AM, Frank Barknecht fbar@footils.org wrote:
Hallo,
Frank Barknecht hat gesagt: // Frank Barknecht wrote:
Hallo, Jack hat gesagt: // Jack wrote:
Le 20 mars 08 à 15:43, Frank Barknecht a écrit :
I don't know of an external which adds PHP support inside of Pd. If you are talking about which programming language to choose outside of Pd: I'd choose whatever you feel most comfortable with. Of course one could debate which language is the "better" language, Lua or PHP, but I think, this would be very off-topic here.
Of course, I selected that with which I am more at ease. :) In fact, i just want to know if Lua is as at ease as PHP with Internet, string operation and MySQL. Lua is well implemented in PD, so i think it's not very off-topic here !
Yeah, I meant the more general discussion if Lua altogether is "better" than PHP would be off-topic. Until PHP is available in Pd, the choice between Lua and PHP inside of Pd is easy.
Oh, and if you're only interested in speed: The Language Shootout shows Lua as generally being roughly twice as fast and memory friendly than PHP in most cases: http://tinyurl.com/ypgvnf
Lua is 13 times slower than C++, PHP is 23 times slower. (Tcl there is 44 times slower ...)
Ciao
Frank Barknecht _ ______footils.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo, Andrew Turley hat gesagt: // Andrew Turley wrote:
I think the latency involved in writing data to and from the database will probably prove a much larger bottleneck than the speed of the language that you use, at least if you're trying to read the web pages and use the data in Pd in real-time.
Yep, and don't forget the latency added by learning a new programming language! ;)
Frank Barknecht _ ______footils.org__
Thanx Frank for this explanation.
I will see for the Kepler project as soon as possible, after the Lua
base :).
++
Jack
Le 20 mars 08 à 16:55, Frank Barknecht a écrit :
Hallo, Jack hat gesagt: // Jack wrote:
Le 20 mars 08 à 15:43, Frank Barknecht a écrit :
I don't know of an external which adds PHP support inside of Pd. If you are talking about which programming language to choose
outside of Pd: I'd choose whatever you feel most comfortable with. Of course
one could debate which language is the "better" language, Lua or PHP,
but I think, this would be very off-topic here.Of course, I selected that with which I am more at ease. :) In fact, i just want to know if Lua is as at ease as PHP with Internet, string operation and MySQL. Lua is well implemented in PD, so i think it's not very off-topic
here !Yeah, I meant the more general discussion if Lua altogether is "better" than PHP would be off-topic. Until PHP is available in Pd, the choice between Lua and PHP inside of Pd is easy.
Outside of Pd there's nothing wrong with using PHP for programming. One difference between Lua and many other popular languages like PHP, Python or Perl is, that Lua is not a language which comes with many modules whereas the "P-languages" shine in regard to this and have many ready-to-use library bindings on board. The core Lua however is deliberatly kept small - much like Pd actually!
Core Lua already has powerful string operations, but for MySQL or Socket/Internet programming you need to install separate libraries. The Kepler project would be a good start.
I don't know very much about PHP (I tend to avoid PHP and Perl as much as possible and greatly prefer Python, if I need lots of library bindings) so I cannot comment on how good the PHP libraries are compared to what's available for Lua.
Ciao
Frank Barknecht _
______footils.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
it is not only a choice between lua and php. I had good experiences in the past with the python external, but that was before I discovered lua. for another project I am now starting to use pdj (java external), because I have to connect to a java api backend via function calls. I think both are reasonable alternatives if you are familiar with one of these languages. I think python has already better support for mysql related stuff than lua, because it is used a lot with web-applications. but that does not mean lua has not... marius.
Frank Barknecht wrote:
Hallo, Jack hat gesagt: // Jack wrote:
Le 20 mars 08 à 15:43, Frank Barknecht a écrit :
I don't know of an external which adds PHP support inside of Pd. If you are talking about which programming language to choose outside of Pd: I'd choose whatever you feel most comfortable with. Of course one could debate which language is the "better" language, Lua or PHP, but I think, this would be very off-topic here.
Of course, I selected that with which I am more at ease. :) In fact, i just want to know if Lua is as at ease as PHP with
Internet, string operation and MySQL. Lua is well implemented in PD, so i think it's not very off-topic here !Yeah, I meant the more general discussion if Lua altogether is "better" than PHP would be off-topic. Until PHP is available in Pd, the choice between Lua and PHP inside of Pd is easy.
Outside of Pd there's nothing wrong with using PHP for programming. One difference between Lua and many other popular languages like PHP, Python or Perl is, that Lua is not a language which comes with many modules whereas the "P-languages" shine in regard to this and have many ready-to-use library bindings on board. The core Lua however is deliberatly kept small - much like Pd actually!
Core Lua already has powerful string operations, but for MySQL or Socket/Internet programming you need to install separate libraries. The Kepler project would be a good start.
I don't know very much about PHP (I tend to avoid PHP and Perl as much as possible and greatly prefer Python, if I need lots of library bindings) so I cannot comment on how good the PHP libraries are compared to what's available for Lua.
Ciao