Sign outside South African school
-
First aliens, now zombies. Will the prejudice never end?
-
They may be live children, but are they slow?
-
I hate those signs. They get in the way of natural selection.
-
Does the number decrement each time you run over one of them?
-
I declare this to be made of win.
-
@Rootbeer said:
If not, it's hardly a very entertaining game, is it?Does the number decrement each time you run over one of them?
-
Aww :( it's blocked for me. Can anybody post it on something like tinypic?
-
@amischiefr said:
Aww :( it's blocked for me. Can anybody post it on something like tinypic?
Now with new-alt tags.
-
@PJH said:
Now with a title attribute!@amischiefr said:
Aww :( it's blocked for me. Can anybody post it on something like tinypic?
Now with new-alt tags.
-
@bstorer said:
Now with a title attribute!
The editor didn't have a box for that, and I couldn't be arsed to mess around with the raw HTML.
-
@Rootbeer said:
Does the number decrement each time you run over one of them?
Yeah. You should see what happens when you run over the 41st one.
-
@bstorer said:
They may be live children, but are they slow?
But..but.. where's the Wii controller?
How can kids play if there's no video game console?
-
-
@PeriSoft said:
@Rootbeer said:
Does the number decrement each time you run over one of them?
Yeah. You should see what happens when you run over the 41st one.
+2 Internets!
-
I agree, but it is the wrong number!! Should be -65536.
-
@Auction_God said:
It's clearly an unsigned 16-bit integer. Besides, in what number system does 0 - 1 = -65536?I agree, but it is the wrong number!! Should be -65536.
-
@Auction_God said:
You are, perhaps, thinking of −32768?I agree, but it is the wrong number!! Should be -65536.
-
-
@PJH said:
@Auction_God said:
What, you don't use a 17-bit integer?
You are, perhaps, thinking of −32768?I agree, but it is the wrong number!! Should be -65536.
-
@belgariontheking said:
@Auction_God said:
I agree, but it is the wrong number!! Should be -65536.
How do you know it isn't?I'm not sure if that's what made him believe it isn't, but the pictured number ends in a five.
-
@bstorer said:
@Auction_God said:
I agree, but it is the wrong number!! Should be -65536.
It's clearly an unsigned 16-bit integer. Besides, in what number system does 0 - 1 = -65536?
Er... unsigned... always-negative... 17-bit integers, with... yeah, an overloaded - operator, that... er... will add instead of subtract... and, add in reverse bit order... yeah, that's it.
Anyone want to implement it?
-
@derula said:
Anyone want to implement it?
sigh
# In this data type, 0 - 1 equals to -65536. class WtfInteger < Numeric WTF_RANGE = 1-(1 << 17)..0 def initialize value = 0 @bitarray = Array.new(17, 0) self.value = value end def value= value raise 'Value out of range!' unless WTF_RANGE === value value = -value each_bit :reverse do |bit| @bitarray[bit], value = *value.divmod(1 << bit) end end def value arg = nil if arg == :binary @bitarray.to_s.to_i else int = 0 each_bit do |bit| int += @bitarray[bit] << 16 - bit end -int end end alias to_i value def to_s(arg = nil) to_i(arg).to_s end alias inspect to_s def + other other = assert_type other num = other < 0 ? 0 : 1 other.abs.times { incdec num } self end def - other self + -(assert_type other) end private def each_bit arg = nil for bit in 0..16 yield arg == :reverse ? 16 - bit : bit end end def assert_type other if other.is_a? Numeric other.to_i else raise TypeError, "can't convert #{other.class} into #{Integer}" end end def incdec mode each_bit do |bit| if @bitarray[bit] == 1 - mode @bitarray[bit] = mode else @bitarray[bit] = 1 - mode return false end end return true end end p WtfInteger.new(0) - 1 # => -65536
Note: This hasn't been thoroughly tested and may be buggy. However, it fulfills the requirement 0-1 == -65536.
-
@derula said:
Anyone want to implement it?
That's just a twos-complement 17 bit signed integer. Of course, that description also kind of answers what number system the guy who updated the sign uses: ones-complement 17 bit signed integers.
-
Okay so I might feed a troll here, but troll feeding has a long tradition on the TDWTF forums, so:
@tgape said:
That's just a twos-complement 17 bit signed integer. Of course, that description also kind of answers what number system the guy who updated the sign uses: ones-complement 17 bit signed integers.
What the hell are you talking about?
- With twos-complement 17 bit signed integers, 0 minus 1 is -1, or 11111111111111111 binary. Interpreting that as a signed 16-bit integer (dropping any 1) will still be -1 (that's the nature of twos-complement). Closest to -65536 would be if interpreted as a 16-bit unsigned integer, where it would equal to +65535.
- With ones-complement 17 bit signed integers, 0 minus 1 is still -1, or 11111111111111110 binary. No matter what system you use, it will never equal to -65536, or 65535, or fricken -65535.
- The format the PeriSoft was obviously assuming was uint16. Yup, pure 16 bit unsigned integers, where 0 minus 1 is 1111111111111111, or 65535.
- IN NO FRICKEN DATA TYPE IS 0 MINUS 1 EQUAL TO -65536 (=-(2^16)), THAT DOESN'T EVEN MAKE ANY FRICKEN SENSE! Except the data type posted above, of course, which is, though poorly implemented, a 17-bit unsigned always-negative integer that has addition and subtraction swapped and acting in reverse, treating the outer left bit as the least significant one.
There, I'm done.
-
I just thought everyone should know that when I edited that pic up there, I was hoping for precisely this kind of response. If I'd been around while people were posting, I'd probably have started changing the number on the sign with every reply, but I've been busy.