Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Ronald Raiden posted:

I can see the reasoning behind 0 being true, but having it false is still super convenient.

in what context

Adbot
ADBOT LOVES YOU

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
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

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

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.

coaxmetal
Oct 21, 2010

I flamed me own dad

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.

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

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

coaxmetal
Oct 21, 2010

I flamed me own dad

ahhh spiders posted:

not in lua, because you wouldn't do those retarded C things in lua

you don't work with numbers? weird.

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

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

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

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

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

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

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

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

jony neuemonic
Nov 13, 2009

i love you, programming thread

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

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

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

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

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
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

EVGA Longoria
Dec 25, 2005

Let's go exploring!

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?

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

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

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum
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

Police Academy III
Nov 4, 2011
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.

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Police Academy III posted:

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.

why

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

wait, people actually use lisp?

besides 1980s academics i mean

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
functions are already first-class values in lua so why would you use lisp

Police Academy III
Nov 4, 2011

ahhh spiders posted:

why

because lisp is the best language, idk how this could be confusing

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Police Academy III posted:

because lisp is the best language, idk how this could be confusing

oh, a troll

Police Academy III
Nov 4, 2011

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

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

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

Police Academy III
Nov 4, 2011
"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

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

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

Police Academy III
Nov 4, 2011
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.

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
it's even simpler than tcl, which is awesome

Police Academy III
Nov 4, 2011

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.

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

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

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
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)

Police Academy III
Nov 4, 2011
the syntax may be the same, but the semantics of arrays and hashes should be different, and being able to do
code:
a = {"a"}
a[7] = "b"
is pretty terrible imo

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

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

Catalyst-proof
May 11, 2011

better waste some time with you
common lisp rules face

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

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
code:
a = {"a"}
a[7] = "b"
is pretty terrible imo

why?

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Fren posted:

common lisp rules face

coaxmetal
Oct 21, 2010

I flamed me own dad
this thread sucks now

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

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

Adbot
ADBOT LOVES YOU

Police Academy III
Nov 4, 2011

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

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply