From Lua to Python?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
70 messages Options
1234
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

From Lua to Python?

Dibyendu Majumdar
Hi,

I am thinking about moving to Python in my project where I am
currently using Lua as the scripting language. My reason is a
pragmatic one - Python is becoming popular in the Financial sector,
and is the language most people my project targets will be familiar
with. Additionally some of the tools I use - such as Google's GRPC and
Protocol Buffers - all support Python.

It seems that Python is also becoming popular in the field of machine
learning / statistics. I think that the Torch project may also be
moving to Python?

We all know that Lua (especially LuaJIT) is much faster than Python,
but as I realized a few months ago
(http://lua-users.org/lists/lua-l/2017-02/msg00253.html) - speed is
not necessarily the driving factor in many applications of a scripting
language. There have been many threads here on what might need to be
done for Lua to make it more widely used - so I won't go into that.
Lua has its own niche in games etc. and hopefully it will continue to
thrive there.

I still hope to continue using Lua where I can - and continue working on Ravi.

Regards
Dibyendu

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Italo Maia
I use python in my daily work. Considered using lua for our scripts, but, even it being faster and lighter, the few libraries and resources online available kind of made me rethink that.

For now, I think lua should be used for what it does best.


Em 30 de jun de 2017 8:09 PM, "Dibyendu Majumdar" <[hidden email]> escreveu:
Hi,

I am thinking about moving to Python in my project where I am
currently using Lua as the scripting language. My reason is a
pragmatic one - Python is becoming popular in the Financial sector,
and is the language most people my project targets will be familiar
with. Additionally some of the tools I use - such as Google's GRPC and
Protocol Buffers - all support Python.

It seems that Python is also becoming popular in the field of machine
learning / statistics. I think that the Torch project may also be
moving to Python?

We all know that Lua (especially LuaJIT) is much faster than Python,
but as I realized a few months ago
(http://lua-users.org/lists/lua-l/2017-02/msg00253.html) - speed is
not necessarily the driving factor in many applications of a scripting
language. There have been many threads here on what might need to be
done for Lua to make it more widely used - so I won't go into that.
Lua has its own niche in games etc. and hopefully it will continue to
thrive there.

I still hope to continue using Lua where I can - and continue working on Ravi.

Regards
Dibyendu

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Jay Carlson
On Jul 1, 2017, at 12:48 PM, Italo Maia <[hidden email]> wrote:

> I use python in my daily work. Considered using lua for our scripts, but, even it being faster and lighter, the few libraries and resources online available kind of made me rethink that.
>
> For now, I think lua should be used for what it does best.

...which is not as a general-purpose systems language, if I understand you correctly.

If only Lua had a (reasonable) subset of the Python libraries.

There’s a project nobody’s done: Clone the Python library designs in Lua. Map them one-to-one to Lua when the languages are close enough; subset them if necessary; omit if rarely used, or silly for Lua. Heck, prototype it with a Lua bridge for Python!

This is the kind of thing GSoC could dig into.

Yes, I am aware Python’s library is full of warts. But look at something like subprocess[1] which pretty much nails all the low-level things you need to use external processes. Notably, it tells you, “to avoid deadlock, use the communicate() method.”

--
Jay

[1]:

https://docs.python.org/2.7/library/subprocess.html#subprocess.Popen.communicate
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Charles Heywood
I agree. Using some Python libraries in Lua is great. I've been using a library called argparse, "ported" to Lua, and it's great.

On Sat, Jul 1, 2017, 14:18 Jay Carlson <[hidden email]> wrote:
On Jul 1, 2017, at 12:48 PM, Italo Maia <[hidden email]> wrote:

> I use python in my daily work. Considered using lua for our scripts, but, even it being faster and lighter, the few libraries and resources online available kind of made me rethink that.
>
> For now, I think lua should be used for what it does best.

...which is not as a general-purpose systems language, if I understand you correctly.

If only Lua had a (reasonable) subset of the Python libraries.

There’s a project nobody’s done: Clone the Python library designs in Lua. Map them one-to-one to Lua when the languages are close enough; subset them if necessary; omit if rarely used, or silly for Lua. Heck, prototype it with a Lua bridge for Python!

This is the kind of thing GSoC could dig into.

Yes, I am aware Python’s library is full of warts. But look at something like subprocess[1] which pretty much nails all the low-level things you need to use external processes. Notably, it tells you, “to avoid deadlock, use the communicate() method.”

--
Jay

[1]:

https://docs.python.org/2.7/library/subprocess.html#subprocess.Popen.communicate
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate
--
--
Ryan <[hidden email]>
Software Developer / System Administrator
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Dibyendu Majumdar
In reply to this post by Jay Carlson
Hi Jay,

On 1 July 2017 at 20:17, Jay Carlson <[hidden email]> wrote:
> If only Lua had a (reasonable) subset of the Python libraries.
>
> There’s a project nobody’s done: Clone the Python library designs in Lua.

This was my plan originally - i.e. I had planned on creating a whole
bunch of libraries (mostly related to maths & statistics). But sadly
this is a huge task and life is too short.

Regards

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Italo Maia
There are a few projects trying to do just that, like https://mirven.github.io/underscore.lua/ and https://luarocks.org/modules/italomaia/luabatteries (this one is mine) tries to fill some gap. Not much in the big picture. Libraries like parsel, lxml, requests, werkzeug and wtforms are still missing (to cite a few). GSoC would probably be a good road toward the goal.

Em 1 de jul de 2017 4:44 PM, "Dibyendu Majumdar" <[hidden email]> escreveu:
Hi Jay,

On 1 July 2017 at 20:17, Jay Carlson <[hidden email]> wrote:
> If only Lua had a (reasonable) subset of the Python libraries.
>
> There’s a project nobody’s done: Clone the Python library designs in Lua.

This was my plan originally - i.e. I had planned on creating a whole
bunch of libraries (mostly related to maths & statistics). But sadly
this is a huge task and life is too short.

Regards

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Jakub Jirutka
In reply to this post by Jay Carlson
> On 1. Jul 2017, at 21:17, Jay Carlson <[hidden email]> wrote:
>
> There’s a project nobody’s done: Clone the Python library designs in Lua. Map them one-to-one to Lua when the languages are close enough; subset them if necessary; omit if rarely used, or silly for Lua. Heck, prototype it with a Lua bridge for Python!

Pardon, why Python’s stdlib(?) and not some other?

Does Python have the best stdlib and third-party libraries? I really don’t think so. Actually I’m quite convinced that it does not have, especially stdlib is IMHO very bad; full of inconsistencies, bloat, various oddities, bad design, legacy bloat… I would really don’t wanna use any port of Python stdlib in Lua.

Is Python close to Lua? No, it’s really not. I think that the closest to Lua is JavaScript. They have in common even that aspect of very concise stdlib.

If you need some big battery of common functions, then you can use e.g. Penlight [1], Microlight [2], lua-stdlib [3] or any other. You can choose whatever libraries suite your needs and taste or write your own, without always installing ~50 MiB of bloat you will never use…

I’m not saying that Lua and its ecosystem is perfect and there’s no problem. But do you really want Lua to be like Python? For me, that would be very disappointing. Maybe I should also mention that I’m quite new to Lua and it’s like 7th language I’ve learned (after Java, Ruby, Python, …).

Jakub

[1]: https://github.com/stevedonovan/Penlight
[2]: https://github.com/stevedonovan/Microlight
[3]: https://github.com/lua-stdlib/lua-stdlib/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Check LuaRocks for maintained libraries! (Was: From Lua to Python?)

Peter Aronoff
In reply to this post by Italo Maia
Italo Maia <[hidden email]> wrote:
> There are a few projects trying to do just that, like
> https://mirven.github.io/underscore.lua/

I'm sorry, but this is a pet-peeve: this version of underscore for Lua
(there are others) hasn't been updated for 8 years.

I mention this because I see references to this library semi-regularly on
this list, and it's worth reminding people that it's unmaintained.

The good news is that there are similar libraries that *are* maintained.
For example, moses[1]. And you can find more on Luarocks, by checking out
the batteries[2] section.

This is just my plug for people to stop recommending old, old, unmaintained
libraries.

P

[1]: https://luarocks.org/modules/yonaba/moses
[2]: https://luarocks.org/labels/batteries
--
We have not been faced with the need to satisfy someone else's
requirements, and for this freedom we are grateful.
    Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Italo Maia
In reply to this post by Jakub Jirutka

2017-07-01 19:50 GMT-03:00 Jakub Jirutka <[hidden email]>:
Penlight

It is a nice thing that lua does not impose "bloats" like you said, to the end user (at least, I like it too). Python was probably a suggestion, because it has most needs covered.

One thing that would be nice for lua to have is "suggested libraries", like, "well, I don't put a lot of libraries in the package, but, if you need some punch, try these. We kind of like them and they're supported by us". This was already discussed in another thread and the solution, so far is to give lua-wiki some love.

ps: Thank you very much for penlight suggestion. I did not know it.


--
"A arrogância é a arma dos fracos."

===========================
Me. Italo Moreira Campelo Maia
Co-fundador do Grupo de Usuários Python do Ceará
Secretário ForHacker (fb.com/ForHackerSpace)
Desenvolvedor Full-Stack, Escritor, Empresário, Visionário
-----------------------------------------------------
Meu Livro, Site, Blog
===========================
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Jakub Jirutka
On 2. Jul 2017, at 1:48, Italo Maia <[hidden email]> wrote:
One thing that would be nice for lua to have is "suggested libraries", like, "well, I don't put a lot of libraries in the package, but, if you need some punch, try these.

Yeah, that’s a nice idea, but can we agree on just one library for particular task? Otherwise it’d be the same as just suggesting to look at LuaRocks, maybe filter by tags. I assume that everyone knows about LuaRocks, it’s the first site you find when searching for Lua package manager…?

On 2. Jul 2017, at 1:48, Italo Maia <[hidden email]> wrote:
ps: Thank you very much for penlight suggestion. I did not know it. 

You’re welcome! However, I actually don’t like Penlight, I consider it quite bloated, that’s why I suggested it in this case/context. That said, it’s still the first library that comes to my mind when talking about stdlib, don’t even know why.

On 2. Jul 2017, at 1:29, Peter Aronoff <[hidden email]> wrote:
For example, moses

Yeah, Moses is not bad, but it has the same problem like underscore.js – not very functional due to arguments order that do not play nice with currying.

On 2. Jul 2017, at 1:29, Peter Aronoff <[hidden email]> wrote:
And you can find more on Luarocks, by checking out the batteries[2] section.

I second that, LuaRocks should be the first place to check when searching for some Lua library!

Jakub

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Tobias Kieslich
In reply to this post by Charles Heywood

Quoting Charles Heywood <[hidden email]>:

>> Yes, I am aware Python’s library is full of warts. But look at something
>> like subprocess[1] which pretty much nails all the low-level things you
>> need to use external processes. Notably, it tells you, “to avoid deadlock,
>> use the communicate() method.”

I see how communicate() is convenient. I would argue that there are helper
libraries out there which allow you to make Lua builtin popen a lot  
more useful.

I used my own library lua-t which sports an event loop but I'm sure there is
other stuff out there which provides similar functionality.  Note, this is a
very quick'n dirty example without any error checking ...


local   Loop = require('t.Loop')

l = Loop(4)
h = io.popen( 'sleep 3 && date' )
l:addHandle( h, 'read', function( handle )
        print( handle:read( '*all' ) )
        handle:close( )
        l:stop()
end, h )
l:run( )

  -tobbik


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Marc Balmer
In reply to this post by Dibyendu Majumdar


> Am 01.07.2017 um 21:43 schrieb Dibyendu Majumdar <[hidden email]>:
>
> Hi Jay,
>
> On 1 July 2017 at 20:17, Jay Carlson <[hidden email]> wrote:
>> If only Lua had a (reasonable) subset of the Python libraries.
>>
>> There’s a project nobody’s done: Clone the Python library designs in Lua.
>
> This was my plan originally - i.e. I had planned on creating a whole
> bunch of libraries (mostly related to maths & statistics). But sadly
> this is a huge task and life is too short.

In my opinion you are making a huge mistake:  namely choosing your tools by popularity/user count rather by fitness for the task.

If that was a wise thing to do, we would probably all code in visual basic for applications… ;)


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Dibyendu Majumdar
Hi Marc,

On 2 July 2017 at 09:12, Marc Balmer <[hidden email]> wrote:
> In my opinion you are making a huge mistake:  namely choosing your tools by popularity/user count rather by fitness for the task.
>
> If that was a wise thing to do, we would probably all code in visual basic for applications… ;)
>

