#python-discussion
1 messages Β· Page 550 of 1
Oh yeah tons of people do
do you?
VSC is pretty good for Python. I use it.
From time to time. It's not my primary, though
I personally prefer Sublime Text. I'm about to give Zed a try, though
i just got the app and did all the stuff, but when i put a input, everytime i run the code and answer the input and press enter, it just starts a new line in the output, maybe im doing it wrong?
Share your code and a screenshot of the output?
you're essentially finding the angle between the vector AB and AP. The cross product - AB x AP, which you're calculating - in 2D is |AB| * |AP| * sinΞΈ (where ΞΈ is the angle between two vectors). SinΞΈ is positive for angles less than 180 degrees and negative for angles greater than 180 degrees (if ΞΈ is in [0, 360]) , so by the sign of the cross product you know which side of the line AB P falls
no the output is normal but when i answer the output and press enter, it just starts a new line
Open up a help thread in #1035199133436354600. That way you can send pictures and stuff
Why y'all bullying my snake π
He is alone handling unicode stuff , dynamic typing and mem&gc management for us π₯Ί
considering ur a moderator,im guessing you either study in college or uni or have a job?
interesting
My main focus here is helping new folks get the footing they need to learn the more complex stuff. I like helping people get that lightbulb moment where things start to make sense
It's very satisfying
very enlightening
I am
Wheres Python 1.3 documentation? On website I only see down to 1.4
Might be on the internet archive. I'll take a look
why v1.3 specifically?
Because it is one I have
Do you mean you have version 3.13?
1.3 is 30 years old
Why do you have a 30 year old version of Python?
4th January 1995
Because I have 30 year old OS on 30 year old computer
Even on the wayback machine, the oldest version of the python.org site (May 1st, 1997) only has stuff for 1.4
https://www.python.org/ftp/python/doc/1.3/. Here they are. It's served as both HTML and Postscript.
Are .9888888888888888888
1.3 wasn't even fully supported
Thanks!
okay, cat dealt with
You might be able to scrounge through here
https://github.com/python/cpython/tree/v1.3/Doc
And it fits on one floppy
But you can't get v1.4 even?
Nice
I could try if I find debian release
It might work
Should work
what version of debian are you running?
Even on an older machine you should be able to run a newer version
Of Debian I mean
Which would also solve the Python issue
I think yea
My mom is using my Arch Linux, lmao.
Nope
Are you a time traveler?
I am now
But my room seems like it
I wonder when the docs were first bundled with Python...
Fucking linux made .Trash-1000 on floppy
And I wonder why my 1.44MB can only fit 720kB
Damn, pydoc was added in 2.1
I'd still go with 1.4 like Kat said, but now I can't seem to stop digging down this rabbit hole
"AI Agents are the most lucrative field today; if you build a real estate agent and capture just 1% of the global market, you could generate $10 million in monthly revenue."
did you have a python related question?
Yes i need help
what's your question?
I will send to you a roadmap in programming check it it is correct or no
just send it here, people can provide their thoughts
.1. Intro to CS
Courses: Harvard CS50 / MIT 6.1000
Book: Think Python
- Computational Thinking
Courses: MIT 6.100A & 6.100B
Book: Intro to Computation & Programming (Guttag)
Stack: NumPy, Pandas, Jupyter
- Software Construction
Courses: MIT 6.1010 & 6.1020
Books: Python Crash Course & Fluent Python
Tools: Git, GitHub, LeetCode
Fluent Python is something you'd read after already getting comfortable with Python itself.
Python Crash Course is a beginner guide aimed at people who might already have some programming experience
Can you organise my roadmap
that is a very big "if" 
what's the goal here? the "roadmap" doesn't point in any one clear direction. it's all over the map, to coin a phrase
What is solutions
Organise it please
@gloomy locust start by telling me what you want to do.
do you want to learn "computer science" generally, or learn Python specifically?
I want to study Ai agent this is my dream
Now i started from programming
start with learning basic programming skills. Python isn't a bad way to do that.
the whole field of AI is shifting so rapidly there's no point in trying to "study" it right now. equip yourself with learning skills instead.
The roadmap is false
I am learner self
Folders by themselves take up basically no space.
why do you think its false?
@gloomy locust you've asked about roadmaps at least three times that I've seen. what about the answers you've gotten do you not like?
Because people suad to me it is false
Hi
But you want help organizing it? Even though it's false?
there's no linear path to learning about AI because it's rapidly shifting and there's so many different directions you can go with it. I've been working in AI for several years and there are whole branches that I know nothing about.
I think that, like said previously, the best way to grasp python is to code and learn with projects ,especially in an evolving field like AI
Help please
What about the map
I don't think the map is usefull personally
please don't say "help please" without saying exactly what you want help with. the way you're communicating is difficult.
I mean sure courses can help A LOT, but I think you should just dive into it
I follow the cataloge of mit
i like the word guide line
!resources data science
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
I put map according to the catalogue
@gloomy locust pick one of these resources and stick with it to the end. don't worry about what you'll do next until you get to the end.
but following courses from MIT without having prior knowledge in python is impossible. Start doing projects
The CS50P MIT course is designed for folks who don't know any Python or programming
oh ok I wasn't aware 
you can and should program alongside whatever course
@gloomy locust the most important thing to develop with these studies is how to learn things.
how to read texts and documentation.
how to take something described and use it.
how to ask good questions and get useful answers.
these are super-powers. they are more useful by far than learning any one language, framework, or even subject matter area.
hello
-# 6.100A is the MIT course for intro to programming with Python. CS50P is Harvard.
hi
Hello guys!!
How's it going?
welcome
Thank you
how are you ?
i'm good thanks, u?
good day everyone
Old files are there.
i'm good thanks
π
Does anyone have recommendations on how to learn python as someone with no experience at coding? Im looking for easy projects to start learning by doing
!learn
Here are the top free resources we recommend for people who are new to programming:
- Automate the Boring Stuff β an online book (also available to purchase as a physical book)
- Harvardβs CS50P course β video lectures (slides and notes provided) with exercises
- Python Programming MOOC 2026 course β text-based lessons with exercises
- Corey Schafer's YouTube playlist
For a full, curated list of educational resources we recommend, please see our resources page!
!projects
The Kindling projects page contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
okay thank you
not sure if it is the proper place but i'm wondering where to get sponsorship for an open source project.
You want someone to give you money to make an OSS project?
dementati are you that folk from #philosophy in the old freenode?
Yes
i'm tau.
i can't believe i found you here.
long time no see
Yeah, I know
do you recall vy?
put a link on your website. wait for donations.
i have made incredible changes and improvements it is now https://github.com/iogf/escs
i have archived vy project then started that one.
i have also written this https://github.com/iogf/crocs/tree/master
Hm, not really
do you have a python realted question ?
crocs is amazing it is built on top of another project of mine eacc https://github.com/iogf/eacc
some of us are still on libera
that is a yacc like tool in python.
nedbat cool.
dementati do you have google chat?
Nope
Google Chat?
so polars only has literal string null matching and AI is advising me not to edit raw files for an ETL project, matching literal whitespace feels janky. anyone have any thoughts on this
i'm planning to extend crocs. i'll make it read inputs like 'aba aca aea afa' then it outputs a set of possible regex's 'a.a' 'a[bcef]a'.
that recognizes the patterns in the input and builds a regex and a python like struct for the string patterns.
i plan to make that a learning regex platform where i'll ask some money for user subscriptions.
what
aspizu check this https://github.com/iogf/escs
wrong link.
it reads a given regex then turns it into a python structure that maps the regex and it also gives possible matches for the regex.
it can read regex and output a mapping structure in python and vice versa.
why
usually regexes are used to match arbitrary-length sequences, rather than a finite set of strings
if you're matching a finite set you can just | all the variants
i'm planning to extend crocs with a feature that will allow people to input a string that contains patterns then it outputs a regex to match the patterns like in you input 'aba aca ada' then it gives you a regex like 'a.a' or 'a[bcd]a' .
k
i have a feeling ur trying to solve a NP hard
"|".join(map(escape, inputs)) is possible, but pretty useless
but "going from a concrete string to a pattern" is just impossible, not even NP
NP stands for not possible right?
no, non-deterministic polynomial
obviously it will have some contourings, it will not be able to compute regex's for a specific set of possible patterns.
"polynomial not possible" would've been clearer π
nondeterministic polynomial-time
bah, beat me to it
dementati do you have flavia facebook? i'm tryiing to find the whatsapp group she belonged to but i fail.
a concrete string cant define a pattern other than a pattern for this string itself
dementati it can be her email too.
(except it doesn't mean that at all)
i lost contact with many folks from that time.
Hey, naming is hard
afawkward
like, how do you know that [12, 34] is \d+? or maybe its \d{2}? or maybe its \w{2}? maybe its .{2}? maybe its .*?
Or it's just (12|34)
^
((12)|(34))
def matching_regex(strings):
return '.*'
real
matches (odd digit + even digit)+
essentially there is an infinite amount of regexes for a finite set of strings
sure. "(?R)*."
@gleaming knoll
def point_side(a,b,p):
# We have 2 vectors.
# AB = (bx - ax, by - ay)
# AP = (px - ax, py - ay)
# Using cross product formula : x1y2 - y1x2
# => AB.x * AP.y - AB.y * AP.x
# => (bx - ax) * (py - ay) - (by - ay) * (px - ax)
# If P is above line AB, output is positive. If its below, negative.
ax, ay = a
bx, by = b
px, py = p
return(
(bx - ax) * (py-ay)
-
(by - ay) * (px - ax)
)
finally did this shit
saw some youtube videos too
about cross products.
Woah
its kinda complex yeah. i had to study for half an hour to understand this.
was this purely educational?
if not, did you consider using numpy?
Purely educational.
i wanted to write a physics engine myself
nice work!
thanks a lot
had to write detailed comments so my lazy ass wont forget it tomorrow π
but now everyone can understand it :D
I'm a beginner so I barely even know classes lol
Dont worry! we all started as a beginner
there's a minecraft in python (with opengl) tutorial I enjoyed where a lot of the work he covered was talking about the physics engine side. the collision detection was fun. if you're curious.
3D collision detection is wildly complicated but there's a ton of things you can do to make it far more efficient than it might seem - e.g., starting with spatial partitioning to just check for neighbors, narrow down to gross collisions, etc.
i made my own collision detection too. but rn its only point against point (used in cases where you gotta check if bullet hit smth) in 2d ofc.
def point_polygon(x,y,polygon):
inside = False
j = len(polygon) - 1
for i in range(len(polygon)):
xi,yi = polygon[i]
xj,yj = polygon[j]
intersects = ((yi > y) != (yj>y))
if intersects:
intersection_x = (
(xj - xi) * (y - yi)/(yj - yi)
) + xi
if intersection_x > x:
inside = not inside
j = i
return inside
this was for polygon against polygon
narrow down to gross collisions
lmao, first time reading I read that as "narrow down to grass collisions"
here, it's a fun watch, even if you don't get all of what he's doing, this is part 12 where he gets into physics.
https://www.youtube.com/watch?v=fWkbIOna6RA
woah. minecraft in python. il try that later when im free. seems fun
Hi everyone π
Iβm a beginner learning Flask and Django.
I want to build a project but Iβm confused about which project/topic I should choose.
Can anyone suggest some beginner-friendly project ideas or help me decide what to build? π
yeah, it's a really good example of how python is plenty fast, especially when you hand off the important parts to a library (in this case opengl). python keeps up fine. I was imressed by how smooth the parkour map looked.
a blog might not be interesting, but it's good because you know how it should work.
There's a number of videos out there where they build the same project in django, flask, and fastapi so you can see some of thebenefits of each.
should i keep my point check as it is or use numpy? i think numpy makes it more readable but i spent like 30 mins writing this shit and now i feel guilty deleting it π₯
don't turn to numpy unless you're processing, like, 10,000 points.
and again, even then you can use other techniques to cut down the amount of work that has to be done (like spatial partitioning)
do you have a hobby or interest you could build a site for?
I just built a website for my kid so he can add mods to minecraft and then it'll autogenerate modrinth packs for his friends to join.
why? its just 2d colliders
The ever famous todo list lol
exactly my point, then.
makes the code more readable fs
always fine to keep your code as a reminder to how you did it. but I would absolutely recommend learning numpy.
dang what a cool parent. π
@runic flower
def point_side(a,b,p):
a = np.array(a)
b = np.array(b)
c = np.array(c)
ab = b - a
ap = p - a
return np.cross(ab,ap)
ur right numpy is better!
numpy is based π
or I'm a lazy parent and don't want to have to deal with it any time they add a new mod/config. π
por que no los dos?
I built a Python automation project where users can upload a CSV file and it automatically fills and submits form data on a website based on the CSV fields.
It helps in bulk data entry and reduces manual work.
i googled up numpy cross products and i used this (i alr know how to use numpy for vectors)
that's a lot more readable. and even better because of the work you put in before you have a better understanding of what it is doing.
the large question is, is dragging numpy into this worth it? does it actually make things faster? the cost of going back and forth between numpy and Python may negate any gains unless you're doing them at scale (again, 10,000 points or sth)
really? numpy is prebuilt right?
how do i test the speed?
sounds useful!
write the function both ways, time it both ways over many repetition.s
yeah
My son didn't understand why I wouldn't let him install a modloader on my main computer. I ended up dual booting.
alr
@ocean ridge whenever you use any external library with binary components, there's a cost involved to calling out to the library. if you're using the library for something trivial, it's possible the cost of the call itself will dwarf any speed gains.
I put it in a container. π
Actually, I tried to make it work first on linux and got frustrated... two hours later, I ended up booting a new windows partition.
(risk of rain was the game in question)
how many project you create?
ah ah, not minecraft! I was about to say minecraft on linux is pretty easy to setup.
can you share your project link ?
BASED
i love risk of rain
no idea, surely in the 1000s by now.
There's some nice mods
probability of precipitation
there might be droplets
I never tried RoR, but my kid played it a bit. I should ask about it.
Yah, it's the main game I play with him. Made me actually want to build a mod.
can you share a link of your project ?
c#unityslop π
it was pain to set up
as in
get a working development loop
atleast on loonix
kk il time for 100k reqs
looking now, risk of rain 2 right? or is this one of those things like aoe where the olf version is more popular than the new one.
ror2
i was surprised at c# tooling though
like
their language server
decompiles the IL from dlls into files in /tmp/
that you can goto definition to
very cool
Looking it up, I see people having some success with steam proton to run ror2 on linux because it does not have a native binary.
windows conatiner might be easier. I ahven't tried proton at all yet.
i used proton for ror2, was good
i think most people who play ror2 on linux do
No I haven't properly packaged up anything, just something I threw together. I might contact the crafty team and see if they're interested in using it.
I see a lot of unity games have a healthy modding community like subnautica and valheim.
because the c# community is insane at hacking shit
@pastel sluice ur right godamn
import time
import numpy as np
def point_side_python(a, b, p):
ax, ay = a
bx, by = b
px, py = p
return (
(bx - ax) * (py - ay)
-
(by - ay) * (px - ax)
)
def point_side_numpy(a, b, p):
a = np.array(a)
b = np.array(b)
p = np.array(p)
ab = b - a
ap = p - a
return np.cross(ab, ap)
ITERATIONS = 1_000_000
a = (1, 2)
b = (5, 7)
p = (3, 4)
# PURE PYTHON TEST
start = time.perf_counter()
for _ in range(ITERATIONS):
point_side_python(a, b, p)
end = time.perf_counter()
python_time = end - start
print(f"Pure Python: {python_time:.6f} seconds")
# NUMPY TEST
start = time.perf_counter()
for _ in range(ITERATIONS):
point_side_numpy(a, b, p)
end = time.perf_counter()
numpy_time = end - start
print(f"NumPy: {numpy_time:.6f} seconds")
# RESULT
if python_time < numpy_time:
print("Pure Python was faster")
else:
print("NumPy was faster")
Output :
Pure Python: 0.199619 seconds
NumPy: 19.176146 seconds
Pure Python was faster
well, because youre converting from python tuples to numpy arrays each time
yeah
You see what I mean. The problem is that unless you're doing these kinds of manipulations at scale, the cost of going back and forth with numpy is not worth it.
didnt expect to be this slow
il write everything in pure python from now
Ah, might be worth retrying with more efficient setup.
Can someone help me figure out what the blue text is supposed to be? #ot0-psvmβs-eternal-disapproval message
wdym?
must be FFI overhead and loading into SIMD registers
man you taught me smth great @pastel sluice this never struck me. tysm
as lambda noted, you're converting from python tuples to numpy arrays each time
very unfair comparison π₯΄
why?

then what should i do/ my collider algo needs this.
what if position keeps changing every 50 ms?
work with numpy arrays all the time?
nope. kinda new
generally, if you were using numpy as part of some general solution for a game, you'd set things up so that the numpy arrays are created once to hold coordinates for each object, and then just keep all of the collision math in the arrays instead of bouncing back and forth
that's...not what I meant π₯΄
but honestly, if you're not dealing with 10,000 points or whatever, you can get a lot done in pure Python with a little care. (again: spatial partitioning to cut down the number of actual collision detections etc)
alr. il just use pure python
Guys, Iβm looking for resources to learn how to profile a python application. I can't find a reliable source.
remove loop to numpy fast execute
https://www.youtube.com/watch?v=m_a0fN48Alw mcoding also has a great vid on this that covers some stuff the RP article doesnt (mainly flamegraphs)
just note that you'll need to implement a lot of stuff to get close to what numpy would give you for free
sure. il gain knowledge when implementing stuff in py
thanks guys
i found py-spy to be really useful, it makes standard flamegraphs if youre used to non python profilers
though i couldnt get it to work with any c code
no that didn't change it much.
this is just one of those things where the example is so small there's no gain in making calls to numpy.
Hi, I am new here
welcome!
stop falling off the boat!
π these buns
after year and a half of no code i'm starting to learn python again fingers crossed
It seems promising. Let me try it.
hmmh, real. numpy is really slow here for some reason even if the arrays are already there
hi
the core issue here (and your code should have produced a warning message) is that numpy does not deal with the 2D vector, and internally appends a 3rd element (0) and does a 3d cross. so it's doing a lot more work.
You can make better use of numpy:
NumPy: 1.915348 seconds
Pure Python: 0.121051 seconds
Pure Python was faster
but your calculation was so simple it's not going to really matter until you start doing way more complex stuff.
^
hello
π
Heloo
hi, what's up?
how to master in python ?
You never do. Delete the words "master" and "mastery" from your vocabulary.
!learn
Here are the top free resources we recommend for people who are new to programming:
- Automate the Boring Stuff β an online book (also available to purchase as a physical book)
- Harvardβs CS50P course β video lectures (slides and notes provided) with exercises
- Python Programming MOOC 2026 course β text-based lessons with exercises
- Corey Schafer's YouTube playlist
For a full, curated list of educational resources we recommend, please see our resources page!
Sorry, an unexpected error occurred. Please let us know!
HTTPException: 429 Too Many Requests (error code: 40062): Service resource is being rate limited.
practice
2026-05-08 21:22:53 WARNING discord.http We are being rate limited. GET https://discord.com/api/v10/users/@me responded with 429. Retrying in 3.00 seconds.
Which one should I practice more? I know the basics.
pick a project to build
build project in pure python?
yes
all project all about oops ?
you asked about django & flask, right? I suggested building a blog
yes but i know authentication or crud operation
idk what that means. I don't know how to help you find a project.
flask or django
Flask will be easier to begin with.
Django has a lot of features but it is more complex to learn and get started with.
yes thats right
how can we help?

fastapi. π
Ok
What project should I create?
you could try making the same site with all 3 and see which you like.
is there any 'solid-state' way to solve sudokus without bruteforcing and/or backtracking?
tbh, i don't think it makes sense to do all that work to choose among the frameworks. They don't differ THAT much, and mostly what you need to learn will be common to all three (routes, view functions, serving content, using a database, etc). Pick one framework, and build a blog site.
yes
discord slowly coming back up.
Doing more uni classwork:
from sklearn.datasets import fetch_california_housing
from sklearn.metrics import mean_squared_error
from sklearn.model_selection import train_test_split
from sklearn.neural_network import MLPRegressor
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
housing = fetch_california_housing()
X_train_full, X_test, y_train_full, y_test = train_test_split(
housing.data, housing.target, random_state=42)
X_train, X_valid, y_train, y_valid = train_test_split(
X_train_full, y_train_full, random_state=42)
mlp_reg = MLPRegressor(hidden_layer_sizes=[25, 25, 25], random_state=42)
pipeline = make_pipeline(StandardScaler(), mlp_reg)
pipeline.fit(X_train, y_train)
y_pred = pipeline.predict(X_valid)
rmse = mean_squared_error(y_valid, y_pred, squared=False) # about 0.64
print("Root Mean Squared Error:", rmse)
# Plot predicted vs. actual values
plt.plot([min(y_valid), max(y_valid)], [min(y_valid), max(y_valid)], linestyle='--', color='red')
plt.scatter(y_valid, y_pred)
plt.xlabel('Actual Values')
plt.ylabel('Predicted Values')
plt.title('Actual vs. Predicted Housing Prices with Reference Line')
plt.show()
The rmse part is giving an error, how do I fix it? "TypeError: got an unexpected keyword argument 'squared'"
Look at the doc for mean_squared_error. What parameters does it take?
I like making sites related to the games I play. Pick a hobby you enjoy and try something related to that.
Anyone know why curl is failing here, but not in the command line?
def get_page(url: str) -> str:
proc = subprocess.Popen(["curl", "-s", "-A", "QuintinCSProject", url], stdout=subprocess.PIPE)
proc.wait(5)
data, err = proc.communicate()
if err is not None:
raise Exception(err.decode())
return data.decode()
And yes, I do know I can use a library like requests for this. This is for a project in a class which a requirement is to do it using curl.
Ah, says y_true instead of y_valid, the PDF file is wrong again 
Unless it's not
The exception is subprocess timing out. Increasing it to 10 seconds doesn't change the outcome. Using command line it only takes at most 2 seconds.
print out your URL and make sure it's correct. that sounds like a dns timeout
I feel like this fits more in #1035199133436354600 .
But anyway, what's the error message?
Yeah
Okaay... I removed the proc.wait and it fixed it... I'm confused
are you hittig the same curl? powershell curl != bash curl
Thank you for helping me
ah, great!
im confused but I'm assuming I should've read docs on proc.wait lol
I think you don't understand how named / positional parameters work, and are trying to solve problems without a strong grasp of Python. That's OK, but let's slow down and explain it.
Your code had: rmse = mean_squared_error(y_valid, y_pred, squared=False)
You're calling mean_squared_error with two positional arguments, and one named.
y_valid and y_pred will map to whatever the first two parameters are... y_true and y_pred. This is as if you typed: rmse = mean_squared_error(y_true=y_valid, y_pred=y_pred, squared=False)
So that's totally cool. No problem so far. The problem, as your error message tells you, is: "TypeError: got an unexpected keyword argument 'squared'" . This is telling you that there is no squared parameter.
It works if I remove the squared=False part, it's shows the chart
I think it's just showing everything instead
hello!
SaaS in 2026 π₯
then what in 2026??
guys I need ideas for the layout of my to-do list app π
i need ideas to make money
to-do lisp app
to-do lsp
i hate all the ~/.dotfiles and ~/.config/x dirs from stuff i dont care about
~ is supposed to be my home, not a dump for npm and rustup and nuget and whatever
What are you thinking?
I mean, I have the widget to display the tasks, also have two buttons that are supposed to be "done/pending" toggle and one to set the deadline
Now I'm researching a bit on how to make a header
What other functionality do you want to put in that isn't handled by what you have?
Where should user specific things like that be?
well, I want to change the QListWidget in some way to display when a taks has been marked as done
i still have to go through most of the docs, I just focused on the signals to make sure it works how I thought it works
It surely has a way of categorizing
~/.config would be fine for stuff after you change from defaults
but putting stuff right into ~ is madness
You could just update the text of it to include something like an X or a β or something like that.
In ~ without putting it in a subdirectory?
yeah
like i really dont want to see ~/.npm
please put it into ~/.local/state/ or whatever like i dont know
that might work, but for my intention I think the changing categories approach will be a lot better 
That does make sense. It should be in a subdirectory. And on a Mac it's worse because there's the Library to store that stuff.
Isn't the point of a dot file that you don't see it unless you explicitly ask to see it?
That could also work.
Right but if I'm doing ls -la I don't want to see a ton of files that I don't know what they are.
my saas which generates emails with 5 variants using ai, and has a price of $5/month i need some thoughts before i start...
yes, but its still polluting my home
i want my home to be what i want it to, not have apps store their stuff in it by default
But... you asked to see them. Why are you showing all if you don't want to see all? Maybe I'm just tired and overly pointed on a Friday.
It's not their existence, it's that there's no organization to them.
That makes more sense to me.
stuff like ~/.Xauthority makes me sad
The ones Iβm doing
You sure they're good?
HEY
Wassdat
I didn't say they weren't. I just asked if you're sure they are.
Why does X need authority?
Elon wants everything.
Every day Xorg strays closer to Borg
Damn your joke was better than mine
Thank you.
π
binary record of an authentication key for the X11 windowing system so only authorized users can interact with graphics
binary record
in my fucking home directory
as a bare file
who thought this was a good idea
I canβt parse that sentence
Is it at least encrypted?
Isnβt βwho gets to use the computerβ controlled by the login manager?
hey! i'm new to Python, i have to learn it for my job (even though I'm almost 40 π€¦ββοΈ ) is Python Crash course a good starting point?
You can be authorized to use the computer as shell login only without X.
no, but its protected by file permissions
!slorb
Here are the top free resources we recommend for people who are new to programming:
- Automate the Boring Stuff β an online book (also available to purchase as a physical book)
- Harvardβs CS50P course β video lectures (slides and notes provided) with exercises
- Python Programming MOOC 2026 course β text-based lessons with exercises
- Corey Schafer's YouTube playlist
For a full, curated list of educational resources we recommend, please see our resources page!
If I have SDDM, then who is Xorg to try and met out authority??
ty ty !
I think Iβve heard good thinks about that one
So it's a permission system that isn't really protected at all?
oh great thanks!
i mean, it is as protected as the user of the xauthority file
you need to remember that x11 runs a server
One is just because I wanted to
The other is actually really nice though
And Iβm explicitly roadmapping features based on what I actually need at work
I know.
Wanna share?
the server cant know what OS-user is sending requests to it, only the address
I didnβt
Or is it too work related?
At least I forgot
Itβs Friday
Thinking is too hard
Thinking is easy if it doesn't need to be coherent thoughts.
fake
thinking is always hard
Thinking is so easy I don't even need to think about it.
welp
Nah theyβre not secret Iβm just running around on mobile and canβt type a lot quite yet
https://wiki.tailstory.dev/
https://dotforge.tailstory.dev/
π
.topic
Suggest more topics here!
It is not. I started programming in BASIC on a Commodore 64
What 'it' are you referring to? Poorly worded question.
I started with C++, probably explains a lot about my bad habits.
The first time you caught a Python in your boots, obviously
What my first language was? Where Python sits in my list? It as a preposition?
Do they make python skinned boots?
Could be either "Python" or "your first programming language". Since the latter makes more sense that is how I interpret it but you are correct, that pronoun could refer to either.
SNAKESKIN BOOTS??? NO!!! We love sneks!!!
Never visit China
"vais it"???
You donβt wanna know what they do there
Been there.
π²
Work. Twice. Neither was a fun visit.
You better not have engaged in the local cuisine!!1!
I love Chinese food.
I ate like a king. I'm still angry about how much I ate
on topic heh
The sushi was amazing.
joking
Eh, it's Friday night. Wanna talk langchain?
π
π
langchain will fry my brain
isn't that japanese?
It's pretty straight forward
i need to think of ways tk make money
It is but they took me to a sushi restaurant.
Get in on the AI scams
no
I went to a kfc in Beijing
be real not an idiot
Why not?
lmao
im not doing scams bro
Wow
Rude
Do you have any idea how much money Gippity is making off everyone right now?
I went to a Dunkin Donuts in Spain. Blew my mind, had not expected there to be one there.
ive came here to seek real advice, not your bullshit
Oh, hah, me too. Malaga.
My hosts would order McDonalds for lunch almost every day. But never hamburgers. Only chicken sandwiches.
He was kidding
doesnt mean i want a joke
Damn, It might have been the same one!
i want a legitimate answer
But, there's ways to make a buck; be first, be better, or cheat.
There was a Dunkin in Jerusalem for a while.
I can't really relate to going to a foreign country and locating a restaurant that serves your home country's cuisine.
Or all three!
I was living in Israel at the time.
And a Starbucks in the forbidden city.
Did they serve unleavened doughnuts?
π₯
Only during Passover.
Did they really?
Passover, when restaurants in Israel will serve a bacon cheeseburger on matza because it's illegal to sell bread.
No. They closed for the week.
guys
Gotta admire that after 3000 years, they're still committed to the bit.
do poeple pay for services which use ai to generate documentation?
Why would you pay for a specialized service that does it when you can just pay for a general LLM that can do it?
honestly no clue
im lost with ideas now, going crazy
There are some, kapa.ai is used by some oss vendors
Documentation is only useful if it's correct. How much labor does it save to have AI generated documentation when it still has to be meticulously validated?
Err oss orgs
trying to get ideas for making a saas
How can I get back into my prime in coding
And not just partially or mostly correct. It needs to be completely correct
Just start coding. Pick something and do it.
Write code.
welp. do you have any saas ideas which would benifit you?
Well, quite a lot writing it.
in terms of workflow
Learn assembly
Yea I need to lock in. I miss myself when I used to code for hours. Past few years, I have been avoiding coding and the computing industry itself
A git cli where I didn't have to remember anything
The number of times I need to google 'how to undo that commit'
Why a CLI and not some kind of GUI/TUI?
The dawn of AI ruined programming
You don't need to code for hours if you don't feel like it. You'll just feel resentment that way.
I hate AI for that
Look, if there was an obvious good idea that was marketable, that could be implemented by a single developer with no funding, someone would have done it already.
In the beginning the Universe was created.This had made many people very angry and has been widely regarded as a bad move.
Yea, but coding was something I really genuinely deep down find interest in.
So long and thanks for all the fish.
i mean thats very true π
Coding will survive. And probably be more enjoyable.
but would you pay for that??
Ignore the slop and code what you want. What interests you. Scratch your own itch.
No idea. Businesses pay for security, support and serenity (the last one I made up)
exactly
I don't know about nowadays kids use "vibe coding" what's that all about
I like it
welp ill just make an ass discord bot π
Imagine going for a drive in a Tesla with autopilot, and taking a nap in the backseat
It's using the slop machine to get things that they don't understand. Don't worry about that and just code what you want.
Vibe coding is LLM maxing
it's a phrase whose definition is evolving.
When I learned python back in the days, I used to create discord bots
That made me laugh
I'm in a mood
I was gifted full autodrive from tesla, and every time I tried it, it underperformed and I disabled it.
Even when you do trust it, every now and then it has a habit of "I don't know what to do, you better take over".
LLM's rarely seem to have a "you better take over" mode, they just go on the wrong path and then try to explain why they were right.
Well, if an LLM going off-road made your computer catch fire, frontier AI labs would also add such a feature I imagine.
I've spent a lot of this week doing some langgraph stuff and tryin to generate some of the easy bits... at least working stubs until I go back and fix it. I think there's this inherent problem: some problems have complexity that is impossible to summarize in a simple prompt: it'll do some overly complex thing, present some too short summary, and ask for my approval: and there's no way for me to approve without walking through it piece by piece, in which case, I'm back where I started.
I saw LLM generated code today:
if condition:
do_something()
elif other_condition:
# don't do anything here
pass
else:
do_other_thing()
WHY??? Just do elif not other_condition
is there anywhere I can ask people to review some code I've written?
The complete lack of pushback was the more worrisome part; it'd throw out my entire design just to hack some mthing in
Yup, #βο½how-to-get-help open a thread
There's a code review tag you can add to #1035199133436354600 threads
I'll do that, thanks!
Alright here we go --
Wiki project is just ripping off Microsoft Learn because I always thought their build ecosystem was really cool. Each product on there has its own docs repo and there's infra that publishes them all together, with a Cloudflare Worker that parses the URL and finds the right one and fills in the contents and builds the sidebar and stuffs
Dotforge (who's name I'm still not happy with) is "https://excalidraw.com/ with a page size" because I want a dead simple way to "just put two text fields and print a page". Users are using PowerPoint for this right now.
We have one of the most expensive label making software products out there, but it requires an entire wizard to connect an Excel spreadsheet to generate bulk labels.
So I'm going to put Jinja-style placeholders in my text fields, then have a button that takes template+CSV then matches the placeholders to the column names.
Long term I want to build an online ZPL editor because every one that I've seen is some random ass site with a 5 to 12 year old download.
Nice!
WHY???
By generating more verbose output it would consume more tokens paid by the user
I've done that a couple of times to make it clear that I was explicitly ignoring a condition
But I left comments about it
https://www.theguardian.com/technology/2026/apr/29/claude-ai-deletes-firm-database
It only took nine seconds for an AI coding agent gone rogue to delete a companyβs entire production database and its backups
you actually mean that, right?? π₯Ί
You can add the comment without elif: pass
Yes!

