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
Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
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

Adbot
ADBOT LOVES YOU

Opinion Haver
Apr 9, 2007

Jonny 290 posted:

pretty annoying, i'd wager

double sulk
Jul 2, 2010

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

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

tef posted:

itym decimals.

code:
> irb
irb> 222609459011264500 + 1
=> 222609459011264501
irb(main):002:0> ^D
> node
node> 222609459011264500 + 1
222609459011264500
Those look like integers to me :smug:

gonadic io
Feb 16, 2011

>>=

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?

Opinion Haver
Apr 9, 2007

code:
\> 222609459011264500000000000000000000000000000 + 1:: Integer
222609459011264500000000000000000000000000001
\> 222609459011264500000000000000000000000000000 + 1:: Int
-4919221460288929791
:colbert:

e: thanks for converting my lambdas into html entities and then escaping them, radium

tef
May 30, 2004

-> some l-system crap ->

Hard NOP Life posted:

Those look like integers to me :smug:

if you can't read posts I can't help you

Zombywuf
Mar 29, 2008

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.

tef
May 30, 2004

-> some l-system crap ->

AlsoD posted:

so you mean a language with type inference?

no he means a language like scheme

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

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:
<?php var_dump("22260945901126450000000" == "22260945901126450000001") ?>
bool(true)

Opinion Haver
Apr 9, 2007

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

tef
May 30, 2004

-> some l-system crap ->

Cocoa Crispies posted:

these are tweet ids in json, which cannot be parsed correctly by javascript

just use the string id no big deal

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

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

tef
May 30, 2004

-> some l-system crap ->

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.

tef
May 30, 2004

-> some l-system crap ->

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.

Opinion Haver
Apr 9, 2007

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 ===

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

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.

gonadic io
Feb 16, 2011

>>=

yaoi prophet posted:

apparently the right thing to do is to use ===

I was under the impression that == in javascript php is basically filed under 'newbie trap' and that there's no reason ever to use it over ===.

gonadic io fucked around with this message at 23:50 on Dec 17, 2012

Opinion Haver
Apr 9, 2007

we were talking about php but i think this is true as well

Shaggar
Apr 26, 2006

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#.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Shaggar posted:

there are all kinds of real languages like c#.

which also gets integers wrong

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

AlsoD posted:

I was under the impression that == in javascript php is basically filed under 'newbie trap' and that there's no reason ever to use it over ===.

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

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

tef posted:

because you've already abandoned decimal so what the hell, go wild.

non-negative integers are the best numbers :colbert:

Opinion Haver
Apr 9, 2007

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

Quebec Bagnet
Apr 28, 2009

mess with the honk
you get the bonk
Lipstick Apathy
types are a social construct

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
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?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

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)

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Cocoa Crispies posted:

why do people put up with languages that gently caress up integers?
have u looked into something called mathematica? it's created by spergs for spergs and you'll never have to compromise your perfect mathematical abstractions again

JawnV6
Jul 4, 2004

So hot ...
smash the stackiarchy

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
my radfem language deconstructs transitivity :twisted:

HORATIO HORNBLOWER
Sep 21, 2002

no ambition,
no talent,
no chance
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

gabensraum
Sep 16, 2003


LOAD "NICE!",8,1

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 +

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice

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?

rotor
Jun 11, 2001

Official Carrier of the Neil Bush Torch

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

HORATIO HORNBLOWER
Sep 21, 2002

no ambition,
no talent,
no chance

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.
https://blogs.adobe.com/typblography/2012/09/source-code-pro.html

ugly

nothing beats consolas

FamDav
Mar 29, 2008
Are you surprised?

rotor
Jun 11, 2001

Official Carrier of the Neil Bush Torch

rotor posted:

wow twitter didn't read the loving spec either huh

                              so shoking
 
 
 
                      suprices
 
  
 
 
 
                                                                            wow
 
                      did not see that coming

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

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

so, uhm, huh?

i'm talking about biginteger being in some class/struct ghetto and not first-class like machine integers

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

deep square leg posted:

took a bit to get used to but having larger meta-characters is a big +

:rimshot:

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006

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.

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