It is not a question of Python being a more popular language than Lua
- I knew that when I decided to use Lua some time back. I documented
my reasons then:

http://marc.info/?l=lua-l&m=142688565919209&w=2

The issue is that since then Python has gained a solid footing in the
sector I am targeting - so much so that at my previous work place the
team were moving from R to Python for the work they did. Just as if
you were to target a game it would make sense to use Lua as the
scripting language - similarly Python is looking like the better
choice in certain domains. I had hoped to counter this by creating all
the "features" my users would need in Lua - but it has turned out this
that this is a very major undertaking in its own right, and not what I
can afford to spend time on. I am not talking here of generic
libraries ... more like these:

https://github.com/rasbt/pattern_classification/blob/master/resources/python_data_libraries.md

I also mentioned the official support for Python in GRPC, Protocol Buffers.
And finally the growing support for machine learning via PyTorch,
Tensorflow etc.

Sure all these can be done for Lua as well - and naively I had hoped I
could tackle that. But I can't.

Regards
Dibyendu

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Andrew Starks-2
In reply to this post by Jakub Jirutka

On Sat, Jul 1, 2017 at 17:50 Jakub Jirutka <[hidden email]> wrote:
> On 1. Jul 2017, at 21:17, Jay Carlson <[hidden email]> wrote:
>
> There’s a project nobody’s done: Clone the Python library designs in Lua. Map them one-to-one to Lua when the languages are close enough; subset them if necessary; omit if rarely used, or silly for Lua. Heck, prototype it with a Lua bridge for Python!