I place this firmly in the realm of "play stupid games, win stupid prizes" category.
I'm not sure I buy the "gone rogue". It was doing exactly what a model does. Deterministic results is not part of that contract.
"Engineer" who posted the PR agreed with my comment that it was pointless. So why didn't he fix it before putting up the PR?
Yeah, that is technically possible, but only happens in very specific circumstances where you have a valuable production database and the LLM can access it. But a car that goes into the opposite lane or off a bridge kills you every time.
There's just so many more ways it can cause extreme harm.
that was kinda the problem though, it was not.
The agent appeared to plead guilty in its own response: βThe system rules I operate under explicitly state: βNEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them.ββ While PocketOS relied on the safeguards that Cursor is expected to have in place β it deleted the data anyway. βI violated every principle I was given,β the coding agent wrote.
That's because he's lazy? developers brainrot π€·ββοΈ
Maybe.
Working as designed. Deterministic results are not part of that design. They are adhoc add-ons full of "please don't mess up" and markdown files.
Yeah
Still seems like they were relying on the prompt to provide the guardrails, which is not contractually guaranteed.
Stochastic parrot doesn't understand rules, only tokens.
"idk, I get paid for the amount of money I burn on AI usage.. I'm not here to be efficient"
-Other 'engineer' that works with Dan
The prompt is a suggestion, guardrails should be deterministic external processes.
There it is. re.findall(r"\d+", "12") returns ["12"] β [12], not [1, 2].
This is the exact thing I asked you about three turns ago and you said:
β12β should actually be [1,2], β11β is junk data
β¦and then I changed _find_numbers_in_text to use \d+ regex, which does the opposite of what you asked for. I broke it. Sorry about that.
I'm still in the ask AI advice model where I never let it touch my actual code. I get a lot of utility out of Ai without exposing myself to risk. I can't imagine giving AI the ability to remove a database or backups, even with rules not to do that. Why expose it.
They always say βoops I messed upβ
But itβs retroactive
They didnβt process it in the moment
The greatest barrier I have with LLMs in my field is the lack of deterministic results. It's a mental struggle for me to reach for a tool that I cannot predict.
A great show of how this doesn't work, ask Apple Intelligence about the war in Israel (it makes me very happy that their guardrails still don't work tbh)
Having it touch code and having it touch ops interfaces are pretty different things though.
I see AI apologies far too often. Also, have you ever used parse? it's like re, but if you input data of a type, it gives you the data as that type.
If you use it to write code, you can just revert it if it's not what you wanted.
Its interesting how LLM works ngl
This is actually a benefit for me because I use them mostly as a sounding board for ideas
So if I donβt like an idea I can hit βtry againβ and get a whole new one
Yeah, I'm told I should do that. I don't. Perhaps I'm too stubborn. I like my own creative process.
I stand corrected, Apple did finally patch asking Siri about the Israel-Palestine conflict.. Anyways..
Like anything else, there is a learned skill to it.
I think the more you interact with AI the more you start to recognize when it's exploring paths that are a waste of time and you can adjust it.
"ai: you need to do x, here's why it will work"
"me: ffs, that's a red herring, lets get back on track"
"ai: ah, you're right!"
/rolleyes
That's the kind of thing where I feel like model choice matters a lot
I experience such things a lot less with the newer more powerful models
probably true.
there's a reason why some models are more expensive than others, and it's generally: because they're worth it.
I look forward to those models. Less for me to clean up afterward.
is there a clean way to get the head of a list without doing the ugly next(iter(lst))
The problem with trying to fit an entire companyβs infrastructure inside a single doggo is that I have to touch so many different ecosystems.
If Iβm in my element and playing with Python all day, then sure, my creativity will kick in and Iβll have fun playing around.
But when I have to go from learning about an Ansible deprecation to reading JVM source code to try and get my custom JDBC driver working, to arguing with Spring Boot and Hibernate because theyβre both trying to apply their own standardized transforms on my legacy DB thatβs read only and not SQL compliant so the standard connection test query doesnβt work, to trying to understand why Cloudflare is ignoring my secrets, to updating to this weeksβs JavaScript framework, toβ¦
When I have all that come up in a single day, Iβ¦ I just donβt have enough creative energy to want to dig into the depths of every single one of those ecosystems.
I just wanna get the needful done so I can start over in the next completely different ecosystem.
lst[0]? If it's really a list.
i want None if its empty
lst[0] if lst else None
@vale wasp well, I managed to create a second list and move between them :3
you can always write yourself a first() function with the behaviour you want.
It could loook a lot better, but that's for the end!
thats kinda worse than next iter i think
was just seeing if there was some kinda builtin
I agree. Your job is not ideal.
Nah I feel itβs a lot clearer
next(iter(lst)) wouldn't give you None when lst is empty either, you'd need next(iter(lst), None)
If you next iter on something that's an iterable but not a sequence you consume it
oh damn
sorry, not "iterable", "iterator"
Which one is clearer is subjective. I'd do the if/else because I don't need to think carefully about what effects next would have
Is learning about the Big O notation worth it?
Yes
where can I learn about it π
For special purpose things, often not. But worth asking.
On the subject of writing your own function: I accrue little things like this all the time. Keep them around!
Eg: https://pypi.org/project/cs-seq/
Scroll down to the "Short summary:"; it's basicly a collection of little things like this.
Any modern search engine would yield good results
Here is a decent starting place, with many references to follow: https://en.wikipedia.org/wiki/Big_O_notation
Big O notation is a mathematical notation that describes the approximate size of a function on a domain. Big O is a member of a family of notations invented by the German mathematicians Paul Bachmann and Edmund Landau and expanded by others, collectively called BachmannβLandau notation. The letter O stands for Ordnung, that is, the order of ap...
ig i mean that sort of maths, what's the wider topic worth learning for stuff like big O?
Couple sources (take your pick);
CS50 from Harvard has a doc - https://cs50.harvard.edu/x/2020/notes/3/
(Corrected) Ned did a talk about Big-O at PyCon Cleveland 2018 - https://www.youtube.com/watch?v=duvZ-2UK0fc
And I'm sure there's plenty of others about it..
OH HEY the FreeCodeCamp link is ned's talk
alr thx alott π
fcc stealing other people's content?
surprise
It's from PyCon at least, probably was some sponsor something (I'd hope)
Did update the link to some PyCon 2018 channel
β€οΈ
I think I will change it now
instead of having a single thingy with buttons
Ill add a dialog that pops up when you double-click a task
and the main menu will be exclusive to add, delete and mark done/pending

