|
numbers are numbers and all this stuff about numbers turning into different numbers if they have too many decimal points is pretty stupid and an artifact of the way numbers were stored on ancient mainframes. languages really ought to be smart enough to just treat them all the same and turn them into different "types" behind the scenes if they have to
|
# ? Dec 17, 2012 23:05 |
|
|
# ? Jun 13, 2024 07:08 |
|
Jonny 290 posted:pretty annoying, i'd wager
|
# ? Dec 17, 2012 23:07 |
Shaggar posted:this is because javascript was created to pop up a window and then close a window or maybe to display a neat clock or something so big rear end numbers werent a concern. if you run across any such problems its cause you're doing things that shouldnt be done in javascript. i hate js as much as you do though i wish someone would come up with a better solution instead of writing a python to haml to javascript interpreter
|
|
# ? Dec 17, 2012 23:13 |
|
tef posted:itym decimals. code:
|
# ? Dec 17, 2012 23:14 |
|
Tiny Bug Child posted:numbers are numbers and all this stuff about numbers turning into different numbers if they have too many decimal points is pretty stupid and an artifact of the way numbers were stored on ancient mainframes. languages really ought to be smart enough to just treat them all the same and turn them into different "types" behind the scenes if they have to so you mean a language with type inference?
|
# ? Dec 17, 2012 23:18 |
|
code:
e: thanks for converting my lambdas into html entities and then escaping them, radium
|
# ? Dec 17, 2012 23:18 |
|
Hard NOP Life posted:Those look like integers to me if you can't read posts I can't help you
|
# ? Dec 17, 2012 23:18 |
|
rotor posted:literally the same people who complain that their "unlimited" internet is being throttled once they get past 1tb/day No-one ever claimed Javascript numbers were unlimited.
|
# ? Dec 17, 2012 23:20 |
|
AlsoD posted:so you mean a language with type inference? no he means a language like scheme
|
# ? Dec 17, 2012 23:20 |
|
0xB16B00B5 posted:yes cherry pick one case of bad math with stupidly large numbers no one will use in real life these are tweet ids in json, which cannot be parsed correctly by javascript Tiny Bug Child posted:numbers are numbers and all this stuff about numbers turning into different numbers if they have too many decimal points is pretty stupid and an artifact of the way numbers were stored on ancient mainframes. languages really ought to be smart enough to just treat them all the same and turn them into different "types" behind the scenes if they have to you know drat well php fucks it up the exact same way PHP code:
|
# ? Dec 17, 2012 23:23 |
|
my favorite part about that is that you explicitly specify them as strings but php converts them into numbers anyway because why the gently caress not
|
# ? Dec 17, 2012 23:31 |
|
Cocoa Crispies posted:these are tweet ids in json, which cannot be parsed correctly by javascript just use the string id no big deal
|
# ? Dec 17, 2012 23:31 |
|
rotor posted:man thats just how numbers loving work when you jam them into a fixed number of bits, the behavior is standardized, well-loving-documented and common as poo poo, what is the loving issue here spoiled by languages where numbers without decimal points are just Integers and not some weird "integer but you can't go outside of a range between two powers of two" or "it looks like an integer but it's actually a lossy floating point number" type thing why do people put up with languages that gently caress up integers? the only one i deal with is javascript and you don't really have a choice about that one
|
# ? Dec 17, 2012 23:33 |
|
yaoi prophet posted:my favorite part about that is that you explicitly specify them as strings but php converts them into numbers anyway because why the gently caress not you can fix this by adding trailing whitespace. leading whitespace (and newlines) are stripped. hooray.
|
# ? Dec 17, 2012 23:34 |
|
Cocoa Crispies posted:why do people put up with languages that gently caress up integers? because you've already abandoned decimal so what the hell, go wild.
|
# ? Dec 17, 2012 23:35 |
|
tef posted:you can fix this by adding trailing whitespace. leading whitespace (and newlines) are stripped. hooray. apparently the right thing to do is to use ===
|
# ? Dec 17, 2012 23:35 |
|
tef posted:if you can't read posts I can't help you I meant that everyone expects arbitrarily large integers, but now that I think about it why wouldn't they also expect arbitrarily large decimals. So you're right.
|
# ? Dec 17, 2012 23:37 |
|
yaoi prophet posted:apparently the right thing to do is to use === I was under the impression that == in gonadic io fucked around with this message at 23:50 on Dec 17, 2012 |
# ? Dec 17, 2012 23:47 |
|
we were talking about php but i think this is true as well
|
# ? Dec 17, 2012 23:48 |
|
gucci void main posted:i hate js as much as you do though i wish someone would come up with a better solution instead of writing a python to haml to javascript interpreter there are all kinds of real languages like c#.
|
# ? Dec 17, 2012 23:49 |
|
Shaggar posted:there are all kinds of real languages like c#. which also gets integers wrong
|
# ? Dec 18, 2012 00:13 |
|
AlsoD posted:I was under the impression that == in actually you want to use == in most cases because it's simpler. you only want === in cases where you know you want a strict comparison. == properly handles comparing numbers in different "types", which comes up a lot when you're getting values from a db/web form
|
# ? Dec 18, 2012 00:15 |
|
tef posted:because you've already abandoned decimal so what the hell, go wild. non-negative integers are the best numbers
|
# ? Dec 18, 2012 00:15 |
|
Tiny Bug Child posted:actually you want to use == in most cases because it's simpler. you only want === in cases where you know you want a strict comparison. == properly handles comparing numbers in different "types", which comes up a lot when you're getting values from a db/web form see like i can understand the rationale behind 2 == "2". it's stupid and a bad design decision but i can understand why. but why the gently caress would you want equality between strings that look like numbers to use floating point arithmetic
|
# ? Dec 18, 2012 00:23 |
|
types are a social construct
|
# ? Dec 18, 2012 00:29 |
|
no filthy entitled cistypes in this poo poo. i'm a typequeer codehomo with lots of experience smashing down the walls of source patriarchy DID YOU KNOW? over 80% of "Garbage Collected" data is STILL GOOD?
|
# ? Dec 18, 2012 00:31 |
|
yaoi prophet posted:see like i can understand the rationale behind 2 == "2". it's stupid and a bad design decision but i can understand why. but why the gently caress would you want equality between strings that look like numbers to use floating point arithmetic it's a feature so that $_GET['a'] == "2.0" works on a query string ?a=2. why that's a feature i have no idea but they won't remove it because that would break old code (hahahaha)
|
# ? Dec 18, 2012 00:39 |
|
Cocoa Crispies posted:why do people put up with languages that gently caress up integers?
|
# ? Dec 18, 2012 00:41 |
|
smash the stackiarchy
|
# ? Dec 18, 2012 00:42 |
|
my radfem language deconstructs transitivity
|
# ? Dec 18, 2012 00:45 |
|
i use the "recogneyes" theme that comes with the eclipse theme plugin, i think its pretty great my coworkers all use the standard eclipse scheme and i don't undestand how their eyes don't fall out of their head at the end of the day the only thing worse than black-on-white is the awful zero-constrast schemes like zenburn what the gently caress is up with that poo poo
|
# ? Dec 18, 2012 00:50 |
|
gucci void main posted:what themes are you guys using these days. editing them yourself is such a pain in the rear end i like zenburn in vs2010, but using solarized at the moment because people in that recent themes thread were writing epic poems about it. still undecided about that change but also in the thread someone suggested adobe's free source code font and i like it a lot. https://blogs.adobe.com/typblography/2012/09/source-code-pro.html took a bit to get used to but having larger meta-characters is a big +
|
# ? Dec 18, 2012 00:53 |
|
Cocoa Crispies posted:which also gets integers wrong uhm, huh? while a ulong wouldn't hold those tweet ids, what it does hold is integral not fp so not sure what you mean here unless you're talking about biginteger being more work in which case at least it works so, uhm, huh?
|
# ? Dec 18, 2012 00:55 |
|
Cocoa Crispies posted:these are tweet ids in json, which cannot be parsed correctly by javascript wow twitter didn't read the loving spec either huh
|
# ? Dec 18, 2012 00:57 |
|
deep square leg posted:still undecided about that change but also in the thread someone suggested adobe's free source code font and i like it a lot. ugly nothing beats consolas
|
# ? Dec 18, 2012 00:57 |
|
Are you surprised?
|
# ? Dec 18, 2012 00:58 |
|
rotor posted:wow twitter didn't read the loving spec either huh so shoking suprices wow did not see that coming
|
# ? Dec 18, 2012 00:58 |
|
Cold on a Cob posted:uhm, huh? while a ulong wouldn't hold those tweet ids, what it does hold is integral not fp so not sure what you mean here unless you're talking about biginteger being more work in which case at least it works i'm talking about biginteger being in some class/struct ghetto and not first-class like machine integers
|
# ? Dec 18, 2012 00:59 |
|
deep square leg posted:took a bit to get used to but having larger meta-characters is a big +
|
# ? Dec 18, 2012 00:59 |
|
|
# ? Jun 13, 2024 07:08 |
|
Cocoa Crispies posted:i'm talking about biginteger being in some class/struct ghetto and not first-class like machine integers use a long or a ulong. if u got integers over that big then they need a special interger storage mechanism.
|
# ? Dec 18, 2012 01:05 |