r/ProgrammerHumor • • Aug 26 '20

Python goes brrrr

Post image
59.2k Upvotes

789 comments sorted by

3.0k

u/epiquinnz Aug 26 '20

I love how this ancap zoomer is always so opinionated on technical programming stuff.

301

u/ToaKraka Aug 26 '20

I've seen at least one meme-maker say that he was just too lazy to edit out the ancap bowtie.

304

u/lasiusflex Aug 26 '20

or maybe they don't realize that it's supposed to be an ancap flag

The meme has spread far beyond the political memes sphere and I doubt most people outside of that context recognize it.

68

u/HeavenlyAllspotter Aug 26 '20

What is ancap?

194

u/AdennKal Aug 26 '20

Anarcho-Capitalism. An Ideology that argues for the abolishment of the state in order to replace it with free market capitalism. Meaning corporations should replace governments. Ancaps are often the butt of many jokes, especially in leftist spaces, since Anarchism and corporate rule are kind of antithetical.

→ More replies (24)
→ More replies (1)
→ More replies (13)

10

u/renrutal Aug 26 '20

Or edit to reverse the black glasses.

At this point I believe all its "faults" contribute to its meme survival rate.

715

u/for_the_voters Aug 26 '20

Was going to say the same. They just get dunked on wherever they go.

438

u/haikusbot Aug 26 '20

Was going to say

The same. They just get dunked on

Wherever they go.

- for_the_voters


I detect haikus. And sometimes, successfully. Learn more about me.

Opt out of replies: "haikusbot opt out" | Delete my comment: "haikusbot delete"

192

u/vextronx Aug 26 '20

Oh wow, it actually did its job correctly this time. Good bot.

80

u/c_wilcox_20 Aug 26 '20

I wasnt aware this was a thing until it happened on a comment of mine the other day

→ More replies (15)
→ More replies (29)

5

u/Balu22mc Aug 26 '20

What is a haiku? I really wanna know since I now start to see this bot everywhere.

→ More replies (7)
→ More replies (11)

45

u/BecomeAnAstronaut Aug 26 '20

Probably because of who they are

82

u/Owl_Of_Orthoganality Aug 26 '20 edited Aug 27 '20

Was going to say the same. They just get dunked on wherever they go.

Cause their Ideology is shit, appropriated actual-Anarchism, impractical— their Subreddits are full of literal "Power-Level" hiding Neo-Nazis and two of their Ideology's theorists literally defends Intellectual-Property "rights".

So Open-Source software can go Goodbye.

 

You can say goodbye to your thought-patterns too, when Elon-Musk claims Intellectual-Property "Rights" in his Neuralink's Terms of Service to the specific form/organisation of Neurons.

Instead of Abolishing the State, they want to Privatise it.

 

The State consists of;

  • A Monopoly on Violence

  • Law-Enforcement to Enforce whatever Laws are agreed ( Convened ) upon any Nation-States' Founding ( Whether they be Favoured by the People or not. )

  • An Army

  • Courts


"An"-capistan consists of;

  • Monopoly on Violence ( by way of Capital-Accumulation/Money = Money = Power )

  • Privatised Law-Enforcement, so Protection gatekept by whoever can Afford it.

  • Privatised Armies/Private-Military-Contractors...

  • Privatised-Courts.

 

They want to Privatise the Internet too. They deserve to get dunked on.

58

u/infidel_castro_26 Aug 26 '20

their ideology in the honest presentable form is just useless. they have no mechanisms for enacting any of the things they want that actively hurt capital accumulation.

that's why free market dogma goes out the window when it comes into opposition of accumulation.

the only way to make sense of it is to build conspiracy theories about individuals being stupid and certain groups being "undesirable".

Also if you're ancap and read this don't bother replying because I'll just reply with a picture of my balls.

→ More replies (8)
→ More replies (22)

27

u/[deleted] Aug 26 '20

Centrists use Python cuz its quick, easy, and let's them get to grilling a lot sooner.

7

u/d7mtg Aug 26 '20
tax = theft
→ More replies (2)

1.3k

u/itoshkov Aug 26 '20

This is multiplying string by number. Multiplying strings would look like 'abc' * 'de'. Python goes kaput.

756

u/delinka Aug 26 '20

