« first day (3525 days earlier)      last day (1648 days later) » 
00:00 - 22:0022:00 - 00:00

00:00
@roganjosh hello! I deeply apologize for the delay! I will look into flask-session. That is new to me and I will need to do some research. If I have further questions, I will be sure to ask :). Thank you very much!
 
1 hour later…
01:20
I'm a bit unsure whether to close questions that doesn't show any effort/code as needs details or clarity, Needs debugging or Caused by typo.
needs more focus (or needs details if it's also unclear)
If it's not a debugging problem "needs debugging" doesn't apply. And "caused by typo" only applies to actual typos, problems that were never there in the code ("cannot be reproduced") or something as simple as a typo that is unlikely to help future readers ("OP forgot to call a function").
I have a question that I am a bit confused about even though it feels easy. How do I create a dict from a list and a list of lists e.g [A, B, C] and [[1,2,3],[4,5,6],[7,8,9]] to get [{A:1,B:2,C:3}, {A:4,B:5,C:6},{A:7,B:8,C:9}].
1. loop over the second list, 2. zip the first list with the given sublist of the second list, 3. feed that to dict
Does that help?
I am trying to let it sink
sure thing
01:28
But the description This question currently includes multiple questions in one. It should focus on one problem only. doesn't really apply to very specific questions that simply doesn't show any code.
@AnnZen yes, it's the next best thing. It's commonly accepted that "too broad" (the old name of this close reason) applies to no-effort questions. My rationale is that the answer is "the asker should learn the language first and read a tutorial, which would be too broad to cover here"
point 2 is kinda confusing
@Starter do you know what zip is?
yes I do
OK. Want me to write a one-liner for it?
01:30
I want to try first
OK, that's why I asked :)
Which part about point 2 is confusing?
given sublist of second list
by "first list" I meant [A, B, C], and by "sublist" I meant the result of point 1
okay gotcha. let me try it
Take first_list and sublist = second_list[0] and try to play with those separately to get one dict, and if you have that just loop it
01:38
I got a list of tuples
Either you called list on the zip, or you're on an ancient version of python
yes I did call list on it
if you have a list or similar of tuples (as (key, value)) then 2. works
yes I did
so then you can advance to 3. and then 1. :P
01:41
getting it to 3. Do I need to define the dict?
You misread what I wrote. I said "feed it to dict". With dict, the type.
oh okay got you
but you won't need the list call
oh zip gives a generator
yup
or at least an iterator
I'm always hazy on the nomenclature
01:43
got it
thanks. but it is not a one liner for me lol
That's not a problem. What have you got?
One-liners are overrated and abused.
I got dicts a list of dicts
list of dicts I mean
I mean what is the code you used to create it?
you can post it here, with some code formatting
I have never done code formatting here but I can learn
Yup. You can also practice in the sandbox if you need to.
01:46
sandbox?
it's linked in the guide I linked
lis = []
for vals in lis2:
	sublis1 = zip(lis1, vals)
	dict_lis = dict(sublis1)
	lis.append(dict_lis)
OK, perfect. Do you know what list comprehensions are? This is a perfectly laid-out example to practice that.
yeah [ x for x in lis]
I know the basics but it gets complicated sometimes
Yeah, I guess ;) This initialize empty list - loop - append triple can often be written as a list comp, and at times it's worth it
@Starter when it's too complicated one shouldn't write it as a comprehension anyway. In this case I think the end result would be readable still.
and consider renaming your objects, lis1, lis2 and lis are not excellent names
01:58
so can you append within a list comprehension
yeah, I was just practicing and looking for short names
Thanks for the advice
@Starter the list comprehension is about replacing the create-loop-append triple with a direct construction of the resulting list
so, in a way, you can only append with it (to a new empty list)
sends cbg to Andras
@Starter If you want to turn it into a list comp you can try first editing the loop body to have a single lis.append(...) statement and nothing else inside. I have to go to sleep so I'll leave the listcomp solution here behind this link, in case you want to keep trying first: view spoiler.
okay thanks. I will look at it oonce I try it
good night
wim
wim
02:08
ppl out here upvoting incorrect answers. jimmies rustled.
Welcome to 2020
Once you begin to learn to use the cmd line tools...you realize it blows GUI out of the water.
rbrb
 