Pardon, why Python’s stdlib(?) and not some other?

Does Python have the best stdlib and third-party libraries? I really don’t think so. Actually I’m quite convinced that it does not have, especially stdlib is IMHO very bad; full of inconsistencies, bloat, various oddities, bad design, legacy bloat… I would really don’t wanna use any port of Python stdlib in Lua.

Is Python close to Lua? No, it’s really not. I think that the closest to Lua is JavaScript. They have in common even that aspect of very concise stdlib.

If you need some big battery of common functions, then you can use e.g. Penlight [1], Microlight [2], lua-stdlib [3] or any other. You can choose whatever libraries suite your needs and taste or write your own, without always installing ~50 MiB of bloat you will never use…

I’m not saying that Lua and its ecosystem is perfect and there’s no problem. But do you really want Lua to be like Python? For me, that would be very disappointing. Maybe I should also mention that I’m quite new to Lua and it’s like 7th language I’ve learned (after Java, Ruby, Python, …).

Jakub

[1]: https://github.com/stevedonovan/Penlight
[2]: https://github.com/stevedonovan/Microlight
[3]: https://github.com/lua-stdlib/lua
stdlib/

I don't like to repeat, but it seems like if it can "just be stated in a clearer way" (or something) it will stick... or maybe I'm wrong...

