|
Cocoa Crispies posted:i'm talking about biginteger being in some class/struct ghetto and not first-class like machine integers I actually have no idea what you mean.
|
# ? Dec 18, 2012 01:08 |
|
|
# ? May 9, 2024 16:28 |
|
he's talking about having to pull in a separate namespace (system.numerics) to use the BitInteger lib but once you pull it in i don't recall it being any more difficult to use, don't they overload + and ++ and all that? it's fairly new and i haven't really used it we use GUIDs in the one place i'd have a reason to use it
|
# ? Dec 18, 2012 01:17 |
|
Suspicious Dish posted: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) either you are a sperg who really doesn't understand why being able to compare those things is handy or are you just a disingenuous gently caress
|
# ? Dec 18, 2012 01:21 |
|
Oh, okay. Well in Ruby FixNum (integers) actually silently fall over to BigNum so use Ruby.
|
# ? Dec 18, 2012 01:21 |
|
Tiny Bug Child posted:either you are a sperg who really doesn't understand why being able to compare those things is handy or are you just a disingenuous gently caress i understand why trying to compare those things is useful but why would you write $_GET['a'] == "2.0" instead of $_GET['a'] == 2.0
|
# ? Dec 18, 2012 01:24 |
|
you wouldn't, but stuff that comes out of $_GET is a string so $_GET['a'] == 2.0 would be false (or produce a spurious error) in type nazi land even if the query string was "?a=2"
|
# ? Dec 18, 2012 01:26 |
|
VS2012 doesn't have proper XNA4.0 support where's my babby stick? I need to beat some bitter executives Tiny Bug Child posted:you wouldn't, but stuff that comes out of $_GET is a string so $_GET['a'] == 2.0 would be false (or produce a spurious error) in type nazi land even if the query string was "?a=2" I thought PHP was weakly typed. Or does weak type just means arbitrary decisions everywhere even for primatives?
|
# ? Dec 18, 2012 01:56 |
|
FamDav posted:I actually have no idea what you mean. Shaggar posted:use a long or a ulong. if u got integers over that big then they need a special interger storage mechanism. i'm saying that the special integer storage mechanism is a pain in java/c# like you can do Java code:
Java code:
Java code:
Java code:
|
# ? Dec 18, 2012 01:58 |
|
Tiny Bug Child posted:either you are a sperg who really doesn't understand why being able to compare those things is handy or are you just a disingenuous gently caress tbc brought out "types are for spergs," consider this discussion closed
|
# ? Dec 18, 2012 02:02 |
|
turns out computer science really is about computers after all, sorry about your garden of pure ideology bro
|
# ? Dec 18, 2012 02:31 |
|
BigInteger is an object and not a primitive. why is that syntax weird wrt java or are you just complaining about its verbosity
|
# ? Dec 18, 2012 02:33 |
|
Tiny Bug Child posted:you wouldn't, but stuff that comes out of $_GET is a string so $_GET['a'] == 2.0 would be false (or produce a spurious error) in type nazi land even if the query string was "?a=2" in perl, you do == to mean 'do they look like the same number' and eq to mean 'do these look like the same string'. as such, you don't get the ambiguous == 'can you mash either of these to look the same as a number, or are they the same string'
|
# ? Dec 18, 2012 02:35 |
|
rotor posted:yes because there were also 0-based arrays unless you set an env var and then it was 1-based and oh god it was so bad I heard they finally dropped that special variable in perl that controlled where arrays start at
|
# ? Dec 18, 2012 02:38 |
|
seriously though i dont really think strong typing is all that important and it's usually not worth the effort imho
|
# ? Dec 18, 2012 03:06 |
|
rotor posted:seriously though i dont really think strong typing is all that important and it's usually not worth the effort imho
|
# ? Dec 18, 2012 03:23 |
|
you can write an entire haskell program without seeing a type i mean granted if you don't at least declare the types of your top-level declarations you suck but still
|
# ? Dec 18, 2012 03:26 |
|
fritz posted:I heard they finally dropped that special variable in perl that controlled where arrays start at code:
|
# ? Dec 18, 2012 03:35 |
|
it's interesting that we are getting so much discussion from one little common programming issue. i think this is a good exercise; i like to see the different processes people follow even at this level. for me it depends on the language: 1. google "compare [this type] and [that type] in [computer language]" 2. find ticked stackoverflow post 3. copy 4. paste
|
# ? Dec 18, 2012 03:42 |
|
homercles posted:
Probably meant Perl 6
|
# ? Dec 18, 2012 03:45 |
|
rotor posted:itll end up in django or - lmbo - actionscript sorry you got sucked into the full retard modern web development zeitgeist
|
# ? Dec 18, 2012 09:11 |
|
yaoi prophet posted:you can write an entire haskell program without seeing a type Wow this sounds so relevant and applicable in my day to day work as a software developer, on software that people actually use.
|
# ? Dec 18, 2012 09:11 |
|
y do people even reply to tiny bug child lol
|
# ? Dec 18, 2012 09:14 |
|
it's pretty simple. 1. read his post 2. realize it doesn't make sense 3. keep scrolling
|
# ? Dec 18, 2012 09:14 |
|
vapid cutlery posted:y do people even reply to tiny bug child lol because tiny bug child ownnnnns
|
# ? Dec 18, 2012 10:15 |
|
Wheany posted:because tiny bug child ownnnnns best gimmick poster ever posted from conkeror 19, the web browser for emacs users
|
# ? Dec 18, 2012 15:37 |
|
vapid cutlery posted:sorry you got sucked into the full retard modern web development zeitgeist man you have no idea
|
# ? Dec 18, 2012 15:38 |
|
Cocoa Crispies posted:i'm saying that the special integer storage mechanism is a pain in java/c# in C# it would be: C# code:
code:
but the c# system.numerics library is loving terrible, and the java.math stuff ain't so bad c# is not a bad language but man are there some warts in that std library Notorious b.s.d. fucked around with this message at 15:50 on Dec 18, 2012 |
# ? Dec 18, 2012 15:48 |
|
thats if you use tryparse. you can just do C# code:
|
# ? Dec 18, 2012 15:51 |
Shaggar posted:thats if you use tryparse. you can just do lol just look at this poo poo
|
|
# ? Dec 18, 2012 15:52 |
|
?
|
# ? Dec 18, 2012 15:52 |
gucci void main posted:lol just look at this poo poo whoops signed my post just lol though at the workarounds for big numbers
|
|
# ? Dec 18, 2012 15:53 |
|
Shaggar posted:thats if you use tryparse. you can just do much better but the point of the exercise was to show that c# is non-stupid and has some type inference so you don't spend time typing the type twice C# code:
|
# ? Dec 18, 2012 15:53 |
|
duck typing is dumb dangerous poo poo for idiots
|
# ? Dec 18, 2012 15:54 |
|
Notorious b.s.d. posted:much better typing: the worst enemy of the working programmer
|
# ? Dec 18, 2012 15:55 |
|
ya users and having to specify "int x" a lot are traumatic
|
# ? Dec 18, 2012 15:57 |
|
congratulations to Perl on the car insurance discount! (25 today. thx tef for reminder)
|
# ? Dec 18, 2012 15:58 |
|
Jonny 290 posted:congratulations to Perl on the car insurance discount! i'm celebrating by trying to convince a ruby-programmer friend that no really perl is totally readable. doing the lord's work here.
|
# ? Dec 18, 2012 16:00 |
|
Shaggar posted:duck typing is dumb dangerous poo poo for idiots it's not duck-typed: at runtime, 'b' has the static type of "BigInteger" the compiler just inferred the type for you so you don't waste precious keystrokes
|
# ? Dec 18, 2012 16:02 |
|
Jonny 290 posted:congratulations to Perl on the car insurance discount! perl.org has no cake or nothin
|
# ? Dec 18, 2012 16:05 |
|
|
# ? May 9, 2024 16:28 |
|
oh im using the wrong term. but yeah its bad and dumb and dangerous since the compiler cant warn you if the rhs changes resulting in runtime failures. its bad bad bad. dont do it. the lhs must remain properly typed.
|
# ? Dec 18, 2012 16:06 |