1 hour later…
03:22
Does this answer really deserve 5 votes in 4 hours??? stackoverflow.com/questions/62293141/clean-list-from-stopwords/…
03:35
@vaultah Thanks
03:48
Could someone please also advise on Python related question, on how to read from two CSV files properly and to find similar data that has unique ID values, for example? As a result, parse the output into the third CSV file.
@AnnZen for what?
I think I know what you're implying, and you're wrong
I know :)
04:05
@wim So not even right. Modern C++ has nearly all the same constructs and algorithms as Python. It isn't the 1990s anymore. The cartoon might be more accurate if it said "C", rather than "C++". I've taught multiple Python programmers how to write code in C++ that is equally expressive, just as few of lines, and actually efficient, cutting runtimes for mathematical algorithms or simulations from hours or days to seconds or milliseconds.
@Eugene_S pandas
04:33
@JossieCalderon I noticed your comment, and coincidentally, an hour ago: chat.stackoverflow.com/transcript/message/49600963#49600963
@thx Jossie, appreciate if you have any reference docs
@JossieCalderon pandas for reading CSV's is like using a steamroller to open a ketchup bottle. Python has a module in stdlib called csv expressly for reading CSV files.
5
@Eugene_S - this question really needs to be refocused. If you have resolved the SyntaxError, then edit the code in the question and remove that part.
@PaulMcG But he wants to find data dependent on unique ID values. Wouldn't a DataFrame be an appropriate storage compartment for his purposes?
04:49
@Eugene_S - Ah, I see that your SyntaxError in the code that you copy/pasted from the RealPython article is due to their use of f-strings, which your version of Python does not seem to support. Your follow-up question about extracting data from multiple CSVs and joining on unique ID values is an entirely different question.
05:12
Yes, that's a different question and if you may advise on it, I appreciate it @PaulMcG ty
06:01
can anyone tell explain me how print is not deleted?
>>> def print():return None
...
>>> print()
>>> print(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: print() takes 0 positional arguments but 1 was given
>>> del print
>>> print(1)
1
>>> del print
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'print' is not defined
>>> print(1)
1
i create my own print which masks the existing print, which i can see works as intended, then I delete my print and the original print works, why can not I delete that print as well?
how does python do that?
wim
wim
that's a builtin
if you want to delete it, you have to delete it from the builtins namespace
>>> import builtins
>>> del builtins.print
>>> print(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'print' is not defined
ohh ok, so there are ways that I can add my own print method to builtins or are builtins just for bultins?
wim
wim
yeah you just do builtins.print = my_print
thank you, I wanted to write a print function that adds #### and ### but didnt want to change all prints
wim
wim
just cause you can monkeypatch builtins doesn't mean you should
in this case it's probably better just to change all prints using find/replace in your editor
06:12
will just masking the print function wont do it?
wim
wim
within a module scope it will
i.e. within one .py file
then i guess i have to find/replace instead, if its bad practice as you suggest
thank you for the help
231k rep, you must answer a lot
do you mind if i ask how long you have been programming in python? I am at around 1 year and i still dont get how things work lol
is doing object_of_class.new_name_not_in_init='this was created outside init'
is doing so monkeypatching? i have come across this term but didnt read much about it
 
1 hour later…
07:47
Can anyone help me with this question please. I am not sure how to reference a link to a post on SO
07:59
@Starter Please have a look at the room rules. We ask not post fresh questions (<48h) here to avoid duplicate discussions.
Your answer is rather fresh, just give people on SO main time.
oh my I am sorry. I didn't know
No worries.
08:16
@nilajawill no need to apologise :) The optimist in me hopes they pulled the documentation down because it was actually out of date and partially broken, and they're hinting at a major release. We'll see
@AnnZen nope
@MisterMiyagi Hakerank
@AndrasDeak Worse. Hakerrank challenge with made-up test cases.
10:14
Hello
I have question in my code
Can anyone please help me
@RishiRaj You should ask your question and people will help if they feel able. Please ensure you follow the room rules and familiarise yourself with code formatting in chat
10:45
How important is it to have a clean commit history (atomic commits, proper descriptions, explaining the changes, etc) in one-man projects? I never gave it much thought because the only git feature I really use are branches, so my commits are pretty messy. Is it fine to be sloppy since the quality/cleanliness is irrelevant to me personally?
Look at me worrying about other people working with my code. I've moved up in the world
@Aran-Fey small commits are useful for losing less work and being able to cherry-pick subsets with multiple branches
And good descriptions are only necessary if you look up things in the log or blame (which can be real helpful), or use them to put together changelogs/release notes
Assuming you're the only user ever, I mean.
Yeah, if I see bad code I know exactly who wrote it :D
Oh, changelogs. Good point.
FWIW I use descriptive commits for only myself
publishing code sure is a lot of work
You can also rewrite history easier with smaller commits. Reorder and squash, for instance
10:54
Right, but I don't do that kind of stuff. At most, when I'm planning big changes, I make a new branch and then if something doesn't work out, I delete the whole branch. But I never look at any past commits
I should probably start paying more attention to my commits just for the sake of developing good habits
@Aran-Fey sounds like lots of work
Unless of course the feature is a dead end
well, I don't always delete the branch. Sometimes I just let it rot
@Aran-Fey For your private projects, it's mostly about your own preferences. I find it useful to practice proper procedure on toy projects. That also includes being aware that experimenting is fine, because there is no harm done if it turns out to be a mess.
And if only a small subset of the new changes are a dead end, I delete those manually - I don't rely on git for that
@MisterMiyagi can't get more messy than it already is ;P
Just commit often (even with --amend) not to lose work
11:08
@Aran-Fey That's the perfect situation to try and improve. No harm done if it stays messy. :P
So about atomic commits: How small of a change are we talking? If I add a to_string() method and a from_string() method to a class, do I make 2 separate commits?
IMO, nope, same purpose, so single commit.
if they are related, e.g. as in a == A.from_string(a.to_string), make it one commit.
ok, so that requires experience to get right. Gotcha
11:17
As I see it, if it's a feature that gets something wrong, how easily can you roll back?
Treat it kinda similar to SQL transactions. If hell breaks lose, it should be easy to pin point and go back.
But in case of git, it should be undoable even if hell breaking lose takes a few days.
@Aran-Fey I'm pretty sure it varies. If you start paying attention you'll probably get a feel for how it makes sense to you
Makes sense. If all I do is add one or two new functions, that's easy to undo even without having to rely on git - delete the functions, delete the tests, delete the docs (if present), done. But removing a feature that required other code to be changed is more difficult
True, that's why for features (or any big enough thing) you should ideally use branches.
Easy to roll-back via the merge commit (apart from other benefits).
Is having a class with vars in it for some small thread communication an antipattern?
class Coordinator:
    running = True
    finished = False
    x = 0
and how else to easily communicate with a thread?
have you considered a queue?
11:31
A class that holds a bunch of attributes like that is just a bunch of global variables in disguise. If anything, you should be using instances of that class
if x is a counter, a semaphore may be appropriate.
@Aran-Fey ah of course I have an instance of that class
and pass that instance to my thread
what exactly are you trying to communicate with this pattern?
Ah, nevermind
Had to read the second half :)
Generally speaking, I don't see anything wrong with doing communication through mutable objects like that - but the running and finished attributes worry me a little. There are other ways to tell if a thread is still running
11:35
I have system a which shows an image. Depending on what the image is i change something in system b over the network. system a has a small fast loop. and I only want to check if I should tell system b to do something, once the old request finished and if x changed. So i communicate from b to a if the previous request finished
oh, running is for system a. I was just too lazy to make it two seperate things :P
why does the finished worry you?
oh, if that doesn't store whether the thread itself is finished, that's fine. Because if it was, it would just be a silly way of doing thread.is_alive()
ah yes, I agree
@Eugene_S What I meant was, you should post a new question that asks how to process data from 2 CSV files, and describes what kind of process you are trying to perform. Be sure to post the code that you've already written, and which part is specifically giving you trouble.
12:12
stackoverflow.com/questions/62069256/… - f-strings in copy/pasted example code are failing because OP is using Python pre-3.6
Someone should tell this user to stop answering with large text.
@PaulMcG hammered
I looked for a dupe, couldn't find that one - thanks
12:30
@AnnZen Can you post a link?
Okay, i'll just try to remember the name
question about logging I have a logger which loggs the statements in a logfile only when the file with the loger code gehts executed but when i import the logger to a other file and want to log a function output the log doesnt get inserted in the log file
@roblox Can you please clarify what you are asking? Your message is extremely hard to understand; the lack of punctuation does not help.
How can I control posting hyperlinks?
[displayed_text](hyperlink)
12:40
Can you remove that large link?
I can't - a room owner can.
So that's the benefit of being a room owner.
The heading text in that answer doesn't bother me that much.
Can't say the same for me.
@AnnZen Plus the warm feeling inside from having the respect and gratitude of the chat room bestowed upon you for your tireless efforts in room ownership.
12:44
I'm more annoyed by the question being yet another RTFM/Typo case. At least one without tons of upvotes...
there's more in the prfle
mmm. I found a bug in pandas and the suggested solution was just to update. I've taken the plunge to go from 0.20 to 1.0. That's bumped another ~80 packages. I wonder how big the kaboom will be
I imported These function from file name 'catboostalgo.py'
from catboostalgo import plotstatfeature,catbostreg,catbostregtest
i got this error :
from catboostalgo import plotstatfeature,catbostreg,catbostregtest

