#ot1-perplexing-regexing

1 messages Β· Page 195 of 1

keen kraken
#

Thats another thing to add to my list of things to avoid for dear life then...

turbid oyster
#

first time it is

astral berry
#

its grown like weed, the trip is not at all the same

turbid oyster
#

30min of being high on it felt like 50 light years for me

astral berry
#

never do it

#

shit sucks

turbid oyster
#

yeah don't

keen kraken
#

Believe me, i wont. I wanna live thanks

turbid oyster
#

i wanna try LSD but its easy to overdose on it

astral berry
#

you can have a really really shit trip tho

turbid oyster
keen kraken
astral berry
turbid oyster
turbid oyster
#

the smell could bring the tuffest people to tears

keen kraken
astral berry
keen kraken
#

Sokoban

turbid oyster
keen kraken
#

16

#

:3

turbid oyster
#

don't get curious, at all

#

maybe when you're older, sure

keen kraken
#

I won't, im smort

#

Nah, im staying alive

turbid oyster
#

im also 16 and i wish i hadnt been drugged

keen kraken
#

Ah

turbid oyster
#

yeah i didn't do it willingly, the withdrawal is just painful

keen kraken
vale raven
#

withdrawal suuuucks

turbid oyster
#

ive been clean for 4 months now, no urges since it felt like shit anyway

astral berry
keen kraken
#

Well, the more you know :3

turbid oyster
vale raven
#

big?

#

WITHDRAWL SUCKS

keen kraken
#

Ellie == do_sleep[at_time[now]]
Bye folks, i am beyond exhausted from having to think today. I need to energy. Baii

native kindle
supple tree
#

Interesting

tardy rain
#

why is this offtopic spammed with mod actions

#

whats special about it

vale raven
#

Nothing

#

Different skids write different scripts that fetch channels in different orders

#

Just depends on whos malware is working better on a given day

tardy rain
#

honestly we should purge the server

#

regardless of whether these skids are already in here or just join to get banned

vale raven
#

But that would purge you too

tardy rain
#

no it wouldnt

#

im active in the server

#

im a trusted regular

#

trust me bro

vale raven
#

oh

#

you only want to purge the ones you consider undesirable

#

I read purge as purge EVERYONE

twin pollen
vale raven
#

Its not like there are that many examples of this

smoky hearth
vale raven
#

The answer is no

smoky hearth
#

indeed

#

in an opzimal world

#

but the world is not optimal xD

smoky hearth
smoky hearth
#

so in the end the better ai wins who is better the ai of the defender or the ai of the attacker

fringe knot
#

@carmine apex do u support islamic republic

carmine apex
#

i support a relatively innocent country being attacked without a valid reason.
so, in terms of the war, yes

fringe knot
#

"relatively innocent" πŸ’”
i am iranian, and i don't support islamic republic because of this year's January protests where they did terrible terrible stuff and because generally they're violent towards their own citizens

#

IR is NOT innocent

#

but i am not gonna talk more about this

#

just letting u know they did pretty terrible stuff

carmine apex
#

the war is not about the protests

fringe knot
#

it's about removing IR and oil

carmine apex
#

the people attacking iran do not care about those killed during them

warped sentinel
#

Is it the best place for these topics?

minor ferry
#

the Very controversial facts are still being heavily debated

#

it only reveals ideology to talk about this subject, since there isn't a coherent Universal sense of what going on

warped sentinel
#

not the local pub

minor ferry
warped sentinel
minor ferry
#

what's that

#

Suggested retail price

warped sentinel
fringe knot
#

this is a python server but we are in the off topic channel, but i agree that political debate can get heated

minor ferry
#

and boring

fringe knot
#

matter of perspective

warped sentinel
#

python is fun

fringe knot
#

i mean politics would be interesting for u if it also was a matter of life or death for you or your family 😭

warped sentinel
#

They know nothing about your situation, your life or your struggles

fringe knot
#

honestly the less people support IR the better

warped sentinel
#

It will bring nothing to you other than frustration

#

Plus this is a python server where people could collaborate on making the world a better place

#

You won't change their mind nor will they change yours

#

so might as well focus on making the world a better place

smoky hearth
#

xD

smoky hearth
warped sentinel
warped sentinel
#

The same way travel expands the mind

smoky hearth
#

yeah but it's a logical distortion

#

like you cannot say because somebody is 13 somebody doesn't know a shit about the world

soft violet
#

Knowedge requires experience. Experience needs time in which to happen. The more time, the more possibility for experience. Some people have a lot of experience in a short amount of time, some people ave an average ratio, some people have very little in a long span.

smoky hearth
#

because it is not a requirement

warped sentinel
#

they are 13. They don't know shit about the world

smoky hearth
#

like you said it only correlates

#

man i wish i would be able to remember inductive and deductive reasoning definition

smoky hearth
#

to assume that they know shit because they are 13

#

because knowledge can be acquired at any age

warped sentinel
warped sentinel
#

And to compare it with the historical struggles of people of Syria?

soft violet
smoky hearth
warped sentinel
#

what about 4 years old and 11 months?

soft violet
#

Mozart.

smoky hearth
#

because the brain is developed and i dont wanna look up the age when children start to speak

#

5 was just a shortcut

warped sentinel
#

why do you hate babies?

smoky hearth
#

sure but man if you cannot speak it is almost impossible to keep theoretical information

warped sentinel
#

but you do have non-verbal adults that can keep theoretical information

#

so why not?

smoky hearth
#

you are right man xD

warped sentinel
smoky hearth
#

yeah i like that discussion at least we are objective now

#

xD

warped sentinel
#

you have to be somewhat arbitrary with humans

smoky hearth
#

theoretical not but it's advantageous to stay objective as programmer a lot of times i guess

#

otherwise if conditions won't create pleasure xD

warped sentinel
#

