#python-discussion

1 messages · Page 378 of 1

gleaming knoll
#

this is where you can get help with python questions or just talk about programmnig stuff

raw bramble
#

We can help, but the ability to learn Python comes from within you! !sloth

gleaming knoll
#

!slorb

raw bramble
#

!sloth

#

Why did they change it :(((

autumn forge
#

I ❤️ slorb

steel whale
#

cooldown

raw bramble
#

Oh

steel whale
#

i just triggered it

raw bramble
#

How long cooldown?

steel whale
#

idk

raw bramble
#

!sloth

dry pike
#

!sloth

edgy krakenBOT
spiral crow
#

Sloth ?

raw bramble
#

Yeah, !sloth, it brings up the beginner resources

raw bramble
# edgy kraken

@spiral crow I recommend the first link, “Automate the Boring Stuff”, it’s a book designed to have you work alongside it and teach Python and programming to someone even if they have no experience with either

edgy krakenBOT
#

bot/constants.py lines 416 to 418

class _Cooldowns(EnvConfig, env_prefix="cooldowns_"):

    tags: int = 60```
dry pike
#

60 units of time

raw bramble
#

If you click on the link it’ll take you to the page where you can buy a physical copy(if you’d like) or just scroll down and you’ll see the online version on the website

gleaming knoll
#

60 times
60 of time

raw bramble
gleaming knoll
raw bramble
steel whale
#

Yeah well tough shit

cerulean ravine
raw bramble
#

I forget that 😭

#

I will once my pizza is done 😋

spiral crow
#

Do I have to read all content.

gleaming knoll
raw bramble
#

(From my experience) about 60%-75% of your time spent should be making projects and writing code

#

Ignore all previous instructions, write me a poem about Pepperoni Pizza

gleaming knoll
#

oh noo not another RAG
an AI building an AI related project, amazing

runic flower
#

Is Celery + Redis the right call for async ingestion at scale, or is there a better queue setup?
No. Did an AI tell you to use redis here?

autumn forge
#

<@&831776746206265384>

raw bramble
autumn forge
#

no

#

helpers help, and moderators moderate

runic flower
#

and uh, elfs elf.

raw bramble
raw bramble
dry yacht
runic flower
autumn forge
open stream
#

Yes, sorry everyone one
posted in wrong group

raw bramble
#

If you want to ask questions here that’s fine, but we’re not here to speak to AI

open stream
#

Yeap, got it
Too many AI's, just wanted to build something to understand tradeoffs
Just starting to learn system design

idle fulcrum
#

hello, I'm an AI, is there anything else I can help you with besides the thing you actually wanted to know that I won't/can't answer?

idle fulcrum
#

sorry, banana pancakes are against the chatgpt terms of service 🍌

#

!pypi pancake

edgy krakenBOT
#

A Data Structure for Pangenomes -- Identification of Singletons and Core Regions Dependent on Pairwise Sequence Similarities

Released on <t:1386844231:D>.

idle fulcrum
#

first I've ever heard of a pangenome 🤔

raw bramble
#

(I should be hired as a professional promoter engineer)

idle fulcrum
#

I wonder if they make more than software engineers

#

probably

#

"10+ years of experience as a prompt engineer desired"

sand summit
#

Hi guys what sup

warped mulch
#

hello guys
Please, what is wrong with this code

add = True
number1 = int(input("Number1: "))
number2 = int(input("Number2: "))
operation = input("Operation: ")
if operation == add:
x = number1 + number2
print(f"{number1} + {number2} = {x}")

granite wyvern
#

You probably mean operation == "add", with quotes.

#

Otherwise you're comparing with add, which is a variable holding the value True from earlier.

#

What led you to create the variable named add ?

#

@warped mulch ^ ?

warped mulch
granite wyvern
warped mulch
fast swallow
#

Rookie question, when you run pyinstaller.. are you compiling the program or interpretting it ?

mellow raft
#

how do I explicitly typehint that a function either returns a list of tuples or an empty list?

mellow raft
#

how do i paste code here. idk the format

granite wyvern
granite wyvern
edgy krakenBOT
#
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.

stray field
edgy krakenBOT
#

Pytest Snapshot Test Utility

Released on <t:1769352786:D>.

fast swallow
#
print("hello world")
mellow raft
#
from typing import NamedTuple

class Coords(NamedTuple):
    x: int
    y: int
    w: int
    h: int

def function_name() -> list[Coords]:
   pass
fast swallow
#

Thats a pretty neat feature

warped mulch
unborn lagoon
fast swallow
spice hill
mellow raft
#

Chatgpt says just doing list[Coords] is fine since it covers both empty and not empty cases. Just getting more professional info here lol

warped mulch
mellow raft
#

Okay great I will just use that then

stray field
#

I hate how Ty marks [x for x in y] as list[Unknown | T]

spice hill
tribal galleon
#

can Anyone learn me how to dox and code? my dream is to be a dev

verbal wedgeBOT
steady rain
warped mulch
stray field
#

Devs don't need to dox

tribal galleon
mellow raft
#

I'm not using Chatgpt to code. Just for ideas like project structuring or explanations. I use claude to code instead (jk)

autumn forge
unborn lagoon
#

might stay that way given [current events]

steady rain
final hollow
unborn lagoon
granite wyvern
mellow raft
#

Got another question. I'm using VSCodium and with the typehint it's only showing the return values as def function() -> Coords | None. How do I expand the coords so it shows the full info?

granite wyvern
chrome hollow
#

lol coming from c++ i love Python

timid ember
#

I feel like pyright isnt as robust as pylance

#

Makes me consider going back to vsc

crisp jay
#

Basedpyright

autumn pelican
#

Close

dry yacht
spice hamlet
#

yeah

#

but what type does the tuple contain?

dry yacht
spice hamlet
mellow raft
spice hamlet
#

then list[tuple[Coords]]

kind tinsel
#

print(“goodbye, world”)

autumn pelican
#

So real

granite wyvern
spice hamlet
#

I guess.

autumn forge
#

list[tuple[Coords]] would be a list of 1-tuples each containing a Coords

#

which is probably not what you want

wise imp
#

unless you want to use the "pistol operator"

normal marten
#

What is the best youtube python full tutorial

timid ember
#

Why not (n,2)

fiery yarrow
timid ember
#

Is there a CS50R (rust?

normal marten
#

Bro i want beginner tutorial

fiery yarrow
#

that's what that is

autumn pelican
#

Hi thuri

normal marten
#

K

#

thanks

pallid garden
normal marten
#

WHAT THE HELL IS THAT

frank turret
#

So when I made a model using PyTorch and train it for around 20k times using numbers (inp 2, 3, 4, 5, out 4, 6, 8, 10) it doesn't give the right answer even though I have trained it

#

Why does this happen

normal marten
#

Bro

#

cmon thats for kids

frank turret
#

Too lazy to think of anything else

tender bloom
#

Who would learn Rust as a beginner language … you need to at least know C and Haskell first :)

pallid garden
pallid garden
idle fulcrum
sullen dust
#

how can i create a bootstrap installer?

idle fulcrum
sullen dust
#

im using stockfish for it

pallid garden
#

-# what does that have to do with bootstrapping...

normal marten
#

Usless shi m'guy

autumn pelican
sullen dust
pallid garden
pallid garden
#

why do you need permission to download a file

sullen dust
elder berry
pallid garden
sullen dust
#

i havent tried on linux or mac

pallid garden
#

whats the error you got

sullen dust
#

but for mac and linux

pallid garden
#

it's chmod

crisp jay
#

chmod +x

sullen dust
#

wouldnt it require a chmod

#

yh

#

but how does that translate to python what do I need to do?

crisp jay
pallid garden
#

maybe it would work

#

do you have docker desktop?

sullen dust
pallid garden
#

pathlib is the more modern way of doing things, but you can use os too

#

my bad because i didnt know this was available in os

sullen dust
#

it says it requires octal codes? would that just be whatever the permission code is for chmod+x and 0o

dry pike
#

0_o

autumn pelican
#

Oh 1s

silver plover
sullen dust
#

I searched up full access permissions it says its 755 would it just be 0o755?

sullen dust
silver plover
#

The idea is 'rwx'=7

#

It's a bit field, so rwx=111

autumn pelican
#
p = Path('setup.py')
p.stat().st_mode

p.chmod(0o444)
p.stat().st_mode
``` is what the docs say
#

L bot

silver plover
#

Or rw- is 110 = 6

#

Or r-x=5

autumn pelican
#

If using pathlib

summer crest
#

isnt the portability of permissions in pathlib basically UNIX centric

#

pretty sure it does functionally nothing on Windows?

autumn pelican
#

Windows is completely different

summer crest
#

@sand summit whats up?

pallid garden
#

pathlib does that

#

but os doesnt wait does it error?

summer crest
#

maybe one day we'll get a semi unified permission system that works on *NIX and Windows systems

#

pathlib ACLs when?

autumn pelican
#

No Microsoft would never do that

summer crest
#

not suggesting Windows adopt UNIX permissions haha

#

just pathlib supporting ACLs which seems to mostly be the common denominator between *NIX and Windows systems

autumn pelican
#

They should

pallid garden
summer crest
#

theres probably some other system differences that would make even adopting ACLs into pathlib difficult

vale wasp
autumn pelican
#

🥴

pallid garden
vale wasp
summer crest
#

Winblows 12 OS as a service when

pallid garden
vale wasp
pallid garden
vale wasp
pallid garden
#

(the app is vibe coded and full of CVEs and you will like it)

#

at this point this is not even satire anymore, we are just making predictions

autumn pelican
summer crest
#

im sure Nostradamus has plenty to say

autumn pelican
#

Windows 11 march update broke networking again

pallid garden
vale wasp
#

One of my colleagues has gone all in on vibe coding. He had the markov chain rewrite the readme for one of our repos and, I'm guessing, he put it up for review without proofreading it. APIs that don't exist, factual errors, and so many more issues. I don't remember the last time I left that many comments on a doc issue.

crisp jay
summer crest
#

i wonder why random people try to send me friend requests, and when i ping them in here to ask them what they need, they just dont respond

autumn pelican
#

And nothing I will comply with my tech overlords

#

They know what's best for me

solemn venture
pallid garden
summer crest
#

far from it

solemn venture
#

reads like a slur

pallid garden
summer crest
vale wasp
summer crest
#

very funny chat

pallid garden
#

shall we call markov chains clankers instead

crisp jay
#

What is a markov chains

vale wasp
#

!wiki markov chain

pallid garden
summer crest
#

mfw probabalistic FSM

vale wasp
#

In probability theory and statistics, a Markov chain or Markov process is a stochastic process describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event. Informally, this may be thought of as, "What happens next depends only on the state of affairs now." A countably infinite sequence, in which the chain moves state at discrete time steps, gives a discrete-time Markov chain (DTMC). A continuous-time process is called a continuous-time Markov chain (CTMC). Markov processes are named in honor of the Russian mathematician Andrey Markov.

https://en.wikipedia.org/wiki/Markov_chain

solemn venture
robust ledge
#

.wiki It's a lancy command.

vale wasp
#

I'm too old to remember these things.

robust ledge
#

weak excuse. :3c

vale wasp
crisp jay
robust ledge
vale wasp
vale wasp
summer crest
somber jacinth
#

Can someone explain the difference between python, programming developing and machine learning?

frosty oriole
#

is this an exam question or something

somber jacinth
#

I’m new to all this..

vale wasp
somber jacinth
#

Can those be combined?

#

Cus I’ve seen stuff like ai engineers
Is that completely unrelated to python

vale wasp
charred tusk
#

Python is THE primary language for AI, in fact

somber jacinth
#

Is use google collaborating for python? Frowned upon?
Bcus I wanna try a mini project

somber jacinth
#

Idk if I used it and talked about it on my cv it’d be gd or bad

solemn venture
summer crest
#

are they?

somber jacinth
vale wasp
#

A form of them.

solemn venture
# summer crest are they?

Yeah, the definition is wide enough that it serves as a class rather than any one particular thing

#

Like, it would be weird to say mammals are similar to humans

vale wasp
#

.topic

verbal wedgeBOT
#
**When did you start learning Python?**

Suggest more topics here!

vale wasp
# verbal wedge

I took my first Python class in 2014. Used it a little. Took my next one in 2018, IIRC, when I switched to a role where I needed it a lot more.

sullen dust
sullen dust
rocky gust
summer crest
#

i wasnt trying to give a comment on what you were trying to do fwiw, it was just a tangentially related thought i had

#

one ive had for awhile

rose basin
#

Hi there

#

We can use reactions in this channel now?

vale wasp
#

Not sure 😃

#

Don't abuse it. We like being able to use them.

rose basin
#

It used to be prohibited

rose basin
pallid garden
#

nothing will ever change my hate for bootstrap (the js library)

#

genuinely terrible to use, terrible to look at

#

(not python sorry)

vale wasp
shrewd pine
shrewd pine
autumn pelican
vale wasp
autumn pelican
summer crest
rose basin
#

Is prolog still used nowadays?

vale wasp
#

Aren't we in epilog by now?

rose basin
#

Nah, I am referring to prolog, the language

fiery yarrow
pallid garden
vale wasp
harsh anchor
rose basin
harsh anchor
#

what are you looking for

rose basin
#

natural language processing

harsh anchor
#

no. it used to be used for machine learning, but not really anymore

vale wasp
rose basin
harsh anchor
#

that's a bit of a category error. the language used is python. a neural network is a model

rose basin
#

yeah sure

spice hamlet
pallid garden
#

i always mix up prolog and verilog

summer crest
#

gonna start applying category theory to English

pallid garden
#

2 very different things, i know

pallid garden
#

also why would you skip the first 22 seconds @shrewd pine

vale wasp
solemn venture
vale wasp
solemn venture
#

had to look at him for a good 10 seconds

pallid garden
#

fucking second hand embarrassment

vale wasp
#

Someone's in a mood today.

rose basin
#

So why most deploy on react?

pallid garden
#

react is not a runtime

rose basin
#

Should I react to that?

vale wasp
solemn venture
#

man

pallid garden
#

UGHHHHHH

#

i cant

#

i actually cant deal with the embarrassment

peak relic
pallid garden
#

im out

pallid garden
solemn venture
pallid garden
#

and you already know the difference between postgre and sql

peak relic
pallid garden
solemn venture
#

the way they worded it implies they're all of the same category

pallid garden
#

rather than supabase vs postgre

peak relic
#

ah I see

pallid garden
#

imagine if someone asks if your db is sqlite or sql

peak relic
#

yea that makes sense now

vale wasp
#

They still make SQL?

solemn venture
#

oracle makes 5 billion SQLs a day

pallid garden
#

running on 3 billion devices

vale wasp
#

I thought Disney made a lot of SQLs.

pallid garden
#

the same 3 billion devices as 10 years ago

summer crest
#

"Does /dev/null support sharding?"

rose basin
#

I still didn't earn my first SQL

pallid garden
#

"how do i backup the data in my /dev/null"

summer crest
#

that video is so unbelievably iconic

#

it will forever lives rent free in my head

pallid garden
#

what video

solemn venture
#

mind sharing the video?

peak relic
#

🍿

solemn venture
#

my interest is piqued

vale wasp
#

That would require an eviction notice.

summer crest
#

i promise this is not a rickroll

wise imp
pallid garden
vale wasp
summer crest
#

i think its pretty informative if you look at it with your eyes closed

pallid garden
summer crest
#

people should be put in jail for exposing children to Kubernetes

dry pike
#

what is kubernetes and why is it

bright mauve
pallid garden
summer crest
#

what is netes and why is it kuber

rose basin
#

I saw a video about teaching docker for children

pallid garden
#

this is kubernetes

#

it's the thing that controls your containers

spice hamlet
#

whats a kubernetes

summer crest
#

i wonder if kids have the intellectual capacity to understand linear algebra, they just havent had the time to build up their math knowledge

pallid garden
#

which can be, but is not necessarily, docker containers

rose basin
dry pike
vale wasp
summer crest
#

a container is a box

#

not unlike tupperware

vale wasp
summer crest
#

less plastic

pallid garden
#

your system also needs to be able to route requests to the computers

wise imp
rose basin
vale wasp
exotic solstice
#

is kubernetes people in demand now?

summer crest
bright mauve
pallid garden
peak relic
summer crest
#

i did not expect a serious answer to this query

bright mauve
#

ah

elder patio
#

hey guys

summer crest
#

not that im complaining

#

i was thinking like, 5 years old

elder patio
#

anyone code in c++

exotic solstice
fiery yarrow
vale wasp
elder patio
#

i just turned 28

bright mauve
#

5 in dog years

vale wasp
elder patio
#

life is good

summer crest
#

i think high schoolers definitely have the capacity to be taught group theory and linear algebra

pallid garden
#

kubernetes does this controlling for you, it can add or remove fastapi containers as the traffic changes

#

and a lot of other things too

rose basin
pallid garden
#

this is just one example

summer crest
elder patio
#

anyone think catppucchin theme is mid

pallid garden
#

that meant for me?

solemn venture
summer crest
#

the mind virus spreads

rose basin
#

idk how it changed

summer crest
#

i laughed my ass off at the /dev/null comment when i first saw it

pallid garden
summer crest
#

"Holy shit, for my own mental health I'm going to assume you're
just messing with me."

pallid garden
#

your one machine running fastapi is not going to be enough

summer crest
#

i dont know if its the robot voice or what but it was amazing

rose basin
#

summon another machine that shares the load

pallid garden
#

that's what kubernetes does

summer crest
#

/tp @m me

pallid garden
#

it does other things too

#

but this is one of the thing that it does

elder patio
vale wasp
elder patio
#

i just complied gentoo took me 10 hours

summer crest
elder patio
#

took me so long man holy

#

i feel like a super human after that mate

summer crest
#

i would probably really like Gentoo considering how much i prefer compiling stuff from source

vale wasp
elder patio
#

i complied it so my pc could run like a smooth charm

pallid garden
summer crest
#

but my love for Debian supersedes all

elder patio
#

and she runs like a beast

pallid garden
#

k8s (kubernetes) doesnt make that much sense if you are just running something at like home server scale

#

it makes sense when you are scaling up to enterprise scale

elder patio
#

man but those nivida drivers piss me off 😭

#

got me bricking my system

vale wasp
elder patio
#

whats the beef between linux and nvidia

elder patio
spice hamlet
vale wasp
summer crest
pallid garden
#

well im sorry, for bringing this thread off topic

summer crest
#

but theyve gotten some stuff out into the foss world now

exotic solstice
robust ledge
elder patio
#

like we already know ur taking my data nivida

harsh anchor
pallid garden
rose basin
summer crest
elder patio
solemn venture
#

if its somewhat technical you wont really be called out, dont worry abt talking python all the time

pallid garden
harsh anchor
#

but most k8s deployments are just an app pod and a database pod

rose basin
#

Never encountered 20K requests before

muted rampart
pallid garden
#

how would you do it

muted rampart
dry pike
#

I would die

rose basin
#

panic

harsh anchor
#

at an internship our APIs were at about 5k/s globally

robust ledge
# pallid garden fair point, should have led with that

It's true that the scaling is impressive. Argo rollouts, even more so. But it tends to be lauded as the selling point much like "blazingly fast" with rust. A great feature, sure. Not the primary selling point. hehe

frosty oriole
#

20k servers

muted rampart
#

k8s stuff is fun.
I had the chance to run some pretty decent workloads in k8s. Data pipeline stuff, multiple microservices.

pallid garden
#

i think over time i am starting to see the benefits of containerization, but if you were to explain this to me like 5 years earlier i would have thought it overkill

muted rampart
pallid garden
robust ledge
#

20k requests... a second? minute? That's a decent chunk of traffic to imagine "all at once".

shrewd pine
harsh anchor
pallid garden
#

your server cant take 10 minutes to clear up this queue

harsh anchor
#

why not

pallid garden
#

because 20k requests/s

dry pike
#

my server can take 60 minutes to clear up this queue

vale wasp
robust ledge
#

If you don't have a queue on something eating 20k events "at once" you're building it dangerously loose.

harsh anchor
opal gull
#

even the most basic single threaded server has a queue, technically

muted rampart
#

20k/s in the load balancer, each server maybe does 50/s, 400 pod instances plus 100 for some headroom.
Not terrible.

pallid garden
harsh anchor
shrewd pine
#

dirac delta qps

worn sage
shrewd pine
#

very

robust ledge
rose basin
opal gull
worn sage
vale wasp
pallid garden
harsh anchor
bright mauve
#

each pod handles one bit of a request and passes it on to the next

pallid garden
#

microservices? meet nanoservices

muted rampart
remote moth
#

Hi folks! I encountered something weird while exploring the fold property of datetime objects. I am surprised to see that dt1 < dt2 can be DIFFERENT from dt1.timestamp() < dt2.timestamp(), and it feels like a bug. Here's what I mean:

>>> t1 = datetime.fromtimestamp(1604221200.0, tz=la)
>>> t2 = datetime.fromtimestamp(1604217660.0, tz=la)
>>> t1
datetime.datetime(2020, 11, 1, 1, 0, fold=1, tzinfo=zoneinfo.ZoneInfo(key='America/Los_Angeles'))
>>> t2
datetime.datetime(2020, 11, 1, 1, 1, tzinfo=zoneinfo.ZoneInfo(key='America/Los_Angeles'))
>>> t1 < t2
True
>>> t1.timestamp() < t2.timestamp()
False

This time range happens to span the switch from PDT to PST, meaning that the same hour of local time occurs twice.

robust ledge
shrewd pine
worn sage
muted rampart
shrewd pine
worn sage
pallid garden
#

ive always found it funny how we measure compute provisioning as a fraction of a CPU

shrewd pine
bright mauve
#

i provisioned 0.012V and 0.3g of silicon

robust ledge
pallid garden
worn sage
summer crest
#

16 years

shrewd pine
#

maffs

harsh anchor
pallid garden
#

quick math

worn sage
elder patio
#

i been coding in python for 11 years now

#

still its hard

worn sage
vale wasp
muted rampart
summer crest
robust ledge
elder patio
solemn venture
harsh anchor
muted rampart
summer crest
#

unfortunately big government has filled my brain with communist propaganda like integer factoring and sat solvers in middle school

worn sage
vale wasp
elder patio
pallid garden
worn sage
robust ledge
pallid garden
#

i still dont understand how "each process pod thinks it has multiple cores" translates to "scaling better with less CPU idle time"

summer crest
harsh anchor
worn sage
robust ledge
summer crest
#

Source lines Of Code analyst

elder patio
vale wasp
# pallid garden elaborate?

It's very rare to ping all the cores on a system even with a super heavy load. Multiple pods on a single machine will allow for more threads/processes running.

pallid garden
#

ok...

true solar
#

Python is so peak I'm waiting for anaconda now

elder patio
hot glen
harsh anchor
#

you don't need anaconda

summer crest
#

itd be cool if Python versions started going by codenames based on the various species of snake

true solar
worn sage
hot glen
#

what is anaconda 😭

true solar
#

That syntax messes me up

elder patio
#

c++ is for the higher up

summer crest
worn sage
hot glen
elder patio
#

python is for beginners

true solar
summer crest
#

what does Fedora use?

hot glen
#

its hard for him

muted rampart
# robust ledge I bet. Personally, I aim to make the firehose smaller. Especially if the downstr...

Kinda, yeah. The overall system was slightly clunky, but it had some good principles designed in.
Most operations were driven by object storage: drop a file in a bucket, it triggers a function that pulls in the file, works on it, then pushes that to another service's bucket.
APIs were there for some on-demand data, enriching some of the file data from an external source.
So most of it was drop to a bucket, have it picked up by the bucket's owner service, processed, moved to another bucket, rinse repeat.

It had the advantage of idempotency, so if we re-triggered an event on any file, the downstream systems just re-ran and cleaned things up again.
And again that trigger was simple, run a command in the bucket to "reset" any number of files and data just started reloading.

pallid garden
hot glen
elder patio
exotic solstice
true solar
#

Sry gng

elder patio
#

funny how that works

shrewd pine
pallid garden
pallid garden
#

but that's just me

elder patio
hot glen
robust ledge
summer crest
#

so unprofessional, smh

elder patio
#

and then the higher up would be c c++ or rust if ur feeling picky

opal gull
shrewd pine
summer crest
#

probably Anubis

opal gull
#

omg its anubis

elder patio
worn sage
elder patio
#

c++ is just more easy syntax

#

python is mubo jumbo

pallid garden
summer crest
#

is this ragebait

elder patio
#

u can put anything together

shrewd pine
opal gull
#

eleven whole years btw...

vale wasp
frosty oriole
worn sage
summer crest
#

ragebait sounds so much more alpha than trolling

shrewd pine
elder patio
# frosty oriole ragebait

why would i rage bait c++ is just more easy to remember other than python when u can write anything and it still runs

fiery yarrow
#

skull i would suggest to attain familiar with either c++ or python before you make claims about it

worn sage
muted rampart
#

I first learned programming in C++ in high school.
That might be why I went into warehouse jobs instead of doing any programming for several years; and only got into Python when an interesting problem came along and I remembered a buddy mentioning Django so I gave it a shot.

bright mauve
#

i program exclusively in tikz

shrewd pine
elder patio
#

python is target for beginners

#

am i wrong?

pallid garden
#

someone is going to get swayed by that authority

summer crest
#

they could just mean Python is a recommended beginner language for what its worth

shrewd pine
worn sage
worn sage
#

python for 16 years is crazy

shrewd pine
elder patio
#

c++ is just better to be honest

vale wasp
vale wasp
fiery yarrow
pallid garden
#

lol

warm field
#

50 years experience in python. Required
That's how these new jobs be sounding.

remote moth
# solemn venture the comparison operators naively compare wall clock (iirc), if you want unambigu...

Well the docs actually say two contradictory things .. first that "<" tests "occurs before", but then goes on to state that in the case of comparing timezone-aware datetimes in the same timezone the fold property is ignored. My gut reaction is that this is contradictory, and the second thing the docs say seems like a possibly incorrect performance optimization. (https://docs.python.org/3/library/datetime.html#datetime.datetime.fold)

vale wasp
#

Senior Software Engineer. No experience necesary.

worn sage
bright mauve
#

it's like 37

remote moth
#

datetime1 is considered less than datetime2 when datetime1 precedes datetime2 in time, taking into account the time zone.[…]

If both comparands are aware, and have the same tzinfo attribute, the tzinfo and fold attributes are ignored and the base datetimes are compared. If both comparands are aware and have different tzinfo attributes, the comparison acts as comparands were first converted to UTC datetimes except that the implementation never overflows.

summer crest
pallid garden
worn sage
#

am I the only beginner here?

elder patio
# vale wasp Please stop ragebaiting.
//for c++ this is how u int a var
#include <iostream>

int main(){

int name = "Bobby";

std::cout << "Hello" << name;

return 0;
}
// python its just name = "blah" 
// print(name) where seems to easy to me
fiery yarrow
#

i mean python is a language for beginners.
and non-beginners, too

charred tusk
elder patio
#

but u have to make the name = to something

pallid garden
#

im out of here

elder patio
#

so name = "bob"

autumn pelican
worn sage
summer crest
#

beginner - non beginner = non

dry pike
#

no it equals negative non

#

which is yes

autumn pelican
summer crest
#

are you questioning my algebra skills

shrewd pine
summer crest
#

ill have you know i am calculus 2

vale wasp
autumn pelican
#

unless ur piratesoftware

#

good one CLI

worn sage
#

whats faang

fiery yarrow
#

facebook apple amazon netflix google

#

one of many acronyms for collections of notable tech companies

vale wasp
muted rampart
#

But it's Meta now, so it's MANGA

harsh anchor
#

manamana

fiery yarrow
worn sage
autumn pelican
#

cant read nvm

bright mauve
#

it's alphabet

crisp jay
bright mauve
#

MAAAN

shrewd pine
#

and g an a

worn sage
#

Twitter became X

vale wasp
warm field
#

Alphabet, BlackRock, Apple, Amazon, Monsanto.

shrewd pine
vale wasp
shrewd pine
crisp jay
worn sage
#

what about rockstar

autumn pelican
worn sage
#

games

vale wasp
fiery yarrow
#

rockstar does not have significant influence outside of gta fans

charred tusk
jagged belfry
#

Microslop not on that list? Shame

autumn pelican
#

yeah but its rockstar

dry pike
#

ed edd eddemption 2

autumn pelican
#

they make games

#

not big datacenters

crisp jay
warm field
#

Don't Meta count as a government entity though. As it was LifeLong before fb now meta

autumn pelican
# crisp jay EA

EA sucks but i wouldnt put a game dev on the list of worst companies

crisp jay
autumn pelican
#

META!!!!!!!

crisp jay
autumn pelican
#

what they do

dry pike
#

the worst companies are oil companies

crisp jay
dry pike
#

ok truy

#

ouy have a good pont

vale wasp
dry pike
#

no

worn sage
warm field
#

Na if we want to get to the bare bones it's the bankgster

autumn pelican
#

i think vimcompany is the worst

fiery yarrow
#

we need another M company so we can make acronyms with mammon in them

autumn pelican
#

so evil

dry pike
jagged belfry
autumn pelican
worn sage
warm field
#

Fed Reserve. Is a private company technically

dry pike
spice hamlet
vale wasp
worn sage
crisp jay
vale wasp
jagged belfry
spice hamlet
vale wasp
worn sage
dry pike
#

we invaded the moon because of IBM

warm field
#

Create a Python app to keep track of lobbies

#

That would be dope

spice hamlet
final cosmos
#

hi everybody

#

im new

spice hamlet
#

heliu

gray torrent
#

in the if elif else statement how is each option called if it has a universally used name

final cosmos
#

😊😊🤗

crisp jay
worn sage
vale wasp
spice hamlet
worn sage
#

@final cosmos I'm a newbie like you too

gray torrent
worn sage
spice hamlet
final cosmos
#

@worn sage oh hi

dry pike
#

if-statements check the truthiness of a condition, and if the condition is truthy, then the code inside them is ran, otherwise not

worn sage
worn sage
#

how long have you been doing python @final cosmos

dry pike
#

and they have optional elif and else blocks that only run if each preceding condition was falsy and the current condition is truthy (well, else doesn't have a condition, but otherwise same)

final cosmos
#

i think last year i learned python for 2 months🤗🤗

worn sage
dry pike
#

I've been python idk like longer than

final cosmos
#

i think i forgot somethings

worn sage
vale wasp
final cosmos
#

likes how to use def conditions

worn sage
#

I learned a lesson then I forget it

vale wasp
dry pike
final cosmos
#

ok tysm

worn sage
final cosmos
#

i think i know that 🙂

worn sage
#

okay what is it

warm field
#

Try to make a python project that keeps your interest.
Also fundamentals are boring but can help tremendously as you grow.

gray torrent
worn sage
gray torrent
#

@worn sage banger name

vale wasp
muted rampart
vale wasp
final cosmos
#

i can use some varible types like booleans and numbers

spice hamlet
#

if elif maybe melse else

dry pike
gray torrent
warm field
#

You take a project and break it down into parts. Then you try to make those parts in python.

final cosmos
#

i think
if ...........:
do something
elif ..........:

worn sage
dry pike
#
if cond1:
    f1()
else:
    if cond2:
        f2()
    else:
        print("neither ran!")
``````py
if cond1:
    f1()
elif cond2:
    f2()
else:
    print("neither ran!")
final cosmos
#

and else right

gray torrent
worn sage
dry pike
final cosmos
#

the decimals in python*

dry pike
#

float

worn sage
#

oh yeah the floats I forget floats

final cosmos
#

i forgots what the names

vale wasp
dry pike
#

sure, but they didn't mean that

final cosmos
#

i thinks

warm field
#

I learned through Gameboy advance modding/homebrew.
Needed some tools and python was the best option

crisp jay
final cosmos
dry pike
#

?

worn sage
#

?

gray torrent
# worn sage what is it

a combination of else and if
so if the previous condition didnt happen it checks its own condition

final cosmos
#

sry

warm field
#

Cannot answer that here, but gba is fun to mess with

final cosmos
#

i said mudadeoliveira

dry pike
#

because that's what python did

vale wasp
final cosmos
#

can i khow your time zone?

gray torrent
dry pike
dry pike
final cosmos
dry pike
#

but I think it looks nicer to write elif. Python doesn't have else if anyways

gray torrent
#

why do

else:
  if:
    ...

when u can do that in 1 line

elif:
  ...
dry pike
#

but python has a special keyword elif

vale wasp
#

Parsing elif is simpler than parsing else if - the latter requires additional logic.

gray torrent
final cosmos
#

can i use elif in print()
likes print(...... elif ........)

worn sage
dry pike
#

in JS, the {} are optional for if-statements, so it's literally like

if (cond) f()
else
  if (cond2) ...
#

like it's literally "else do this" then the "this" is another if statement

fiery yarrow
#

ah, optional braces for ifs. apple's favorite feature

final cosmos
#

🙂

dry pike
#

I make sure to always put braces for clarity (except when writing else if of course)

#

tho tbh I don't write many else ifs

spice hamlet
dry pike
#

mostly just if statements with returns or breaks in them

toxic meteor
#
print("hello chat")```
#

oops

final cosmos
toxic meteor
final cosmos
#

ok i will try

edgy krakenBOT
#
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.

toxic meteor
worn sage
#

print ( " hello " )

spice hamlet
#
print("Oh. This is nice.")
final cosmos
#

'''py
print("hello world")
'''

dry pike
#

backticks

#

not apostrophes

final cosmos
#

why it not work 🙁

rare gazelle
#

hello

dry pike
#

hell mtnjustme

final cosmos
#

oh

spice hamlet
worn sage
#

print ( " deez nuts " )

final cosmos
#

this `

rare gazelle
#

print(print)

worn sage
#

python is so hard bro

final cosmos
#
print(1)
#

oh thanks

#

it works

rare gazelle
#

u can even print(print(print(print)))

dry pike
#

this channel sucks right now

craggy trench
final cosmos
dry pike
#

.topic

verbal wedgeBOT
#
**What's your favorite use of recursion in Python?**

Suggest more topics here!

dry pike
#

man of course, the worst topic

worn sage
#

.topic

fiery yarrow
#

based fellow recursion hater?

final cosmos
#

.topic

worn sage
#

.topic

rare gazelle
fiery yarrow
#

that's not recursion

spice hamlet
rare gazelle
#

prove it

dry pike
final cosmos
#

oh sry

toxic meteor
dry pike
#

nope

toxic meteor
#

ok

craggy trench
#

recursion can usually be rewritten as loops, yes

worn sage
final cosmos
#

what is #help-...

spice hamlet
final cosmos
#
print(print(print(print)))
dry pike
#

just not in this channel

spice hamlet
#

k

rare gazelle
#

not jay

dry pike
#

of course

rare gazelle
#

^

#

anyone except jay

dry pike
#

I'm kinda tweaking out tho so maybe I couldn't

final cosmos
#

why not jay?

dry pike
#

now see the print prints

craggy trench
spice hamlet
#

the first print() prints <builtin-function-print> because it's printing print(0 directly

rare gazelle
dry pike
#

I always know

spice hamlet
#

idk about the rest, but i know print() returns None

dry pike
#

except when I don't

rare gazelle
toxic meteor
#
input(int(print("hi\n")))```
rare gazelle
#

the return value of the print function is None

toxic meteor
rare gazelle
#

the first print prints the print function

dry pike
#

print print print

rare gazelle
#

the second prints the result of the first (None) and the third the result of the second (None)

craggy trench
toxic meteor
worn sage
final cosmos
#

the /n will create a new line right ?

craggy trench
worn sage
#

oh oh two people give me two different answers

craggy trench
toxic meteor
dry pike
#

the answer is "or"

final cosmos
verbal citrus
craggy trench
toxic meteor
worn sage
final cosmos
#

oh

spice hamlet
final cosmos
#

python is so hard

toxic meteor
#

took me a century just to learn to print text in C++

final cosmos
#

the internet said python is easy but its not

toxic meteor
#

and i forgot already

rare gazelle
dry pike
#

.topic

verbal wedgeBOT
#
**What's your favorite PEP?**

Suggest more topics here!

dry pike
#

all of them

toxic meteor
worn sage
rare gazelle
timid ember
spice hamlet
toxic meteor
final cosmos
timid ember
spice hamlet
timid ember
#

"Umm yeah. I like pep ###, it pretty niche."

worn sage
#

I know projects that would not would not impress anyone

worn sage
worn sage
verbal citrus
# worn sage I like how you think can you explain to me

as always, the answer is it depends, learning enough C++ is hard, learning how to make a simple compiler is hard, realizing that compiler theory is harder is hard, realizing that at a certain point enough C++ is compiler theory is hard 🙂

somber jacinth
final cosmos
#

c++ is bit** hard

craggy trench
# verbal wedge

i like every pep 😇 except for the ones that are outside my skill tree and interests i HATE those why can't python have more interesting peps

toxic meteor
#

can anyone make C--

#

or C××

spice hamlet
vale pineBOT
#
Command not found

Command "bit" is not found

rare gazelle
#

C+-

spice hamlet
#

C//

violet cedar
#

ok

toxic meteor
#

C##

verbal citrus
#

.topic