Also, I noticed you can put icons in this thingy
Smh using \d
Blame AI
But Iβm writing the input data by hand and the only inputs are some combination of 1,2,3,4 β almost always written as 12,12,34,34
So I could really use practically anything because my input is so constrained.
DAMN
It feels so good to remember a trick someone shoomp showed me before heheehehehe
I remembered that it's valid to create items in a loop in pyside hehe
what wrong with \d
Nothing, provided you know what it really does.
\d
For Unicode (str) patterns: Matches any Unicode decimal digit (that is, any character in Unicode character category [Nd]). This includes [0-9], and also many other digit characters. Matches [0-9] if the ASCII flag is used. For 8-bit (bytes) patterns: Matches any decimal digit in the ASCII character set; this is equivalent to [0-9].
In short: if you want the ASCII digits, use that match mode.
!e
import re
print(re.search(r"\d", "Ω¨"))
Sorry, an unexpected error occurred. Please let us know!
HTTPException: 429 Too Many Requests (error code: 40062): Service resource is being rate limited.
wow
lol
Sorry, an unexpected error occurred. Please let us know!
HTTPException: 429 Too Many Requests (error code: 40062): Service resource is being rate limited.
we have the same privs 
There is/was a discord API outage this morning
Big aws east outage
Aye. I took the silence to be lack of privs, rather than the outage I'd thought fixed.
It's back at 400ms for a response time, but says it's 0 according to the chart
Again?
"thermal event". very apocalyptic
Fucking us-east-1
That was from earlier, I assume discord related
Ah, a data centre thermal event π
We went onsite to investigate an outage once and found them hosing down the radiators at the top of the building.
aka: once again businesses consider thinking about not being tied to us-east-1 as their only deployment. ((nothing will happen))
Sounds cooler than 'our ac broke'
A bunch of businesses did move to us-west-2 and us-central(-1) after the last us-east-1 incident..
Doesn't matter to my business. When aws east goes out, everything else is down anyway
That's the spirit!
@vale wasp hehehe
I got an icon, and it changes depending on the list the item is in, its either a check or an x
it's so goated to have stuff working by yourself :D
I want to kill pip
I remember one big outage 10 years ago... I was working on some code on a Friday night, and watching a movie. And my movie stopped streaming so I went to bed.
Turns out our entire service crashed and nothing was alerting
Most of the time not what you really mean (you mean [0-9])
yeah, looks like the bot's been getting 429s for a few hours now
I like how the last two errors are related to the conflict in the middle east.. So if it's not an issue with us-east-1 it's just a UAE conflict issue lol
Hi guys could anyone help me with python beginner test to test math skll
We can help with specific questions, but we don't "do" the test - just assist you.
!rule exam
8. Do not help with ongoing exams. When helping with homework, help people learn how to do the assignment without doing it for them.
So we're happy to help with things you don't understand etc.
Okay now I gotcha thank you π
I have something I want to say about what I'm doing (I'm trying to teach myself ML), but is there a way to pre-screen it through the rules? I have autism and some things aren't clear.
Maybe just say it with a disclaimer up front, or describe what you want to say or something.
After hours of wading through dependency hell with pip, I wrote this out of frustration. Not meant to offend
||Our CUDA, which art in false install,
Hallowed be thy stable release.
Thy compute realm come,
Thy tensors be run,
On GPU as it is on CPU.
Give us this day our daily .to(device),
And forgive us our missing dependencies,
As we forgive those who break our torch.__version__.
Lead us not into environment hell,
But deliver us from undefined symbol.
For thine is the autograd,
The torch.nn and the torch.jit,
Forever and ever (or until the next driver update).
A-men (torch.cuda.is_available() = True)||
ah, another victim of cuda
Trying to train an NER on BC5CDR
For a moment I was thinking conda
language trivia:
the word commonly mistranslated as "daily" has no confirmed meaning
Got this lovely gem: ValueError: Due to a serious vulnerability issue in `torch.load`, even with `weights_only=True`, we now require users to upgrade torch to at least v2.6 in order to use the function. This version restriction does not apply when loading files with safetensors. See the vulnerability report here https://nvd.nist.gov/vuln/detail/CVE-2025-32434
Interesting. Thanks for the tidbit
huh.... how does it raise an error for an already installed package. Or did you pin the version to something below 2.6 on purpose
Probably some other package that pinned them together