Lua is a product that is made for all developers that want scripting, and many of those don't want any kind of standard library. Most of us know that. Therefore, it is not going to work to suggest adding a bunch of those libraries to Lua, in an effort to help only part of one segment of that world (the one that needs a library AND that agrees your library is the right one)

AND at the same time, there is a need. On some other "higher" level, there is clear demand for a new product. 

It requires people to stop admiring the problem, organize, make checklists, and start knocking them off. Happily, there is work being done on this; probably on multiple fronts. I'm aware of at least one group that is working on these issues. 

-Andrew
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Russell Haley
In reply to this post by Dibyendu Majumdar
On Sun, Jul 2, 2017 at 2:44 AM, Dibyendu Majumdar
<[hidden email]> wrote:

> Hi Marc,
>
> On 2 July 2017 at 09:12, Marc Balmer <[hidden email]> wrote:
>> In my opinion you are making a huge mistake:  namely choosing your tools by popularity/user count rather by fitness for the task.
>>
>> If that was a wise thing to do, we would probably all code in visual basic for applications… ;)
>>
>
> It is not a question of Python being a more popular language than Lua
> - I knew that when I decided to use Lua some time back. I documented
> my reasons then:
>
> http://marc.info/?l=lua-l&m=142688565919209&w=2
>
> The issue is that since then Python has gained a solid footing in the
> sector I am targeting - so much so that at my previous work place the
> team were moving from R to Python for the work they did. Just as if
> you were to target a game it would make sense to use Lua as the
> scripting language - similarly Python is looking like the better
> choice in certain domains. I had hoped to counter this by creating all
> the "features" my users would need in Lua - but it has turned out this
> that this is a very major undertaking in its own right, and not what I
> can afford to spend time on. I am not talking here of generic
> libraries ... more like these:
>
> https://github.com/rasbt/pattern_classification/blob/master/resources/python_data_libraries.md
>
> I also mentioned the official support for Python in GRPC, Protocol Buffers.
> And finally the growing support for machine learning via PyTorch,
> Tensorflow etc.
>
> Sure all these can be done for Lua as well - and naively I had hoped I
> could tackle that. But I can't.

