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

LuaJIT

Name: LuaJIT 2012-02-25 0:48

LuaJIT

Name: Anonymous 2012-02-25 0:50

no match for python, ``faggot''

Name: Anonymous 2012-02-25 0:52

You're just one butthurt python faggot, aren't you?

Name: Anonymous 2012-02-25 1:12

sorry but Javascript already exists

Name: Anonymous 2012-02-25 9:29

>>4
Hahahaha, funny joke.

Name: Anonymous 2012-02-25 14:08

>>5
:<

Name: Anonymous 2012-02-25 16:05

How LUA is better than Haskell?

Name: Anonymous 2012-02-25 16:15

>>7
people use it!

Name: Anonymous 2012-02-25 16:22

I am far from an expert at Lua, but I have done a couple of semi-serious projects in the language and will try to recall specifically what I didn't like:
- Simple-minded people seems love Lua due to Baby Duck Syndrome and too much World of Warcraft farming, instead of education.
- Yet another boring, badly designed, slow scripting language. Nothing to see here.
- No, wait! Lua managed to screw royally even where other scripting crap works nice - there is no list/vector type in Lua: you can't access elements sequentially or by an integer index. That needs some talent!

Name: Anonymous 2012-02-25 16:24

>>8
Some "people" use human faeces as a sexual stimulant

http://en.wikipedia.org/wiki/Coprophilia

Name: Anonymous 2012-02-25 16:26

check 'em

Name: Anonymous 2012-02-25 17:14

>>9
you can't access elements sequentially or by an integer index.
0/10

Name: Anonymous 2012-02-25 17:36

>>12
http://lua-users.org/wiki/TablesTutorial
Lua stores all elements in tables generically as key-value pairs. Lua does not differentiate between arrays and dictionaries. All Lua tables are actually dictionaries.

Name: Anonymous 2012-02-25 17:38

http://lua-users.org/wiki/TablesTutorial
This didn't work because when we tried to retrieve the value of a[{1,2,3}] we constructed another table, i.e. the table that we used as a key in the table constructor is not the same one as we used to retrieve the value.

the fucking tutorial is full of Lua-criticism!

Name: Anonymous 2012-02-25 17:46

>>13
you'll have to explain how this prevents you from ``accessing elements sequentially or by an integer index''

Name: Anonymous 2012-02-25 17:51

>>14
and that has absolutely nothing to do with what you were talking about earlier

-10/10

Name: Anonymous 2012-02-25 17:57

>>15
Please, implement CAR and CDR in Lua.

Name: Anonymous 2012-02-25 18:00

>>16
I was talking about Lua being shit. The fact that in Lua {1,2,3} != {1,2,3} is the essence of shitness.

Name: Anonymous 2012-02-25 18:01

>>18
I don't know if that applies to Lua, but most languages separate referential equality from data equality.

Name: Anonymous 2012-02-25 18:12

>>9
argumentum ad hominem, subjective reasoning, no sources, didn't read the manual
0/10

>>13
lua-users.org
5/10

>>18
deep object comparison
0/10

Name: Anonymous 2012-02-25 18:15

>>17
function car(t) return t[1] end
function cdr(t) return { unpack(t,2) } end

keep on trollin'

Name: Anonymous 2012-02-25 18:21

Why `t = {"a","b","c"}; print(t[2])` works, but `print({"a","b","c"}[2])` doesnt?

>>19
Most languages are shit like JS/PHP. Where you have

var foo = [0];
foo == foo  // true
foo == !foo // true


>>20
Your answer shows that you're out of viable arguments. I will interpret it as your surrender.

>>21
http://doris.sourceforge.net/lua/weblua.php
Lua script:
unpack({1,2,3},2)

Run using lua generates:
error: attempt to call global `unpack' (a nil value)

Name: Anonymous 2012-02-25 18:35

>>14
actually this is my biggest beef with Lua: mutable data structures. The language is awkwardly "almost functional." I would love Lua with immutable persistent tables so that you could compare equality and key by them and do all sorts of functional shenanigans. Lua should be more like its second cousin Clojure.


>>21
what the fuck? does unpack even take more than one argument? what you smokin, son?

function car(l) return l[1] end
function cdr(l) return l[2] end
function cons(a,l) return {a,l} end
function map1(f,l)
  local r
  if l then
    return cons(f(car(l),map1(f,cdr(l)))
  end
end

Name: Anonymous 2012-02-25 18:38

>>22
>Run using lua generates
>error: attempt to call global `unpack' (a nil value)
because lua 4.0 has been out of date since 2003

Name: Anonymous 2012-02-25 18:39

>>23
does unpack even take more than one argument?
http://www.lua.org/manual/5.1/manual.html#pdf-unpack
it takes up to 3, thank you very much!

Name: Anonymous 2012-02-25 18:46

>>24
i.e. Lua is unstable shit.

>>23
function cdr(l) return l[2] end
but that returns only 2nd element, not the table without the first element! It's like this ugly Set Theory, where you have to do special Axiom of Choice magic.

Name: Anonymous 2012-02-25 18:57

LuaJIT?










