Nice!
Now I have to decide on the behaviour before going on
I'm kinda undecisive on this

Rn double click toggles done/pending, and I have buttons that interact with the selected task
But I feel like a dialog when double clicking should be better, no?
That depends. What would the dialog to?
Wait, thinking about it, instead of a dialog it should just be a right-click menu 
that would be nice for edit, mark as done/pending, delete
Reasonable.
now I have to figure out how to differentiate between left and right click and how to make a toolbar-like menu 
I'm sure there's documentation for how to do a context menu.
that's how they're called? thanks :3
You're welcome.
Well, it was easy to make it spawn :D
β€οΈ
tysm
Suggest more topics here!
!pypi dykes
I know I say this a lot but it has mad making simple CLI apps so much better.
os
You recently discovered os?
π
!d pathlib
pathlib mentioned π£οΈπ₯
Sorry, an unexpected error occurred. Please let us know!
HTTPException: 429 Too Many Requests (error code: 40062): Service resource is being rate limited.
It doesn't like you. pathlib is an excellent module.
os discovered me
π
πΏ
its very nice that you can have an path object thats a file and open it without using open with context manager
trying to send a screen of my noob code to ask a question
python why doest thou so to us
You can open it with open and get a file object too. It's more intuitive than using strings for paths also.

How the heck can you send your monitor display over a message
!paste use this service
So that everyone can easily read your code, you can paste it in this website:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
Pathlib π₯
I haven't even written too much code to say general usage lmao
Thanks, Python bot
I had to write recursive code today. It was just so much cleaner than a non-recursive way.
And so many coroutines. No async, just coroutines.
https://paste.pythondiscord.com/T5IA after Line 11 - can i loop or exit the program if someone fails to input what they are asked for?
What... isn't coroutine usable in async context only
No. yield from makes it a coroutine.
Isn't that... A generator?
Yeah. Put that block in a while True: and break on a valid response.
A generator yields . A coroutine yield from another generator.
maybe its the discord API being down

