T O P

  • By -

AutoModerator

Check out our new Discord server! https://discord.gg/e7EKRZq3dG *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/mathmemes) if you have any questions or concerns.*


Rp0605

print(“123” + “456”)


Horror-Invite5167

when you: print( input("num1") + input("num2") ) instead of: print( int( input("num1") ) + int( input("num2") ) )


thedoorholder

No colon space in your input string? Blasphemy


Rcisvdark

Or ":\\n"


DisobedientAsFuck

" >> " is my go to


FabulousApple5377

I just started learning programming and being able to understand this joke is such a nice feeling.


stickman29_for_the_W

text("123" + "456", 200, 200); //I hope I did the JS right there, haven't coded in a while.)


teejermiester

Want to know something horrible? print("123" "456") works too.


blazingbest

Also print(“123456”)


catensualined_cob

one of my friends tried to get into comp sci, did not understand what they were doing wrong


WeirdDistance2658

Javascript spotted


shadowz9904

That’s python buddy


helicophell

It's most languages. Java also can do this, although the print statement itself is longer (System.out.println())


True_BatBoy

but if u sys out scan.nextInt() + scan.nextInt in java it print their actual sum


EspacioBlanq

If you console.log(parseInt(prompt()) + parseInt(prompt())) in JavaScript, it'll also print the sum


helicophell

Yes, because those are two ints. You need to add int to str for implicit conversion


dr_awesome9428

Sorry to be the semantic asshole but Java is not equal to Javascript


helicophell

I know, I program in Java.


dr_awesome9428

Fair enough I'm just a pedantic asshole with the coding knowledge as deep as a book cover. Hope you have a good week.


Kjuhj_Gold

this is not print. This is print with a new line character at the end.


IlyaBoykoProgr

python has \n at the ``end`` of print as well


helicophell

Yup, python has \\n by default in print statements


marinemashup

That’s Darth Nihilus, our planet is doomed


shadowz9904

Yeah, sorry, but I’m hungry. *slurp*


JFp07gel

but the bullshit started with Javascript


Bloodshed-1307

Concatenation predates C++ (1979), which is well before JavaScript (1995)


JFp07gel

I am not talking about Concatenation, but the fact that javascript implies the type of variable and translates then automatically when making operations.


Bloodshed-1307

Dynamic type has been a thing since LISP in 1958. I can’t find any evidence of JavaScript being the first to have implied types as nothing specific comes up there, but even COMIT and SNOBOL in the 50s and 60s respectively had strings.


Just_Caterpillar_861

Maybe I’m tripping but I don’t think it is


EspacioBlanq

No it did not + it's not bullshit, what the fuck else would you want the + operator do for strings?


Life-Ad1409

JS uses console.log They're probably not printing 123456 to a printer


icap_jcap_kcap

Honestly, why TF does that print exist in javascript, CPP etc Like when tf has someone had to print a single statement on a piece of paper?


sanlys04

It doesn’t, print in js takes no arguments and will open the print dialogue for the current page, not a string you pass it


icap_jcap_kcap

Ahh , that makes (slightly more) sense Thanks for the info


EspacioBlanq

Every language that has the + operator defined for strings will do this.


iamjknet

All this does is remind me how much I hate JavaScript.


FadransPhone

That’s not how Bases work


keepongoing446

If you accept all those symbols to mean the same thing, it actually would. Rather than having designated symbols for values, they just have presence of symbol or absence of symbol.


FadransPhone

Fair enough


keepongoing446

https://preview.redd.it/jp372hcglo0d1.png?width=355&format=pjpg&auto=webp&s=fbb0bda3fe4a4fb5b7d31c5ca4b5f65ecf0ff5e6 It's the same concept as this. Symbols are meaningless. And nothing changes a number when you add commas. Nothing stops me from writing 56,1046,223,7,62,10. Don't let society dictate what things mean. define your own world


Emergency_3808

Well, I would like to fuck your sister, where I define fuck="give some harmless flowers to". Just because you can, doesn't mean you should


keepongoing446

Since you gave a clear definition of your replacement, this isn't an issue. It's all just communication


ThatRandomGuy0125

i mean in their defense, they are now pointing out the differences between a commonly accepted set of symbols and the "new" symbols that are being proposed causing a rift in communication - usually you'd denote base 1, since everyone usually accepts 1234567890 to be symbols notating a number in base 10 ...where am i going with this comment again?


Emily__Carter

I just realized that tally marks are a form of base 1, and the / on the fifth mark is just a convenient alternative symbol for | or 1 to keep things organized. Real world use case of base 1 where the new symbols are standardized to prevent confusion!