While I am not attempting to dissuade you from switching from Lua, I
assume you have posted this to gather opinion on the mailing list so I
shall add mine:
- If a technical choice does not lead to a clear competitive
advantage, I would argue it is not a wise choice. That competitive
advantage may be performance, ease of use, existing libraries or large
user base and integration with existing products. However, said
competitive advantage will always carry a price. The price of Lua
performance is a need to maintain your own tools and libraries. The
price of python is that every person not writing in Java or C# is
probably using Python. That's a good and a bad thing...
- The majority of programmers in the world are not very smart, usually
easily manipulated by shiny new toys and are resistant to learn new
things. I believe this resistance is because they will stand to loose
some advantage in the transition unless it is suggested by them
(because they think they have an advantage).
- Never trust large technology companies - especially Google. The old
Microsoft game was to embrace a 'partner' and then create their own
version of the tools and integrate it into their existing products,
leaving said partner in the shadows. Googles game is a 'long game'.
They will give you the tools to integrate your data into their systems
and then suck any profitability out of that market and leave you with
nothing. Don't believe me? Look at Android, Play Store, Google Maps,
and many other platforms. Once you are sending data to their 'free'
systems, you will no longer be able to extract yourself and you will
suffer the same fate as the millions of other developers that accepted
the shiny new toys they offered. I bet companies like Sony and HTC -
and even Samsung to an extent - thought they were being pretty smart
embracing Android. However, once the market has moved fully to the
<company name here> corner, you may no longer have a choice!