ImportError: cannot import name 'plotstatfeature' from 'catboostalgo'
Hello!!
What's up?
Any open issue i can help?
how to resolve this error?
12:54
Wait i minute
I can answer
@aaaaa Is catboostalgo a module (.py file) or a package (folder with __init__.py)?
Does the traceback show the same module being run twice?
@MisterMiyagi can you post a link?
@AnnZen the very question to which answer you linked. The OP erroneously used timeit.timeit instead of time.time.
@MisterMiyagi what about the one with upvotes?
13:08
@aaaaa Future you will thank present you for using names like plot_stat_feature, cat_boost_reg, and cat_boost_reg_test (and it looks like you've misspelled boost in a couple of those).
@MisterMiyagi files are in the same directory ...Issue still the same...how to resolve it ?
I don't think we can help without an MCVE
@aaaaa please consider and answer my second question as well.
You mean the 21K+ rep user's answer with 3 votes?
13:27
Long time no cabbage.
@AnnZen I mean the general situation of having extremely basic questions that could be solved by starter tutorials/documents/logic, and resulting threads with half a dozen upvotes.
cbg @holdenweb!!!
I need to write an API endpoint to archive the event rows associated with a particular license out to S3. Is a GET the appropriate RESTFUL method?
I usually reserve GET for query-type methods. This sound more POST-ish.
13:33
There''s not hesitating answering when a sky high rep user answered beforehand.
@PaulMcG But it doesn't create a new resource - it writes a given set of rows (specified by the PK of a related object) to S3. Then, once success is assured, I hit the endpoint to delete them (pretty sure which HTTP method to use for that ;-)
Is seeing global in a function in an answer something to downvote?
13:50
not necessarily, if it was already present in the OP's code
otherwise? Yeah
@AnnZen Well, I probably wouldn't downvote it if the code works, if it's the only flaw in the code. But I'd post a comment saying that it's not good to use global and link to an answer or tutorial that explains why it's bad.
@holdenweb I agree that POST is the most suitable method. It doesn't necessarily need to create something on the server; it's really the general-purpose method for making the server do stuff
@AnnZen Sorry, I don't like that answer of yours. The OP asked how to process a list of tuples of strings. You're basically saying "It's easier to process a list of strings". Yes, that's true, but it's answering a different question! The OP might be able to control the structure of the input data, but that's not generally true.
oh my, global + with... that's an accident waiting to happen.
14:05
My answer?
There no global there.
For that, that word claims to be easy to use. It gives me way too much headache integrating pictures with text
@AnnZen No, there isn't. I didn't imply that there was. I was replying to your earlier message which I read a little while ago in the transcripts. Sorry for the confusion.
11 hours ago, by Ann Zen
Does this answer really deserve 5 votes in 4 hours??? https://stackoverflow.com/questions/62293141/clean-list-from-stopwords/62293211?r=SearchResults&s=1|192.6530#62293211
Does this answer really deserve 5 votes in 4 hours??? was a rhetorical question.
14:16
I keep odd hours, and I'm in the UTC+10 time zone. So I'm not always here when the room is busy. But I read the transcripts so I don't miss anything. (Ok, I tend to skim stuff that I'm not interested in, like Django & Pandas).
[Sorry abut the delay - Mac crashed!]
Yeah, can't really think of a more appropriate method really. Thanks.
@AnnZen Understood. The code in that answer is fine, and I agree it feels weird to get so many upvotes for something that basic. But as I said before, the answer isn't good because it's not answering the OP's question.
@MisterMiyagi cbg to you and @PaulMcG
@AnnZen Yes, that's a problem. Unfortunately, we have some high rep people who answer stuff that should be closed. Some even post an answer & then close the question as a duplicate. :(
if i could just download download right into my brain the capability to write Python , C++ and C like a champ. If Neuralink works ill be its first client
14:39
@PM2Ring we have some high rep people who answer stuff that should be closed I'm sure the new contributers are grateful for these users :)
@PM2Ring So you think most of the users are in the UTC time?
@AnnZen No, I don't. I was simply stating my time zone. We have some regulars in the UK & mainland Europe, some in North America, some in India. But not many in Australia, Korea or Japan.
14:58
@PM2Ring Anyway, my answer should be just fine now.
Hi Pythonistas!