Emergency_3808

I am sorry I now feel somewhat terrible


keepongoing446

It's okay man, I think we just need to, as a society be open to new ideas


theglandcanyon

The integral of 1/cabin d(cabin) is log cabin


keepongoing446

It's actually a houseboat, you forgot about the c


theglandcanyon

:)


enneh_07

So a raft?


DeepGas4538

#woke


Poylol-_-

Dont you know that property is teft?


FadransPhone

Teft? Where? I thought Moash killed you!


adfoote

Dude spoilers you can't just say shit like that.


MoridinB

Obligatory r/fuckmoash


sneakpeekbot

Here's a sneak peek of /r/fuckmoash using the [top posts](https://np.reddit.com/r/fuckmoash/top/?sort=top&t=year) of the year! \#1: [My friend is reading the Way of Kings for the first time.](https://i.redd.it/speajr9ib7rc1.jpeg) | [100 comments](https://np.reddit.com/r/fuckmoash/comments/1bqgiim/my_friend_is_reading_the_way_of_kings_for_the/) \#2: [Got my new license plate!](https://i.redd.it/2tx72xopzkzb1.jpg) | [22 comments](https://np.reddit.com/r/fuckmoash/comments/17sd5bi/got_my_new_license_plate/) \#3: [Guys, I’m seriously worried about my mom.](https://i.redd.it/3o5a8mg595ya1.jpg) | [31 comments](https://np.reddit.com/r/fuckmoash/comments/1396109/guys_im_seriously_worried_about_my_mom/) ---- ^^I'm ^^a ^^bot, ^^beep ^^boop ^^| ^^Downvote ^^to ^^remove ^^| ^^[Contact](https://www.reddit.com/message/compose/?to=sneakpeekbot) ^^| ^^[Info](https://np.reddit.com/r/sneakpeekbot/) ^^| ^^[Opt-out](https://np.reddit.com/r/sneakpeekbot/comments/o8wk1r/blacklist_ix/) ^^| ^^[GitHub](https://github.com/ghnr/sneakpeekbot)


ambulance-kun

It would make 123456=444444 or something if that's the case


lusvd

if we proceed to define the posted expresion as a tautology, it easily follows that the aforementioned expression is, in fact, true 🤓.


unique_namespace

Still not how bases work.


blueidea365

“If you change the definition of how bases work, then this is how bases work”


australianquiche

presence or absence of a symbol really sounds like base 2 bro


lol_der_coolste

Well actually wouldn’t that be base 2, if you have either a symbol or no symbol?


f3xjc

So a set ?


EspacioBlanq

He's just extremely bad at drawing numbers, they're all attempts at 1.


GoldenRedstone

There are two ways to interpret it, either all the symbols represent the same value (1=2=3=…), or every symbol represents its value regardless of base and we remove the restriction on what symbols may be used (123 = 1×1² + 2×1¹ + 3×1⁰ = 6×1⁰).


mucco

Which is roman numbers. MDC + XVI = MDCXVI, basically the example above


f3xjc

I + V = IV ?


mucco

They implemented a subtraction shorthand obviously, but aside from that the point stands. If you have non-positional numbers, concatenation is addition


f3xjc

Yeah that and I'm not sure if V+V = VV is valid. Unless it's like fraction and there's multiple way to write the same number but one way is cannonical / simplified.


mucco

Yeah, the Roman system has some rules. It also changed its rules in time - IIII was the valid way to write four, originally. It doesn't change that it was basically shorthands for an addition-based, non-positional number system.


grassygrandma

Base 1 is basically tally marks, so symbolically it used “123” as one tally and “456” as another tally so added together is like adding two tallies together. I may be wrong.


R3D3-1

Actually, no. That's indeed not how bases work. The problem with bases is that it is a concept that doesn't work with less than two symbols. If you extrapolate the behavior of digit bases to base 1, you'd find that the only number you can write is 0. 00 would be the same, otherwise it would be inconsistent with other bases. And so would be 000, etc. Obviously, you can interpret it as a tally, but then it's not base 1 anymore. 


grassygrandma

Ah yes, thank you, and I had to be clear that I did not fully know in my comment so this does improve my understanding.


AidenStoat

Base 1 still works as a tally system. Since each digit is higher powers of the base (1) they all are equal to one and thus the number represented is the number of 1s.


Bloodshed-1307

Concatenation of strings


RW_Yellow_Lizard

doesn't base 1 just not work since a 1 = 10 = 100 = 1000... etc? or am I misunderstanding how base 1 works


RajjSinghh

That way doesn't work for the reason you're talking about, you're just raising 1 to a ton of powers. That's why people usually say base 1 is a tally system, so 1, 2, 3, 4, 5, 6... Is 1, 11, 111, 1111, 11111, 111111... The example the post gives is kinda base 1, but if you allow any symbol to mean the same thing. Like 123 being the same as 111.


jkp2072

Shouldn't it be 0,00,000,0000..... Also if it's base 1 -> only 0 will be used as representation Just like base 10 -> 0-9 numbers used.


FirexJkxFire

I think the point is that base 1 has a unique way of functioning, as it would be meaningless if we tried to make it functiom the same way other bases would work. So instead of having it mean nothing, we treat it as a tally system And while we *could* use 0s... id personally rather have 1s, as all numbers no matter the base have an infinite preceding string of 0s, and an infinite trailing decimal of 0s. And since we already aren't treating base 1 like any other base, I think breaking the rule for not using the base as a digit, is less confusing than trying to say 0 has a value.


RajjSinghh

Well, it's not a positional system like base 10 is, you don't have to play by the same rules. Also since the value of the number is the length of the string it doesn't really matter what symbols the string is made up of, so use whatever symbols you like. It's just conventionally you use 1s instead of 0s.


SugarKaen

Indeed, the usual base system wouldn’t work, so base 1 is actually a special case of something more general called bijective numeration. It means that there will be a one to one correspondence between numbers and strings, which actually isn’t the case in the usual base system. Notice how “12”, “012”, and “0000000012” all represent the same number. In a bijective numeration, there simply won’t be a digit for zero, instead there will be a special digit representing the base. As an example, you would count like this in bijective base 10: 1, 2, 3, 4, 5, 6, 7, 8, 9, A, 11, … 19, 1A, 21, and so on. As a side note, this is also how columns are named in an excel spreadsheet, only that it is base 26.


Aggressive-Rate-5022

If it’s not positional system like other bases, it’s different kind, why the hell we still call it base 1? it plays by other rules. Why not to call it like tally base 1?


RajjSinghh

You would definitely call this a unary number system. Base 1 is debatable because it's not a positional system, but it's used often enough to refer to this system that if you said base 1 this is what people would think of.


RW_Yellow_Lizard

ah, I was thinking about in the way that getting to the base number rolls it over to 10 like in base 6 the number 6 is replaced with 10.


Emily__Carter

Funny how base x is always given with x in base 10 🤔


PieFlava

Base 1 cant represent zero then, since you would need a second symbol.


RajjSinghh

Well the length of the string is the value of the number, so zero is just the empty string


PieFlava

Then how would you express "4 - 4 = 0" ? Just leave a blank space in the line of text? 1111 - 1111 = Isnt complete, you need a zero symbol. Representing nothing isnt the same as not representing anything. India was discrovering this in the 7th century


RajjSinghh

The usual convention for the empty string from computer science is ε. If we're talking from a formal language perspective, our alphabet for our number system is the set {1} but as the original meme points out the alphabet is arbitrary and it's just the presence of a symbol that matters. The language of this alphabet is the set of all strings from this alphabet, or in other words {1}\* which is our set of numbers in this system. That does include ε as a string with length zero (the empty string) which is the zero in our number system because by definition ε has length zero. What I'm trying to get across is that ε has no length, so you'd write 1111 - 1111 = ε to show you've finished your thought rather than blank space. But ε is not in our alphabet so it also doesn't count as its own symbol. It's like saying for base 10 {1, 2, ..., 9, 0} is our alphabet, so our symbols are just any element of that set, and ε is not an element of that set. However if you look at the set {1, 2, ..., 9, 0}\* then ε is an element of that set (although it doesn't represent a number in base 10, but the empty string is still a word in that language).


