Surely "1337" is the same as 1337, right?
Surely "1337" is the same as 1337, right?
Meme transcription:
Panel 1: Bilbo Baggins ponders, “After all… why should I care about the difference between int and String?
Panel 2: Bilbo Baggins is revealed to be an API developer. He continues, “JSON is always String, anyways…”
You're viewing a single thread.
"1" + "1"
48 0 Reply"11"
49 0 Replystrings are in base two, got it
27 3 ReplyWouldn't the answer be "10" in that case?
38 0 Replyyes, if I could do maths
41 0 Reply1+1=11 means base 1
22 0 ReplyHow so?
5 0 Reply1 11 111 1111 11111 111111
That's base 1. By convention, because it doesn't really fit the pattern of positional number systems as far as I can tell, but it gets called that.
16 0 ReplyOh, I get it, was reading as base 2 and confused by that. Essentially Roman numerals without all the fancy shortcuts.
6 0 ReplyCloser to tally marks without clustering
1 0 Reply
Based
2 0 ReplyWho calls it that? Who even uses that enough to have given it a name? Seems completely pointless...
1 1 ReplyTheoretical computer scientists, historians of mathematics.
I'm not sure where I heard the term exactly, but I know I have multiple times.
3 0 ReplyThanks for sharing this, it's quite interesting. I found a Wikipedia article on it: https://en.m.wikipedia.org/wiki/Unary_numeral_system
Apparently, as you did suggest, "base 1" is a name that is used, but is somewhat a misnomer.
The article mentions that Church encoding is a kind of unary notation, which I would not have thought of, but I guess it is.
Enjoyable little rabbit-hole to zap my productivity for the day.
3 0 ReplyNo problem!
1 0 Reply
That's unary.
9 0 ReplyStrings are in base whatever roman numerals are.
1 0 Reply
int("11")
7 0 Reply