I'm a bit of a noob with async Python, just wondering what the easiest way to call a function a simple, non-blocking "fire and forget" manner?

My use case is as follows — I'm sending a GET request to an API endpoint. I want to call a function asynchronously, I don't care about a result, I just want to return immediately. Something like:

def my_endpoint() -> dict:
some_async_action() #
return {
'status': 202,
'message': 'started_some_async_action'
}
You can't use formatting in multiline messages, unless the entire message is a code block.
Yeah, I realise that now, tried to fix it but didn't work. Doesn't really matter, it's just to illustrate really.
@AnnZen Yes, it is.
15:21
@DarraghEnright my_endpoint is a synchronous function? Do you have an event loop running at all?
In a different thread or something?
@AnnZen I used needs details or clarity with this question because by not having the code (or at least an explaination of their attempt) it is un-answerable (or more correctly there are too many answers).
A caution: If not having the code causes that then use that close reason but if it just "doesn't have code" sometimes people don't close them and just downvote (no research effort vs. close) - so it varies on whether it will actually be closed.
@LinkBerest It's still pending, right?
@PM2Ring fyi: I might know that assignment (its in a python course I happened to help with - or someone used exactly the same set of words) - not using a set would mean a 0 for not following directions (and for exactly the reason you give).
Hi Aran. Thanks for the response. Yeah, it should be async I guess — whatever works. But actually this is a lambda function... just realised this might be a complicating factor.