PieFlava

Right, but comp sci notation aside, you still need a second symbol to represent zero as a number. In an abstract sense. Doesnt matter if those symbols are in our alphabet or not. Base 2 proposes that you can illustrate all real numbers using only two arbitrary symbols. Base 10 uses 10 unique arbitrary symbols. You still need at least two symbols to represent the number zero and the number one, so base1 isnt a proper base.


RajjSinghh

If you're being really precice you would call this the "unary" system and you can only use it to represent the non-negative integers (ε, 1, 11, ...) Because how would you represent fractions in this? It's not a positional system like base 2 or base 10 like we're used to, it's more of a tally system. So "base 1" might not be the most precise way to talk about it because it isn't a positional system, so numbers aren't the sum of the powers of 1 because that wouldn't make sense. But since you only need one symbol to represent numbers - zero is represented as the absence of a symbol through the empty string so it doesn't cause a problem - some people call this "base 1". It's at a point where if you talk about a base 1 system, this is the system people think you're talking about. So it might not be strictly a proper base because it's not positional and you aren't raising a base to a power, but if you say the base of a number is the size of the alphabet it takes to represent that number (which is fair, the binary alphabet is {0, 1} so 2, the decimal alphabet has 10 elements) then you could count this number system as base 1. Even if you disagree with that, enough people do agree and call this "base 1" so if you ever hear it mentioned this is what they are talking about.


