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

Pages: 1-4041-

Language ShowOff Part #1: Lua

Name: Anonymous 2011-01-21 19:45

Pros:
   * Tiny
   * Crossplatform
   * Easy to embed
   * Fairly easy to extend
   * Has no external dependencies
   * Easy to learn due to simple syntax
   * Has metatables, which allow creating objects, and with that, allow OOP

Contra:
   * The builtin stdlib doesn't allow much more than just basic IO
   * The stackoriented API might be confusing to those unfamiliar with the concept of stackbased APIs
   * Due to the do ... end syntax, closures and co tend to look clumsy:
   
       pcall(function()
           stuff ...
       end)

Name: Anonymous 2011-01-21 19:48

(lisp-p >>1)
nil


No one cares.

Name: Anonymous 2011-01-21 19:49

>>2
*lispp

Name: Anonymous 2011-01-21 19:58

>>3
*lis?

Name: Anonymous 2011-01-21 20:00

>>1
Lua metatables suck shit, the tables-as-the-base-datastructure would have worked fine if it wasn't for how shitty they are. The semantics are so close to be Lispy, yet so far ;_;. Lua's failure makes me sad and angry. If only...

Name: Anonymous 2011-01-21 20:03

>>5
Shitty because of the syntax? Please explain.

Name: Anonymous 2011-01-21 20:07

>>4
*((compose lisp? scheme? (negate clojure?)) >>1)

Name: Anonymous 2011-01-21 20:07

>>5
That's my only real complaint about Lua. Enough to make me avoid it, too.

Name: Anonymous 2011-01-21 20:09

>>5
Tcl is the most lispier non-lisp language out there. Too bad it sucks self-ordinating binary O(logn) black-red dicks tree.

Name: Anonymous 2011-01-21 20:20

I HATE LUA. It really isn't “lightweight” like it says. Isn't there a Forth-like lightweight scripting language?

Name: Anonymous 2011-01-21 20:24

>>10
A Lisp macro on [ that read that stops at ] and reverses it.
[1 2 +] => (+ 2 1)

Name: Anonymous 2011-01-21 20:35

>>10
Yeah. Forth.

Name: Anonymous 2011-01-21 20:39

hair back whip

I whip my hair back in Forth

Name: Anonymous 2011-01-22 0:13

Lua: no integers allowed

Name: Anonymous 2011-01-22 1:27

>>14
How does that work?

Name: Anonymous 2011-01-22 3:47

Their scoping rules are broken. "Global by default" is shit. All code looks like

local local local local local
local local local local local
local local local local local local local local
local local local local
local local local local local local local local local local
local local local

Name: Anonymous 2011-01-22 5:10

>>15
It says integers.
You're allowed to have one integer.

Name: Anonymous 2011-01-22 5:25

Alright, fuck all you'all. Check out Luajit beta 2. Faster than your dynamic language o'choice. and now with an awesome ffi.
"faggots"

Name: Anonymous 2011-01-22 6:41

TCL is extremely minimal, concise and consistent.  It supports Unicod and treats code as data (strings).

Name: Anonymous 2011-01-22 6:48

>>19
see >>9

Name: Anonymous 2011-01-22 8:05

>>11
fickle ficl

Name: Anonymous 2011-01-22 8:27

>>18
Call me when Lua has a standard library on par with (Python|Ruby|Perl)'s, you lowly spammer you.

Name: Anonymous 2011-01-22 8:38

Call me when Lua has OPERATOR FOR EVERYTHING

Name: Anonymous 2011-01-22 8:46

>>23
ARE YOU an operator?
ARE YOU for everything?
ARE YOU an operator for everything?
If you answered ``Yes'' to all the above, Perl 6 might be exactly what you've looking for!

Name: Anonymous 2011-01-22 9:01