I'm more used to elixir style async, where you can just fire messages to other processes with minimal ceremony. Maybe this is clouding my idea of what's possible in Python.
@AnnZen NLP tags I frequent seem to be pending a lot - there are not a lot of high level signal processing people here (a few, most hang out in this room at least a little). So unless regular Python people happen upon them - they sit (pending even aged away are okay - don't get banned for those - only declined matter for review bans)
15:31
@AnnZen Not any more...
@DarraghEnright I'm not exactly familiar with async either, but what I do know is that nothing runs if you don't have an event loop. From within an async function you can queue another function simply by awaiting it, but in a synchronous function you need to get access to the event loop somehow so you can submit your async function into the loop
Long Short Term Memory network questions tend to be some of the worse (not for the questions but for the answers they generate where people just give a full solution without any effort or attempt at understanding on the OP's part - meaning they have no idea how a LSTM works and will be up excrement creek without a paddle when complex conditions are encountered)
def ta(sample_string):
    count = 0
    sample_string=sample_string.lower()
    vowels = ['a', 'e', 'i', 'o', 'u']
    for char in sample_string:
        if char in vowels:
            count = count + 1
    return count
Guys do you know why i get this persisten sample string is not defined?
Driving me nuts
The identical piece of code does not give that error
@LinkBerest Almost all my declined flags are one for Very low quality. Guess I just don't understand it well enough.
@ExoticBirdsMerchant no repro, can we have an MCVE?
15:39
@PM2Ring yeah, like that ;) :)
No, I mean a piece of code that actually throws that error when I run it
honestly the bigger point I was making was with the comment on LSTM-style questions (or any questions without effort really): its a disservice and actually harmful to the OP if you answer without any effort on their part - I know, I've hired them and watched or had to work with them as their lack of basic understanding and research ability causes their job to fall apart
You hired them? How did that happen? O.o
when I used coding challenges as hiring mechanisms - they'd pass those and look smart but didn't have a clue how any of the tools actually worked or had no problem solving skills just good at "challenge style" questions
15:44
hmm, makes me wonder how they solved those
Now I don't use those (I still might give a question but the answer needs to be a speaking answer to my face - or over the video conference today)
Is there some easy way to see the history of a question's edits?
@Aran-Fey sry my internet connection went down. i have two pieces of code that are identical like 2 pieces of water. The first one works flawlessly the second drops an error
Jul 30 '19 at 19:34, by JGreenwell
HR interview, I don't mind at all pointing to where the "accepted answers" are because they're typically cookie cutter (so a correct answer might get rejected). Do not try and fake technical interviews you will end up dying on the job - which are way more demanding
basically when I realized the above
@holdenweb Right below the question is a button you can click that begins with edited
15:48
I just see text links "share edit follow close flag "
Ah, you mean the (recently added?) timeline icon? Thanks!
The "edited X time ago" message is clickable
@ExoticBirdsMerchant Okay? I still need an MCVE to help
@Aran-Fey Much better. Thanks.
def tirio(sample_string):
    count = 0
    sample_string =sample_string.lower()
    vowels = ['a', 'e', 'i', 'o', 'u']
    for char in sample_string:
        if char in vowels:
            count = count + 1
    return count