More like LuaSHIT

Name: Anonymous 2012-02-25 19:11

Forced Flushing Of L1/L2 Cache per operation

Name: Anonymous 2012-02-25 19:18

it's no javascript

Name: Anonymous 2012-02-25 19:21

I really can't see why one would choose to use an interpreter outside of development for any purpose other than green threads.

Name: Anonymous 2012-02-25 21:21

Here we are!
- Lua Tables are mutable and encourage modification, instead of creation, meaning there is no easy way to do functional programming with Lua.
- `t={[{1,2,3}]="abc"}; print(t[{1,2,3}])` wont print "abc", meaning that `{1,2,3} != {1,2,3}`. In general, Lua's logic seems odd: "nil+1" results in error, while "(not nil)+1" eval to 2.
- Lua uses floating point values instead of integers and 1234567890123456789 would result into 1.234567890123457e+18
- Lua is unstable: API changes frequently, functions are being added and deleted continuously, `table.foreach` being a good example of to be deleted function, and then there is `table.unpack`, which present only in some versions of Lua.
- Lua is inconsistent: `t = {"a","b","c"}; print(t[2])` works, but `print({"a","b","c"}[2])` fails.
- Hash-Table as a primary data structure has some issues. There is no simple and safe way to implement FIRST and REST function from Lisp: either you have to copy whole Table or modify it, and sequential access is somewhat slow. There is no easy way to remove an element from a list. Even worse, the size of a list may not be what you expect: "b={};b[666]="a";print(#b)" will print 1. Lua Tables also don't provide advantages of catenable double-ended queues -- a silver bullet data strucure, you'll find in modern Lisps and Haskell.
- Lua's REPL wont pretty-print tables, instead it'll print something like "table: 0x807e978"
- Hashtables hold much of Lua's data, and even simple variable access goes through table system, producing several L2 cache misses in process just to get to value. That makes Lua slower than comparable alternatives, like Lisp.
- Table indexing starts from 1, instead of 0, like everything in computing. That acts as a source of errors and confusion, when interfacing with external APIs or converting algorithm from Lua to C/C++, while 0 still acts as a dangling pointer.
- Lua's GC is a naive mark-and-sweep implementation, which stores the mark bit directly inside objects, a GC cycle will thus result in all objects being written to, making their memory pages `dirty` and Lua's speed proportional to the number of allocated objects. Lua simply was not designed to support hundred thousand objects allocation per second.
- Quirky syntax with underscores for special variables and cryptic symbols for simple functions, like `#xs` for `length(xs)` and `x = start,end,step` instead of range(start,end,step), while logical connectives (`and`, `or` in place of `&&`, `||`) are hard to notice between other symbols. do/then/end everywhere could be annoying.
- Lua was built as a glue language, and it shows. Much of Lua hype comes from it's usage as a simple integrated scripting language in video games industry. That makes typical Lua user a teenage gamer with little expectations or taste for computation features and productivity.

Name: Anonymous 2012-02-25 22:20

>>31
>In general, Lua's logic seems odd: "nil+1" results in error, while "(not nil)+1" eval to 2
still not proofreading are we

Name: Anonymous 2012-02-25 22:22

>>31
What do Lua, Python, Ruby, and PHP have in common?
They're all shit!

Name: Anonymous 2012-02-25 22:27

>>31
You must be the ``in Lisp'' goy

Name: Anonymous 2012-02-25 22:41

>>32
That is an imageboard post! Nobody cares about it's quality.

>>34
At least I'm not a jew. Some evil people here tried to insult me like that, calling me a "jew".

Name: Anonymous 2012-02-25 22:53

>>31
http://www.lua.org/about.html
fast, lightweight, embeddable scripting language
ideal for configuration, scripting, and rapid prototyping
emphasis on embedded systems


http://www.lua.org/doc/hopl.pdf
[i]One of Tecgraf’s largest partners was (and still is) Petrobras,
the Brazilian oil company. Several Tecgraf products
were interactive graphical programs for engineering applications
at Petrobras. By 1993, Tecgraf had developed little
languages for two of those applications: a data-entry application
and a configurable report generator for lithology profiles.
These languages, called DEL and SOL, were the ancestors
of Lua. We describe them briefly here to show where
Lua came from.


Please give me an good Lisp or Haskell implementation that:
  - is < 500K
  - has configurable gc cycles
  - has better C <=> script ffi api

I tried to use some Scheme implementations, but they weren't what I expected.

Name: Anonymous 2012-02-25 23:28

>>36
I tried to use some Lua implementations, but they weren't what I expected.

Name: Anonymous 2012-02-25 23:33

>>37
yeah i was expecting horribly-designed hacks ala php but i was left disappointed

Name: Anonymous 2012-02-25 23:40

>>38
Agree. They were much worse -- you have to write half of your code in C/C++! Then use scary toLua++ bindings, exporting half of stuff manually.

Name: Anonymous 2012-02-25 23:44

>>31
which stores the mark bit directly inside objects
there
Sorry but there's no other way.  If you seriously think about using double indirection or storing the GC flags in a separate table, then yo'ure retarded.

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