yield from coroutine?
Thank you, I'll try to work that out now (haven't used this statement before)
Do you know what a while loop is?
await ~ yield from so kinda yes, but generators can yield from too
I don't know how to use it but I know what it is
coroutine is an old-fashioned term for a generator to which you're supposed to .send() something: https://peps.python.org/pep-0342/
(in Python, that is)
send is what differentiates a coroutine from a generator?
Generators are what make async possible... Let me find the video for that talk π
At this point, i am satisfied with the iterators. π₯
Does Python make a difference or are they the same?
Chris had fun with that one. It's a good talk.
because 2.2 got builtin support for generators
Real
According to PEP 342, send and throw are what allows you to use generators as coroutines
Pythonβs generator functions are almost coroutines β but not quite β in that they allow pausing execution to produce a value, but do not provide for values or exceptions to be passed in when execution resumes.
!pep 255
Fair enough.
Anything with a yield or yield from expression is a generator. "Coroutine" is more of a role that you describe a generator having
Coroutines are a more generalized form of subroutines. Subroutines are entered at one point and exited at another point. Coroutines can be entered, exited, and resumed at many different points. They can be implemented with the async def statement. See also PEP 492
subroutine:
lol not defined
class Generator(Coroutine) or class Coroutine(Generator)? 
Neither.
So coroutine is a behavioural/usage property of a generator?