As someone who also thought of himself as an 'Army of One' I can see
that without massive amounts of time and resources (i.e. a financial
backer), there is little hope to compete even in a small slice of a
market. I believe the GPL license is largely responsible for this, as
large companies can always pour more resources into a technology than
you have available. Then, they simply suck up your GPL'd IP and turn
it to their advantage. I disdain the GPL and all who toute it for this
reason.

Okay, my daughter wants to play so I have to cut my rant short.

Good Luck, and stay away from Google. ;)

Russ

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

szbnwer@gmail.com
hi!

you made me a bit sad, but i can understand your point. first when you
appeared with your plans i've thought you are a competitor around my
aims, but even if i've found later that's far not the case, i became
interested in your work and i've found you to be a great mind under
the flag of lua. i can't really say much to make you stay, but mostly
you already have so much behind you, maybe you can count that as extra
work with python, as you've said you have no enough life to do the
remaining work. i think financial folks are mostly not programmer
geniuses, who are great with python and in general with programming,
they could find lua as an easy to learn and use tool. the best i can
suggest, is to invest more into asking your target group, show them
benefits of both sides, and take a deeper look around for the
available tools, and possibly you can go farer by asking the local
community to help make the needed tools, as i can see the common
interest. possibly if you show your aims and python tools you need,
the community can offer good alternatives and some hands for shared
needs. just as not only you but your target group have to learn all
those tools as well, not just python, ravi or lua.

one of my aims is to bring down the wonder of programming for the 'man
of mold' (-> mortals), and i'm making tools for this purpose (i'm
still around funds, far from shiny ornaments to the top), and i've
came from python land (i know mostly lua, fullstack web, bash, c and
python, and checking out anything new and popular in the wild, and i
can read almost anything that was written for computers) - with this
background i didn't find anything better in the wild, and i have
really so much points of view for selection. i've got stuck on python
land with my goals, and then i had 2weeks of intensive research
starting from assembly upwards, this way i arrived here, and i love
lua day after day only more, while walking around with opened eyes for
any other possibilities. this project is still private, mostly right
because what Russell Haley said about big corps. i have 4k+ lines of
notes for my plans and i know well that nothing will be harmed here,
just i've got no much time for a long while because of getting some
existence and funds.

you could think the same, as first making tools that can boost your
work instead of optimizing. second good aim is to make much usable
things, so when you will have a good product with enough people
involved, then they will boost you the most, but that time you will
stuck with the funds you have. therefor give much time for over
thinking all corners in your mind, and do your research in all depths.
python with much tools won't be easier to use, as a masterpiece with
all the necessary things given, and a huge tangled infrastructure is
kinda untouchable. this can harm you easier with python i think. one
of my goals is to make untouchable to touchable and fragile to
bendable - but don't wait for me, i have a so long road to walk down,
but i can help you, if you have good questions.

most likely you got tired, but a restart is more likely a soul killer
then having a rest take a deep breathe and continue, watch around for
help anyway, write your goals for them, share your aims, tools and
achievements with them, and you will be fine. i think you wanna work
for something that will work for you later, the best way for this is
to open up doors, and get help for make things complete after the
funds will show the way and make it easy to finalize, but you can
become much more tired than now, if you are farer from the funds that
you can offer for help. and maybe put on some bad habits, those can
help much to stay strong :D

and all the bests for your path! :)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Sean Conner
In reply to this post by Russell Haley
It was thus said that the Great Russell Haley once stated:
>
> As someone who also thought of himself as an 'Army of One' I can see
> that without massive amounts of time and resources (i.e. a financial
> backer), there is little hope to compete even in a small slice of a
> market. I believe the GPL license is largely responsible for this, as
> large companies can always pour more resources into a technology than
> you have available. Then, they simply suck up your GPL'd IP and turn
> it to their advantage. I disdain the GPL and all who toute it for this
> reason.

  The GPL, or open source in general.  Because in my experience, companies