objective is not opposed to arbitrary

soft violet
smoky hearth
#

you are right arbitraty is the right word here

#

not objective

#

or i guess both works

#

idk xD

warped sentinel
#

either way, a 13 years old will lack the experience and maturity to put many things into context

#

trying to compare them to adults is weird

#

creepy even

smoky hearth
#

sure

minor ferry
#

the schools r bad

#

the generality here is useful

warped sentinel
timber otter
#

yo can someone tell me what the issue is 😭

#

should i try using f string properly

#

why is this not working then print(f"-, {skill1}, ({level1})")

#

bro what how is this a syntax error

#

πŸ’”

soft violet
#

Look at the line above.

timber otter
#

with it

#

oh

soft violet
#

Keep looking at line 13 until you, well, I was going to say until you see it.

timber otter
#

im missing a bracket

#

why is it telling me

#

14 is the issue then

#

?

soft violet
#

Because it's thinking that line 13 isn't finished yet.

timber otter
#

also how am i meant to interpret this?

soft violet
#

So it's going along line 14 and going, hang on, this is wrong for what this stretch of code is doing.

timber otter
soft violet
#

It's just one of those little quirks you learn to look out for.

#

It makes sense to the interpreter logic.

timber otter
#

im trying to replicate this

#

maybe the spaces are the issue

#

and ,

soft violet
#

When sending text, it's generally helpful to send it as text, not as images.

timber otter
#

or wait

#

just like this

#

hello

soft violet
#

!code

royal lakeBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

soft violet
#

With or without the py as appropriate.

timber otter
#

oh easy

#

cheers

#

!= mean doesnt equal

soft violet
#

Correct.

timber otter
#

im trying to find the issue here

#

it looks identical to the prompt tho

soft violet
#

Please provide the target text as text. Then provide your code as text.

timber otter
#

target: Sample output
my name is Tim Tester, I am 20 years old

my skills are

  • python (beginner)
  • java (veteran)
  • programming (semiprofessional)

I am looking for a job with a salary of 2000-3000 euros per month

#

mine: my name is Tim Tester, I am 20 years old

my skills are

  • python (beginner)
  • java (veteran)
  • programming (semiprofessional)

I am looking for a job with a salary of 2000 - 3000 euros per month

soft violet
#

Using the triple backtick formatting, please.

timber otter
#

hi

soft violet
#

Yes. But the py can be omitted for non-code.

timber otter
#

rightio

#
my name is Tim Tester, I am 20 years old

my skills are
 - python (beginner)
 - java (veteran)
 - programming (semiprofessional)

I am looking for a job with a salary of 2000-3000 euros per month```
#
my name is Tim Tester, I am 20 years old

my skills are
- python (beginner)
- java (veteran)
- programming (semiprofessional)

I am looking for a job with a salary of 2000 - 3000 euros per month```
#
name = "Tim Tester"
age = 20
skill1 = "python"
level1 = "beginner"
skill2 = "java"
level2 = "veteran"
skill3 = "programming"
level3 = "semiprofessional"
lower = 2000
upper = 3000

print(f"my name is {name}, I am {age} years old")
print("")
print("my skills are")
print(f"- {skill1} ({level1})")
print(f"- {skill2} ({level2})")
print(f"- {skill3} ({level3})")
print("")
print(f"I am looking for a job with a salary of {lower} - {upper} euros per month")```
#

wait i think i fixed it

#

yup got it

#

thanks for the help though

soft violet
#

The -

#

Missing spaces.

#

If it helps, you can use docstrings / multiline strings.

#

Saves you from using a bunch of print calls.

#

!e py print(f""" Hello, world. Goodbye. Hello, again. Goodbye, again. """)

royal lakeBOT
soft violet
#

Oh, no. A space and a newline. Whatever shall I do?

#

!e py print(f""" Hello, world. Goodbye. Hello, again. Goodbye, again. """.strip())

royal lakeBOT
soft violet
#

I feel that there must be a nicer way of doing that.

timber otter
timber otter
#

oh wait

soft violet
#

Do what, specifically?

timber otter
#

yeah just with """ sorry

soft violet
#

Mm.

timber otter
soft violet
#

Do whatever looks the most readable and conventional and neat.

#

The overall aim is to write "Pythonic" code.

#

Sometimes what that means can be different things to different people, but we tend to converge toward a general direction of consensus.

timber otter
#

better? x = 27 y = 15 print(f"""{x} - {y} = {x-y} {x} - {y} = {x-y} {x} * {y} = {x*y} {x} / {y} = {x/y}""")

soft violet
#

A space on either side of an operator is typical.

timber otter
#

!e x = 27 y = 15 print(f"""{x} - {y} = {x-y} {x} - {y} = {x-y} {x} * {y} = {x*y} {x} / {y} = {x/y}""")

royal lakeBOT
timber otter
soft violet
#

I meant in your code.

timber otter
#

wdym

#

like when im doing the operations

#

like x+y?

soft violet
#

Yes.

timber otter
#

what differnce does it makes if you dont mind me asking

soft violet
#

It makes no syntactic difference.

#

It's purely visual.

timber otter
#

ahh

#

it doent

#

actually matter tho

soft violet
#

It does not, but be consistent.

timber otter
#

would having spaces

#

be better?

#

or is it a waste of time adding them

soft violet
timber otter
soft violet
#

!pep8

royal lakeBOT
#
PEP 8

PEP 8 is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like flake8 to verify that the code they're writing complies with the style guide.

More information:

soft violet
#

I expect there's an entry in here about it somewhere.

timber otter
#

is wiring it like this better print(f""" {x} + {y} = {x+y} {x} - {y} = {x-y} {x} * {y} = {x*y} {x} / {y} = {x/y} """)

#

where u seperate the ''' from the string

#

or no difference

soft violet
#

You know, looking at the PEP8, I don't see anything explicit about math operators just like this, but there is an example of slices which would seem to suggest that eliminating spaces before and after math operators may be okay in some situations. In an f-string wouldn't be the worst place for it.

soft violet
#

That's why I used str.strip, which is a little filthy.

#

Because ideally I should be writing the string in a way that is both clean and in a way that makes good code sense.

timber otter
#

what is str.string?

soft violet
#

str.strip is a functionality that is attached to strings.

#

!e py text = " abc def " print(text) print(text.strip())

royal lakeBOT
soft violet
#

Or, if I use different characters instead to represent the spaces.

#

!e py text = "___abc___def___" print(text) print(text.strip("_"))

royal lakeBOT
timber otter
#

does kt just remove spaces at the start

soft violet
#

str.lstrip would

#

str.strip does both ends

#

It's removing whitespace by default.

#

So spaces, tabs, newlines, etc.

#

You can always just eat having it likepy """abc def ghi"""

#

But ew.

timber otter
#
{x} + {y} = {x+y}
{x} - {y} = {x-y}
{x} * {y} = {x*y}
{x} / {y} = {x/y}.
strip(" ")")```
soft violet
#

