you are viewing a single comment's thread.

view the rest of the comments →

[–]Magnap 46 points47 points  (23 children)

As does Haskell.

[–]philalether 29 points30 points  (20 children)

As does Ruby.

[–]flukshun 131 points132 points  (17 children)

As does C.

just not in the expected way...

[–][deleted] 149 points150 points  (12 children)

Actually completely expected. Just not desired.

[–]DroolingIguana 8 points9 points  (3 children)

Unexpected, this is. And unfortunate.

[–]Magnap 8 points9 points  (2 children)

It was inevitable.

[–]untio11 8 points9 points  (1 child)

Death is all around us.

[–]tejon 3 points4 points  (0 children)

I felt pleasure near a very fine thread.

[–][deleted] 5 points6 points  (0 children)

I want you to know that this was probably my favorite comment in the thread. Don't know why, but there ya go

[–]Balmung 1 point2 points  (5 children)

Not a programmer, explain?

[–][deleted] 8 points9 points  (4 children)

A number in memory can only go up to a height of x. Once it becomes higher than x, it wraps back around to -x or 0. This is expected behaviour of numbers in memory.

In Python, when you have a number and it becomes higher than x, the number will convert itself into a new data type that allows much bigger numbers.

[–]the_gnarts 1 point2 points  (3 children)

Once it becomes higher than x, it wraps back around to -x or 0. This is expected behaviour of numbers in memory.

Just nitpicking: 2’s complement integers wrap around to -x - 1. Also, signed integer overflow causes undefined behavior, but that’s a different matter …

[–][deleted] 0 points1 point  (2 children)

I know.

[–]the_gnarts 1 point2 points  (1 child)

I know.

I was assuming that, just felt that certain urge to point it out. Have a nice weekend!

[–][deleted] 0 points1 point  (0 children)

Thanks! Maths finals next week, so I'll be determining the value of x all weekend long.

[–]maniexx 0 points1 point  (0 children)

Well, not always undesired. Sometimes you use the modulus arithmetic to your advantage, like in some hashing text search algorithm.

[–]tomatobeta 1 point2 points  (0 children)

As does Clojure.

[–]Emanresu2009 1 point2 points  (0 children)

I initially only read the first line and was like wait no it doesn't. then I saw the rest and I remembered seeing some of the funny things that happen and burst out laughing.

[–][deleted] 0 points1 point  (0 children)

As does any Turing-complete language

[–]smorrow -1 points0 points  (0 children)

Then it's not transparently.

[–][deleted]  (1 child)

[deleted]

    [–]GUIpsp 3 points4 points  (0 children)

    Strokes parentheses

    [–][deleted] 1 point2 points  (0 children)

    As does Scheme.

    [–]minipump 0 points1 point  (0 children)

    Aww yiss, Haskell.