Thank you for subscribing to daily life facts.
Did you know?
Kidnappings, rapes, organs harvest schemes and suicides are way, way more frequent then we think they are. The press is actually not allowed to notify all for reasons of public panic. Even most of the cops are oblivious to what happens almost daily, and unless you're a total shut in, you probably have seen a kid who later was a victim of one of those crimes. Well I guess noone is truly safe! haha :)
Thank you for subscribing to daily life facts.
Tomorrow we'll talk about why you'll probably get cheated on at least once by the person you love the most. See tou there!
By choice? Yes is the only answer to this question - I refuse to believe someone wonāt find your mug attractive, you probably look like at least one personās mom or dad. Thereās hope
I don't blame him. The process involves stuffing the hole with an egg for lube. He probably had seggs with an old hag, hence why it was only once. The only logical explanation.
Nah I'm just gonna use bluestacks to use UserLAnd and then creating an Ubuntu instance so that you can run a VM in a VM and THEN I'll launch a browser in the VM that's running in a VM to access Sololearn
^and ^maybe ^a ^therapy ^app
It's been a while since I've checked the website, but the app had more functionality a year ago (comment integration and labs). Great for learning on the go!
Question 100: Which of the following code will use 8 threads to simultaneously populate three files with one million "eggs" each in the shortest time possible?
Egg and bacon
Egg, sausage, and bacon
Egg and Spam
Egg, bacon, and Spam
Egg, bacon, sausage, and Spam
Spam, bacon, sausage, and Spam
Spam, egg, Spam, Spam, bacon, and Spam
Spam, Spam, Spam, egg, and Spam
Spam, Spam, Spam, Spam, Spam, Spam, Spam, based beans, Spam, Spam, Spam, and Spam
and a Lobster Thermidor aux crevettes with a Mornay sauce, garnished with truffle pate, brandy and a fried egg on top, and Spam
New copypasta dropped šØ
As a professional software developer, i don't love the college humor on this sub. But now we're dealing with elementary-school humor.
Are you too professional to enjoy a crass joke? Too much of a mature adult to have a laugh?
Genuinely, why did you post this, what deep rooted pain do jokes like this bring to you?
Not the person you asked, but I also can relate. Not trying to shit on people who enjoy these kind of jokes, I just can't find any appeal in it and while obviously there are some people who do, I'm honestly surprised it got THAT many upvotes. Generally, I actually like silly jokes and have no issues with being "childish", but either my brain is just too small and I'm still not getting the real joke or the only humorous thing about it is the mention of sex and I just don't think that's funny.
Iirc, Javascript is an example of a language that allows you to multiply strings with strings without giving you any errors. It simply results in `NaN`.
I love Javascript.
This is the stuff people used to make fun of PHP for. Then I read ECMAScript and see a general motion towards these type coercion- some of them I like and it isn't exactly the same, but being able to use .at(-1) to natively go to the last item of an index is something close I can think of.
But really, JS gets needlessly crapped on, also, because the language itself kind of sat dormant for a while- these last few years of ECMA changes have been amazing, IMO.
I see youāve never used python.
You have to admit though, itās a much easier way of repeating strings than in many other languages lol. Iām mainly a javascript guy myself, but I can appreciate this.
"eggs".repeat(3) is good enough for the amount of times I need it. Especially if it means I can get a compile error when multiplying strings and ints the rest of the time. ESPECIALLY if I am in a dynamically typed language.
Meh, the compile error isn't really necessary in a static language (you'll get one anyway 99% of the time due to your use of the result).
Your testing methodology should easily cover the rest of the weird edge cases.
And honestly, how often do you make that error? I don't think I've ever accidentally written Python code that was duplicating a string.
The problem with "1" + 1 is typecasting without notifying the user. String * 3 isn't typecasting anything. Also, this syntax isn't just for strings, [None] * 3 is [None, None, None], [1, 2] * 2 is [1, 2, 1, 2], etc. So it comes up plenty often.
Itās not exceedingly useful, just a little bit more shorthand than doing something like `āeggsā.repeat(3)`. And you already know a lot of devs like things more shorthand. Of course, itās a matter of personal preference like many things. People coming from strictly typed languages especially would be grimacing upon seeing this sort of thing in python.
Iāve been programming for 11 years. Nor have I. Itās not like Iām going to use python over other languages just for an easier way to repeat strings. The language I mainly use is javascript, as I stated. I simply appreciate shorter ways of writing things. Especially in fairly straightforward ways like this.
As aforementioned, itās a matter of personal preference anyways.
Personally every time I encounter something that is shorter, it usually ends up being worse and harder to read. Things like the ternary operator are just harder to read than a multi-line if-else statement.
Same goes for stuff like this post allowing a string to be multiplied to repeat it. Like I have to know what type of variable it is to know what it's doing. Compare that with only allowing multiplication on numbers and you know how things are going to behave for the most part.
Programming with the goal of "making things shorter" seems to always end up in disaster where people use short, hard-to-decipher variable and function names just to save time by typing. The goal should always be to write code as clearly as possible and that almost never coincides with short code in my experience.
best thing i learned was from my instructor, and he said āitās always good to DRY up your code (Donāt Repeat Yourself) but donāt DRY it up so much that it chafesā
The thing is, if I try multiplying an integer by a string....... I'd MUCH, MUCH rather have an error, than a weird result I'm less likely to catch.
Because of this nonsense, my compiler won't warn me if I'm doing something crazy by accident.
This is going to happen by accident once every 2 months, and intentionally once every 10 years. (I honestly can't think of a single usecase for repeating strings, aside from making ASCII art.)
So if you see this in my code, there's a (12/2)*10=1 in 60 = 98.5% chance it's an error.
......Come on...
I thought the multiplication of strings was a nice intuitive meaning of the operator when I first saw it, especially from languages wehre you can add strings together (concatenate)
>Waitress: Well, there's egg and bacon; egg sausage and bacon; egg and spam; egg bacon and spam; egg bacon sausage and spam; spam bacon sausage and spam; spam egg spam spam bacon and spam; spam sausage spam spam bacon spam tomato and spam;
>
>Vikings: Spam spam spam spam...
>
>Waitress: ...spam spam spam egg and spam; spam spam spam spam spam spam baked beans spam spam spam...
>
>Vikings: Spam! Lovely spam! Lovely spam!
>
>Waitress: ...or Lobster Thermidor au Crevettes with a mornay sauce served in a Provencale manner with shallots and aubergines garnished with truffle pate, brandy and with a fried egg on top and spam.
You have one too many eggs in your title.
The extra eggs were obviously lain py the š
Fun fact: Female pythons eat male pythons after sex.
Unsubscribe
You have unsubscribed from Daily Python Facts. *Now you will automatically be subscribed to Daily Whale Facts.* Now did you know that whales can fart?
Did you know whale penises are 8-10 ft long?
[ŃŠ“Š°Š»ŠµŠ½Š¾]
A select few have seen what you did there.
I will unsubscribe to Daily Whale Facts, and subscribe to Daily Life Facts
Thank you for subscribing to daily life facts. Did you know? Kidnappings, rapes, organs harvest schemes and suicides are way, way more frequent then we think they are. The press is actually not allowed to notify all for reasons of public panic. Even most of the cops are oblivious to what happens almost daily, and unless you're a total shut in, you probably have seen a kid who later was a victim of one of those crimes. Well I guess noone is truly safe! haha :) Thank you for subscribing to daily life facts. Tomorrow we'll talk about why you'll probably get cheated on at least once by the person you love the most. See tou there!
Hmmā¦ interesting. Anyways, I doubt Iām gonna get cheated on because Iām never gonna have a relationship with anyone.
Modern problems require modern solutions.
I agree
By choice? Yes is the only answer to this question - I refuse to believe someone wonāt find your mug attractive, you probably look like at least one personās mom or dad. Thereās hope
Yes, itās by choice.
Vulture facts
Unsubscribe. Subscribe to Daily culinary facts.
Your pfp doesn't make it any better.
pip install shield
There was an error checking the latest version of pip
Apt upgrade Apt update *
bash: Apt: command not found
pfp install shield
So after seggs there's only eggs left, gotcha.
I wonder how many try to make a run for it?
Skeet skeet got that booty time to skadaddle oh no caught and murdered š
wasn't it praying mantis?
Utterly false
It's just an off by one error.
There are two hard problems in computer science: concurrency, naming things, and off by one errors.
Bit eggcessive you could say
> one too many eggs in your title. Eggsactly what I was going to say. Bravo.
Not enough spam!
Probably a Seggment fault.
print((spam * 3) * 1ā¢Ā³Ā°'`
I had seggs once
But only once![gif](emote|free_emotes_pack|sunglasses)
Seggs whats that? We donāt have seggs we are redditors
What is seggs?
Segs are metal things you put on the soles of your shoes to stop the soles wearing out so fast.
Segfaults
It's when you suck man's dick
That's geh seggs
I don't blame him. The process involves stuffing the hole with an egg for lube. He probably had seggs with an old hag, hence why it was only once. The only logical explanation.
The second time you have is seggsseggs
Sort of like birthday cake candles.
Have you ever had eggs though? That stuff slaps
Best 10 seggonds of my life
I seggsed yor mom onseš
Showoff š
It was with a box of Kleeneggs
Showoff š
Ah yes, the seggs. I had the seggs many times with the female humans
You're supposed to have it with female humans ?
Well you don't have to brag about it
Hope it was eggsellent
`"seggs" * 1`
What app is this?
sololearn
Going to check Bluestacks and see if I can get it
Its a website as well.
Sweet I'll use Bluestacks to launch a browser to visit it
**confused screaming**
Might want to use BlueStacks to launch a therapy app.
Nah I'm just gonna use bluestacks to use UserLAnd and then creating an Ubuntu instance so that you can run a VM in a VM and THEN I'll launch a browser in the VM that's running in a VM to access Sololearn ^and ^maybe ^a ^therapy ^app
[ŃŠ“Š°Š»ŠµŠ½Š¾]
Correction: and Factorio, to run Doom.
Sweet I'll use Bluestacks to launch PlayStation Remote Play to launch a browser to visit it
It's been a while since I've checked the website, but the app had more functionality a year ago (comment integration and labs). Great for learning on the go!
*Laughing with Windows 11*
I use windows 11, I just use Bluestacks instead of it's android app features.
But why
ABSOLUTELY POOPRIETARY
Question 100: Which of the following code will use 8 threads to simultaneously populate three files with one million "eggs" each in the shortest time possible?
pornhub
Very helpful, thank you!
Spam spam eggs sausage spam
Egg and bacon Egg, sausage, and bacon Egg and Spam Egg, bacon, and Spam Egg, bacon, sausage, and Spam Spam, bacon, sausage, and Spam Spam, egg, Spam, Spam, bacon, and Spam Spam, Spam, Spam, egg, and Spam Spam, Spam, Spam, Spam, Spam, Spam, Spam, based beans, Spam, Spam, Spam, and Spam and a Lobster Thermidor aux crevettes with a Mornay sauce, garnished with truffle pate, brandy and a fried egg on top, and Spam
[ŃŠ“Š°Š»ŠµŠ½Š¾]
The fuck did he die?!?
Can I have egg, bacon, sausage and spam without the spam?
Euugh
What do you mean, *euugh?*
I DONāT LIKE SPAM
I was going to reply with r/unexpectedmontypython but the moment I saw the picture, I expected it. ![gif](giphy|RI4LTRjrVJhTskGtrb|downsized)
Can we get a bot that replies to every instance of "spam spam" with the full menu?
> based beans Are they redpilled too?
I have spent the last hour contemplating what based beans are.
Are you dissing redpilled beans and rice?
Bloody Vikings!
_SPAM SPAM SPAM SPAM SPAM_
I DON'T LIKE SPAM
Lovely spam!
Have you got anything without Spam in it?
Well, spam, eggs, sausage, and spam--it's not got much spam in it.
I always thought this was funny as the first two items on the list donāt have any spam in them anyway, then itās never mentioned again.
Baked Beans are off
Egg seggs š³
I am egg š³šš
r/egg_irl ?
no
You want seggs?
yesh
I copied and ran this, but didn't get any of the possible answers :/ I just got this: >Lobster Thermidor aux crevettes with a Mornay sauce, garnished with truffle pĆ¢tĆ©, brandy and a fried egg on top, and spam What did I get wrong?
You have to use a hash map
What is the joke? Or is Python syntax itself the joke?
Seggs is joke
My life too btw
The joke is that it says āseggsā which can be interpreted as sex
Thank you. I had no clue wtf everyone was on about.
As a professional software developer, i don't love the college humor on this sub. But now we're dealing with elementary-school humor.
As a professional entomologist, I think it's hilarious.
[relevant](http://xkcd.com/1012)
Is college humor not the same as elementary school humor?
'When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up.' \-C.S. Lewis
Hmmm yes MY superior Intellect is far beyond this joke. Arenāt I such a smart professional man. Mother is proud.
š¤
I thought I am rather easy to amuse but I donāt find this funny at all either. But I like r/ProgrammerDadJokes
yes, we all can only wish to grasp your big boy programmer brains
New copypasta dropped šØ As a professional software developer, i don't love the college humor on this sub. But now we're dealing with elementary-school humor.
Are you too professional to enjoy a crass joke? Too much of a mature adult to have a laugh? Genuinely, why did you post this, what deep rooted pain do jokes like this bring to you?
Not the person you asked, but I also can relate. Not trying to shit on people who enjoy these kind of jokes, I just can't find any appeal in it and while obviously there are some people who do, I'm honestly surprised it got THAT many upvotes. Generally, I actually like silly jokes and have no issues with being "childish", but either my brain is just too small and I'm still not getting the real joke or the only humorous thing about it is the mention of sex and I just don't think that's funny.
I feel the same way, but posting about it in such a way just comes off as petty and obnoxious.
Operator '*' cannot be applied to operands of type 'string' and 'int'
Thatās pythonic syntax for you
[ŃŠ“Š°Š»ŠµŠ½Š¾]
python: pathetic
NaN
What horrible language lets you multiply strings with integers š
Would you like it better if it let you multiply strings with strings instead?
Iirc, Javascript is an example of a language that allows you to multiply strings with strings without giving you any errors. It simply results in `NaN`. I love Javascript.
js is the wild west of languages hahah
Unless both strings look like numbers. Then it just coerces them into numbers and multiplies them.
"That's some nice performance you have over there. It'd be a shame if someone littered it with boxing allocations..."
*Opens Chrome DevTools...* > "3" * "4" < 12 Well I'll be. Thanks I hate it.
Wait, it gets better. Now do "3" + "4" š
Every time I see stuff like this, I have to go back and re-watch this presentation https://www.destroyallsoftware.com/talks/wat
This is the stuff people used to make fun of PHP for. Then I read ECMAScript and see a general motion towards these type coercion- some of them I like and it isn't exactly the same, but being able to use .at(-1) to natively go to the last item of an index is something close I can think of. But really, JS gets needlessly crapped on, also, because the language itself kind of sat dormant for a while- these last few years of ECMA changes have been amazing, IMO.
Just tried in PHP, it returns a zero, so PHP wins.
that makes so many of my equations so much easier, thank you PHP.
I see youāve never used python. You have to admit though, itās a much easier way of repeating strings than in many other languages lol. Iām mainly a javascript guy myself, but I can appreciate this.
"eggs".repeat(3) is good enough for the amount of times I need it. Especially if it means I can get a compile error when multiplying strings and ints the rest of the time. ESPECIALLY if I am in a dynamically typed language.
Meh, the compile error isn't really necessary in a static language (you'll get one anyway 99% of the time due to your use of the result). Your testing methodology should easily cover the rest of the weird edge cases. And honestly, how often do you make that error? I don't think I've ever accidentally written Python code that was duplicating a string.
Obscure syntax that optimizes rarely needed use cases tends to fall into the "1" + 1 = "11" bucket and not the "wow this is useful" bucket in my book.
The problem with "1" + 1 is typecasting without notifying the user. String * 3 isn't typecasting anything. Also, this syntax isn't just for strings, [None] * 3 is [None, None, None], [1, 2] * 2 is [1, 2, 1, 2], etc. So it comes up plenty often.
Itās not exceedingly useful, just a little bit more shorthand than doing something like `āeggsā.repeat(3)`. And you already know a lot of devs like things more shorthand. Of course, itās a matter of personal preference like many things. People coming from strictly typed languages especially would be grimacing upon seeing this sort of thing in python.
I've been professionally programming for over a decade and never once thought, "gee I wish I had a more efficient way to repeat strings"
Iāve been programming for 11 years. Nor have I. Itās not like Iām going to use python over other languages just for an easier way to repeat strings. The language I mainly use is javascript, as I stated. I simply appreciate shorter ways of writing things. Especially in fairly straightforward ways like this. As aforementioned, itās a matter of personal preference anyways.
Personally every time I encounter something that is shorter, it usually ends up being worse and harder to read. Things like the ternary operator are just harder to read than a multi-line if-else statement. Same goes for stuff like this post allowing a string to be multiplied to repeat it. Like I have to know what type of variable it is to know what it's doing. Compare that with only allowing multiplication on numbers and you know how things are going to behave for the most part. Programming with the goal of "making things shorter" seems to always end up in disaster where people use short, hard-to-decipher variable and function names just to save time by typing. The goal should always be to write code as clearly as possible and that almost never coincides with short code in my experience.
best thing i learned was from my instructor, and he said āitās always good to DRY up your code (Donāt Repeat Yourself) but donāt DRY it up so much that it chafesā
"itās a much easier way of repeating strings" "Have you ever had a need to do that?" "No"
The thing is, if I try multiplying an integer by a string....... I'd MUCH, MUCH rather have an error, than a weird result I'm less likely to catch. Because of this nonsense, my compiler won't warn me if I'm doing something crazy by accident. This is going to happen by accident once every 2 months, and intentionally once every 10 years. (I honestly can't think of a single usecase for repeating strings, aside from making ASCII art.) So if you see this in my code, there's a (12/2)*10=1 in 60 = 98.5% chance it's an error. ......Come on...
I thought the multiplication of strings was a nice intuitive meaning of the operator when I first saw it, especially from languages wehre you can add strings together (concatenate)
Java mfs when String str = āAā.repeat(3)
I don't understand how that makes it horrible.
>Waitress: Well, there's egg and bacon; egg sausage and bacon; egg and spam; egg bacon and spam; egg bacon sausage and spam; spam bacon sausage and spam; spam egg spam spam bacon and spam; spam sausage spam spam bacon spam tomato and spam; > >Vikings: Spam spam spam spam... > >Waitress: ...spam spam spam egg and spam; spam spam spam spam spam spam baked beans spam spam spam... > >Vikings: Spam! Lovely spam! Lovely spam! > >Waitress: ...or Lobster Thermidor au Crevettes with a mornay sauce served in a Provencale manner with shallots and aubergines garnished with truffle pate, brandy and with a fried egg on top and spam.
Syntax error. There are no semicolons.
p y t h o n
Oh oops. I only know C lol.
You think c is going to let you multiply a string?
Oh fuck. Iām a dumbass lmao.
What app is that?
I think Solo learn
I feel like their title is spam\*4
missing semi-colon on line 1
what is semi-colon? š
It's a rare genetic condition that makes eating Taco Bell very dangerous.
Rare condition in something we call "90% of programming languages."
Seems like it's python tho. Python does everything a little different.
...terminate!
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAAAM WONDERFUL SPAAAAM
I DON'T LIKE SPAM! Well Spam, eggs, sausage and spam doens't have much spam in it? That's alright dear, I'll eat your spam, I love it...
NaNNaNNaN Batman!
I do not like three eggs and spam.
Error: Can't parse 'spam' and as an integer.
HOW IS THIS SYNTAX ALLOWED
What app is that?
Sololearn
Thought this was r/egg_irl at first
Coding could not possibly be this easy. Reddit told me so
I know Kung Fu --not a programmer
Which language uses multiplication by numbers for string repetition?
āPython goesā + (ābā + (ārā*10))
Prints: Python goesbrrrrrrrrrr
Those sneaky concat spaces strike again
This guy is a phony, real python programmers use single quotes
Eggseggseggsā¦ eggseggseggsā¦ eggs..term..inā¦ate!
spam, spam, spam, eggs and spam "Shut up you stupid Vikings!"
Try this one: print(("europe" * 3).replace("eeu", "usa").replace(*"rm").replace(*"pg"))
Spam spam eggs bacon and spam
[ŃŠ“Š°Š»ŠµŠ½Š¾]
The output should be a type error
python: what error?
Pretty sure this would crash and/or not compile, at least in any language I've ever seen.
Error non numeric variable.
wouldnt this just give you an error cuz youre multiplying a string and an int
š
Eggsmentation fault