>>16
(let (let (let (let (let

Name: Anonymous 2011-01-22 9:07

>>25
That's not nearly as ugly when you're not stuck w/ S-exprs:

let ... in
let ... in
let ... in
code ...;;

Name: Anonymous 2011-01-22 9:09

>>25
(let*

Name: Anonymous 2011-01-22 9:12

>>26
;;
;_;

Name: Anonymous 2011-01-22 9:26

>>26
You're that guy who took away most of parens from Lisp and still claims it's a Lisp while hardheadedly refusing to make his reader macros public?

Fuck off.

Name: Anonymous 2011-01-22 9:46

>>29
I call him the ``\`\`in Lisp\'\' guy''.

Name: >>26 2011-01-22 11:57

>>29
No... that's not me... and that's not Lisp. You might want to look into ML or something.

Name: Anonymous 2011-01-22 12:59

>>31
...
...

...

Name: noko 2011-01-22 14:42

noko

Name: Anonymous 2011-01-22 16:14

I prefer Squirrel to Lua, it uses C-like braces instead of end, it has OO instead of the cludgy OO in Lua. The only thing I dont like in Squirrel and Lua is having to explicitly declare variables as local. I'll stick to Python and Ruby thank you.

Name: Anonymous 2011-01-22 17:18

Aye Tee Tee: toy languages.

Name: Anonymous 2011-01-22 17:37

>>34
The only reason OO is kludgy in Lua is because metatables are utterly broken. As for declaring variables as local manually, that's a great indicator of a sane language (though it doesn't apply to C++ and Java).

>>35
Fuck off, troll.

Name: Anonymous 2011-01-22 19:42

>>30
Can I call you the \\\\\`\\\\\`magic quotes guy\\\\\'\\\\\'?

Name: Anonymous 2011-01-22 20:29

>>37
Call me the ``\`\`\\\`\\\`\\\'\\\\\\\`\\\\\\\`\\\\\\\\\\\\\\`\\\\\\\\\\\\\\`in Lisp\\\\\\\\\\\\\\'\\\\\\\\\\\\\\' guy\\\\\\\'\\\\\\\'\\\'\'\'''

Name: Anonymous 2011-01-22 20:30

>>36
Is there a summary somewhere of what is wrong with Lua metatables?  Do you mean the particular implementation details in Lua, or the general concept?

Name: Anonymous 2011-01-22 20:35

>>39
Do you mean the particular implementation details in Lua, or the general concept?
Both. There are things you can override in metatables, and there are things you can't. That's really bad.

Name: Anonymous 2011-01-22 21:02

>>36,40
I prefer Lua's object model (i.e. protos, not classes), especially for scripting. But one thing I dislike in OO is meta-anything and Lua's metatables are so broken and/or not completely documented in 5.1 (unless you want to buy the book.) It's a real turn-off. For OO scripting I'm most fond of Io: http://www.iolanguage.com/

Another thing I've found is braces aren't that important. As long as blocks are delimited consistently and by something other than weird whitespace configurations I am usually fine with it.

Name: Anonymous 2011-01-22 21:14

>>41
I prefer Lua's object model (i.e. protos, not classes)
Why do prototype based OO languages always suck? I love prototypes, but: Lua sucks, JS sucks, Io is RUBY AS FUCK.

Name: Anonymous 2011-01-22 21:18

>>42
JS sucks
I'd love to know why you think that, unless it has to do with the standard library. (Solution: stop coding for the web.)

Name: Anonymous 2011-01-22 21:19

>>42
They don't "always suck;" you just can't be satisfied.

Name: Anonymous 2011-01-22 21:23

>>43
It's shitnamyc typed, has too many gotchas and dos and don'ts.
And no, === and !== solve just one problem.
I hope ECMAScript ``Harmony'' will fix JS, it's the only language I'd use other than Lisp and C. I doubt it though.

Name: >>45 2011-01-22 21:26

shitnamyc typed
I DON'T MEAN DYNAMIC TYPING, IT IS GOOD AND ALL, I'M A LISPER AND I KNOW IT. I MEANT THE TYPE COERCION.

Name: Anonymous 2011-01-22 21:36

>>46
Oh okay, I was going to flame you for that. Never mind then.

proggles~~

Name: Anonymous 2011-01-22 22:16

>>45
Gotcha. I the gotchas are mostly the ever multiplied product of things MS did in IE. One thing about Harmony is the opt-in strategy. I don't know how well that will work out, but if it does it may bring a lot of relief to the existing problem of support for terrible decisions made in the past.

The type coercion hasn't given me any serious problems. Given that it's meant for web designers to ruin their sites with, I would have expected a far worse situation... I think we're getting off easy.

Name: Anonymous 2011-01-23 6:37

>>48
The type coercion hasn't given me any serious problems.
A flaw is still a flaw, they need to get rid of it.
Also, I'd like macros.

Name: Anonymous 2011-01-23 23:57

>>49
But all languages are flawed. Type coercion in Lua is such a minimal thing by comparison with the other flaws in the language and in the flaws in other candidate languages. Sure it should get fixed, but I'd sooner see documentation. Maybe there's a new metatable field that I can use to fix it myself.

Name: Anonymous 2011-01-24 0:01

>>50
What Lua? We were talking of JS.

Name: Anonymous 2011-01-24 0:59

>>51
Oh right. Oops. Same deal, really... only without the rest of the problems in the language. I mean if you code for a specific JS engine you're fine.

Name: Anonymous 2011-02-03 2:36

FORCED INCLUSION OF CLOSURES

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