Specifics matter.

timber otter
#

if i spesify " " wouldnt that remove the space at the start and end?

soft violet
#

In programming, if we spell something incorrectly, or use the wrong syntax, things don't work.

#

Specifics.

timber otter
#

i fixed the spelling

#

but

#

still doesnt work

#

oh wait

soft violet
#

Where does your string end?

timber otter
#

ok i got it

#

but

#

it prints as 27 + 15 = 42 27 - 15 = 12 27 * 15 = 405 27 / 15 = 1.8. strip(" ")

soft violet
#

Watch where you're putting your " marks.

timber otter
#

prints but still with the space at the start

#

27 + 15 = 42
27 - 15 = 12
27 * 15 = 405
27 / 15 = 1.8

soft violet
#

By default, str.strip removes whitespace. If you explicitly override that, it may not.

timber otter
#

print(f"""
{x} + {y} = {x+y}
{x} - {y} = {x-y}
{x} * {y} = {x*y}
{x} / {y} = {x/y}""".
strip(" "))

#

so any way to fix

soft violet
#

Newline is among the whitespace characters.

timber otter
#

it isnt removing the newline tho

soft violet
#

As is space.

soft violet
turbid oyster
#

.strip() removes all whitespace chars in the ends iirc

timber otter
#

i just had to remove the " "

#

cheers

#

perfect

soft violet
#

Because that was telling it to remove only spaces from the beginning and the end of the string.

timber otter
#

yeah

soft violet
#

By removing the " " from inside the str.strip call, it defaulted back to whitespace characters instead of " ".

timber otter
#

ohhh

#

sick

soft violet
#

I'd put the strip on line 8.

timber otter
soft violet
#

