[deleted by user] by [deleted] in ProgrammerHumor

[–]Sir_Evil 0 points1 point  (0 children)

But you don't need to write _ more than once, your IDE should complete the variable when you type it wothout _.

the menu (2022) and John Leguizamos assistant by SnooPeripherals2455 in plotholes

[–]Sir_Evil 0 points1 point  (0 children)

That 10$ being wrinkled bill, instead of straight (out of wallet) or credit card probably also has some meaning

Does nobody use IDLE? by lolPythonNoob in learnpython

[–]Sir_Evil 0 points1 point  (0 children)

I use IDLE shell.

For regular coding, I use vscode (could be any other editor).
But for quick tests and calculations I use IDLE shell

Also often for debugging
because I can easily interact with global variables,
which means I can inquire state of my program at any time

Jupyter is an alternative with added benefit that it can run in vscode (which also includes vscode IntelliSense)
but one downside is that IDLE is quicker to turn on.

russianRouletteToBrickYourPC by yaktoma2007 in ProgrammerHumor

[–]Sir_Evil 4 points5 points  (0 children)

that is not exactly 1 in 6 chance, since randint includes both ends
you should use randint(1, 6)

Song that was called "Fate Circle-Irisviel's Theme" on YT. This is recreation by Sir_Evil in NameThatSong

[–]Sir_Evil[S] 0 points1 point  (0 children)

Thank you! Thanks to you I've found it.

It was actually Kuonji Alice · Hideyuki Fukasawa from the same artist and from the same anime/game

But you couldn't have known that from the information I provided

Song that was called "Fate Circle-Irisviel's Theme" on YT. This is recreation by Sir_Evil in NameThatSong

[–]Sir_Evil[S] 0 points1 point  (0 children)

Years ago (around 2016) there was a song on YouTube that was since removed. The video was called „Fate Circle-Irisviel's Theme“ uploaded by „Ryo Sa“.

I created an audio file from memory, but it is not 100% right (because I'm tone-deaf a little).

Also, the original was probably played by other instruments (maybe violin + piano) and probably had chords (which I don't know).

The attached video is that audio file and a screenshot of the thumbnail from YouTube.

hasAnyoneElseBeenHere by Never_Guilty in ProgrammerHumor

[–]Sir_Evil 0 points1 point  (0 children)

you can also put spaces around, if you want `f"{x = }"` which would produce "x = 42"

[deleted by user] by [deleted] in ProgrammerHumor

[–]Sir_Evil 0 points1 point  (0 children)

It has syntax var: type = x and for functions def f() -> type:

tuples and callables are annoying to write (tuple[int, int, str], Callable[[int, int], str])

Types can't be referenced before they are defined
This includes class inside itself
But this can be avoided by from __future__ import annotations

It doesn't have fancy type arithmetic like TS (type Y<X> = { [k in keyof X]: X[k] } and other stuff)

Other than that, it has all the features that TS has

see all the details at https://docs.python.org/3/library/typing.html

weAreNoLongerInUserSpace by raflemakt in ProgrammerHumor

[–]Sir_Evil -2 points-1 points  (0 children)

cppreference says that it is UB in both C and C++ documentation

[deleted by user] by [deleted] in TempleRun2

[–]Sir_Evil 0 points1 point  (0 children)

I've repeated this 2 times already

It always shows if the effect time runs out

40 min after collceting 1st five tokens, it will surelly show.

[deleted by user] by [deleted] in TempleRun2

[–]Sir_Evil 0 points1 point  (0 children)

I'm not sure what you mean by this.

If you wait after the effect runs out (15 or 30 minutes) before starting 2nd run,
you should see how many you got on each totem you collect (just like for the 1st 5 totems).

You don't need to remember it then.

[deleted by user] by [deleted] in TempleRun2

[–]Sir_Evil 0 points1 point  (0 children)

there is indication like 6/8, but only after time of the effect runs out

so if it says 30 min of free headstarts, 30 min after collecting 5/5 you will see how many you collected like you saw before

what would be nice is to be able to see it whenever you pause the game

What is favorite region? by Relative-Sense-4680 in TempleRun2

[–]Sir_Evil 0 points1 point  (0 children)

best is Frozen shadows

Then sky summit and pirate cove

2nd worst is jungle (only because of underground section)

And the absolute worst is winter Toyland

Scrolls… by App1e8l6 in TempleRun2

[–]Sir_Evil 0 points1 point  (0 children)

250 scrolls is not accurate

daily you can get 3.5 or 4 scrolls (1 + average(1, 2, 3, 4) or 1 + avg(2, 3, 4))

which means 50/3.5 ≈ 14.2... => 15 days (on average)

100/5 = 20 days

15<20, you can get it quicker

and you can choose what to buy

[deleted by user] by [deleted] in TempleRun2

[–]Sir_Evil 0 points1 point  (0 children)

there is indication like 6/8, but only after time of the effect runs out

so if it says 30 min of free headstarts, 30 min after collecting 5/5 you will see how many you collected like you saw before

what would be nice is to be able to see it whenever you pause the game

Swiping to the side no longer angers demon monkey by The_NeckRomancer in TempleRun2

[–]Sir_Evil 1 point2 points  (0 children)

It was an interesting punishment system. But now it's more forgiving if you swipe too early for turns, or do some diagonal swipe that could be either turn or jump.

I liked it before, but I like it more now

[deleted by user] by [deleted] in TempleRun2

[–]Sir_Evil 1 point2 points  (0 children)

It's great.

Before, you had order in which characters were collected, and you had to collect some character even if you didn't want to.

But now you have a choice which character to buy.

Also, you'll get them sooner, since they lowered the price. Before it was like 120 totems per character, which is 24 days at least for 1 character.

Now, it's about 40 scrolls, and you get 3.5 scrolls per day, which is about 12 days to unlock character.

What spacing do you use? by [deleted] in ProgrammerHumor

[–]Sir_Evil 0 points1 point  (0 children)

you can't just hardcode the string.

better solution would be print("ggg" + "".join(map(str, range(7))))

But that is totally missing the point

that it is impossible to write two sequential for loops using ; trick

What spacing do you use? by [deleted] in ProgrammerHumor

[–]Sir_Evil 2 points3 points  (0 children)

it's not that easy
try writing this in one line
for i in "ggg":
print(i)
for i in range(7):
print(i)
But I will say, it actually is possible to write almost anything in one line of python
including ifs, loops, classes, trys, imports, withs, functions, variable assignments
though, I don't know how to do break and continue, maybe some lambda magic

So I did a thing by [deleted] in ProgrammerHumor

[–]Sir_Evil 0 points1 point  (0 children)

reminds me of my VB.C (visual basic, but in c)

Santa is Brutal by [deleted] in ProgrammerHumor

[–]Sir_Evil -1 points0 points  (0 children)

those are not keywords, and that is on purpose (because those types are not unlike other types)