Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #33508

Re: [OT] Lua

Message-ID <51B58076.7030005@westcontrol.removethisbit.com> (permalink)
Date 2013-06-10 09:29 +0200
From David Brown <david@westcontrol.removethisbit.com>
Newsgroups alt.comp.lang.lua, comp.lang.c
Subject Re: [OT] Lua
References (1 earlier) <koniun$ghe$1@dont-email.me> <21ee45ab-771f-436b-a6df-f48a5939ae13@googlegroups.com> <slrnkr1agr.3jn.grahn+nntp@frailea.sa.invalid> <slrnkr1jg8.9e4.usenet-nospam@leptop.lan> <87obbgpkzw.fsf_-_@violet.siamics.net>

Cross-posted to 2 groups.

Show all headers | View raw


On 08/06/13 19:31, Ivan Shmakov wrote:
>>>>>> Seebs  <usenet-nospam@seebs.net> writes:
>>>>>> On 2013-06-06, Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:
> 
> 	[Cross-posting to news:alt.comp.lang.lua, just to make keeping
> 	the track of it easier.]
> 
>  >> That /is/ a good idea (the general one: learning C by using it for
>  >> extensions to your favorite scripting language).  We should remember
>  >> to suggest that the next time someone asks.
> 
>  > It is.  And I quite like Lua, too. :)
> 
> 	I wonder, what's so good in Lua specifically?
> 
> 	Indeed, it seems to be one of the first "embeddable" languages
> 	to appear, but now that a number of them (including a variety of
> 	Lisp derivatives, Python, and of course Tcl) has reached the
> 	"mature" state, I don't quite understand, -- why Lua?
> 
> 	And personally, I tend to like Tcl for the purpose, mainly for
> 	its well-designed FFI, its support for Unicode, and that it
> 	looks like a mature language for years now.
> 
> 	(... But more than that, I like to embed C into HLL software,
> 	such as that written in Perl, -- and not the other way around.)
> 
> PS.  I hadn't yet the chance to say I'm glad to see you're back to
> 	Usenet.  So I do it now.
> 

Lua is much smaller than Python (in terms of the language, the libraries
and the implementation).  If you need a powerful and flexible language
with all the bells, whistles and libraries you could imagine, go for
Python.  But if you need something small, fast (for an interpreted
language) and simple, then Lua is probably a better choice.  And while
it is possible to mix C and Python using things like swig or ctypes, or
writing python extensions in C, it is usually much simpler (and much
more efficient at run-time) to integrate C code with Lua.

Personally, I write most desktop/server code in Python, but when I want
to add scripting to microcontroller code in C, I use Lua.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Good bootstrap application to learn C for what C is intended for? Tinxx <jeti789@web.de> - 2013-06-05 04:22 -0700
  Re: Good bootstrap application to learn C for what C is intended for? Öö Tiib <ootiib@hot.ee> - 2013-06-05 04:59 -0700
  Re: Good bootstrap application to learn C for what C is intended for? Bart van Ingen Schenau <bart@ingen.ddns.info.invalid> - 2013-06-05 14:45 +0000
    Re: Good bootstrap application to learn C for what C is intended for? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2013-06-05 21:17 +0000
      Re: Good bootstrap application to learn C for what C is intended for? Ian Collins <ian-news@hotmail.com> - 2013-06-06 11:07 +1200
    Re: Good bootstrap application to learn C for what C is intended for? Tinxx <jeti789@web.de> - 2013-06-06 01:22 -0700
      Re: Good bootstrap application to learn C for what C is intended for? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2013-06-06 15:26 +0000
        Re: Good bootstrap application to learn C for what C is intended for? Seebs <usenet-nospam@seebs.net> - 2013-06-07 22:19 +0000
          [OT] Lua Ivan Shmakov <oneingray@gmail.com> - 2013-06-08 17:31 +0000
            Re: [OT] Lua Tinxx <jeti789@web.de> - 2013-06-09 12:00 -0700
            Re: [OT] Lua David Brown <david@westcontrol.removethisbit.com> - 2013-06-10 09:29 +0200
              Re: [OT] Lua "BartC" <bc@freeuk.com> - 2013-06-10 09:48 +0100
            Re: [OT] Lua David Brown <david@westcontrol.removethisbit.com> - 2013-06-10 09:30 +0200
  Re: Good bootstrap application to learn C for what C is intended for? James Kuyper <jameskuyper@verizon.net> - 2013-06-05 10:55 -0400
  Re: Good bootstrap application to learn C for what C is intended for? "osmium" <r124c4u102@comcast.net> - 2013-06-05 10:02 -0500
    Re: Good bootstrap application to learn C for what C is intended for? Rosario1903 <Rosario@invalid.invalid> - 2013-06-05 21:55 +0200

csiph-web