Result should be ‘adbdcd aebece’. Someone needs to fix this.

425

u/itoshkov Aug 26 '20

Remove the white space and we have a deal. :)

164

u/[deleted] Aug 26 '20 edited Aug 26 '20

''.join(itertools.product('abc', 'de')) If you want me to fix it submit a ticket, thanks.

edit: Ticket assigned, standby.

import itertools as it ''.join(it.chain.from_iterable(it.product('abc', 'de')))

→ More replies (7)

7

u/Telope Aug 26 '20

'You added the white space by clicking. You have only yourself to blame.'

→ More replies (1)

58

u/GaussWanker Aug 26 '20

Why? It seems you're treating abc as a*b*c but de as d+e, I think it should either be abcde (as it would be algebraicly or if 'x'*'y'=='x'+'y') or (a+b+c)*(d+e) = a*d+b*d+c*d+a*e+b*e+c*e = [something to be defined that probably doesn't equal abcde)

22

u/LosersCheckMyProfile Aug 26 '20

It’s matrix multiplication

→ More replies (5)

7

u/auser9 Aug 26 '20

Well considering ‘a’+’b’+’c’ gives you ‘abc’ I would say string attach by addition, and multiplication is undefined behavior

→ More replies (1)

10

u/gabrielgio Aug 26 '20

Python can't multiply sequence by non-int of type 'str'

39

u/delinka Aug 26 '20

Not with that attitude

7

u/[deleted] Aug 26 '20

It can, it just chooses not to, because it's lazy

31

u/absurdlyinconvenient Aug 26 '20

why not dabceabc or adebdecde? Nevermind that multiplication always should be commutative

Or, let's go totally rogue and multiply the character codes and retranslate, fuck it

26

u/Phrodo_00 Aug 26 '20

Nevermind that multiplication always should be commutative

Only in commutative rings like ℤ and ℝ

6

u/delinka Aug 26 '20

^ this one’s going places!

→ More replies (3)

4

u/spizzat2 Aug 26 '20

Or it could read them as hex, so you'd get 2748 * 222 = 610,056 => 94F08.

→ More replies (7)

16

u/Acalme-se_Satan Aug 26 '20

I take it you haven't seen Julia yet.

11

u/neil-lindquist Aug 26 '20

I mean, Julia just uses * for Python's string addition and ^ for Python's string-int multiplication. So, it's really the same thing, just changing the operator symbol.

→ More replies (3)

4

u/needed_an_account Aug 26 '20

hmmm, if you were able to tap into basestring's __mul__ method you could make it work

3

u/[deleted] Aug 26 '20 edited Aug 26 '20

String concatenation forms a semigroup. Having two binary operations of addition and multiplication would yield a semiring.

In groups, we can take a group element g (in this case a string) and raise to a power g^n, which would be equivalent to repeated string n times. But unless we can figure out how to subtract "xyz" from "abc", strings are not gonna have a semiring structure anytime soon. New character for "negative z" maybe?

2

u/rmTizi Aug 26 '20

To be more pedantic, this looks more like multiplying a char by a number.

No idea if python has that concept though.

→ More replies (1)

2

u/MrHyperion_ Aug 26 '20
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can't multiply sequence by non-int of type 'str'
→ More replies (4)

797

u/geeshta Aug 26 '20

f"Python goes b{'r'*10}"

367

u/Jeb_Jenky Aug 26 '20

This made my nips so hard.

314

u/xDarkFlame25 Aug 26 '20

Ah yes fstrings, the ultimate fetish.

155

u/AinsleyBoy Aug 26 '20

I fucking love fstrings. I use them so much

42

u/Moldy_pirate Aug 26 '20

Is there ever a reason to use a “regular” string rather than an f”string?

→ More replies (19)
→ More replies (2)
→ More replies (2)

12

u/slix_88 Aug 26 '20

Fstrings in chat bois

23

u/marmoshet Aug 26 '20

laughs in 3.6

3

u/mxzf Aug 26 '20

You still have .format(), even in 2.x. Which is still way better than formatting strings with %.

8

u/[deleted] Aug 26 '20

Oh, fuck yeah, Fstrings. Grip it and rip it, dude!

→ More replies (2)

0

u/[deleted] Aug 26 '20

[deleted]

37

u/pterencephalon Aug 26 '20