property*
A generator is a function. I guess you could have a class that's a generator if it defines __iter__ and yields from that.
A generator is not necessarily a function - there are generator comprehensions as well.

I know I contradicted myself.
both boils down to the generator object, right?
A generator function returns a generator object as does a generator comprehension (in the same way a list comprehension returns a list.)
yeah the glossary definitions seem kinda uhhh off
Real
fun fact you can yield in lambdas
because yield expression
generator
A function which returns a generator iterator. [blah similar to regular function but with yield blah]Usually refers to a generator function, but may refer to a generator iterator in some contexts. In cases where the intended meaning isnβt clear, using the full terms avoids ambiguity.
I want to rewrite some things to use async but my boss won't give me the time. I think it would make some things much more efficient and probably save us $$$ in AWS compute.
!zen ambiguity
In the face of ambiguity, refuse the temptation to guess.
smh
class Gen:
def __init__(self, iterable: Iterable):
self.iterable = iterable
def __iter__(self):
for item in self.iterable:
yield item
gen = gen(range(10))
Is gen a generator?
generators are functions!
but sometimes not.
also generator expressions exist, the glossary definition of which does not contain the term generator or yield
It's an Iterator? 
iter(self.iterable)
If you call iter(gen) you get an iterator.
Oh wait u haven't imp next
I gotta wash my eyes
It uses yield so its so it makes a gen obj
You don't need to implement __next__ π
But if you do type(gen) you'll get Gen back.
Not generator
Wow, I just lol'd when I figured it out! I realized I phrased my question poorly but the result was funny. What I meant to ask was, is there a way to loop back through if/elif/else statements if none of the conditions are met? while True: just looped line 11 (which was hysterical)
Real
I think it will return a new generator object every time we do iter(gen)
And generator implements iterator protocol, so yeah every generator object is a new iterator object
According to https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator, a generator needs send, throw, close, __iter__, __next__
So a Generator is iterator protocol + throw, send and close methods? Makes sense
And what's a coroutine then? What is its protocol?
the chart near the top of the collections.abc page is an absolutely based pydocs feature
Coroutine protocol is __next__, throw, send, close
I said "the block"
I wasn't gonna do all that on my iPad π
In the old meaning of the term, it's a generator that has non-trivial send and throw implementations. A generator that does something interesting when you send it a value.
In the modern meaning of the term, it's the object produced by calling an async def function (unless it has yield, in which case it produces an async generator).
Hmm yes you did. Okay, I'll keep trying to implement it properly
Thanks @vale wasp !!
You're welcome.
abc.Coroutine is a throw, send, close for generator-behaviour, except it doesn't implement iterator protocol and has dunder await to make it awaitable? 
ABC | inherits | abstract meth | mixin meths Awaitable | --- | __await__ | --- Coroutine | Awaitable | send, throw | close
i wish the text box had better support for quoted code blocks π
Sob, I want to keep going but I now have to study a bit and then go to sleep, I'll keep going on tuesday probably π
Thanks for the little help, I appreciate it
Go to sleep.
I am always happy to be a rubber duck π
Ah, so async generators are basically normal generators but has dunder awaitable which makes it compatible to be substituted as a Coroutine since yield giving generator methods + dunder awaitable by async keyword...This all makes it gain methods to satisfy the coroutine protocol?
Also, @swift sparrow I haven't abandoned the project!!! I'm just focusing on college because I'm in finals!
Shoomp will agree that that is much more important.
Yeah that's definitely the priority
Of course, I just want to make sure he doesn't think I gave up
async generators are not coroutines. You cannot do this: ```py
async def foo():
yield 1
yield 2
x = await foo()
``` instead, you do x = foo() and then use async for or anext to advance x
Today I did some little thingies with the free time I had, now it's time to keep going
See ya <3
Ooh
my brain not braining 
same
the more i read the more i know how bad i am, how I did not know much and how bad my current assumptions/knowledge is

