Python

Room rules: https://sopython.com/chatroom Code formatting guide: https://tinyurl.com/urnzp7k
1d ago – roganjosh
roganjosh: 1d ago, 51703 posts (2%)VLAZ: 1d ago, 264 posts (0%)Aran-Fey: 1d ago, 21874 posts (1%)Peilonrayz: 1d ago, 1210 posts (0%)ThiefMaster: 33d ago, 2758 posts (0%)inspectorG4dget: 45d ago, 10936 posts (0%)metatoaster: 47d ago, 1683 posts (0%)toonarmycaptain: 450d ago, 4569 posts (0%)dbush: no postsflawr: no posts
6788

export all events for this room

Starred posts

1 2 3 4 5 89
May 23 06:47
There generally isn't much use in adhering to design patterns just out of principle, and that goes doubly so for Python where added cruft has actual, heavy runtime cost.
May 23 06:46
@me9hanics To weigh in here with the n'th opinion, in my experience the main goal to follow should be YAGNI. Don't see whether something should be a class? Don't add one. Don't see whether something should be an extra module? Don't add one. And so on. Python is pretty flexible, you can still expand a heap of functions later on to classes, modules, interfaces, yada yada, once the need arises.
May 23 00:18
Other languages that don't have classes can still provide similar levels association of common set of functions via something like traits, and these can be mixed and matched as needed, resulting in no hierarchy as that's a completely flat structure, fulfilling the Flat is better than nested. in Zen of Python.
May 22 20:38
@me9hanics just my two cents for some of the technical concerns: 1. I only use **kwargs when wrapping other functions (or when calling functions), because a long list of arguments is preferable to having to figure out behaviour from the function body. It also helps users who use an IDE to get hints. Especially if you're a library author. Might also want to add some type hinting for the same consideration, but that's a divisive topic in Python and a huge pain in the butt if you do it right...
May 22 17:15
Aside from PEP8 we can't really agree on any standards here in python land :/
Apr 18, 2023 09:04
There are studies that suggest that consciousness requires quantum processes. I think the consensus is that nobody really understands anything here
5
May 22 02:08
Python 3.13 pre-release already available, it contains "An experimental free-threaded build mode, which disables the Global Interpreter Lock, allowing threads to run more concurrently.".

https://www.python.org/downloads/release/python-3130b1/
Oct 10, 2023 09:50
I never did finish my training slides for "Psycho Pig 2: The SQL"
3
May 21 23:59
The reason I'm pushing parquet is just how impressed I am with it. It has very high compression and the metadata it stores allows for really efficient filtering by columns (which might not apply here it's they're just arrays). With the file format, you can filter and process data extremely efficiently (look into things like "predicate pushdown" for polars). Sometimes you might need to be specific in the layout of the file for this
Sep 2, 2022 09:16
I am Sisyphus and my todo list is the mountain
8
Jan 12 21:22
@zoomingspeed it's easy to feel overwhelmed when you're still learning and facing a difficult challenge. And frankly you're way in over your head with your current project. You need classes and async and a whole framework for writing a discord bot, which is a lot of levels above "learn the basics of Python" which you often seem to be struggling with. At the same time the best way to learn is to try to build something you have a passion for. So I sympathize with your situation.
2
Sep 27, 2023 09:37
@discoMonkey You won't have us for your whole career. I advise you to read the official tutorial. If there is a syntax you don't know, you may ask chatgpt, it may help you to find the name of the syntax structure, for you to look about it in documentation after
3
Mar 8, 2022 18:11
I prefer overthinking to coding, so losing interest before writing anything is a beneficial optimization
10
May 10 16:06
the real hero
Oct 14, 2021 17:58
Too many programming tutorials teach you how to pour cement and bolt girders together, and then say you're ready to build a skyscraper
12
Feb 23, 2022 20:07
Underrated debugging technique #0: Taking a break
10
May 8 06:49
The best part is that I have to make refreshed predictions each week based on some proxy measure of shrink. We never actually know the real figure until the inventory is formally taken on a 52 week cycle. I might as well have a wacky-waving-inflatable-tube-man's arm dictating whether the forecast increases or decreases. That would at least have some physical input to the system
May 7 17:54
Actually, "We are not a resource of last resort" probably isn't true since I do ask questions but only after trying to figure it out myself. Not just because I got banned from somewhere else I was asking.
May 7 11:26
Also, being ashamed of your codebase is normal. Everyone is ashamed of your codebase :P *ducks*
May 20, 2021 11:22
user image
14
May 17, 2021 08:23
ccccccccbg breaker!
14
May 3 19:58
So Python 2 code that deals with Unicode may contain odd hacks to try and deal with those flaws. It may not necessarily behave correctly in all cases. And it may behave quite differently if you try to run it in Python 3. In some cases, it won't run, and you'll get an error message. But it might run and do wrong things, resulting in mojibake. So you need to carefully test such code and inspect the output.
May 11, 2021 23:55
New major versions of all the Pallets projects, including Flask 2.0, have been released! twitter.com/PalletsTeam/status/1392266507296514048
14
May 3 15:42
Anyways, the string module is not listed as part of the fixers.
May 3 04:03
Woooow! I'm late on this conversation. @zoomingspeed: please realize that while you might best learn with methodA, there is no expectation or requirement that anyone here is an actual teacher that can tailor a teaching method to a specific user. We are all here as a volunteer community and do the best we can. Not to mention that in programming practice, it's only a matter of time before you reach a problem that requires you to Socratic yourself (this sometimes referred to as the Rubber Ducky method). As a really easy example, even if you were able to articulate a very valid question, you mi
Apr 7, 2022 15:24
There's a a fine balance between helping people so they can become good programmers, and helping them so they can stay crap programmers.
9
May 2 13:20
@roganjosh I accept your plea, but only because I don't have the power to change it anyways. I am a generous god powerless peasant
Dec 31, 2020 23:08
Happy New Year - Don't drink and sudo
16
May 1 13:59
I don't quite agree with that. Programming is definitely hard, much harder than I think it should be
Apr 30 20:17
Difficulty changed from "nightmare" to "baby mode"!
Feb 6, 2023 08:52
This is quite an interesting implementation detail between del and .pop()`
5
Apr 27 15:45
@Marco The problem is that the MRE needs to include both a piece of runnable code, and some suitable test data, and expected output. But ML usually needs a large amount of data, and it's not practical to paste that into the question. But it may be possible to include code that can generate some test data. Another option is to link to a repo of standard data, but such links may rot.
May 9, 2023 15:00
because if your foot has to go, the floor should go with it
4
May 9, 2023 14:15
Meet my new profile pic! His name is NAT, he was the mascot for the company where my grandfather worked, National Screw and Manufacturing (no jokes, please). NAT was the logo character printed on product boxes, marketing swag, etc. Employees would receive a little desktop NAT about 4" tall, made of brass and steel parts and a wooden head. The story is that my grandfather made the first one (he worked in the machine shop) as a toy for my brother, and they caught on in the company.
4
Apr 27 01:53
@smci Yeah, this page (carpentries-incubator.github.io/python-text-analysis/…) actually has the same info and more. Here's the code I've actually run (hastebin.com/share/ocawodiyod.python). Notice that because female - woman is about the same as male - man, the first expression outputs only 2.8631563, while the second expression doesn't roughly cancel in this way and outputs 10.555002. Then most_similar() returns nearby words.
Dec 11, 2023 17:25
This is the first "faster python" example laid bare in the wild
2
Apr 24 13:10
I'm not comfortable with the V-words anymore.
Jan 20, 2023 18:16
The important patterns you learn automatically without even noticing, and the others you don't need
5
Aug 7, 2023 22:49
Code reviews on reddit be like
OP: Shows up with a trainwreck
Reviewers: Point out the scratched paint
3
Jan 7, 2023 20:12
Every string is a comma-separated list of values, technically ¯\_(ツ)_/¯
5
Jul 12, 2018 16:06
Jan 13, 2022 18:26
"Six months ago I couldn't even spell 'software engineer,' now I are one."
9
Apr 10 15:31
It's self-documenting, anyway, duh. It does what it says on the tin! (opener not included)
Dec 18, 2020 17:36
Job hunting update - I was allowed to retake my failed hackerrank coding test, followed by a 7-1/2 onsite-interview-over-zoom, which included 2 more coding tests and 2 "find the bug in this broken system" tests. I finally wore them down and they just gave up and gave me the job. Start Jan 4.
14
Oct 3, 2021 11:13
Room meet: In the past, we've had some virtual meet-ups between room members and they've been a good way of networking and getting to know the people in the chat room. One good thing from covid was to normalise zoom/google hangouts, so I'm proposing we have one in the week commencing 11th October. This is open to everyone in the room. I'm going to kick off with a suggestion of the 13th Oct at 6pm UTC and see if we need to move due to availability
10
Jul 24, 2020 18:08
We need a "The absolute minimum every software developer should know about copyright and licenses".
16
Nov 4, 2019 14:50
Room6: It's finally done. I'm PhinisheD
20
Sep 17, 2021 19:00
Cbg everyone, I hope you're all doing well! Just stopping by to say that I graduated today and I am finally an engineer! Thank you all for the support!
10
1 2 3 4 5 89