I'm enjoying going through my old code and changing things to fstrings. Instead of actually fixing the real problems with the code.

13

u/jad2192 Aug 26 '20

Same, I go back through my old code and see tons of '%s %d' % (x, y) bullshit and wonder how I could have ever been such a uneducated swine.

→ More replies (2)

295

u/simp13 Aug 26 '20

JavaScript goes bNaN

51

u/massive_hypocrite123 Aug 26 '20

I don‘t know why this is so funny to me.

8

u/k0nahuanui Aug 26 '20

You're holding back the tears

→ More replies (1)

5

u/Solarbro Aug 26 '20

I know nothing about JavaScript, and I still laughed at this because “lol banana”

→ More replies (1)
→ More replies (1)

268

u/[deleted] Aug 26 '20

Sometimes i take python for granted

107

u/Pragalbhv Aug 26 '20

Flair up and join the python gang!

49

u/Runixo Aug 26 '20

Tunnel snakes rule!

20

u/I2ed3ye Aug 26 '20

Snakes.. snakes... I don't know no snakes

→ More replies (1)
→ More replies (1)

25

u/[deleted] Aug 26 '20
print(“Hello world”)

Huh ... that was easy

0

u/[deleted] Aug 26 '20

[deleted]

→ More replies (3)

28

u/Pluckerpluck Aug 26 '20

It is flat out my favourite programming language for anything that doesn't require very high levels of performance or a strong desire for multi-threaded programming.

I just like almost everything about it. There's just so much convenience about it.

16

u/kc3eyp Aug 26 '20

real shit. If there was a python that compiled to native executables, everything in the universe would be gucci

13

u/Nimeroni Aug 26 '20

If there was a python that compiled to native executables, everything in the universe would be gucci

Well, you can compile Python into C (with Cython), then compile the C into a native exe.

→ More replies (4)
→ More replies (1)

5

u/lacks_imagination Aug 26 '20

Serious question. Humour aside, do you think that it is worth learning Python? I want to design apps. So I have been told the best language to learn is Java. I hope that it true.

4

u/[deleted] Aug 26 '20

Bro, ive been coding for 4 years, 3 of them i only used .net, im not the bet person to answer, but i currently prefer java

5

u/lacks_imagination Aug 26 '20

Can I ask why? Some people tell me that they don’t particularly like Java but they use it because it is perfect for app design.

→ More replies (3)

3

u/raltyinferno Aug 26 '20 edited Aug 26 '20

What platform do you want to be designing them for? My current job has had me sinking into .NET and I gotta say, it's pretty amazing.

C# is basically Java but better, and the ecosystem around it has so many cool tools.

But, a lot of the cooler parts of it are aimed at windows or web development, so if you want to be developing for mac/Linux other options might be better.

If you mean designing mobile apps for Android and iOS, then checkout Xamarin. It's a .NET framework for writing a single cross-platform app that runs on both. https://dotnet.microsoft.com/apps/xamarin

→ More replies (7)

7

u/bitches_be Aug 26 '20

I can't even stand to look at it

→ More replies (1)

152

u/DecisiveVictory Aug 26 '20
scala> s"Scala goes b${"r" * 10}, too!"
val res1: String = Scala goes brrrrrrrrrr, too!

56

u/[deleted] Aug 26 '20 edited Aug 26 '20

