MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/mlub9u/apparently_java_can_only_handle_255_parameters_in/gto7lm9
r/badcode • u/646c726f576f6c6c6548 • Apr 07 '21
249 comments sorted by
View all comments
64
What a strange number 255, why not round up to 300 /s
18 u/vinicius_kondo Apr 07 '21 We should increase the parameter stack size from 8bit to 16bit so we can pass 65k parameters. 6 u/Terrain2 Apr 07 '21 16 bit is a horrible idea, we need 128-bit stack size! 5 u/[deleted] Apr 07 '21 Yeah, it doesn't looks very... LOGIC... *drumroll noise -12 u/pizzafoot_1057 Apr 07 '21 This value is likely stored in 7 bits (111 1111 in binary), where the max possible integer is 255, or (28)-1.Binary is far more convenient for machines than decimal. 11 u/Siggi_pop Apr 07 '21 But...but I used the /sSince we are on this subject, is my calculator broken?27 = 128, It seems I need at least 8 bit. 28 = 256 (255 zero indexed) 4 u/23Silicon Apr 07 '21 You have been wooshed 2 u/pizzafoot_1057 Apr 07 '21 Yea I'm a bit r/OutOfTheLoop ig 1 u/[deleted] Aug 15 '22 edited Jun 08 '23 I have deleted Reddit because of the API changes effective June 30, 2023. 1 u/pizzafoot_1057 Aug 16 '22 I recall, this had been the day I learned about it in school.
18
We should increase the parameter stack size from 8bit to 16bit so we can pass 65k parameters.
6 u/Terrain2 Apr 07 '21 16 bit is a horrible idea, we need 128-bit stack size!
6
16 bit is a horrible idea, we need 128-bit stack size!
5
Yeah, it doesn't looks very... LOGIC... *drumroll noise
-12
This value is likely stored in 7 bits (111 1111 in binary), where the max possible integer is 255, or (28)-1.
Binary is far more convenient for machines than decimal.
11 u/Siggi_pop Apr 07 '21 But...but I used the /sSince we are on this subject, is my calculator broken?27 = 128, It seems I need at least 8 bit. 28 = 256 (255 zero indexed) 4 u/23Silicon Apr 07 '21 You have been wooshed 2 u/pizzafoot_1057 Apr 07 '21 Yea I'm a bit r/OutOfTheLoop ig 1 u/[deleted] Aug 15 '22 edited Jun 08 '23 I have deleted Reddit because of the API changes effective June 30, 2023. 1 u/pizzafoot_1057 Aug 16 '22 I recall, this had been the day I learned about it in school.
11
But...but I used the /s
Since we are on this subject, is my calculator broken?
27 = 128, It seems I need at least 8 bit. 28 = 256 (255 zero indexed)
4
You have been wooshed
2 u/pizzafoot_1057 Apr 07 '21 Yea I'm a bit r/OutOfTheLoop ig
2
Yea I'm a bit r/OutOfTheLoop ig
1
I have deleted Reddit because of the API changes effective June 30, 2023.
1 u/pizzafoot_1057 Aug 16 '22 I recall, this had been the day I learned about it in school.
I recall, this had been the day I learned about it in school.
64
u/Siggi_pop Apr 07 '21
What a strange number 255, why not round up to 300 /s