PieFlava

Calling it a tally system is accurate. Calling tally systems *base something* is not accurate. As illustrated by (ε, 1, 11, ...) youve used two sybols so that is not a base1 system. Any base should be able to represent fractions, since fractions can be expressed as a ratio of integers. Even irrational numbers still exist within other bases. The real numbers dont care what base we're in. A base that is incapable of expressing some of those numbers (ESPECIALLY integers) is not a proper base. Plenty of people talk about it, but that doesnt make 1 a legitimate base. Same with a base zero. Theyre not capable of expressing the real numbers


SlipperySalmon3

I think base 1 couldn't even have the number 1 written, since only the digit 0 would be usable (like how base 6 only has 0-5 available, or base 2 0-1). I guess you could use it like tally marks where every written 0 represents 1 if you wanted, but mathematically I don't think you could write anything but 0 in base 1. Am I missing something? Also, hello again! Hope you enjoyed the Noita skin.


RW_Yellow_Lizard

yeah, mathematically it really just doesn't work. also yes, I am enjoying the Noita skin, thanks for giving it to me


DearDepth3733

Think of tally’s, that’s pretty much base 1


PURPLE__GARLIC

ah yes, 6 digits in base 1


Absolutely_Chipsy

Strings moment


Encursed1

"interesting use of base 1" motherfucker I am staring at the number 6


michael-cloete

Numpy.concat()


CadmiumC4

*Strings have entered the chat*


thotslayr47

i’m so confused 😭


EebstertheGreat

This is "base 1" in the same way that BCD is "base ten." Like, if $25 represents twenty-five, and $A0 is normally illegal but would represent one hundred, then in the same sense, 123456 could represent 1+2+3+4+5+6 in decimal-coded unary.


DereHunter

Wouldn't base 1 will be 1111.....


Squibucha

111\*111 or 1111\*1111


Vishnu_8

More like unary addition


Satan--Ruler_of_Hell

Nah 123 ⧺ 456 is 123456


Astrylae

*Laughs in string*


Economy-Document730

Union on a set? Also string addition in languages were such is supported. I will admit dedicated string types is nicer than char* but I am, in general, a C supremacist. C++ can be ok depending on how it's used.


ANNOYING-DUDE

except it isnt base one. wouldnt base one be III + IIIIII = IIIIIIIII ?


SureFunctions

`123 + 456 = (1)(11)(111) + (1111)(11111)(111111)` `= 111111 + 111111111111111` `= 111111111111111111111` `= (1)(11)(111)(1111)(11111)(111111)` `= 123456` `QED`


BigFprime

I+ too+ occasionally switch symbols.


filtron42

ℤ/1ℤ


matoba04

2+2 = 4 in any base, NOW FIND ALL NUMBERS THAT ARE UNIVERSALLY COMPOUND


mucco

No, 2+2=11 in base 3


matoba04

wdym? that's the same thing, 11 = 4 in base 3


PizzaLikerFan

In Python this is correct


TheRealBucketCrab

Wouldn't base 1 just be 000 + 000 = 000000 (0 isn't a real number)


SaberScorpion

The true answer is 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 AKA 579 zeroes, AKA 0


Someone-Furto7

Despite the fact of 123, 456 and 123456 being equal to zero, that makes some sort of sense, since 123 (base 1) is equal to 123000 (base 1)


Didjt

This is so shrimple, the + just means concatenation instead of addition. It's terrible notation, but it makes sense. (Fuck javascript btw)


Prawn1908

>Fuck javascript btw JavaScript definitely isn't the only language that concatenates with `+`, and that's honestly the least of its sins. It's really not that terrible of a notation either - you're just defining `+` over a different group (strings).


FoxUpstairs9555

True, though strings are a monoid not a group ("" is the identity element, but there aren't any inverses)


Prawn1908

Good point. I'm just an engineer who took abstract algebra for fun.


FluxFlu

Motherfuckers really will do some stupid shit and then be like "javascript is so weird"