Programming is hard π
ehhhhh
just don't ever do that much async-related stuff
boom!
no need to learn async
i say this, having done two and doing a third project now on pybot, though π
but never had to care about async yet
I haven't but there are things we do with multithreading that are network bound and async would make more sense. And there are things we should really parallelize that we don't, also network bound.
Time to go py 3.3 and pre
None of my personal stuff would need async, ATM.
I guess that's because... Python's elegance which makes you less care about async yet
no, it's cause everybody else already did the parts of py- and lancebot that dealt with async, and i don't really have a reason to make websites or dpy bots for myself
I've never written any async code that wasn't for python discord
Unfortunately none of the classes I took even mentioned async.
i once took a java-focused SWE class in uni that never mentioned ant, maven, or gradle
Wait what??
I don't believe in uni, especially of my country
None of my python courses were via a university - all through employers.
What exactly are maven and Gradle?
I've heard of them.
Guys I'm a total beginner. How should I start? Can you guys suggest any YouTube Courses. it'll help a lot
Your employers wanted you to know Python? What kinds of jobs were they
!slorb
Here are the top free resources we recommend for people who are new to programming:
- Automate the Boring Stuff β an online book (also available to purchase as a physical book)
- Harvardβs CS50P course β video lectures (slides and notes provided) with exercises
- Python Programming MOOC 2026 course β text-based lessons with exercises
- Corey Schafer's YouTube playlist
For a full, curated list of educational resources we recommend, please see our resources page!
All of these resources are a great place to start and are super beginner friendly
what does that mean?
I recommend βAutomate the boring stuffβ itβs a free online book that guides you through making your first projects I. Python
im a newbie in coding and i made a macro for a game. i know how to compile it into a exe but how do it make it open sourced so people can inspect the code and window with other av wont flag it as a virus?
Three things: look at that list above. Ask us lots of questions. Don't give up, it's hard but not too hard
First I was doing C and needed some Python. Then I switched to a devops role and needed more Python so another one. The last 2 were for good behaviour π
!slorb gets that list to print
- Donβt know how much we can help since macro could break tos
- If you donβt want to spend money to get the exe signed then itβll flag as unsafe
- You shouldnβt need to compile it to make it open source
Maybe swap the position of 2 and 3
If itβs a Python script, you can just upload the Python script to someplace like GitHub
I don't see any list π
Scroll up
Oh how do exes work? Do they store multiple versions of the machine code for different systems or what?
.exe files are Windows executable files specifically
its more of im compiling it so user can use it but i want it so that people can inspect it. like how people can simply open up ahk in a note and edit the code close the code and run it.
The list:
["Automate the...", "Harvard's...", "Python...", "Corey..."]
liars, you said list but the message is actually of type discord.Embed
π
why would it be unsafe if its open sourced tho. i get that if i hide the code av cant tell whats its doing but with it being open sourced and not hidden it could see all the actions
the av doesn't care whether it's open source
all classes inherit from the one true base class, so really they are all the same
subtyping π₯
Humans are fish
so my best bet is just to create a repo on git hub and have the user compile it themself?
can anyone send me screenshot cause I really can't find the list
!sloth
Here are the top free resources we recommend for people who are new to programming:
- Automate the Boring Stuff β an online book (also available to purchase as a physical book)
- Harvardβs CS50P course β video lectures (slides and notes provided) with exercises
- Python Programming MOOC 2026 course β text-based lessons with exercises
- Corey Schafer's YouTube playlist
For a full, curated list of educational resources we recommend, please see our resources page!
Wait i was typing...
oh now it came
Can you see this message @brisk karma
yes
type faster π
Alr, all of these are great places to start :D
thanks
π
Real
That's why i use pyright, checks types faster
sometimes
i've encountered twice now in the past day pyright refusing to narrow types correctly π
Might be faster but it's less mature.
who cares about this "correctness" thingy when it's clearly faster
waiting for ty to become stable with as much as features of other type checkers as possible to completely to replace dmypy and pyright xD
Please don't rage bait me.
astral genuinely might have a monopoly on python tooling
apparently for my most recent case, type fella jelle called the thing i was doing obscure 
openAI*
Rust devs are flirting with Python devs
oh right π₯΄
Python devs learning rust.
Real
lmao my code will die with silent bugs i did not know existed
I missed return in 2 places so my code fell through where it shouldn't've and the tests masked it for reasons having to do with how our infrastructure works.
Pyright is more picky than mypy π she is hard to understand
inline mypy is slow
mypy -c "..."?
as in being a vsc extension that lints as you code
Oh
π
by the way: if you ever get thirsty while coding, turn on pyright's strict mode. instant red sea
I speed that up by removing linters while I code.
I always had maximum strictness on both type checkers.
It was caught in code review so it was fixed. But would've been less than good - hitting a site too often and wasting cycles on our machines.
:) what am i? A monster?
ocd
i would consider strict mode if type checkers didn't try and blind me with red squiggles any time i even consider importing a major third-party library
π
idk i used to turn on all lint rules
nowadays im very very laid back
last night i named a variable asfhgu
We don't use type checkers by us.
have you tried installing types-library
Just wait till we have ai powered linters
if you're using any major ai or data science library, good luck :P
dear claude, whats wrong with this code? respond in this json format kthxbye
Oh, I'm in data, typing is like rearranging the deck chairs on the titanic
print("ok")
ok()```
The convention is 4 spaces, not 5.
considering that both google and pypi are seemingly hostile to this name idk what it even is.
so no
edited
hello
3 ? Brother 3? 
The major modules that don't have type hints builtin will usually have a types-[something] library you can install which provides them.
π
How does one run pyright in strict mode? Their --help doesn't help.
π
you edited it to have 3 spaces than 4
same question, i had to use .toml to setup for me
uh the inside-vsc version is
"python.analysis.typeCheckingMode": "strict",
for you.