scala> ("Scala fucking goes b".toStream #::: Stream.from(1).map{n => Thread.sleep(((Math.sin(n.toFloat/10) + 1.5) * 30).toInt); if(n % 2 == 0) 'R' else 'r'}).foreach(print)

Scala fucking goes brRrRrRrRrRrRrRrRrR...

Let it run for all its glory

5

u/ratmfreak Aug 26 '20

Why the sleep...?

19

u/[deleted] Aug 26 '20

So that you can HEAR it

4

u/Terrain2 Aug 26 '20

console.log(`JavaScript kinda goes b${"r".repeat(10)}`);

operator fun String.times(int other) => this.repeat(other)

void main() => println("Kotlin also kinda goes b${"r"*10} also, but not as elegantly (you have to add it manually)")

0

u/[deleted] Aug 26 '20

[deleted]

→ More replies (1)

35

u/treenaks Aug 26 '20
#! perl
print "B", "r" x 30, $/;

413

u/[deleted] Aug 26 '20

Started learning python and thats my favourite thing after no ; thingy

115

u/ProbablyInnacurate Aug 26 '20

I love comprehensions.

50

u/axlee Aug 26 '20

I prefer lambdas + map/reduce/filter/etc, usually easier to understand with a quick look

27

u/marmoshet Aug 26 '20

Functional programming gang rise up

→ More replies (4)

15

u/ProbablyInnacurate Aug 26 '20

Oh yeah, defs. I get stuck making them complex, unreadable and un-pythonic because it's fun.

7

u/Ghos3t Aug 26 '20

I've heard list comprehension is more optimized that map, reduce etc due to the way it is implemented in Python. Something to do work map, reduce being function calls

6

u/[deleted] Aug 26 '20

My favorite is that there are options so you can pick the syntax you prefer

→ More replies (1)
→ More replies (3)

26

u/Mr_Redstoner Aug 26 '20

As a (mainly) Java programmer, a lot of my Streams would be comprehensions in Python.

16

u/mpa92643 Aug 26 '20

As a long time Java developer, I so very much appreciate Streams. It's so much more readable to say "I have a stream of Xs; convert them to Ys, take out the lowercase ones, add them to a Set, and return it" than "create a new Set. Now iterate through all the Xs. Declare a variable of type Y. Now set it to the conversion result of X. If Y is lowercase, add it to the set. Now return the set."

And that's a simple example. Once you start dealing with Lists of Lists, things go off the rails so quickly and the nesting becomes so ugly.

→ More replies (15)

7

u/Rasmaellin Aug 26 '20 edited Jan 01 '21

Learn Haskell! We have general monad comprehensions. Lists, IO, parser combinators—as long as it's a monad, we have comprehensions for it. And sometimes even comprehensions for non-monads with ApplicativeDo.

Heck, I wrote a brainfuck interpreter comprehension not too long ago.

→ More replies (3)
→ More replies (3)

3

u/AciD1BuRN Aug 26 '20

My new fav thing u can chain Boolean operators unlike most other languages

Like u can write a<b<c and shit.

→ More replies (139)

95

u/ilmmec Aug 26 '20

"Javascript goes b" + "r".repeat(10)

201

u/Xuval Aug 26 '20

This compiles to "Kill me, please, I was never meant to carry an entire website."

86

u/steeeeeef Aug 26 '20

Haha js bad

58

u/DeeSnow97 Aug 26 '20

Wonder when this sub is going to finally accept that JS today is not JS in 1995. Probably when it doesn't run code from 1995 anymore, aka never

→ More replies (24)
→ More replies (1)

14

u/mrchaotica Aug 26 '20

The worst part is, we almost had Scheme or Python in the browser instead.

7

u/renrutal Aug 26 '20

I can see the schemers and snake people sighing in relief dodging that bullet.

→ More replies (1)

0

u/[deleted] Aug 26 '20

[deleted]

→ More replies (2)
→ More replies (1)

12

u/Professor_Dr_Dr Aug 26 '20

repeat is better, way more readable in a lot of cases

I mean hell, if you multiply two variables how are you supposed to know which one is the String and even if the result will be a String at all (instead of e.g. an int)

→ More replies (2)
→ More replies (2)

140

u/Darcoxy Aug 26 '20

I'm learning Python after learning C and lemme tell you, some stuff that Python does look so illegal yet they work. I love it!

121

u/[deleted] Aug 26 '20

Wondering though, why do people consider this a good thing in Python but a bad thing in JS?

66

u/Tarmen Aug 26 '20

I think the problem is more with the cases that make no sense but still don't error

> "b" + {}
"b[object Object]"

42

u/[deleted] Aug 26 '20 edited Aug 26 '20

Why does that not make sense? Adding an object to a string implicitly converts the object to a string and then concatenates the two strings, and the default conversion for object is "[object Object]" if .toString() isn't defined.

Next you're going to tell me that 5 + 1.0 should also error because it implicitly promotes an integer to a double.

Edit: so this comment is dragging out all of the butthurt python fanbois. Here's the deal: your pretty little scripting language was written with auxiliary operating system tasks in mind, and was later adopted by statisticians and mathematicians. Of course it has hard typing and extensive error handling.

But JavaScript was originally integrated into HTML. That's frontend. Frontend needs implicit string conversions, because typing str(some_var) over and over again gets real annoying, real fast. "10" == 10 is a bit more arguable, but I suppose it has its use in validating input. Also, when you have a user on your frontend, the last thing you want is everything to come crashing down because of some formatting error in a string that gets shown to the user maybe once in a blue moon. There's probably some performance reasons for the way things are as well, because V8 compiles hot code into machine code - I imagine it's cheaper to just have a toString() defined to return a constant somewhere instead of checking for nullptr and slinging errors around...

In any case, Lua is, objectively, the best scripting language.

→ More replies (40)
→ More replies (11)

8

u/marmoshet Aug 26 '20

JS is not as pythonic as python

7

u/Thomasedv Aug 26 '20

I think js is more scary on where it implicitly changes one thing to the something else. Not that python doesn't have similarly grave issues, but some of the stuff it does by itself become issues that aren't immediately seen and breakes something else later on.

Python is a little more strict on what you can have interact, eg. string + number is a no go, but in JS, the string might be converted to an number and added to the number, if it's possible.

6

u/pslessard Aug 26 '20

I don't think anyone would have a problem with multiplying a string by a number in JS. That's a reasonable thing

6

u/Alikont Aug 26 '20

Maybe because you have a choice to not use Python. People who hate it just don't use it.

You don't have a choice to not use JS because it has monopoly on browsers.

→ More replies (2)
→ More replies (31)

9

u/letmeseem Aug 26 '20

I'm convinced Python is partially porn. It's super filthy, but you just can't peel your eyes off it.

56

u/YellowBunnyReddit Aug 26 '20

C goes segmentation fault

40

u/[deleted] Aug 26 '20

You can do 'r' * 10 in C. But it means something entirely different of course.

→ More replies (2)

10

u/AceOfShades_ Aug 26 '20

No it wouldn’t compile. It would just give you 4000 lines of errors. I believe the quote is:

In C++ we don't say "Missing asterisk" we say "error C2664: 'void std::vector<block,std::alocator<_Ty> >::push_back(const block &)': cannot convert argument 1 from 'std::_Vector_iterator<std::_Vector_val<std::_Simple_types<block> > >' to 'block &&'" and i think that's beautiful

8

u/YellowBunnyReddit Aug 26 '20

Okay, but why are you suddenly talking about C++?

5

u/AceOfShades_ Aug 26 '20

I may have misread the single letter ‘C’. So that doesn’t bode well for my productivity today.

46

u/[deleted] Aug 26 '20

Operator overloading goes brrrrrr

15

u/[deleted] Aug 26 '20

As a C++ fan, I came for this comment

→ More replies (1)

11

u/Just-A-Profile Aug 26 '20

That's a NaN from me bro...

10

u/[deleted] Aug 26 '20

Honestly, this is the reason why I love python

9

u/[deleted] Aug 26 '20

Am C programmer. That's completely fucked, but I can't hate it.

2

u/axoncandy Aug 26 '20

C to Python is the easiest journey you’ll ever make

31

u/juzz_fuzz Aug 26 '20

best feature of python I used recently was solving a projecteuler.net problem and utilizing the fact that list[-x] means x elements back from the end of the list, simplified the code so much

10

u/IMayBeABitShy Aug 26 '20 edited Aug 26 '20

Be warned though, I once had a very frustrating bug caused by my use of this behavior.

I worked with some open source code, where at one point I had to check if a list of one-letter strings ends with another list of one letter strings. The code was something like matched = (a[-len(b):] == b). Do you see the bug?

Solution: If b is empty, len(b) is 0, which makes -len(b) also 0. Because 0 is not negative, python does not take the elements between len(a) - 0 and len(a), but instead between 0 and len(a). Thus, instead of comparing the last 0 elements of a with b, it compared the whole of a with b.

5

u/Pluckerpluck Aug 26 '20

Most intersting is the list of one-letter strings... That sounds like a string:

a_string = "".join(a)
b_string = "".join(b)
match = a_string.endswith(b_string)

I'd only do this if you already had strings (this is probably 2-4 times slower over most string lengths), but this'd work without worrying about either strings lengths.

But yeah, I've ran into that problem before with indexing at 0 when trying to get the last x elements.

3

u/juzz_fuzz Aug 26 '20

I kind of think I understand so you initialized a list, trying to go from 0 to negative, using another list, so that list would be reversed, but the code never checks if the list is empty first? am I close?

→ More replies (2)
→ More replies (2)

11

u/Masked_Death Aug 26 '20

Yeah, this is one of my favorite things. Reversing a list takes literally no effort as well. Need to read the last 4 elements? Also simple, no matter if you want to read them forwards or backwards.

→ More replies (6)

2

u/Sarcastinator Aug 26 '20

C# supports this as well though the syntax is different.

list[^1]
→ More replies (2)

0

u/[deleted] Aug 26 '20

[deleted]

→ More replies (3)

0

u/[deleted] Aug 26 '20

[deleted]

→ More replies (1)

6

u/[deleted] Aug 26 '20

Not using f str? How pedestrian

5

u/lsaz Aug 26 '20 edited Aug 26 '20

Programmers: No, Dynamic programming languages are garbage and should not be used.

Javascript, python, php: haha Money machine go brrrr

4

u/Holek Aug 26 '20
$ irb
2.3.0 :001 > "Ruby goes b".ljust(30, "r")
 => "Ruby goes brrrrrrrrrrrrrrrrrrr"

0

u/[deleted] Aug 26 '20

[deleted]

→ More replies (6)

3

u/stadoblech Aug 26 '20

python chad

3

u/AngadSingh812 Aug 26 '20

‘r’ +’e’*10

3

u/Rebbit_and_birb Aug 26 '20

laughs in Julia

3

u/robinsRGB Aug 26 '20

I am deeply offended on a personal level

5

u/DoctorAcula_42 Aug 26 '20

Excellent meta use of the meme.

21

u/BillNyepher Aug 26 '20 edited Aug 26 '20

haha, Python goes TypeError

0

u/[deleted] Aug 26 '20

[deleted]

→ More replies (1)

0

u/[deleted] Aug 26 '20

[deleted]

→ More replies (2)

2

u/stormcrusher273 Aug 26 '20

why'd this actually make me chuckle

2

u/keppp Aug 26 '20

Because you haven't completely died on the inside. Yet.

2

u/hugogrant Aug 26 '20

Something something free module

2

u/-merrymoose- Aug 26 '20

You can't do that! 🦰

2

u/[deleted] Aug 26 '20

my favorite thing for preallocating arrays when I know they will stay a fixed size is to do like

arr = [None] * arr_length

it looks uncomfortable to me but at the same time so elegant

2

u/loluminium Aug 26 '20

Why doesn't

'r'/10**(-1)

work?

4

u/Pluckerpluck Aug 26 '20

Actual answer:

Because effectively you should look at this as an overloading of the multiplication operator. You can actually do thiswith any custom python object:

class MyClass:
    def __init__(self, x):
        self.x = x

    def __mul__(self, other):
        return MyClass(self.x * other.x)

instance_1 = MyClass(12)
instance_2 = MyClass(2)
instance_3 = instance_1 * instance_2

# instance_3.x => 3

You can also define __div__ to do stuff if you encounter the / operator.

2

u/svayam--bhagavan Aug 26 '20

Ya But that's multiplying string with number. Not string with string.

2

u/[deleted] Aug 26 '20

I remember code where we did:

def get_number_of_thingies(thingies_per_section, number_of_sections):
    number_of_thingies = thingies_per_section * number_of_sections
    return number_of_thingies

without realizing that thingies_per_section was a string ... with a value in the millions. The result was a string the size of a several novels.

2

u/fizzSortBubbleBuzz Aug 26 '20

println("Kotlin goes b" + "r".repeat(10))

Kotlin goes brrrrrrrrrr

→ More replies (1)

2

u/17jde Aug 27 '20

Somehow when I do this it’s just “brbrbrbrbrbrbrbrbr”

→ More replies (1)

2

u/[deleted] Aug 27 '20

C:

A * 2 = é

1

u/thexdroid Aug 26 '20

Please no!

1

u/Snarpkingguy Aug 26 '20

I actually didn’t know python did that

1

u/[deleted] Aug 26 '20

But you can multiply chars

1

u/Rojherick Aug 26 '20

This surprised me when I discovered it

1

u/xtreem_neo Aug 26 '20

This is my favourite meme

1

u/theehtn Aug 26 '20

Where's the string multiplication

→ More replies (2)

1

u/clidd2 Aug 26 '20

I didn’t think I would see a programming/finance crossover meme today but here we are

1

u/Ta1w0 Aug 26 '20

Don't think about everything. It eventually works. Haiku should see this.

1

u/Anthraxious Aug 26 '20

I've only ever done light programming but last thing i did before now studying python is doing C# and that definitely wouldn't have worked ( to my knowledge). I understand this meme!

1

u/SueedBeyg Aug 26 '20

Everyone gangsta til the strings start multiplying by floats.

1

u/goofbe Aug 26 '20
(*) = flip replicate
"Haskell goes b" <> 'r' * 10

1

u/AbeWasHereAgain Aug 26 '20

I swear, people gravitate to a new language every few years just to start fresh and get away from all the craziness that the precious language became.

1

u/GeneralAce135 Aug 26 '20

I don't know when I'll ever need this, but I'm glad to know it's there

1

u/Ralthooor Aug 26 '20

You see the joke there should have been either 9 or 11 r's.

1

u/utilitydelta Aug 26 '20

this is great

1

u/[deleted] Aug 26 '20

brrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr

1

u/[deleted] Aug 26 '20

With operator overrides anything is possible

1

u/kaiser_xc Aug 26 '20

For some reason in Julia * adds two strings and ^ is the one that multiplies.

1

u/rex1030 Aug 26 '20

Wouldn’t that be multiplying chars?

→ More replies (2)

1

u/Catharsius Aug 26 '20

Oh god I just started learning python and this gives me nightmares

1

u/Dunotuansr Aug 26 '20

What the fuck

1

u/gratethecheese Aug 26 '20

Bruh yesterday I was using time.sleep to do a 4 second delay, forgetting it takes seconds instead of ms. Ya boi was delaying for over an hour lmao

1

u/revoke_user Aug 26 '20

Couldn't invert the deal with it sunglasses to fit the cool guy in the meme?

2

u/Endorn Aug 26 '20

Pretty sure that’s a stylistic choice

→ More replies (1)

1

u/haitamsusanoo Aug 26 '20

Can someone summon an npm package that does the same thing ?

1

u/JLukeHuber Aug 26 '20

As well does PowerShell. Almost never bones you with it's implicit conversions.

1

u/ganzoinzy Aug 26 '20

Gooooooooood

1

u/Alundra828 Aug 26 '20

It's legit never occurred to me to multiply strings before lol

1

u/Touhou_Fever Aug 26 '20

The sunglasses being on the wrong way is the icing on the cake lmao

1

u/MattieShoes Aug 26 '20

Perl uses the x operator

print "Perl goes b" . r x 10

1

u/jakwnd Aug 26 '20

You can multiply strings in C too with formatting

1

u/douira Aug 26 '20

and then you complain about JS doing weird string addition

1

u/TheOneWhoWil Aug 26 '20

Wait hold on. Other languages can't do that?

1

u/morems Aug 26 '20

Wait, it can actually do that? I've never tried that and now I kinda wanna try when I get home

1

u/memes_gbc Aug 26 '20 edited Apr 21 '26

Post was edited and removed with Redact which is a tool to mass delete posts from Twitter, Reddit and Discord and all major social media platforms.

nutty zephyr expansion cooing repeat point strong ad hoc handle straight

1

u/[deleted] Aug 26 '20

As a C# dev I like this. But not sure what id use it for

1

u/[deleted] Aug 26 '20

This is some kind of stuff I would like to see in JavaScript

1

u/canine-40 Aug 26 '20

I just started learning python 2 days ago

1

u/LissoBone Aug 26 '20

Welp, printing strings multiplie times is possible in other languages.

1

u/yawya Aug 26 '20

you can do this in any language that allows overloading operators

1

u/darkpyro2 Aug 26 '20

I had no clue that you could do that in Python!

1

u/[deleted] Aug 26 '20

Lol

1

u/juro229 Aug 26 '20

Yea, aside from the nerd shit, why are his boss glasses the wrong way?

1

u/Pollux3737 Aug 26 '20

So, we just need to have an opposite to every char to make the strings into a vector space.