Wikipedia:Reference desk/Archives/Computing/2018 October 5

From Wikipedia, the free encyclopedia
Computing desk
< October 4 << Sep | October | Nov >> Current desk >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


October 5[edit]

Java - error: integer number too large: 600851475143[edit]

As the title says, I get an error message when trying to assign that number to an int or even a long. How do I get around this? I'm not even sure if I should be getting this error as I don't think the number is that big. --Polyknot (talk) 11:49, 5 October 2018 (UTC)[reply]

Our article Integer (computer science) says in the table in the section 'Common integral data types' that Java int is 32 bits, hence its range is −2,147,483,648 to 2,147,483,647. You may try a 64-bit long for values up to 9,223,372,036,854,775,807. --CiaPan (talk) 11:57, 5 October 2018 (UTC)[reply]
As I said I've tried long as well and I still get the same error. --Polyknot (talk) 12:04, 5 October 2018 (UTC)[reply]
What error exactly do you get? And in what context? Is it about assigning the value to a variable, or may be about the value itself? Did you try to append L at the end of the constant, like this: 600851475143L, to indicate it is long? --CiaPan (talk) 12:31, 5 October 2018 (UTC)[reply]
@Polyknot: Did you try to just use the number but not assign it anywhere? Say,
if (your_number == 0) do_nothing;
or something...? --CiaPan (talk) 13:56, 10 October 2018 (UTC)[reply]

Non-interactive "RPG"[edit]

I recall a parody non interactive "RPG" which worked on telnet (probably). Essentially you made a connection to the server and something like this happened:


...
>You hit the imp.
>The imp misses you.
>You defeat the imp.
>You gained 2xp.
>You are now level 2.
>You attack a brownie.
...

Essentially the longer you stayed connected, the higher level (and the more bored) you got. Naturally people had connected unattended telent sessions, some of them running for months or maybe years - there was a leader-board. If you disconnected, you had to restart from zero.

Anyone remember the name, location and know if it still exists?

All the best: Rich Farmbrough, 13:36, 5 October 2018 (UTC).[reply]

Maybe Progress Quest? [1] CodeTalker (talk) 13:57, 5 October 2018 (UTC)[reply]
That's the one! Progress Quest. Must play... All the best: Rich Farmbrough, 15:01, 5 October 2018 (UTC).[reply]
That looks like it is almost as fun as Desert Bus![2][3] --Guy Macon (talk) 16:35, 5 October 2018 (UTC)[reply]