|
Ronald Raiden posted:I can see the reasoning behind 0 being true, but having it false is still super convenient. in what context
|
# ? May 6, 2012 20:08 |
|
|
# ? May 9, 2024 04:34 |
|
i mean the only reason i can see someone wanting 0 to be false is some weird attachment to C techniques where you don't have a proper boolean type
|
# ? May 6, 2012 20:10 |
|
ahhh spiders posted:i mean the only reason i can see someone wanting 0 to be false is some weird attachment to C techniques where you don't have a proper boolean type testing a field from a sql table that uses a tinyint to represent a boolean flag.
|
# ? May 6, 2012 20:11 |
|
ahhh spiders posted:in what context doing something if something is or isn't 0, or looping while something isn't 0, or checking if something returns 0, is really common.
|
# ? May 6, 2012 20:12 |
|
Ronald Raiden posted:doing something if something is or isn't 0, or looping while something isn't 0, or checking if something returns 0, is really common. not in lua, because you wouldn't do those retarded C things in lua
|
# ? May 6, 2012 20:12 |
|
ahhh spiders posted:not in lua, because you wouldn't do those retarded C things in lua you don't work with numbers? weird.
|
# ? May 6, 2012 20:13 |
|
Tiny Bug Child posted:testing a field from a sql table that uses a tinyint to represent a boolean flag. nice, sounds like more bad database design from our resident php guru
|
# ? May 6, 2012 20:14 |
|
Ronald Raiden posted:you don't work with numbers? weird. you would explicitly check if the number == or ~= 0. why are you so obsessed with some weird shorthand
|
# ? May 6, 2012 20:14 |
|
ahhh spiders posted:nice, sounds like more bad database design from our resident php guru quick q: how do you think you are supposed to store a boolean flag in a sql table
|
# ? May 6, 2012 20:15 |
|
Tiny Bug Child posted:quick q: how do you think you are supposed to store a boolean flag in a sql table why would i give a gently caress about that if i was using lua
|
# ? May 6, 2012 20:15 |
|
i love you, programming thread
|
# ? May 6, 2012 20:16 |
|
ahhh spiders posted:why would i give a gently caress about that if i was using lua actually yeah you're right i forgot lua is a dumb little toy language that isn't used for useful things
|
# ? May 6, 2012 20:16 |
|
Tiny Bug Child posted:actually yeah you're right i forgot lua is a dumb little toy language that isn't used for useful things you just can't resist putting your foot in your mouth, huh
|
# ? May 6, 2012 20:17 |
|
if there's one thing that tiny bug child is good at (there's only one) it's plumbing to new depths of ignorance and stupidity in the name of worthless trolling
|
# ? May 6, 2012 20:19 |
|
When would you use lua, if it wasn't the only language available in your specific circumstance. If you had a goal and open choice of language, when would you choose lua?
|
# ? May 6, 2012 20:24 |
|
Casao posted:When would you use lua, if it wasn't the only language available in your specific circumstance. If you had a goal and open choice of language, when would you choose lua? if you wanted the interpreter to use very little memory so you could embed it into a high-performance application to glue the native parts together
|
# ? May 6, 2012 20:25 |
|
I'm down with using 0 not being false, i dont see what the problem is. i have never run into an issue with it before
|
# ? May 6, 2012 20:33 |
|
caring about whether 0 is false or not is bikeshedding as hell, hth also if you want a lightweight scripting language you should be using a lisp and not some gay mashup of javascript and visual basic.
|
# ? May 6, 2012 21:51 |
|
Police Academy III posted:caring about whether 0 is false or not is bikeshedding as hell, hth why
|
# ? May 6, 2012 21:55 |
|
wait, people actually use lisp? besides 1980s academics i mean
|
# ? May 6, 2012 21:57 |
|
functions are already first-class values in lua so why would you use lisp
|
# ? May 6, 2012 21:58 |
|
ahhh spiders posted:why because lisp is the best language, idk how this could be confusing
|
# ? May 6, 2012 21:58 |
|
Police Academy III posted:because lisp is the best language, idk how this could be confusing oh, a troll
|
# ? May 6, 2012 21:58 |
|
ahhh spiders posted:functions are already first-class values in lua so why would you use lisp lol "functions are first-class values", im sure this is a shocking concept to java programmers but ppl with taste expect a little more
|
# ? May 6, 2012 22:00 |
|
Police Academy III posted:lol "functions are first-class values", im sure this is a shocking concept to java programmers but ppl with taste expect a little more technically doesn't lisp have less
|
# ? May 6, 2012 22:03 |
|
"why would i use the single most powerful language available when i could add in the overhead of parsing and be able to use 1-indexed arrays?" - a bad programmer
|
# ? May 6, 2012 22:03 |
|
Police Academy III posted:"why would i use the single most powerful language available when i could add in the overhead of parsing and be able to use 1-indexed arrays?" - a bad programmer no one uses lisp lisp boy
|
# ? May 6, 2012 22:05 |
|
but for reals spiders, idk what you're so up on lua about. I mean lightweight embeddable scripting is cool, but the language itself is really just one step up from tcl.
|
# ? May 6, 2012 22:08 |
|
it's even simpler than tcl, which is awesome
|
# ? May 6, 2012 22:09 |
|
ahhh spiders posted:it's even simpler than tcl, which is awesome simpler how? because using the same datastructure for lists and hashes may keep the implementation simple but its a pretty php thing to do.
|
# ? May 6, 2012 22:20 |
|
Police Academy III posted:simpler how? because using the same datastructure for lists and hashes may keep the implementation simple but its a pretty php thing to do. the syntax for hashes and arrays is the same in most languages
|
# ? May 6, 2012 22:22 |
|
also, it made the implementation more complicated, because tables that are used as arrays are implemented as actual arrays (in more recent versions of lua, at least)
|
# ? May 6, 2012 22:23 |
|
the syntax may be the same, but the semantics of arrays and hashes should be different, and being able to docode:
|
# ? May 6, 2012 22:27 |
|
ahhh spiders posted:also, it made the implementation more complicated, because tables that are used as arrays are implemented as actual arrays (in more recent versions of lua, at least) is this externally distinguishable from having separate arrays and hashes with the same syntax
|
# ? May 6, 2012 22:28 |
|
common lisp rules face
|
# ? May 6, 2012 22:28 |
|
Police Academy III posted:the syntax may be the same, but the semantics of arrays and hashes should be different, and being able to do why?
|
# ? May 6, 2012 22:28 |
|
Fren posted:common lisp rules face
|
# ? May 6, 2012 22:28 |
|
this thread sucks now
|
# ? May 6, 2012 22:29 |
|
Otto Skorzeny posted:is this externally distinguishable from having separate arrays and hashes with the same syntax hmm, probably not, but that's not really important
|
# ? May 6, 2012 22:30 |
|
|
# ? May 9, 2024 04:34 |
|
ahhh spiders posted:why? because the list doesn't have 7 elements, the language never tells you if you're using an index that's out of range. it just magically does something which is, again, pretty php
|
# ? May 6, 2012 22:33 |