« first day (3505 days earlier)      last day (1446 days later) » 
00:00 - 21:0021:00 - 00:00

9:04 PM
@MisterMiyagi Yes, "Python performance: itโ€™s not just the interpreter (kevmod.com)". I thought it was a total hatchet-job, non-representative, cherry-picked snippet. And his(/her) own pypy numbers prove it's not even a "Python" issue, just cPython runtime overhead.
 
It's one of those "sweet spot" benchmarks that depend on the runtime having a fast path for this precise problem. PyPy being good on this isn't exactly indicative for general case performance either.
 
@MisterMiyagi I know. My point is I'm surprised at HN even giving stuff like a platform.
 
HN is as good as the internet
 
Naw, HN is consistently head-and-shoulders way above average internet. Informed audience, no sales&marketing, no empty rhetoric, fact-based posts with replicable verifiable measurable claims, or else experience/opinions/advice directly derived from same.
 
My impressions of HN are generally pretty close to what is going on in that thread.
 
9:14 PM
MM would you call the piece a hit-job? or say it comes close to that? (the author somehow downplays their own numbers confirming that this is toally not an issue in pypy, therefore the headlne is misleading, should say "cPython runtime")
Meanwhile, 'SO should ReInsTate Monica' anagrams do contain 'RIOT'... but not 'PROLETARIAT'...
 
Its been ages since I've seen a realistic Python (vs. X) benchmark. That one is pretty standard quality.
Even though the academic in me loves PyPy, Python de-facto means CPython.
That PyPy benchmark only shows the author doesn't know what a proper JIT is. CPython is still slow as a swallow nailed to the ground.
Which, really, shouldn't surprise anyone. And as such completely misses the point.
 
git-blame-name-and-shame --overdrive
 
git-jerk-origin is probably the step up :)
I'm enjoying that site too much, I fear my evening is now sunk into that :/
 
9:55 PM
@wim I had a go at concat'ing with <a href='https://stackoverflow.com/questions/tagged/' but looking at the source for the results, I'm not convinced we could force a hyperlink into the results table. That's my best angle of attack and it's probable that I fudged it
 
Hey, guys, most of you aren't into pandas, but I'm using 3.7.6 with pandas 1.0.3, and it's just riddled with bugs (on existing, not new functionality), like they broke groupby() (unbelievable!). Thinking of rolling back. Can anyone corroborate?
 
I'm on 1.0.1 and can run here
 
I'm not into pandas but I have pandas.
if there's a specific test I should run (on 1.0.3) I can
 
@AndrasDeak Not aware of a module-test that fails, but the interaction between read_csv, new 'string' vs 'object', categorical, groupby() etc. is an unholy mess, on 1.0.x. (Hey my Python version being 3.7.6 shouldn't matter, right?)
 
python version probably shouldn't matter, but I'm on 3.7.5
 
wim
10:13 PM
3.9 is almost out luddite!
 
I'm on my older laptop now
 
I have to say that I've not experienced an "unholy mess", and breaking groupby would be a big deal. What's going wrong?
 
My new one has 3.7 and 3.8 both, though I'm using 3.7 there too because mayavi wasn't available for 3.8 when I switched laptops, and I haven't adjusted to the fact that I'm using pyvista instead
 
user11006952
Is it correct that passing a generator object for `any` as seen in this line `any(keyword in result.stdout for keyword in ["some", "keywords", "here"])` is a valid way of using `any` -- since generators are an iterable?

I searched for example uses of `any` and I have seen variables pointing to list comprehensions or list comprehensions, but not this one. I wonder if there are caveats doing it this way.
 
yes
The benefit is that you don't have to create a list, which is good for memory use if there are many items. The drawback is that generators are slightly slower than list comprehensions. And since any short-circuits, you'll often see a benefit from not creating large lists. It's very much idiomatic.
 
user11006952
10:22 PM
> And since any short-circuits, you'll often see a benefit from not creating large lists.
 
user11006952
Just to make sure I understand. By "not creating large lists", you meant, not creating huge lists (of boolean values) using list comprehensions but instead use a generator?
 
If you mean specifically keyword in result.stdout then yes, huge lists of bools. But actually in python you can check any value in a list for truthiness. (If this sounds confusing ignore this for now, because it's tangential to your problem)
 
user11006952
@AndrasDeak Got it. Thank you so much!
 
note that keyword in result.stdout seems fishy to me
 
user11006952
Heh. I'm testing my typer CLI app

https://typer.tiangolo.com/tutorial/testing/#test-the-app
 
10:27 PM
If that behaves like any file-like object does (which it should) then val in result.stdout will start iterating the file to see if val is contained. So if your "file" contains "foo \n bar" and you do [word in file for word in 'baz bar foo'.split()] I'd expect you to get 3 False values. If you switch the order to foo bar baz'.split() then I expect 2 Trues and on False
at least I think so, hold on, let me check
 
user11006952
@AndrasDeak That's interesting! I wouldn't have considered that.
 
user11006952
@AndrasDeak I can also easily replicate that behaviour in my test to confirm!
 
user11006952
You've already helped enough! ๐Ÿ‘๐Ÿผ
 
Ah, I know what's wrong. I wasn't looking for an exact string.
@Pax always a welcome attitude :) Make sure you test a single membership in result.stdout first, because that's what tripped me up just now.
if you do need help or something doesn't add up, feel free to ask
 
user11006952
Thanks, Andras!
 
11:47 PM
@roganjosh Well, price arbitrage. Didn't need to use scraping.
 
wim
better to link to the actual article, not a watered-down summary of it themargins.substack.com/p/doordash-and-pizza-arbitrage
love the GIF of the path-finding slime mold
 
@smci but they did, and it's a mess. Someone surely would be in the firing line or responsibility for that but I would not be surprised if it was all just outsourced
 
00:00 - 21:0021:00 - 00:00

« first day (3505 days earlier)      last day (1446 days later) »