Author Topic: General Programming Megathread - New OP  (Read 29086 times)

Sure, but it's still stuff that is relatively useful and that there isn't really any good reason for not having in the standard library, especially when there, AFAIK, isn't a good dependency manager available either.
lua wasn't made for people who want to make whatever they want using everything out of the can. it was made with minimalists in mind. it was made to be small, short, and simple. map and join functions, again, are only extra unnecessary utilities that aren't needed and can easily be implemented, if the user really needs them.

plus, why use a mapping function when you can just make yourself a function that does whatever you need it to do?

lua wasn't made for people who want to make whatever they want using everything out of the can. it was made with minimalists in mind. it was made to be small, short, and simple. map and join functions, again, are only extra unnecessary utilities that aren't needed and can easily be implemented, if the user really needs them.

plus, why use a mapping function when you can just make yourself a function that does whatever you need it to do?
Because it can greatly simplify the rest of your custom functions, and it's less bug-prone than doing it yourself every time.

Because it can greatly simplify the rest of your custom functions, and it's less bug-prone than doing it yourself every time.
for multiple operations yes, but for the example i've given, i only need to print my characters once, so i have no use for a mapping function.

even if i needed to do it with multiple tables, typing pairs() multiple times isn't that stressful at all, and syntax highlighting colors the word "pairs", so you'll know you've forgeted up if you've accidentally misspelled it.

in terms of errors that aren't syntax-related, it's really hard to forget up with pairs().
« Last Edit: November 09, 2012, 04:45:13 PM by Kingdaro »

for multiple operations yes, but for the example i've given, i only need to print my characters once, so i have no use for a mapping function.
You're saying "it's useless because my 3-line example doesn't need it". I don't think that's a valid argument, assuming that the language is intended for anything else than witty 3-liners.

You're saying "it's useless because my 3-line example doesn't need it". I don't think that's a valid argument, assuming that the language is intended for anything else than witty 3-liners.
my main point here is that it's not needed by default because it can be easily implemented, and that, again, lua was made to be minimalist.

i only said it would be useless in the example i've given, not altogether. that doesn't mean it needs to be implemented by default.

Guy I got moving Platforms in my Platformer
im so happy :D

my main point here is that it's not needed by default because it can be easily implemented, and that, again, lua was made to be minimalist.

i only said it would be useless in the example i've given, not altogether. that doesn't mean it needs to be implemented by default.
I suppose that depends on whether you mean "minimalist code-base" or "minimalist language". If you want to reinvent the wheel every time you want to do something, sure, do that, but if you actually want a more minimalist code-base then there is actually a point to having this sort of thing in the standard library. Or, you know, at least provide a decent dependency manager out of the box.

Guy I got moving Platforms in my Platformer
im so happy :D
that's an accomplishment

how are you defining how the platforms move? is the level hardcoded, or is it dynamic/randomly generated?

I suppose that depends on whether you mean "minimalist code-base" or "minimalist language". If you want to reinvent the wheel every time you want to do something, sure, do that, but if you actually want a more minimalist code-base then there is actually a point to having this sort of thing in the standard library. Or, you know, at least provide a decent dependency manager out of the box.
from what i'm gathering from what you're saying, you believe lua was made for creating full-fledged programs on it's own. however, it is not the case. it was made to be embedded and to make systems for other programs.

also, "reinventing the wheel" is a massive exaggeration, as, again, it's not that hard to implement. even then, a user isn't going to be using said function as much as you might think. people are perfectly fine with using pairs() to iterate through tables.

if you really use it that much, just keep it as a file somewhere for reference, and then copy it to your script directory and require() it.

from what i'm gathering from what you're saying, you believe lua was made for creating full-fledged programs on it's own. however, it is not the case. it was made to be embedded and to make systems for other programs.

also, "reinventing the wheel" is a massive exaggeration, as, again, it's not that hard to implement. even then, a user isn't going to be using said function as much as you might think. people are perfectly fine with using pairs() to iterate through tables.

if you really use it that much, just keep it as a file somewhere for reference, and then copy it to your script directory and require() it.
Again, this would be (almost) fine, provided that there was some sort of dependency manager. But I can only find LuaRocks, which (from what I can tell) doesn't work when Lua is embedded. So that doesn't work with the primary use-case either.

I was also able to find http://luaforge.net/projects/stdlib/, which does seem to provide map and some other useful stuff in it's list module, but, once again, for that to be a real option there needs to be a good dependency manager.

you're asking to do too much with the wrong language. lua doesn't fit your purposes, so you should just stop trying to flip it over and turn it inside out when other languages will do exactly what you want.

that's like bitching about the fact that a potato doesn't have an acorn in it.

is...

is it just me or are C++ and TorqueScript insanely similar?


p much all I know is .NET, TS, and Lua; had a tiny bit of experience with Python and JavaScript
and boy trying to make games with VB's default graphics engine is fun. have to derender everything manually because using clear() makes the screen flicker like crazy

can anyone recommend a different graphics engine/API for use with VB?

pretty sure visual basic wasn't meant for the kind of games you're looking to make.

simplest solution, if you already know lua, is LÖVE.

you're asking to do too much with the wrong language. lua doesn't fit your purposes, so you should just stop trying to flip it over and turn it inside out when other languages will do exactly what you want.

that's like bitching about the fact that a potato doesn't have an acorn in it.
Well, boohoo, I don't like using languages that fail completely at what they're supposed to be good at!



is...

is it just me or are C++ and TorqueScript insanely similar?
What have you been smoking?

p much all I know is .NET, TS, and Lua; had a tiny bit of experience with Python and JavaScript
and boy trying to make games with VB's default graphics engine is fun. have to derender everything manually because using clear() makes the screen flicker like crazy

can anyone recommend a different graphics engine/API for use with VB?
XNA.
WinForms is intended for GUIs.
« Last Edit: November 09, 2012, 05:20:45 PM by DontCare4Free »

PPPPPPPPPPPPPPPPPPPPPPPPP
P                       P
P                       P
P              G        P
G             LP        P
PP                      P
PG                      P
P                       P
PG                      P
P                       P
PG                      P
P                       P
PG                      P
P                       P
PG                      P
P                       P
PG                      P
P                       P
PG                     EP
PPPPPPPPPPPPPPPPPPPPPPPPP
uh
in notepad it lines up
but yeah
P = platform
G = Gem
L = Left Moving Platform
R = Right Moving Platform
S = Spike
yeah.

WinForms is intended for GUIs.
I meant GDI+.

Also I can't install anything because Windows 7 parental controls.