Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

LUA, worth it?

Name: Anonymous 2007-09-28 16:46 ID:m3NizC+e

How about an opinion on LUA from /prog/? Don't believe it's been mentioned much around here.

Anything good able to be made with it?

Name: Anonymous 2007-09-28 16:48 ID:gM0ynSmz

Not bad if you need a tiny embeddable language that doesn't suck horribly.

Anything good able to be made with it?
It's Touring-complete. Go figure.

Name: Anonymous 2007-09-28 16:49 ID:gM0ynSmz

Also, `Lua' is not an acronym.

Name: Anonymous 2007-09-28 16:50 ID:GQTcjRX1

Not bad if you need a tiny embeddable language that doesn't suck horribly.

That pretty much sums it up.

Name: Anonymous 2007-09-28 16:50 ID:zo85tyIq

>>1
I haven't played with it, but it looks very good. I had a look at the docs and this is what I can remember:

Win: dynamic typing, lexical scoping, everything is an object (including first-class functions), metatables, the forced tail call optimization if possible, small, fairly clean syntax

Fail: automagic conversion of strings and numbers (bound to cause problems), crappy regular expressions (absolutely incompatible with Perl's, besides much inferior)

Name: Anonymous 2007-09-28 17:17 ID:zzJlmCIz

>>5
crappy regular expressions (absolutely incompatible with Perl's
Showstopper.

Name: Anonymous 2007-09-28 17:18 ID:u8WVbBzE

>>3
Sure it is. It stands for 'Launch Under Attack'.

Name: Anonymous 2007-09-28 17:19 ID:ibpjupVJ

Lua is AWESOME.
Its amazing what you can do with metatables and environments.
And tables are a very handy unification of all of Python's gay shit (tuples, lists, sets, hashes).
The C interface is pretty amazing as well. YUMMY STACKFAGGOTRY.

Name: Anonymous 2007-09-28 17:55 ID:X+MthvHs

If you guys like Lua have you checked out Squirrel? It's like Lua, but with imperative (C) style syntax.

http://squirrel-lang.org/

Has:
Open Source zlib/libpng licence
dynamic typing
delegation
classes & inheritance
higher order functions
generators
cooperative threads(coroutines) 
tail recursion
exception handling
automatic memory management (CPU bursts free; mixed approach ref counting/GC)
weak references
both compiler and virtual machine fit together in about 6k lines of C++ code.
optional 16bits characters strings
compiles on both 32 and 64 bits architectures

Name: Anonymous 2007-09-28 19:19 ID:hsnOXjv1

Lua is awesome.  It is a clean, small language with a clean, fast implementation and a simple C API and good documentation.  It has awesome Scheme features, like tail recursion and anonymous functions and proper closures, but its implementation is nicer than most Schemes (although it is small and doesn't have its own GUI).  Plus it has coroutines.  You can do OO stuff with metatables and environments pretty well too.

The entire language, API, and standard library is documented on this page:
http://www.lua.org/manual/5.1/manual.html

>>5
I think automatic conversion is only if you try to do operations that wouldn't make sense otherwise, like +,-,*,/ on strings.  So if you don't act like it's there it should never come up.  A string is never == to a number.

>>6
I've never used the tiny built-in regex feature.  I'm sure there's a binding to PCRE somewhere, but PCRE is probably as big as Lua itself so they didn't bundle it.

>>9
From looking at their docs, it is essentially a copy of Lua with a few syntax changes and some OO extensions.  They are even using Lua source code.  The API is identical.  They have copied Lua so much I think they are misrepresenting themselves by not making it clear on their site.  I would use the latest Lua, not a copy of an older version.

Name: Anonymous 2007-09-28 19:47 ID:YvBqlPAf

I think it's unfortunate that Lua does not have bignums, bitshift operators, unicode, or regular expressions, but you really can't expect something like that in a small language meant for embedding.

It's good at what it does at. My only regret is it doesn't look like Lua will outgrow its niche. Maybe if they came up with something like CPAN or gems.

Having said that, the ability to interface easily with C isn't to be laughed at. It's no FFI, but it means you can do almost anything with it fairly painlessly.

Name: Anonymous 2007-09-29 3:32 ID:6blyBm7Q

back in the day we used to smoke hash joints with lua mixed in, tell me what other programming language youve smoked?

Name: Anonymous 2007-09-29 4:29 ID:fJ2fdp61

I'm using Lua for a current project (because I couldn't figure out a way of getting nice coroutines in Guile), and ... well, the API is all right, but I don't really like the language, it's not Enlightened enough.

Name: Anonymous 2007-09-29 5:25 ID:Heaven

>>13
Have you considered SICP?

Name: Anonymous 2007-09-29 17:44 ID:JkM0wwzq

>>10
Oh, I've checked the manual:
The conversion rules of §2.2.1 do not apply to equality comparisons. Thus, "0"==0 evaluates to false, and t[0] and t["0"] denote different entries in a table.

Plus I knew about the different addition and concatenation operator. I'm relieved, now I think Lua is really awesome. In fact, what would you think about using it for ordinary work? This looks good enough to compete against Python, except for libraries.

>>11
it's unfortunate that Lua does not have bignums, bitshift operators, unicode
biggnums, bitshift operators, unicode
operators, unicode
unicode

Oh, wait, no Unicode? What the fuck. What the fuck. What the fuck. This is fucking 2007, Unicode was the only acceptable choice since a decade ago, it's not large, nor a superfluous feature of bloated languages, what the fuck are they doing with no Unicode? How the fuck am I going to script the higher-level part of a system if it can't deal with text strings? What the fuck. What the fuck. What the fuck.

Name: Anonymous 2007-09-29 19:32 ID:E14x2Owl

>>15
I love it when people do the enlarging quotes like that.

Name: G.J. Sussman 2007-09-29 20:57 ID:326efTtT

   . . ,.".".'"""..
  .             ,__\.~~
 .    ;'``` '``     \!"
 .   `.              \~"
  .., '  ____________|'~"
 `.  .__/     |_|    |\
  `..'  |  = /  | =  ||        Lua?
      | \___/   |\___|/        It's not Scheme or Python.
      |        _|    |
       \      __     |
        \    /__\  ./
        |`'._____.'|
       /|          /\
    __/  \________/  |__
      \   / #####/\  |
       \ /  \###/  \/
            |###\

Name: Anonymous 2007-09-29 21:07 ID:j9SIJiDG

>>15
I probably wouldn't use it for scripting because it doesn't have as many libraries (or unicode).  I'm currently using it embedded in a C app though and it's working great.

Oh, wait, no Unicode? What the fuck.
Actually unicode is kind of large:
http://www.unicode.org/reports/tr29/tr29-11.html
http://www.unicode.org/faq/normalization.html

Its 8-bit clean, so if you are working with UTF8 strings and appending paths etc it should work fine.  But if I needed to get the individual characters I would bridge the native string type for whatever API I was working with.

Name: Anonymous 2007-09-29 21:19 ID:j9SIJiDG

Also check out the just-in-time compiler:

http://luajit.org/luajit_features.html

Name: Anonymous 2007-09-29 21:44 ID:LVyluSh6

LuaJIT is awesome. It also adds Coco, which lets coroutines work across C calls.

Name: Anonymous 2009-03-06 11:14

Ability that the data   is indeed that   type Detecting every   possible type would   the following number?

Name: Anonymous 2009-08-16 22:33

Lain.

Name: Anonymous 2010-12-17 1:30

Xarn is a bad boyfriend

Name: Anonymous 2012-06-25 23:51

刀遴葠ᅳ酡颉䍱☲葔杂陕怂䚑☈芈ㄐ喀鑖ተ锶ᑆ隃䊕͗腐ငƅ督ᤁ鞄夙畑陠楨㐅䔐祗ᝂ搑晤腸硣舴ȉ㞅ݱ刴礶ᡘ攣ࡡ㈀㙷餡⦕ᦔ唇䒆␧䈉鎀〙ᤂ眡⑷蘶饈怩獳♦᝗⤕芀聨啅₆㚉㕡ᝈ⥙⍉✡閁閘鈴扈㝩を▂㤷蜹䌩⍱䠲蜇̩搙✔⠥蒖呑衉隆掕ၷ䉗傕Ť怡耀瀈┒疂扠餘爹墁㉆坓ቅ搹墅餗葂㝈∴爸圴蘢㆐吇鐈腵ᔠᄧ㤹ऑ䀱皐Ԃᥤↁ⎕⍲呀奵噹ቷᄗ䘉掐䝢斔〗ᄨ葳奴␩啕睷ᑶ襠暉昗┃բㅧ癶⍖銅瑒⍡䜦S道͇ᡕ抗䜠逨ጉ䜃न劕ɉ镨⁰炐瀵㘶䈰甓錨⑁គ㜤㍄蕕ረ㥁餳䊗逨㉲鑀椷匁剐፱斂䠸ᥠ憒覓閙ᑵ螙ᐁ戥奡㢅摸╘摦鍓ၡ㊘嚁抉焴文䥂⡓块营塘眤↙效萑荤㜱≆Ҙ蘈夀偃䁠ղ敆ĵ脖袇要餷葔┘⒆ᎇ⠄禅䙣≷␔䤔鄷砥䉡我हܗᘘ䆉㍀᠉䘇熅ㅂ暔A聨着慴顒ᅦ栆甈塘䐀閅頡允०၂㥇᝵敳适靵䚗

Don't change these.
Name: Email:
Entire Thread Thread List