@DarraghEnright Please be clear here whether you want to run async code (async def, asyncio, ...) or just asynchronous code. The two are very different.
@Aran-Fey this code gave sample_string is not defined. Hmmmm weird
15:53
@ExoticBirdsMerchant no-repo
First of all, no it doesn't - all it does is define a function without ever calling it. But I'm gonna run it with some arbitrary input anyway, and I'm 99.999999% sure it won't throw an exception, just like last time
100% sure now
hehehe i didnt throw an error on you
@ExoticBirdsMerchant You probably have a typo like you did for count. Get a machine to do a diff and see the result.
Yup will look it up immediately. Thanks
@ExoticBirdsMerchant BTW, there's no point making a list of vowels. You could just use a string. vowels = "aeiou"
16:02
@PM2Ring that is corrent! Hey im new on this. Thanks! Finding an error is sometimes hard in Python.
I mean generaly. I takes a sharp eye. I tend to get (sometimes) instant frustrated. That is not good it breaks concentration.
@ExoticBirdsMerchant True, but you get better at spotting errors with practice.
@PM2Ring an most of all not exploding all of the time like a volcano hahaha
Thanks. I'm actually looking for guidance in that respect, I have no preference here, and in fact I am really not clear on what the differences are between the two options you outlined.

I only know my desired use case, so let me elaborate on that — I have a synchronous function (a function handling a HTTP request in this case) and I want it to do two things:

1. trigger a function to perform some asynchronous, non-blocking action, where I don't care about waiting around for a result.

2. Immediately after invoking this function, return a (synchronous) response, which just states that the r
@ExoticBirdsMerchant There's no point getting angry. The computer can't hear you. ;)
hahahahah thats right only my neighbour
16:10
@DarraghEnright unless you plan to have several thousand of these "asynchronous actions" hanging around, just use threads.
@Aran-Fey we don't do that here
They literally asked if that should be downvoted
yes
But that kind of message is what might make us seem like a voting mob. And this is empirical knowledge on my part.
@DarraghEnright have you read the docs on asyncio or any tutorials on its use?
Cool. Thanks for your help, I can use threads instead.

For the uninitiated, can you elaborate on why you recommend this? I guess I was under the mistaken presumption that using asyncio in some way would be the de facto solution here. I'm not a Pythonista so I am not sure what's idiomatic.
@LinkBerest I have.
16:19
Cause #1 & #2 are in conflict there (or I'm reading it wrong) - do you mean you want to run two operations (or more) in parallel. Starting task 1 & 2 and then getting a response when 1 finishes (all the while 2 is running)?
or that you want the chain or queue a few co-routines (start task 1, task 2 awaits task 1 completion then starts, task 3 awaits task 2 ...)
@DarraghEnright Real async code needs considerable work to make everything async, and the tooling also is still lacking (e.g. no async lambda). The real benefit of async are a) structured concurrency (no callback hell -> always caring for results) and b) extremely high concurrency (10k+).
You don't need/want the benefits, so there is no need to pay the cost.
Sorry, I might be a bit unclear. Let me clarify — I don't want to run anything in parallel or wait for any responses. In my case, the outer function is a HTTP request handler (more specifically, it's an AWS Lambda function).

In essence I want this handler to return a static response immediately, but as a side effect, kick off a task that will go off and do its own thing; i.e: I don't want a response and I don't want to wait for it to finish.

