lua vs python

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

lua vs python

崔 献军
l am going on a project on calc expression. but i cannot desire which one i should use.  
in strugging...

崔献军
Reply | Threaded
Open this post in threaded view
|

Re: lua vs python

Martin
On 02/21/2017 12:09 PM, 崔 献军 wrote:
> l am going on a project on calc expression. but i cannot desire which one i should use.  
> in strugging...
>
> 崔献军
>
Use `bc`.

Reply | Threaded
Open this post in threaded view
|

Re: lua vs python

Kim Alvefur
On Tue, Feb 21, 2017 at 11:16:42PM -0800, Martin wrote:
> On 02/21/2017 12:09 PM, 崔 献军 wrote:
> > l am going on a project on calc expression. but i cannot desire which one i should use.  
> > in strugging...
> >
> > 崔献军
> >
> Use `bc`.

This is the correct answer.

Reply | Threaded
Open this post in threaded view
|

Re: lua vs python

oliver-2
In reply to this post by 崔 献军
On Tue, Feb 21, 2017, 15:09 崔 献军 <[hidden email]> wrote:
l am going on a project on calc expression. but i cannot desire which one i should use.
in strugging...

崔献军

To script a C/c++ app, use Lua; for everything else including colonizing Mars, creating the next cybernetic form of life, and solving the World's energy crisis, use Python. I'll admit to a *bit* of bias. 
--
Oliver
My StackOverflow contributions
My CodeProject articles
My Github projects
My SourceForget.net projects
Reply | Threaded
Open this post in threaded view
|

Re: lua vs python

Dirk Laurie-2
2017-02-22 3:54 GMT+02:00 oliver <[hidden email]>:

> To script a C/c++ app, use Lua; for everything else including colonizing
> Mars, creating the next cybernetic form of life, and solving the World's
> energy crisis, use Python. I'll admit to a *bit* of bias.

I was a Python programmer for about six years (2006-2011) and heard
about Lua just when 5.2 reached beta. I might never have done so, but
Lua had become important in the TeX world and I was curious. That
was a good time to come to Lua, since the whole _ENV issue was
only history, and 5.3 is mostly a sleek 5.2 with mag wheels, leather
seats and tiptronic gearshift.

Lua seemed to come up with the answers on everything that irritated
me about Python. To mention just one: I could find some code on the
list or on http://lua-users.org/wiki/, copy-amd-paste it with the mouse,
amd it worked. With Python the same thing almost never worked
because whitespace has invisible but significant properties.

I never looked back.

Python's perceived good points come from its admittedly impressive
set of application libraries (that page that you are supposed to go to
bed with) and the fact that Perl is just too off-putting to programmers
like met that had become used to languages that look understandable.
I still think that Perl is obviously best if one's application is interacting
with the operating system all the time, but I can't really read, let alone
write it.

So for me, Python is the spoilt brat's Perl.

The clincher (as Oliver notes) is just how easy and seamless it is to
combine Lua and C. With LuaJIT's FFI you don't even need the API
for that.