Lua is annoying sometimes.

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Lua is annoying sometimes.

Post by bartbes »

kikito wrote: Robin, bartbes: Is that still correct? Only bmp and tga in screenshots?
As of now? Yes, though there is a ticket in the issue tracker.

@zac352:
Come on, 3 posts?! Get some forum manners!
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Lua is annoying sometimes.

Post by vrld »

zac352 wrote:Because I haven't used it in a while, and I'm noticing how simpler (and thus lacking in features) Lua is compared to C++.
Simpler: yes. Lacking features: no. Lua actually quite advanced in terms of what the language supports:
  • Anonymous functions.
  • Coroutines (you've discovered that already).
  • Closures. Try to do that in C++:

    Code: Select all

    function foo(i) return function() i = i + 1 print(i) end end
    a, b = foo(1), foo(100)
    a() b() b() a() -- prints 2 101 102 3
  • Tail recursion:

    Code: Select all

    function sum(v, ...) if not v then return 0 end return v + sum(...) end
  • Higher order functions:

    Code: Select all

    function map(f, list) for k,v in pairs(list) do list[k] = f(v) end end
I get the impression you don't like Lua very much because you don't know it well enough.
zac352 wrote:Both came out with division coming before multiplication.
Are you trolling?
a * b / c = (a * b) / c = a * (b / c) = a / c * b = b * a / c = b / c * a= a * b * 1 / c = ...
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
User avatar
pygy
Citizen
Posts: 98
Joined: Mon Jan 25, 2010 4:06 pm

Re: Lua is annoying sometimes.

Post by pygy »

vrld wrote:
zac352 wrote:Both came out with division coming before multiplication.
Are you trolling?
a * b / c = (a * b) / c = a * (b / c) = a / c * b = b * a / c = b / c * a= a * b * 1 / c = ...
Actually, it is not true with floating point numbers, because of rounding errors. But it doesn't matter most of the time.
Hermaphroditism is not a crime. -- LSB Superstar

All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Lua is annoying sometimes.

Post by bartbes »

You can't just say "now it has decimals it is no longer true"...
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Lua is annoying sometimes.

Post by Jasoco »

zac352 wrote:
Taehl wrote:What fail. Lua does fully support OoO.

And .bmp is terrible. Use .png instead, since it's better in every single way.
I like png, but love forces me to save in either bmp or tga. :halloween:
You know your OS has a built-in Screenshot function, right? On Windows it's Print Screen (I think Shift+PrScr to save to a file) and OS X has Command+Shift+3/4. Also, Paint, if you are on Windows, can save files in other formats. There's no excuse at all to upload an oversized BMP file. Especially since there are also countless free image editors and converters out there. This is 2010. The internet age. And BMP is dead. As far as the internets is concerned.
User avatar
Diablo
Prole
Posts: 13
Joined: Wed Sep 29, 2010 9:00 pm

Re: Lua is annoying sometimes.

Post by Diablo »

bartbes wrote:
kikito wrote: Robin, bartbes: Is that still correct? Only bmp and tga in screenshots?
As of now? Yes, though there is a ticket in the issue tracker.

@zac352:
Come on, 3 posts?! Get some forum manners!
Unfortunately zac has no concept of multi posting being a bad thing. Don't worry I'll slap him for yall when he does it again. (and he will)
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: Lua is annoying sometimes.

Post by zac352 »

vrld wrote:
zac352 wrote:Because I haven't used it in a while, and I'm noticing how simpler (and thus lacking in features) Lua is compared to C++.
Simpler: yes. Lacking features: no. Lua actually quite advanced in terms of what the language supports:
  • Anonymous functions.
  • Coroutines (you've discovered that already).
  • Closures. Try to do that in C++:

    Code: Select all

    function foo(i) return function() i = i + 1 print(i) end end
    a, b = foo(1), foo(100)
    a() b() b() a() -- prints 2 101 102 3
  • Tail recursion:

    Code: Select all

    function sum(v, ...) if not v then return 0 end return v + sum(...) end
  • Higher order functions:

    Code: Select all

    function map(f, list) for k,v in pairs(list) do list[k] = f(v) end end
I get the impression you don't like Lua very much because you don't know it well enough.
zac352 wrote:Both came out with division coming before multiplication.
Are you trolling?
a * b / c = (a * b) / c = a * (b / c) = a / c * b = b * a / c = b / c * a= a * b * 1 / c = ...
Lua was my first language. Well, I don't count trying to learn JS when I was 10.
Hello, I am not dead.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests