« first day (4485 days earlier)      last day (457 days later) » 

1:01 AM
@JonClements Please, in the conversation that I will have with the moderator, I want this to be private, please, for privacy reasons. On another occasion that I talked with a moderator, this happened in this way: a room was created between me and him. Thanks.
Well, I guess I was redundant, of course it's for privacy reasons.
 
 
3 hours later…
4:12 AM
@JonClements Sure thing. I will take a look.
@Marco, you are saying that you would prefer to discuss this in a private room, rather than in the MetaPython room? I don't see how there are privacy issues at stake here, but I'm willing to create a private room if you feel strongly about it.
 
Hello. Yes, in a private room, please. Privacy in the sense that I feel more comfortable in a private conversation, that's all. But I will be able to talk to you only at the end of my day tomorrow, I'm about to sleep now (here it is 01:14 AM).
 
OK, no problem. Hopefully we can get our schedules to sync up. I'll go ahead and send you an invite so you can talk whenever it's convenient.
 
Ok, great, thank you very much and sorry for any inconvenience.
 
 
3 hours later…
7:10 AM
morning cbg
 
7:45 AM
@Warcaith template matching? I think that depends on what you're trying to do between the image and another reference image.
there are dozen of names for this that could fit
@MisterMiyagi cbg
 
 
1 hour later…
cbg
 
Apparently the issue I was encountering was just one file having wrong data (thus the extra column) but it's resolved now
 
9:37 AM
Morning cabbage all
 
10:01 AM
morning cbg
 
10:26 AM
cbg
@CodyGray melon
@Pherdindy so don't leave us with a cliffhanger - what'd you do in the end... parse the file in a different or just ignore it?
 
watermelon. I'll probably also need to get some background from either you or roganjosh, whoever has the time and/or feels qualified.
 
10:55 AM
I'm happy to do that if that doesn't conflict with the process @CodyGray
I need to head out for about an hour first
Actually, scratch that, I'm around now as I've just seen the meeting has been moved
 
11:20 AM
stackoverflow.com/questions/74219480 I get the impression there's something special about the combination of PyTorch and 3.11 that's making the question pop up? I could have sworn I've seen more like this, but I guess this looks canonical
 
@KarlKnechtel probably related to this github issue: github.com/pytorch/pytorch/issues/86566
 
Yep, that's noted in the answers there.
I don't like this kind of tech support question but eh
 
it's similar to what we discussed once but for Pygame.
whenever a third-party library doesn't always keep up with the latest python and also comes with its own C binding/etc, then you get this kind of result.
I guess you could probably close the question in those cases, since usually it's up to the maintainer on github to do it, unless the OP want to add support for it themselves.
 
This looks suitable to handle with a duplicate, TBH. It really doesn't matter what the specific library is.
Might need a synthetic canonical, though. All such questions I remember are sticky with useless extra details.
 
12:21 PM
unclear, unfocused and no mre, and the existing answer is a wild guess stackoverflow.com/questions/28842485 thanks to the Community user for highlighting this. Got it on the 13th try
 
12:50 PM
stackoverflow.com/questions/60574597 this is a duplicate of the "ask until valid response" canonical
 
 
2 hours later…
2:43 PM
@KarlKnechtel all set
 
@JonClements Instead of using a list comprehension I just broke it down to the standard for-loop and just put a print statement to determine which .csv file failed to read into the dataframe.
I just did from df_merged_quotes = pd.concat([pd.read_csv(f, header=None) for f in quotes_list])
for f in quotes_list:
    print(f)
    quotes_csv = pd.read_csv(f, header=None)
To something like that and just eyeballed it then there was one extra cell in row 224 of that .csv file
 
3:15 PM
@MisterMiyagi I think I was already talking along those lines in PCR, but I don't have the idea fully fleshed out. please contribute if you can
@Pherdindy fwiw: because print is a function in 3.x, which consistently returns None, we can do pd.concat([print(f) or pd.read_csv(f, header=None) for f in quotes_list])
obviously not production code, but maybe a time saver if you aren't using an actual debugger
(I don't)
another approach, which might look less hacky, is to wrap the iterator. something like
def traced(it):
    for i, v in enumerate(it):
        print(i)
        yield v
which should then allow pd.concat([pd.read_csv(f, header=None) for f in traced(quotes_list)])
 
4:09 PM
@KarlKnechtel thanks a lot wasn't sure how I would approach it in that situation within the list comprehension
 
4:49 PM
@JonClements I feel like a lot of it is annoying me. Too many errors from just one line of code. Haven't really found anything I particularly like about rust either. I might also be jumping in too fast... idk
 
It helped me greatly to accept that the Rust compiler/clippy were right when telling me I was wrong.
 
^
it helps to understand what rust compiler is trying to save you from. i'd say read up on borrow checker and really "get" what it's after, it saves you a lot of pain with rust
 
 
1 hour later…
5:53 PM
Yeah, I was stuck on trying to convert Option<&str> to Option<&String> which is apparently not possible.
 
cbg
 
6:24 PM
I can't seem to create an MRE, but I get this weird error trying to cast something:
task = typing.cast(Download, tasks_by_type[Download])
The first Download is underlined, and mouse hover displays this popup:
(class) Download
Expected type expression but received "Type[Download] | type"
  "type" is not a class
Anyone got a clue what that's about?
 
don't know, but maybe related?: github.com/microsoft/pyright/issues/2058
also found a similar SO post but don't think it helps: stackoverflow.com/questions/61400225/…
 
Oh look, it's my boy Eric Traut
Sounds like this is just an issue of pyright being pyright
 
You know how `pip freeze` output will show requirements as package names and version numbers, with stuff like `^`, `==` etc. in between?
where is the "stuff" documented?
ah, they call it a "requirements file", which is much easier to search for. pip.pypa.io/en/stable/reference/requirements-file-format
more specifically, peps.python.org/pep-0508. But I'm sure I've seen ^ used, and that doesn't seem to be listed here.
Maybe it's a Poetry-specific shorthand, then.
 
6:41 PM
i think pip should release a feature where it save requirement file having os base structure. like when we do pip freeze it should provide option to add os wise dependency too
 
@KarlKnechtel Yeah, it's peotry's version of ~= I think.
 
We're trying to move to >= by default to avoid dependency hell, and use < and != for known incompatibilities. Takes a while to get rid of old, bad advice...
 
6:49 PM
reminds me of that article that pointed out python abi incompatibilities but failed to find a runtime error caused by them :-)
 
@MisterMiyagi I mean, I would have thought that's the obvious and natural thing to do. How did such "old, bad advice" crop up in the first place?
 
@sahasrara62 pip freeze is the gateway to hell. Use the pipreqs library
 
@KarlKnechtel Using ^ and ~= breaks less in the short run, and the various dependency-release-tracking tools like dependabot make horribly specific dependency management look like active contributions at first glance.
IIRC poetry even suggests ^ as the preffered requirement type.
 
7:22 PM
It's scary common the whole "Use pip freeze to generate a list of dependencies" thing is. Sincere case of wrong-tool-for-the-job
 
I mean, Python could have stepped up here and made it clear how the hell you're supposed to do dependency mgmt. There are way too many ways to handle dependencies
Or just package installations, even without dependencies
 
They did kinda tell you :-)
You basically supply a manifest of externally downloaded materials with the exact version numbers
in practice is that can be challenging as linux flavors have different tools, dependencies, etc
so in languages like C++ a popular strategy is to build everything into one dependency free static monolith, but that strategy doesn't for python for many reasons
 
@roganjosh Well, it depends on your needs. pip freeze can be the right tool for the job - if you want reproducible builds, and you know the OS and python version of the PC where your module will be installed...
 
so the real python deployment strategy would be called "have the user run some commands to satisfy their dependencies, and if they can't tell them to switch their OS"
 
I don't think it's python's job to tell you how to deal with dependencies tbh
 
7:28 PM
When Guido was on Lex Fridman, there was a request for questions. I asked why it was chosen that dependency management was outsourced to other tools e.g. easy_install and then pip (and I think prior tools). Sadly it wasn't asked
@Aran-Fey It works until you need to install anything else by, you know, developing. Then it all hits the fan
 
I admit, using pip freeze can be finicky at times. But depending on your use cases, it's fine as a temporary solution to perhaps, an exponentially permanent problem.
I remember using it a lot on Linux when I made my own implementation (based on someone else) of pip bundle (since it's removed now on the latest pip version).
 
I would always take pipreqs over pip freeze just because it allows your own dependencies to be flexible in what they need, and it's a single CLI command. But it's still not totally ideal
 
I vaguely remember trying pipreqs, but my main reason not to switch to it was some complication when creating a requirements.txt file: stackoverflow.com/questions/57907655/…
with pip freeze, it's as easy as outputting stdout to a file. Don't know, but there might be an easy way with pipreqs too.
 
Those answers are quite old - I've not encountered this issue. Back in 2019 I was doing pip freeze > requirements.txt
 
yep, that's the command I was using a year ago
is there an equivalent with pipreqs too? Just curious
 
7:39 PM
Let's see. Happens that I have a new repo without having applied it
pipreqs --mode gt --force . from the root directory. The only reason I needed --force was because I already had a requirements.txt
 
@roganjosh thanks for telling me about pipreqs didn't know about this. i am living this hell everytime when i have to set up existing project(x86 based) in my system (m1 chip). don't want to use docker though
 
@roganjosh Thanks :)
 
 
1 hour later…
8:53 PM
@MisterMiyagi oh, I see what you mean. Yeah, ^ is supposed to guard preemptively against breaking changes in the API, since you know, semver
 
9:06 PM
@NordineLotfi Not sure how equivalent it is, but we use pip-tools at my office.
Mostly for building appropriate requirements.xxx files
 
@PaulMcG I see, I did hear about it but never tried it. Will check it out, thank you
 
stackoverflow.com/questions/75251400 at some point the requirements are so artificial that I feel like closing as not about programming
 
 
2 hours later…
10:59 PM
@KarlKnechtel Only that's usually not how it works in practice. A program could be forward compatible with many dependency major releases just because they never touch the parts the program actually need. Or a patch release could break some edge case behaviour the program relied on.
There is a nice article by one of the PyPA folks (could have been posted here, not sure) how most assumptions on ^ and ~= offering stability are false in the long run. At least >= gives end users the chance to fix things on their end.
 
11:19 PM
I think it was this one.
 

« first day (4485 days earlier)      last day (457 days later) »