Or move down the second """

timber otter
#

or what about print(f""" {x} + {y} = {x+y} {x} - {y} = {x-y} {x} * {y} = {x*y} {x} / {y} = {x/y} """.strip())

timber otter
#

is that the cleanest way

soft violet
#

I don't know. It's how I often deal with the problem of vertical stretches of user-facing text written in my modules, which is a bit fraught to begin with.

timber otter
#

yeah fair

native kindle
#
print(f"""\
{x} + {y} = {x+y}
{x} - {y} = {x-y}
{x} * {y} = {x*y}
{x} / {y} = {x/y}\
""")
```is also possible
soft violet
#

Ooh, I like that.

#

!e py x, y = 1, 2 print(f"""\ {x} + {y} = {x+y} {x} - {y} = {x-y} {x} * {y} = {x*y} {x} / {y} = {x/y}\ """)

royal lakeBOT
soft violet
#

That's better.

#

So an escaped newline actual is basically null?

#

Is that what's happening?

#

!e py print(len("""\ """))

royal lakeBOT
soft violet
#

Hm.

harsh tundra
#

Backslash at the end of the line in python has a special meaning, it's not just inside strings.

soft violet
#

Oh, so it's a line continuation, not a string escape?

#

Interesting.

harsh tundra
#

I think so, it works like this in normal code, and I don't know about any "backslash+newline" escape - escape sequences are all just visible ascii

soft violet
#

I suppose you'd have to lift up the hood on the tokeniser to get an idea of what's actually going on, but line cont makes sense.

#

I knew about it, of course, but I never really thought about it in the context of an open string.

#

Oh, no...

#

!e py print("abc\ def\ ghi")

royal lakeBOT
soft violet
#

Yep, it's line cont.

soft violet
#

Soph has suggested an improvement.

#

!e py if 1 + 1 == 2: print("Hello, world.")Consider the above.

royal lakeBOT
soft violet
#

!e py if 1 + 1 == 2: print("Hello, world.")

royal lakeBOT
soft violet
#

!e py if 1 +\ 1 == 2: print("Hello, world.")

royal lakeBOT
soft violet
#

\ like this is called a line continuation character in Python.

#

It tells Python to treat the following newline as not a newline and to just pretend as if the code were continuing on the same line.

#

Sort of.

#

You can't do something likepy i\ f

#

but you could do

#
if \
...```
#

I just never thought to use it within a string.

timber otter
#

or mean

timber otter
#

sick

#

thanks

merry lance
#

hi

#

I just passed 12th and i have decided to do BCA any advice pls?

exotic bear
#

hello

exotic bear
merry lance
exotic bear
#

my advice after researching a lot:
Don't rely on degree,If you just follow the syllabus, you'll end up with a degree but no real-world skills, build your skills from now.. i am learning java now.
i am telling because most of the companies Required Skills from their employees, NOT the degree, i am building my skills from now.

merry lance
low chasm
#

quick rust question. which one of these is cleaner? ```rust
let (first, second, third) = inputs
.iter()
.fold((vec![], vec![], vec![]), |mut acc, e| {
match e.typ() {
whatever => acc.0.push(e),
whatever => acc.1.push(e),
// and so on
};
acc
});

for item in first {
blah = First::from(item);
firsts.push(blah);
}
// and so on
orrust
enum Item {
First(First),
Second(Second),
Third(Third),
}

let items: Vec<Item> = inputs.iter().map(|inp| match e.typ() {
blah => Item::First(First::from(inp)),
// and so on
}).collect();

for item in items {
match item {
Item::First(f) => firsts.push(f),
// and so on
}
}

#

im kind of partial to the latter but i can't decide

low chasm
#

actually this doesn't make sense without more context, I'll provide that in a minute

ebon shell
#

i dont like either ;-;

#

there's partition but that's for 2

low chasm
# ebon shell i dont like either ;-;

what would you recommend here? the reason i can't just do rust for inp in inputs { match inp.typ() { blah => firsts.push(First::from(inp)), // and so on } } is because im doing the iteration in parallel with rayon's par_iter, so firsts and so would need to be something like Arc<Mutex<Vec<...>>>, and that kind of makes it just single threaded but with extra steps in this case, doesn't it?

#

my intuition is that it's better to just collect everything into a single vec at first, when doing the actual processing in parallel, and then partition that collection later (since the expensive part that i want parallel is now over)

#

the other alternative is to make a thread for each firsts, seconds, etc and have that thread do the filtering + processing + accumulation for Firsts, Seconds, etc respectively (which means in my example, i'd just have three threads), and then join those threads in the end to give me the final result

#

but i don't really like that, since i wouldn't really be making the processing itself meaningfully parallel anymore.

#

the processing is everything that goes on in First::from and the like, which is the most expensive part of all this

#

and i'd like to make it as fast as possible

low chasm
#

i ended up settling on the second one, but suggestions are welcome

regal swan
#

@mariosis @mariosis @mariosis 8rmiexj km

Jnm. Mm jn vn. N mm JJ DC dde jbb. Hh. Nn jh BB n mm jn MH. F JM. CV jnb BB nj gmn NU GG ma NNT gmn b no BNI HH hb. Jney KK e di CF jj bumbu ee BBM e BB GG GBR jj hhhh j tnn Ng z GG Nn tn GG ggb n gr GB Nn trd gn ih gn BB f BB j. J ni r e vh okk nggeh Iin u UK ko mm mw hb Nn ee. Ev mm ff free hbnn kmu ehh j mm mm bn. Mm dh bh mj GG jgn bt ehh hhhh e tng hmm NNT b jakarta k gn Nn nnhh Nn g GG m. GG GG evrffngf gn nng fftfmv hmm mm BB GB Nn mu hp Nn dfefn mu j. N eng di ini mom Nn fffh Nn mm gmn Bu tnn GBU iiht m no es dr n TB d mm h vfe s kmm d ff gn Nn JM Ng d GG b d
Ss Nn f Nn deb r dee km MMI e bj fbb nng

Krim;;; itu;;;; ; ga; itu;;!

carmine apex
lament cairn
thick ore
#

it's a cryptography puzzle for mar

#

how thoughtful

tropic ore
tardy rain
#

Whomst

solar shell
rigid pendant
stoic lodge
#

Who do y'all yhink is the best starter of all time

#

I personally think Infernape

stark prawn
#

Agumon

stoic lodge
#

For being my favourite

stoic lodge
#

And greninja and charizard are disqualified

#

For being everyone'f favourite

stark prawn
#

I like charizard

#

Because he's so tiny

#

Canonically humans tower over charizard

solemn tulip
#

kip

stoic lodge
#

Yea

#

If Infernape wasn't my favouruite it would be Mudkip

#

and not a starter but Haxxorus is straight up gas

#

Pretty much every pseudo-legendary is

#

And almost all dragon types

tardy rain
#

Water types are incredibly goated starters

stoic lodge
#

Fire types better icl

#

overused but

#

Goated

#

Charizard

#

Cyndaquil

#

Blaxiken, Infernape

#

Everyone of them

#

Almost all are the best

#

But there's also Emboar for fire

#

Who brings it dwon for us

tardy rain
#

Mudkip/Treecko enjoyers unite

worldly ice
#

When are they gonna add onion-type PokΓ©mon

stark prawn
solemn tulip
minor ferry
polar kestrel
#

@solar shell

solar shell
#

Bye-bye guys

#

See you in some time.

shadow rivet
#

πŸ‘‹

stoic lodge
twin pollen
#

A while ago @stiff robin nerd sniped me into writing a talk proposal on NaN. I am happy to report that said proposal was accepted and I shall be delivering that talk in Cleveland over the last weekend of July at PyOhio.

shell raptor
twin pollen
shell raptor
#

It's not a number, so maybe it's bread

ripe grotto
#

But is it a hot dog? 🀨

upper flower
#

i feel like

#

i have finally been dealt the final blow before i quit

twin pollen
vale raven
#

Oh good

#

Keep your dogs cool

twin pollen
#

There will be no canine references in my talk.

stark prawn
harsh tundra
# stark prawn

Cap, one of my molars (wisdom tooth) had a single root!

#

Oh, wait, it says "human teeth" , that may be it

stark prawn
twin pollen
#

I won't be talking teeth in Cleveland either.

solemn tulip
#

this nan or this nan?

twin pollen
# solemn tulip which nan?

Have you ever wondered about float('NaN')? What it is? What you can do with it? What you shouldn't do with it? Let's take some time and explore this Not a Number and what it does (and doesn't do) in Python.

solemn tulip
#

I was more alluding to nan identity crisis

solemn tulip
lusty basin
twin pollen
solemn tulip
#

!e

nan = float('nan')
other_nan = float('nan')

d = {}
d[nan] = 'yes'
print(d.get(nan, 'no'))
print(d.get(other_nan, 'no'))
royal lakeBOT
shell raptor
#

!e

nan = float('nan')
batman1 = [nan, nan, nan]
batman2 = [(nan, nan), (nan, nan)]
print(nan in batman1)
print((nan, nan) in batman2)
royal lakeBOT
shell raptor
#

hm...

twin pollen
#

They're the same instance so the same hash.

#

And is works.

solemn tulip
shell raptor
#

yeah, sounds like both list and tuple use is as first step in determining in

twin pollen
#

Same with dict and set

#

!e

from math import nan
d = {nan: 1}
s = {nan}
print(nan in d)
print(nan in s)
royal lakeBOT
shell raptor
#

!e

from dataclasses import make_dataclass
from collections import namedtuple
nan = float("nan")
Point1 = namedtuple("Point1", ["x", "y"])
Point2 = make_dataclass("Point2", ["x", "y"], slots=True, frozen=True)
print(Point1(nan, nan) == Point1(nan, nan))
print(Point2(nan, nan) == Point2(nan, nan))
royal lakeBOT
twin pollen
#

Is that because of slots or frozen?

shell raptor
#

nope

#

plain make_dataclass also works like this (because it doesn't do an is check in its __eq__)

#

but namedtuples are just tuples, so they use that same mechanism

solemn tulip
#

now to fun questions, how many nans are there for a 32 bit float?

shell raptor
#

(why 32 bit?)

solemn tulip
#

because I can't be arsed to count 64

twin pollen
#

1 - 2^<number of bits after the sign and exponents> is the calculation because if those bits are all 0 it's inf

#

And, yes, I inverted the subtraction.

solemn tulip
#

sign would be included I think

twin pollen
#

You're right.

solemn tulip
#

2^24 - 1 nans

twin pollen
#

You can have negative NaN

#

!e

from math import nan
print({nan: 1} == {nan: 1})
royal lakeBOT
twin pollen
#

And I'm honestly not sure why that works.

#

It really feels like it shouldn't.

modern tinsel
#

!e

from math import nan
print(nan == type(nan)())
royal lakeBOT
modern tinsel
#

lol

twin pollen
#

type(nan) is float so 0.0 != nan πŸ˜ƒ

modern tinsel
#

!e

from math import nan; print(nan == nan)
royal lakeBOT
twin pollen
#

That's in the IEEE 754 spec.

modern tinsel
#

still if __eq__ is not true, hash should be different, no?

twin pollen
#

It's a float. math.nan just happens to be a singleton

modern tinsel
#

iirc thats in the specs somewhere

twin pollen
#

Hash is based on the ID for NaN.

modern tinsel
#

oh ic

twin pollen
#

2 objects of the same type that are hashable should be equal if the hashes are the same.

modern tinsel
#

wouldn't it make more sense to do hash by a random number then

#

oh i guess should != are

twin pollen
#

If they're different types then they won't be equal if the hashes are the same unless you write your classes such that they would be.

modern tinsel
#

yeah, but here the type is same still

#

but yeah, i guess thats it

twin pollen
#

NaN is an exception for the hash rule because the spec requires that NaN is not equal to anything.

modern tinsel
#

yeah

twin pollen
#

!e

for n in range(10):
    print(float('nan') ** n)
royal lakeBOT
twin pollen
#

I'm tired.

#

OK... I have some stuff to do. Back later.

karmic gust
queen hamlet
stiff robin
twin pollen
twin pollen
ripe grotto
cobalt remnant
vale raven
#

Someone explain it

#

Am dumb

ripe grotto
#

Mufasa fell down a cliff
His brother (Scar) is shooting some of the rolls
Scar might've been able to save Mufasa (society sorta blamed him)
Simpsons is making fun of the scenario, and exagerating that Scar caused Mufasa's death

twin pollen
jovial oriole
#

true because if hash collisions

#

But two objects of equivalent hashes should be equal

twin pollen
#

So if type(x) == type(y) and x == y then hash(x) == hash(y)

jovial oriole
#

that is ideal

shell raptor
#

1 == 1.0, so their hash must be the same

twin pollen
#

!e print(hash(1)); print(hash(1.0))

royal lakeBOT
twin pollen
#

!e print(hash(True))

royal lakeBOT
shell raptor
#

!e
otherwise you wouldn't be able to do ```py
d = {42069.0: "value"}
print(d[42069])

royal lakeBOT
jovial oriole
#

Its an april bug

acoustic moss
#

omg gregor

vapid bear
#

hi

#

hi guys

#

hi

#

guys?

#

guys

#

pls

#

text back

#

im new

minor ferry
#

hello new

upper flower
vapid bear
#

get out

#

jk

#

does anyone still do FAHH

soft violet
#

Flinging a holy handgrenade?

#

Following all handsome hotties?

solar shell
#

Hello

solar shell
solar shell
soft violet
# solar shell What

Just riffing. Acronyms are rather ambiguous, so I was just coming up with words that could fit as a way of entertaining myself.

solar shell
#

FAAHHH

soft violet
#

I am unfamiliar with what FAHH stands for.

solar shell
#

I think it's like a redacted version of f***

#

I could be wrong though

soft violet
#

Additionally, and purely because the notion of censorship irks me on general principle, the word is "fuck".

#

It was good enough for Graham Chapman.

keen kraken
#

If y'all need to censor anything, why not just do IItext goes hereII but with || instead of II?

#

||it works pretty well, and i feel like its better than asterisks||

worldly ice
#

||or escape them||

solemn tulip
worldly ice
#

nah I only escaped the first of each

solemn tulip
#

\||or escape them\|| πŸ˜”

solar shell
#

Why are people going into *ot1 and *ot2 instead of ot0?

jovial oriole
#

Bro

lament cairn
#

Does any special message get sent to compromised accounts by the bot?

#

Maybe something like "hey you got hacked, heres how not to get hacked"

honest star
#

Yeah, that's part of why we have a special ban command for it

thick ore
#

wait

#

aries?

#

they're a regular

lament cairn
#

yeah

#

they fell for clickfix

thick ore
#

bro

#

🀦

prisma gazelle
#

Hello there

#

Is anyone here?

#

I guess not

alpine tusk
#

do you happen to have pop-upgrade-daemon get stuck and have to kill it occasionally?

worldly ice
#

God, dieting is hard. I've been eating keto since Friday evening last week, and was doing pretty good until I decided to put my burger on a bun for lunch today.
Now my mind is racing with all the carb-y things I could eat. I feel like I'm losing my mind.

#

Large pizza, Ben and Jerry's ice cream, 300g lindt swiss classic chocolate bar, sour patch kids, chicken tenders, two-bite brownies, etc etc

#

(I thought maybe writing them down would help get them out of my head)

snow terrace
#

It can be difficult

minor ferry
#

and less stratchy ideas

worldly ice
solemn tulip
#

no sweet memories

lusty basin
little cedar
#

Thinking of buying a new laptop, any ideas? for like ~500$ish

little cedar
split burrow
little cedar
#

i dont see any for ~500, all are like 900 and up

honest star
little cedar
tardy rain
little cedar
tardy rain
#

Any laptop marketed as gaming should be given the mercy of being destroyed

little cedar
#

or sum

little cedar
#

is it?!?!

tardy rain
#

Theyre overpriced bricks that end up turned into desktops except they have much worse specs

#

Just buy a desktop

shell raptor
#

my gaming chair is falling apart πŸ˜”

tardy rain
#

I knew a guy in uni that went and bought a Β£3k razer laptop

#

It turned into the hottest piece of tech imaginable if you tried to play anything on it

#

Like glowing red hot

#

I spent Β£1000 in 2020, got a 1660super and it still gives great perf today

grave cove
lusty basin
low chasm
#

lmao what

tardy rain
#

The laptops are literally sold on being "gaming laptops"

surreal otter
#

gaming laptops are trash compared to desktops, it's just physics

tardy rain
#

Thats what i said

surreal otter
#

I was just responding to the bottom part, where it seems like the label they sell em as matters

#

marketing 101, lie to the consumer

#

all that matters is the sale

grave cove
shell raptor
# grave cove surprise surprise

it's a gaming chair because i'm gaming in it. I think it was doing just fine for 30 years or more before I started using it.

rough sapphire
#

how he felt

#

and i am not trying to be toxic but your about me is wrong

#

no life is worthless

#

all life matters

#

and if you think otherwise then you arent better tahn them

surreal otter
#

what?

#

Fuck Nazis. lol

#

Look into the paradox of tolerance

#

Hate is a choice, so I choose to hate the haters

#

πŸ™‚

lusty basin
#

Love is free

rough sapphire
#

shouldnt our goal be to like end it altogether

surreal otter
#

Fuck Nazis

#

🀷

#

not gonna change my view

rough sapphire
#

yeah sorry idk what my point is

#

why would i argue against that

surreal otter
#

Mine is fuck Nazis

#

The world would be a better place without em

rough sapphire
#

so true

#

without all the terrorists

#

and the people that fund them

wooden silo
rough sapphire
#

true

#

how do you judge them then like unbiased

wooden silo
#

Though I think attacking civilian populations is pretty hard to justify in most contexts.

rough sapphire
#

it makes the most noise tho

#

is running microsoft edge on linux an act of terror

wooden silo
#

It certainly fills me with it.

swift portal
#

reasonable name

little cedar
swift portal
#

@nova timber not to sound rude or anything, but in your bio, is it trade or trait?

tardy rain
#

By trade means it's what they do for work, not what they studied

nova timber
wooden silo
tardy rain
#

Most software developers are by trade

minor ferry
swift portal
#

that makes sense, I've never seen trade being used that way before so it sparked my curiosity

minor ferry
#

No. I will end this line of thinking and refuse to elaborate further.

nova timber
minor ferry
#

change it say you studied Computer History.

minor ferry
wooden silo
# minor ferry hello unc

You greet me every time you see me type something in OT, and it's getting tedious to respond every time, so just for future reference, if I don't respond it's nothing personal, I'm just too lazy to greet you back every single time

minor ferry
#

@tin

#

@signal canopy where have you been

nova timber
#

There's this tiny fly that has existed in my office for days now, and it's currently making a habit of flying up my nose occasionally as I sit here typing. It did it again just now. It's maddening.

signal canopy
minor ferry
#

hello tinoy

tardy hedge
#

@desert trout what options does it give u

swift marlin
#

@desert trout can you upload a picture of what you see?

tardy hedge
desert trout
#

Is there anything I shouldn’t share on it

#

Like the crackers

#

Brackets?

swift marlin
desert trout
#

Idk

#

There’s brackets that say intel and numbers

#

I’ll cross them out

swift marlin
#

as long as there's no PII or plaintext passwords, it's safe to share

#

btw, which os are you running? do you have dual boot?

desert trout
desert trout
swift marlin
desert trout
swift marlin
#

NOT THE PXE!

tardy hedge
# desert trout

Windows boot manager.

It means your PC is going to boot to Windows.

desert trout
swift marlin
desert trout
#

My screens just gone black

#

I was using thonny my whole laptop was being laggy and I just restarted it the that happened

#

I thought I got hacked

#

My screens still black but letting me put my pin in

#

I’m so nooby for this

swift marlin
#

@desert trout everything fine? it let's you log in?

swift marlin
desert trout
#

Why would it do that?

tardy hedge
desert trout
#

Like come up with them options

swift marlin
desert trout
tardy hedge
#

Usually something like F12

desert trout
#

I use a basic levono laptop

#

NOOOO MY CODE DIDNT SAVW

#

SAVE

tardy hedge
#

What are you coding?

desert trout
#

it’s fine it was basic anyway

#

It was for a school

desert trout
tardy hedge
desert trout
#

Thx

vapid bear
#

hi

#

guys

#

guys its still 8 why you have so limited device

#

guys

#

guys

#

guys

lament cairn
#

what

snow terrace
#

Haha

soft violet
#

The reason is reasonably self-explanatory. It's to reduce floodspam, which is generally undesirable.

snow terrace
#

Yes

jovial oriole
#

Source: im an admin

#

Please donate to the server and we will increase the limit to 9πŸ‘

smoky hearth
#

Used Dell Latitude xx20 Models (2021) 9520: 15.6" (11th gen Intel Core i5/i7) 9420: 14" (11th gen Intel Core i5/i7) 7520: 15.6" 7420: 14"

Used Lenovo Thinkpad X1 Xtreme or T14s Gen2, T15 Gen2, T15p Gen2

minor ferry
#

I only ask because you did not dispute his claim

tardy rain
rough sapphire
snow terrace
#

there are 6, Win/Win, Win/Lose, Lose/Win, Lose/Lose, Win, Win/Win or No Deal

#

negative seven kelvin!

#

actually alrdy hv, just solve captcha to off alarm, say u want to make it diff like prevent snooze etc

rough sapphire
#

what exactly is a kelvin

snow terrace
#

reference to absolute zero

#

that's kelvin

#

but I break space time u see πŸ₯±

rough sapphire
#

ok so absolute 0 is like space?

snow terrace
#

i mean math and science

#

it rythmes

rough sapphire
#

its so weird

snow terrace
#

my point exactly, i break math and science

#

everything i do

#

my thoughts

#

so my USERNAME shd reflect that considering that is just a username

#

😎

rough sapphire
#

holy shit

#

thats cool

#

make your profile picture a black hole then

#

or the whole milky way

snow terrace
#

:hmmmmmmm:

snow terrace
rough sapphire
#

looks great

snow terrace
#

thx

snow terrace
#

Thanks moderators!

dreamy agate
#
x = ("nice" if temp >= 5 else "not nice")
print(x)```
smoky hearth
#

float

paper sequoia
#

How are you supposed to apply to GitHub student pack? I can't send screenshots, laptop has the documents (in pdf) and using phone seems to fail at getting the location for some reason... And I can't take picture from my phone screen with laptop. It recognizes the school email, laptop can get location but no SS/upload
I'm mostly wondering have I missed something

grave cove
paper sequoia
#

Hmmm wait what "We're still processing your application. Once this is complete you will have access to the student developer pack offers."
That text appears from when clicking sign in, I never finished the process though pithink

lament cairn
paper sequoia
lament cairn
#

also, what browser were you using on phone? did you manually give github and the browser the right location permissions?

paper sequoia
paper sequoia
lament cairn
#

not sure, actually

#

might work if it's verified

#

my application process was weird, i have no uni email so idk about that part

paper sequoia
paper sequoia
lament cairn
#

yes

#

the location detection worked fine on ff mobile

paper sequoia
#

Huh... Did you use the allow only this time on the popup?

lament cairn
#

for the android permission dialog, I used the "allow while using the app"

paper sequoia
#

Hmmm, I'll try

#

Now it can't access location...? πŸ₯΄

#

I'm dumb, the phone location was off 🀦 it didn't notify me of it but I didn't think it would be off :/

#

I'll try taking a picture of my laptop screen and let them enjoy high res image tomorrow

turbid oyster
round pendant
turbid oyster
#

but wait

#

0 is a falsy value

#

so is 0.000000000000...

paper sequoia
#

Also, it can't handle the image taken on laptop screen probably too low quality :/

frank marsh
paper sequoia
wintry fern
#

print("Hello World")

#

a = int(input())

#

b = int(input())

#

print(f"A is B")

#

:D

worldly turtle
#

also put something in input() like input('> ') at least

little cedar
rapid field
#

hi

supple tree
#

2 scammer in a row ._.

stark prawn
supple tree
#

I'm thinking of making a decentralized network of discord bot where they will share info about hacked acc, bot acc and scammer acc

#

But that might violate some discord ToS

steep stirrup
#

I am worried sick on how I should be protecting my own server, since I am managing a cryptocurrency one

#

especially prone to scammers

stark prawn
#

use publicly available bots

steep stirrup
#

rn using Wick

#

but it doesn't do much lol

#

ig carl too

stark prawn
#

add a honeypot bot perhaps

steep stirrup
#

oo, will check that out!

#

ty

small coral
#

god i miss discord highlighting

#

months of a colorless mobile world (of codeblocks) really takes a toll on the soul

twin pollen
#

@worldly ice You inspired my most popular toot ever!

twin pollen
worldly ice
#

let me know when you will be sending over the royalties πŸ˜‰

twin pollen
#

You didn't get the check for 10%?

worldly ice
#

did you send it by snailmail?

twin pollen
#

I DMed it to you.

worldly ice
#

ah see that's the problem, I only accept snailmail.

vale raven
twin pollen
#

That's OK. It was for $0.00 so you didn't miss much.

twin pollen
vale raven
#

_you’re not getting me to repeat your vulgarity _

twin pollen
#

Cicada?

worldly ice
#

||I think they are referring to "toot"||

twin pollen
#

Anybody watch For All Mankind?

#

||It feels like this season is based on Heinlein's The Moon is a Harsh Mistress||

shell raptor
#

I think you can even do auto x instead of typeof(hi) x

#

since C23 changed the meaning of auto

lusty basin
twin pollen
lusty basin
twin pollen
#

Bugs?

#

Cicadas?

lusty basin
#
ssize_t sized_strscpy(char *, const char *, size_t);

/*
 * The 2 argument style can only be used when dst is an array with a
 * known size.
 */
#define __strscpy0(dst, src, ...)    \
    sized_strscpy(dst, src, sizeof(dst) + __must_be_array(dst) +    \
                __must_be_cstr(dst) + __must_be_cstr(src))
#define __strscpy1(dst, src, size)    \
    sized_strscpy(dst, src, size + __must_be_cstr(dst) + __must_be_cstr(src))

#define __strscpy_pad0(dst, src, ...)    \
    sized_strscpy_pad(dst, src, sizeof(dst) + __must_be_array(dst) +    \
                    __must_be_cstr(dst) + __must_be_cstr(src))
#define __strscpy_pad1(dst, src, size)    \
    sized_strscpy_pad(dst, src, size + __must_be_cstr(dst) + __must_be_cstr(src))

/**
 * strscpy - Copy a C-string into a sized buffer
 * @dst: Where to copy the string to
 * @src: Where to copy the string from
 * @...: Size of destination buffer (optional)
 *
 * Copy the source string @src, or as much of it as fits, into the
 * destination @dst buffer. The behavior is undefined if the string
 * buffers overlap. The destination @dst buffer is always NUL terminated,
 * unless it's zero-sized.
 *
 * The size argument @... is only required when @dst is not an array, or
 * when the copy needs to be smaller than sizeof(@dst).
 *
 * Preferred to strncpy() since it always returns a valid string, and
 * doesn't unnecessarily force the tail of the destination buffer to be
 * zero padded. If padding is desired please use strscpy_pad().
 *
 * Returns the number of characters copied in @dst (not including the
 * trailing %NUL) or -E2BIG if @size is 0 or the copy from @src was
 * truncated.
 */
#define strscpy(dst, src, ...)    \
    CONCATENATE(__strscpy, COUNT_ARGS(__VA_ARGS__))(dst, src, __VA_ARGS__)
twin pollen
#

That's not overloading.

lusty basin
#

i know

#

for me its close to that

twin pollen
#

You could use that same idea though here.

worldly ice
#

hey guys, what time do adults go to sleep

#

cuz I haven't figured out that and I'm already 23

#

10pm?

lament cairn
#

for me at least 8 hours before the time I want to get up

worldly ice
#

8 hours before never, how does that work?

dire iris
thick osprey
dire iris
#

I think the best way of sleeping is how you body feels

dire iris
minor ferry
minor ferry
#

I can't sleep for that long unless, I am eating 2.6k Calories and walking for about 22k steps a day

faint pike
#

advice

#

sleep on your back with pillow belo your knee and feet

dire iris
#

what I meant is that you don't need to sleep for 8 hours if your body can rest with 7 hours of sleep

#

and if you're fine with getting up at 6 am, why changing it?

faint pike
#

spine turns inwards

#

weak back

#

hernia risk increases

#

legs have increased chances of developing knocked knees

#

destroys posture

#

causes hairloss

#

weak abs

dire iris
#

oh

faint pike
#

etc etc etc

#

also causes face wrinkles

dire iris
#

so maybe my advice is good only for me ahahaha

faint pike
#

when health is

#

well

dire iris
#

what?

faint pike
#

nvm

#

i misread

#

what you said

dire iris
#

yep

faint pike
#

honestly the best sleeping position

#

would be on a bed that like

#

rotates you on all axes

#

throughout the night

#

strap in it and go to sleep

smoky hearth
#

@faint pike you sound like being proficient in posture

what do you think about a chair with a spine cutout

faint pike
#

just

#

no chairs

#

instead

#

have a this

#

now guys

#

i know what im saying is

#

different

#

but

#

you must have an open perspective

uneven veldt
#

Hello sir @soft violet

harsh tundra
# faint pike

Smh just mount a screen to the ceiling
You'd need at least two mirrors otherwise

faint pike
#

i meant

#

screen leakage

#

also

#

lets see paul allens idea now

harsh tundra
#

Then just use wall mount and tilt the screen 90Β° down smh

faint pike
#

not earthquake proof

#

bad vents

stark prawn
faint pike
#

yeah we live on a bubble actually

#

gasp

#

the ai bubble was already foretold

harsh tundra
#

Okay, so instead of moving the screen to a mount, let's just move the bed - vertical bed. Sounds good

stark prawn
#

And strap yourself to the bed so you don't fall out, win win

dapper dew
#

Or get a projector

faint pike
#

this is a bad outcome

#

for the

#

mechanical side of your spine

#

you know what

#

how about we just suspend ourselves in nutrient fluid

#

forever

smoky hearth
hidden raptor
faint pike
#

msd

vernal fjord
#

anyone know how what vscode extention makdes the html {% %} ligfht up yellow:

#

mine deosnt do it:

willow narwhal
vernal fjord
#

thanks!!

swift portal
#

I am probably overthinking this but which is better? a minus sign or a column?

  • feature - blah blah

  • feature: blah blah

I been thinking for 20 minutes straight about which one I should go with for my github readmes thinking~1

#

rip nitro

twin pollen
#

Whichever one you prefer.

#

(Yes :- You're overthinking it.)

native kindle
#

":-" is evil though

swift portal
#

lmao

twin pollen
swift portal
#

minus = tails, column = heads

twin pollen
#

Roll a coin???

#

Do you mean roll a D2?

#

Or flip a coin?

swift portal
#

qtqyciqnoamovtradf

twin pollen
#

Gesundheit.

surreal otter
twin pollen
surreal otter
surreal otter
#

I've never seen one without an edge.

swift portal
swift portal
swift portal
#

gn

twin pollen
twin pollen
swift portal
twin pollen
turbid oyster
#

aka the ridges