are shying away from GPL code like you wouldn't believe---Apple doesn't
allow *any* GPL code on iOS and funded development of clang so they could
remove the one last major GPLed component on their system---GCC.  The only
program that is still GPLed on Android phones is the kernel, and that's only
because Linux is GPL2 only (not GPL2+).

  No, companies *hate* the GPL for the most part.  Companies *love* the more
"permissive" [1] like MIT or BSD, because *then* they can take your IP and
not give anything back [2].  Programmers like MIT and BSD for the exact same
reason [3].

  -spc (One more reason for companies to hate the GPL---it's user friendly [4])

[1] Permissive for programmers; they're actually quite user hostile
        licenses in my opinion.

[2] Actually, they do tend to give back if the company thinks they can
        get free maintainence and upgrades of the codebase and it's not
        giving away too much in the way of competative advantage.

[3] And maybe hoping to become a large company in turn.

[4] In that it allows the user to see how the program works (and how
        data is stored) and also fix and/or improve the program they're
        using (or perhaps hire a programmer to do the work).

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

云帆江
In reply to this post by Dibyendu Majumdar
yes it was, but maybe you could try moonscript :D

2017-07-01 7:09 GMT+08:00 Dibyendu Majumdar <[hidden email]>:
Hi,

I am thinking about moving to Python in my project where I am
currently using Lua as the scripting language. My reason is a
pragmatic one - Python is becoming popular in the Financial sector,
and is the language most people my project targets will be familiar
with. Additionally some of the tools I use - such as Google's GRPC and
Protocol Buffers - all support Python.

It seems that Python is also becoming popular in the field of machine
learning / statistics. I think that the Torch project may also be
moving to Python?

We all know that Lua (especially LuaJIT) is much faster than Python,
but as I realized a few months ago
(http://lua-users.org/lists/lua-l/2017-02/msg00253.html) - speed is
not necessarily the driving factor in many applications of a scripting
language. There have been many threads here on what might need to be
done for Lua to make it more widely used - so I won't go into that.
Lua has its own niche in games etc. and hopefully it will continue to
thrive there.

I still hope to continue using Lua where I can - and continue working on Ravi.

Regards
Dibyendu




--
Name: yunfan
Site: http://geek42.info/
Interest:
  - Lang: [forth, clojure, c, python, lua]
  - software: [nginx, redis]
  - abstract: [vm, tiny, cloud, html5]
  - history
  - science-fiction
  - music: [new-age, vangelis, yanni]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

steve donovan
In reply to this post by Jay Carlson
On Sat, Jul 1, 2017 at 9:17 PM, Jay Carlson <[hidden email]> wrote:
> If only Lua had a (reasonable) subset of the Python libraries.

Heh, that was precisely the start of the Penlight project - nostalgia
for the Python libraries. But I lost interest in staying faithful to
that mission, recognizing the differences between the languages, and
wanting to work with the strengths of Lua.

I don't doubt that it is doable, but it sounds like a lot of work that
could be futile - because why should Lua try to be a better Python?

OP was speaking about financial people, and then I think of ...
spreadsheets. And that makes me think of VBA - much easier to get VBA
people to do Lua than Python.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: From Lua to Python?

Javier Guerra Giraldez
On 3 July 2017 at 14:49, steve donovan <[hidden email]> wrote:
> But I lost interest in staying faithful to
> that mission, recognizing the differences between the languages, and
> wanting to work with the strengths of Lua.


+1 on that

the general impression i got when reading the penlight sources was
that they were very good implementations of somewhat useful but not
really critical abstractions.

the bad thing (at the time, i think it improved a little afterwards)
was how the interwined code reuse meaning how if you want just one or
two nice things, you had to swallow everything below that.

for example, sets are very easy to do in Lua, but slightly tedious to
have all the relevant operators.  so it makes sense to get from a
"standard" library; but using penligh sets meant also using the
provided lists, arrays, classes... no thanks.

so, i find that most of my code reusing in Lua is in the form of
recipes, more than libraries.   yeah, i know that doesn't scale well
to team work.... :-(


--
Javier

1234
Loading...