As outlined by @MisterMiyagi it seems that it's far more straightforward to spawn a thread instead :)
16:35
@Aran-Fey Taking that my answer wasn't the best answer and i knew it, I would've sent a voting mob to my own post. (A minute after posting, i got a downvote. Thank goodness thet didn't continue coming)
I tend to use trio when I'm playing around with async (or just doing small server maintenance tasks on my testing environments) - really liking it right now and hope it continues to grow. And Twisted when using async IO on production environments (honestly, rarely use asyncio anymore but there is nothing wrong with it - its just either too big or too small for my needs most times)
Trio. Cool, I'll educate myself and have a look. Thanks again!
@LinkBerest I vastly prefer trio. The asyncio API is just weirdly clunky most times, and they have some real cruft from supporting sync callbacks.
Trio <- direct link to docs (like I said: its awesome but just a little immature for full production environments - growing though so in a year shrug who can say?)
fyi: I don't get a choice on using Twisted but its not bad
17:36
There are so many duplicate answers here stackoverflow.com/questions/62309093/…
@AnnZen Note that the OP explicitly states they do not want to use str.split. It's a debugging question, not a problem solving question.
reposts of non-answers are the best worst reposts
@Aran-Fey ?
I'm... not sure which part of that I need to explain
17:51
Your famous quote.
Uh... I hate when people post duplicate answers that don't actually answer the question?
wim
wim
18:42
@python_learner about 12 years
@python_learner hmm. usually monkeypatching would refer to replacing an existing name, in order to override some existing functionality. I suppose that adding a new attribute on an instance could also be considered a monkeypatch in some ways, though.
@CodyGray Heh. It's a bit trolly, but everybody knows one of those caveman C++ devs that write reams of DIY code instead of leveraging modern libs. That's not to say that's the only way to write C++ of course
wim
wim
19:07
@AnnZen There is a badge for this (deleting your own answer when you know it's not the best answer, despite upvotes) stackoverflow.com/help/badges/37/disciplined
@wim I know, I've earned that before :)
wim
wim
@MisterMiyagi trio and curio is more interesting comparison
high-level modern frameworks with different design philosophy
asyncio is more like that not really a fair comparison
I was surprised when I earned the unsung hero badge, or more accurately, surprised that it was gold.
wim
wim
good to get that early
if you don't get it early you can probably never get it
@wim I never thought of that.
@wim But when we enough rep, people might consider our request in the comments not to get upvoted!
19:52
that has no efficient solution, does it? Pretty sure the best you can do is add a heuristic to your brute force search
@wim The question's too confusing.
In the first step, get as close to 41/num_sets as possible. In the 2nd step, get as close to 41/num_sets*2 as possible. Etc
@Aran-Fey Isn't it just n-sum so O(n^3) IIRC
the restriction is tricky, but there might be a way to get A* to find the shortest solution at least
Also if set X appears Y times, you can simply multiply all elements of X by Y. That should reduce the time complexity a fair bit I'm dumb
20:02
@wim retagged by a mod. I would take it with a grain of salt.
wim
wim
@Aran-Fey I can't think of an efficient solution (doesn't mean one doesn't exist), but it is highly parallelisable (is that even a word?)
I use it so it's a word
wim
wim
who needs efficiency when you can throw a grid at it ..
you probably need mongodb for that
20:53
@AndrasDeak You have seen the Meta posts saying that mods can now tag things as [status-review] to escalate them to staff, right? Staff is essentially guaranteeing a response to these. So, no guarantees that it'll be implemented, but at least we are promised it will finally be considered. It's better to at least know it's rejected than to have it still pending for years.
(You may already know this, and your comment is entirely correct regardless. Just wanted to make sure the full context was available for why us mods are now adding these tags to old feature requests.)
@CodyGray no, I haven't! Go figure.
Yeah, it's useful context, thank you :)
Yeah, they've hidden it pretty well on MSE. And, despite their claims, I haven't seen very many of the questions tagged [status-review] on MSO getting staff answers. But hey, it's something.
I haven't been paying any attention to the company side of things since they fired our Shog
I wonder if it would be a stretch to push a chat-related feature
something tells me it would be deferred until they find someone who knows how chat works
21:13
Wing 101 is a great IDE
21:48
@wim I disagree.
There was actually a time i hesitated to use it thinking some beginners won't understand and skip to the next answer. used it anyway because it's more practical
00:00 - 22:0022:00 - 00:00

« first day (3525 days earlier)      last day (1648 days later) »