« first day (3285 days earlier)      last day (1656 days later) » 
06:00 - 19:0019:00 - 00:00

6:21 AM
Hey, anyone awake yet?
 
6:38 AM
(or still awake)
 
7:12 AM
nope :D
 
7:40 AM
Aww
 
8:01 AM
cbg
 
cbg?
 
8:13 AM
hmmmm interesting (to me at least) conumdrum for now.
 
Ah a mystery
 
I have a list of IP addresses, and they signify servers we need to migrate onto a new system.

There *is* a spreadsheet, showing where in the new system, each IP address will exist. However.... the spreadsheet is incomplete, as in many places the IP addresses are missing, even when you can figure it out manually using another few sources of information.
 
Can you automate the manually?
 
I can't decide if I should 1. try and complete the spreadsheet, 2. work with the incomplete data hopefully updating it as I go along, 3. Just do it all manually
@Thijser I'm not sure, i'm not very good at coding, and there's some level of guess work here and understanding (For example, I know customer X's network won't be in Customer Y's group).
 
I'm never a big fan of working with missing data
 
8:15 AM
Problem is, for 'server' objects, I don't have a subnet listed. So I'll have to have a data set defining all the networks as well (even those I don't need to know the network for) simply so I can check if a server falls into a perticular network or not
I think filling out the spreadsheets missing data maybe the wisest thing right now.
 
Yes, that does sound like the best solution, good luck
 
Thanks :)
I guess (hope?) it'll help later too when I'm looking at this data again :D
 
8:36 AM
 
@AndrasDeak thanks
By the way, anyone got any experience installing pypotrace on windows 10?
 
9:23 AM
Got a question around wheels. If I'm creating a wheel from a project's SCM link like so - pip wheel git+https://github.com/org/python-proj.git -w /wheel. When I run pip install --no-index --find-links=/wheels git+https://github.com/org/python-proj.git, it tries to clone it again instead of finding it in the /wheel directory (where it does have the archive). pip install /wheel/python_proj.whl works as well
 
I haven't created wheels ever, but isn't the point of wheels so that you don't have to point to the project source?
 
Yes, but I was hoping the requirements.txt used to create the wheels and install them could remain the same
I don't think I have a choice, pip won't know I mean the wheel as long as I don't give it just the distribution
 
9:41 AM
this suggests you can just pip install a wheel
 
im getting configparser.DuplicateOptionError: while trying to read a file with duplicate entries
i treid fg=config.read("/tmp/jj",strict=False)
and got TypeError: read() got an unexpected keyword argument 'strict'
is there a way to live with duplicates,configparser should just overwrite paramas if given earlier
 
that second error seems clear enough
 
@pythonRcpp I think strict=False would have to be an argument to the ConfigParser creation call - it's defined under docs.python.org/3/library/…
 
@holdenweb thanks got my mistake
 
9:57 AM
@madhukar93 just to be clear: is your problem about creating/installing wheels, or about getting pip to use a local source for a remote dependency?
 
 
1 hour later…
11:17 AM
someone's playing minesweeper in another room again. 5 flags, really?
 
Anyway in case anybody knows something about installing c libraries in python (like potrace), could you take a look here: stackoverflow.com/questions/58374149/… ?
 
give the question some time to collect answers
 
Yhea, but I'm also looking for some extra suggestions to improve the question
 
the PyPI page has some things to say about your failing dependency, libagg. I would expect to see your question reference these and say if/how you followed them,
 
Ah in the installation guide for ubuntu/mac
I will try to pacman that
 
11:29 AM
no, in the installation guide for Windows
 
I don't see libagg anywhere in the windows part of the guide
or you mean the agg stuff
 
Ah yes that
I extracted both packages in my C:\src folder. Both are easy to build by executing ./configure; make and ./autogen.sh; make respectively, on MSYS prompt. that's where I got stuck
Though the link is no longer opening for me
But I'm not entirely certain what you mean
I downloaded the source code, extracted it in /c/src/agg-2.4
and continued the tutorial
 
12:22 PM
hey guys
 
hello
@Abhinav please edit message, highlight, ctrl+k for code format
for details see sopython.com/wiki/…
you can practice formatting in the sandbox
 
def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n-1)

print(factorial(5))
 
thanks
why do you expect that to print 1?
 
Why is this showing 120 instead of 1
 
because 5! == 120
 
12:30 PM
@AndrasDeak sorry for that fprmatting error
 
i.e. 5 * 4 * 3 * 2 * 1
@Abhinav it's alright, chat formatting is finicky
 
i think it's 1 because the last if statement says return1
 
cbg
 
cbg
@Abhinav try unrolling the function calls on paper
first you have factorial(5) which wants to return 5 * factorial(4)
 
ok
 
12:31 PM
so write down on paper what factorial(4) returns, in the same manner
and then you'll eventually reach a point where you just have return <number>, at which point you have the result for your original recursive function call
you can get back to us if after doing that it's still unclear :)
 
5X4X3X2X1X0!
after this the if statement comes
and it says return 1
so shouldn't t return 1
 
No, the if statement says "if you're asking for factorial(0), I'll give you 1"
"5X4X3X2X1X0!" you wrote is actually 5*4*3*2*1*factorial(0)
the last call to factorial, with argument 0, returns 1, so you get 5*4*3*2*1*1
 
@Abhinav it returns 1 to the caller, not to the top-level
 
What do you mean by caller
 
factorial(1) ends with return 1 * factorial(0)
so factorial(1) is the caller of factorial(0) in this case
 
12:36 PM
factorial(5) = 5 * factorial(4)
  factorial(4) = 4 * factorial(3)
    factorial(3) = 3 * factorial(2)
      factorial(2) = 2 * factorial(1)
        factorial(1) = 1 * factorial(0)
          factorial(0) = 1
        factorial(1) = 1 * 1 = 1
      factorial(2) = 2 * 1 = 2
    factorial(3) = 3 * 2 = 6
  factorial(4) = 4 * 6 = 24
factorial(5) = 5 * 24 = 120
Each indentation level ^ there corresponds to a level in a recursive call stack. factorial(5) can only return if its call to factorial(4) returns, and so on. So you go down deeper and deeper until factorial(0) can return literal 1 to its caller factorial(1), then factorial(1) can return 1 to its caller factorial(2), and so on
I bet there are some good tutorials about recursive functions out there (I just don't know where)
 
okay i understood what you said
 
This little captive program is a tool to help visualize recursive calls: practicum.tech/recurser There is a factorial example.
 
1:11 PM
cbg, do you know if there is a faster implementation of this (perhaps using numpy)

tot_volume = group.f_taker_size.sum()
group['f_taker_size'] = group['f_taker_size'] / tot_volume
vwap = (group['f_trade_price'] * group['f_taker_size']).sum()

where `group` is the `pandas.DataFrame`
 
if you indeed want to normalize the 'f_taker_size' column then I don't think there is one. Perhaps numexpr can speed things up a bit, not sure.
of course doing the same with the underlying numpy arrays might be faster, because pandas does all sorts of checks
 
The above takes an incredibly long time since there are many groups :(
will try numpy
 
so you have some outer loop that does this for each group?
 
correct
I tried .groupby('datetime').apply(lambda group: do_work(group)) and that was giving wrong groups
 
I bet groupby/apply will be slower than any vectorized arithmetic
 
1:16 PM
because I was giving back dataframe that was a single row (I think that was the cause)
 
Do all your dataframes have the same size? Or do they vary?
 
Varying sizes, usually in excess of 20k rows
 
if they're the same size you could even put them in a 3d numpy array and do all of this in one step, which would take a lot more RAM but would be fastest
if you have to loop you should look at numexpr or numba
 
thanks, will have a look
 
1:52 PM
question of opinion: are there some projects where you turn off "mutable default argument" inspections/warnings? we have a lot of functional code and this inspection is getting really annoying -- the warning is basically never correct.
 
Hi guys, if someone asked you how would you handle big data using python if you didn't have access to any external library/cloud how would you answer?
You can also direct me to any relevant resource if you know any
 
"handle data" is rather broad - do you mean process data, store it, ...?
 
Let's say while doing some analytical work @MisterMiyagi
 
@MisterMiyagi Then I don't see a problem with turning it off. Clearly you know what you're doing, so you probably don't need the inspection at all
 
> functional code
maybe this was what python was trying to warn you about all along
 
1:58 PM
you mean it's a secret conspiracy behind all that?
 
I thought functional code doesn't have mutable state
 
@Aran-Fey I was hoping to funnel the collective experience in regards to "I just shot Marvin in the face" with a default dict
 
what do you mean when you're saying "the warning is not correct"? That it's not really a mutable default, or something else?
@RaphX I'd say "I wouldn't."
 
the warning is correct in that the default is mutable (usually a dict). it is incorrect in the sense that the code doesn't actually do any mutating with it.
 
if someone wants me to reinvent the wheel (badly) they're welcome to employ somebody else for the same problem
@MisterMiyagi so basically you're just missing a frozen dict type
 
2:00 PM
"just", yes
 
well, yeah :P
not a simple problem but at least concise to explain that way
 
and you don't want to move to namedtuple just to appease a warning?
 
@MisterMiyagi I think I was just implying that functional code scares me, and I'd agree with python to warn about it\
 
you just have to upgrade to 3.9
 
2:03 PM
NamedTuple would not be appropriate. the fields are dynamically defined.
@AndrasDeak nice! I've had HAMT slip through my hands way too often now...
 
Does that mean we can never handle big data w/o cloud?@AndrasDeak
 
@RaphX no, I said I'd never try handling big data w/o external libraries
the cloud is a red herring
 
Presumably big data was once handled before the cloud existed
 
I'd claim the cloud wasn't called The Cloud back then
 
oh god, he's back - they all scream
 
2:06 PM
come to think of it, big data wasn't called Big Data either...
 
neither was data science
 
@AndrasDeak I know it makes total sense in the context... but it still made me chuckle like a madman for just a second.
 
heh
mondays, eh?
 
Is there a python library that can convert slash notation for network addresses, into IP address + subnet mask?
 
@AndrasDeak indeed!
 
2:08 PM
and for bonus points, be able to confirm if a given IP is in a subnet?
 
@djsmiley2k I'd start with googling "python ip library"
 
that'd be sensible wouldn't it D:
 
and if you find a reasonable-looking one, see what it supports
 
i got scared after my csv fun sent me looking at pandas
 
2:09 PM
stdlib is your friend
 
>>> list(ip_network('192.0.2.0/29').hosts())  #doctest: +NORMALIZE_WHITESPACE
[IPv4Address('192.0.2.1'), IPv4Address('192.0.2.2'),
 IPv4Address('192.0.2.3'), IPv4Address('192.0.2.4'),
 IPv4Address('192.0.2.5'), IPv4Address('192.0.2.6')]
 
(unless it's url stuff because requests)
(or unit tests because pytest, say many)
 
it's ip stuff, and woo ip_network.hosts() is fun
Now I need to think through the steps I follow to do this process manually :S
 
@djsmiley2k surprisingly enough, I've found the overlap between devops and pandas to be practically nil :/
 
am I missing a joke?
 
2:20 PM
panda(s?) is a lib for dealing wiht csv's
i started my script with a csv of data and spent a day looking how to use pandas to do the needful
Now I have a huge list of ips, or networks and need to match them to the 'name' of the network they are in
 
Pandas does many other things besides reading csvs
 
@djsmiley2k s.
and it's not a lib for dealing with csvs, it's a lib for dealing with data. People suggesting it as a csv reader are way off the mark
 
@djsmiley2k Python csv mANipulation LiDrAry
 
If you're thinking "yes, it does lots of fancy data things, but since you must have that data in a csv to begin with, 'pandas deals with csvs' is still an accurate description of its overall purpose", pandas can read several other kinds of files too.
 
@Dair don't even joke about that :|
 
2:26 PM
@AndrasDeak :D
 
2:38 PM
@AndrasDeak no, just regular mumbling on a monday
on a totally unrelated sidenote, finding out you may have an undetected race condition on an 8PB partition is better than 4 cups of espresso.
 
Given the silence, maybe the joke was a bit harsh. I'm sorry. It does read csv (as well as other formats, but often used to read csv) and it allows you to manipulate tabular data with labels.
(But then again, I'm no expert so that could also be a mis-characterization of pandas.)
 
@MisterMiyagi OK, I just wouldn't have assumed that there is any overlap between devops and pandas :) But now I suspect the only connection is that you're doing devops
 
@AndrasDeak I was just generally lumping "handling IPs and IP ranges" into the devops category
 
I've mostly found pandas to be either too large (when people just dealt with a few kb) or too small (when people death with streams) for devops
 
2:43 PM
> death with streams
Freud, eh?
 
@AndrasDeak I was going to blame Mondays. :D
 
@AndrasDeak Funny, I didn't notice that, I noticed the too large or too large but I thought it was a joke to indicate that pandas is just too bloated.
 
goes drinking another espresso
 
@Dair I had the same thought
 
2:56 PM
stackoverflow.com/posts/19960077/revisions Am I alone in thinking that edit is a regression? The "filtering" and "like in SQL" seem like minor details to the more general question "how to implement in and not in", which the previous title addressed.
 
yeah, that might be a bit superfluous
 
since in and not in have very specific meaning in Python, I feel the like in SQL is rather important
 
but SQL is already there in the body
I keep forgetting how important the title is for indexing
 
Not too familiar with SQL, but is it just the equivalent of item in list
 
no
the result is not a boolean in this case
it is more like list in items, returning a mask
 
3:03 PM
it's elementwise comparison
 
Ah yeah. Clearly that's the more typical use :p
 
Can anyone tell me how DataFrame.values returns a numpy array?
It's not a method..
As explained here DataFrame.values is an attribute, so how it can return something?
 
either 1) it's a property or 2) the wording isn't precise
well, technically . is a function call that returns the value of the slot
 
@MisterMiyagi But not using () after values
 
well technically now you should be using df.to_numpy()
 
3:18 PM
@Quark I have no idea what you meant. can you clarify?
 
@ALollz Is that another way of doing the same thing?
 
It's the recommended way, there's a bit red warning at the top of the docs: pandas.pydata.org/pandas-docs/stable/reference/api/…. They moved away from .values (though it's not deprecated yet) a few versions ago because .values behaves inconsistently in certain rare cases.
 
Hello. I have probably discussed this in past. I have to find the area of intersection of two circle who centres coordinates and radius are given, here is the code, how can I shorted to this, currently it is of 175 characters, but I have to shorten this to 128 character.
 
@MisterMiyagi I mean, is it not necessary to write an ( and ) after a function call? Till now, I've used () after every function call
 
>>> df.values is df.values
False
so it's a property (implemented as a function that returns an array)
@AjayMishra I hope you don't want us to debug that golfing mess
 
3:20 PM
@Quark behind the scenes, everything is a function call. . calls __getattribute__, just like a for loop calls iter for you
 
I’m on phone, so can’t format the code.
 
@AjayMishra too bad
that's not legible, unfortunately
 
@AjayMishra can't this, like, wait until you are not on the phone anymore?
 
@AndrasDeak I ain’t asked it to debug, just hint to shorten the code by 50 chars, I have no idea.
 
@AndrasDeak Can you tell me what does that imply?
 
3:22 PM
@MisterMiyagi C’mmon waiting for formatting one line of code, is pretty inefficient, that just one line.
@AndrasDeak what are you talking about?
 
@MisterMiyagi Ok, so placing () is not necessary for function call every time?
 
@Quark that it's not just an attribute, as in self.values = <some numpy array>
read about properties, but as Miyagi said through __getattribute__ anything is possible anyway
@AjayMishra the unformatted code had spurious markdown due to the missing code formatting, some of the asterisks were turned into italics. That's no way to write or read code, so until you find a pair of backticks somewhere you'll have to wait
And 50 chars sounds like a lot. Sounds like something that needs a refactor.
 
@Quark I will only say "yes" if everybody promises not to start some weird meta programming challenge
 
nobody will promise that here :P
 
this should be fine.
 
3:27 PM
yup
 
If you want derivation of the formula, I can send you link.
 
I'm fine, thanks
 
@MisterMiyagi Ok thanks :)
 
wim
3:48 PM
anyone else here in the "zero group" (can't see negative scores for posts)
 
It varies in time. I was there for half a day, then I went back into -1
 
wim
that was a bug that they allegedly fixed
you should only be in 1 group
 
Was it? Maybe
too bad, I've been waiting to get back into 0 to find things to downvote
 
wim
I am really curious about what the hypothesis is for this whole thing
 
I bet it's that seeing -4 will make you more prone to dogpile than -1
(because it would be a very weird way to test if askers feel better about seeing -1 rather than -4)
 
3:58 PM
today my job title is "Technical Writer"
 
Yeah @wim , I seem to be in the zero group; none of the last 200 python posts has a negative score shown from the search page! :D
 
all at zero @AndrasDeak
 
I see -1 scores
 
I don't remember giving my consent to being part of this sort of study, and be shown false indications in my browsing!
 
4:04 PM
ha, that's funny coming from you :P
 
I am immune to irony!
 
wim
Yeah it's kind of lame, reminds me of the shady tactics facebook do manipulating user feeds
 
at least this is just a temporary experiment and I'm pretty sure Shog will report back when it's done
just don't forget to downvote generously
 
wim
seeing scores like -1, -4 is a strong signal like "you shouldn't waste your time opening this post" and this just removes that signal, adding more noise.
 
4:07 PM
I've probably downvoted some questions more than I'd usually do. a -4 means I don't look at all, a -1 means look inside and downvote fruther if it's a mess.
 
wim
fortunately with the 1 rep filter script I don't see most of the worst crap anymore, regardless of whether the score is censored or not
 
@AndrasDeak I'm seeing negative scores
 
@Code-Apprentice all -1 or all <=-2?
 
The first page is just -1
 
yeah, look at the filter
 
4:12 PM
I'm not inclined to page through the rest of the results
 
and welcome to the test :P
 
oh yah...when I expand the score to see separate up and downvotes...the total would be different.
 
I meant the filter I linked, which says "score <= -2". But yeah.
 
Are people still losing rep for downvotes that are now ineffective?
 
yes
it's only about display
 
wim
4:21 PM
if you open in incognito tab you see the real score
 
or if you install a userscript that loads the real votes, or you install a userscript that automatically loads the vote breakdown
 
wim
4:42 PM
what the heck are key and filter gist.github.com/CertainPerformance/…
 
filter encodes what an API query should return
 
wim
base64?
 
key sounds like a user's generated key for having larger quota
@wim no
something proprietary I think
 
wim
where did you find that
 
I ticked some boxes interactively over at api.stackexchange.com
 
wim
4:44 PM
oh I see, missed the line above.
weird API
 
@wim The hypothesis is that the new OPs get discouraged when their question has a high negative score, even though their rep can't go below 1. So they are less likely to repair their question. The test is to see if the 0 min total score encourages them to respond to constructive comments.
 
@PM2Ring did you see that being mentioned anywhere official?
I don't think Shog would ever disclose what the test is about
 
wim
Then the score should be hidden from OP, not hidden from trusted users
 
and if it's just guesswork, I'm not convinced
@wim yeah, that should be it
this is a test about voting
 
wim
not necessarily
might be a test about views/editing
 
4:47 PM
maybe
in any case I'm pretty sure we are the guinea pigs, not the askers
 
wim
(are users more likely to just ignore downvoted questions, not try to comment or improve them)
 
@AndrasDeak Shog did say that it's to see if the OPs are less inclined to abandon their question.
 
wim
[citation needed]
 
@PM2Ring really? Wow
that would be a very bad experiment
I hope there's just some misunderstanding
 
@wim Fair enough. I might be able to find something in MSE chat... OTOH, I might be mis-remembering, or misinterpreting. And Shog did say he didn't want to go onto too much detail.
But it's consistent with the upcoming plan to make the on hold / closed message box more friendly & welcoming for the OP.
 
4:52 PM
But it's a completely wrong way to measure that :|
 
user10984358
hey guys, a quick question
 
user10984358
pip install "numpy<1.17"
 
like trying to measure the friction coefficient on asphalt by dropping a coin from the overpass over a highway
 
user10984358
does that remove my "old" latest numpy and installs an older one or two numpys?
 
(and it's the friction coefficient between the coin and the asphalt at that!)
 
4:54 PM
I'll take a look in MSE chat. In the mean time, there's this meta.stackoverflow.com/q/390178/4014959
 
@TheNamesAlc one thing's for sure: you'll never have two numpys
 
wim
@TheNamesAlc read the output of the command carefully.
 
user10984358
I didnt run it still, I am just paranoid as to not mess up my python environment, already re installed anaconda twice, but will do
 
> We are conducting a two-week experiment to understand how the voting user interface impacts question answering and editing.
I guess that's the official version
 
Ok. Maybe I was wrong, but I'll keep reading.
in Tavern on the Meta on Meta Stack Exchange Chat, Oct 7 at 20:25, by Shog9
@Zoethetransgirl right. Superficial - the goal is to gauge how score affects how folks interact with the post(s).
 
wim
5:00 PM
so I guess they are trying to determine if negative score signals to "ignore me", or negative score signals to "improve me" ... ?
 
@AndrasDeak And "editing" to me primarily implies editing by the OP, not just others making cosmetic changes.
 
wim
imagine what a mess wikipedia would be if they wanted to make the job of contributing to and curating it welcoming and fun to the lowest common denominator.
 
@wim Also, the pile-on thing with negative votes. As you said earlier, that could work either way. Mostly, if I say a poor question at -4 I figure that's an adequate signal, both to the OP to make a big effort to improve the question, and to others that the question is probably not worth looking at (in its current state).
But if the OP does put in the effort, few people bother to reverse their votes, or even look at the post, since they get virtually no info that it's been edited, apart from the page bump.
 
wim
yeah. I wouldn't mind a feature to get a notification that OP has edited their post after I downvoted it, tbh
as long as it had a way to "ignore notifications for this post" in the UI
 
OTOH, if the -4 question is really bad & unsalvagable, there is the tendency to downvote & burn it with fire. Of course, it's probably better to just delvote it, but only a relatively small number of us can do that, compared to the number with downvote privileges.
 
wim
5:08 PM
@ReblochonMasque if you feel it's shady then drop a vote on here meta.stackoverflow.com/q/390343/674039
 
@PM2Ring huh
 
wim
currently sitting at a tranquil +31/-32
 
Thanks @wim - the split votes are quite interesting...
 
Meh. Bunch of sites fuzzy votes, and permanently. I don't think this concerns ethics
We can always grab our pitchforks when this becomes a feature
 
wait, we weren't supposed to grab the pitchforks yet?
 
5:12 PM
I doubt you can enforce ethics with pitchforks.
 
@MisterMiyagi not for this, anyway :P
 
wim
I'm not the pitchfork type, I would just stop contributing :P
it's not fun to wade through crap without the necessary tools to avoid touching/smelling the crap
 
Yup
And if you sacrifice quality control for pampering, we can close shop because we already have things like quora
 
Ok, it was Magisch speculating, and shog neither confirmed nor denied that speculation.
in Tavern on the Meta on Meta Stack Exchange Chat, Oct 7 at 20:26, by Magisch
It'll be very interesting if not having negative scores makes people more likely to edit their closed posts into shape or similar
 
That's somewhat reassuring
 
5:18 PM
@AndrasDeak picks up pitchfork again
just to be sure...
 
"Tavern on the Meta"? marketers have taken over!!
 
5:35 PM
I just had a strange experience at the bus stop with a guy from washington. He tells me an old story and I then tell him I just visited the us this summer. He replies good for you. Which in german would be considered very rude and then walked away...
 
lol
 
I know realized that in english there is a non sarcastic usage of this term. In german this phrase exclusively means. I dont care what you habe to say or who cares :D
 
Did you just meet him at the bus stop? And who initiated the chat?
 
Yes' I did saying something about how annoying the mosquitoes were
Culturaö differences cqn be quitea pitfall :D I first thought wth old man. You just told me a story of your home town and I just told you I visited your country. Its not like I was telling him my life story. But he actually meant that is good for me, a nice thing :D
Argh mobile
 
did you talk in German?
 
5:41 PM
rbrb
 
No english
 
@Hakaishin In English, "Good for you" is almost always sarcastic. I suppose there's a chance that he wasn't being sarcastic.
 
"good for you, young man" sounds less like that ;)
or perhaps he was a grumpy guy because he hasn't been home in three decades, and you were there last month
 
Yep. And you can do a lot with tone, too. OTOH, I like Andras' jealousy theory.
 
wim
5:56 PM
TIL ned batchelder has been playing AoC since the start 2015, 2016, 2017, 2018
 
nice
 
wim
yeah, will have to check out his approaches when mine are too slow
There are still a couple of puzzles I wasn't able to get under 15 seconds
 
6:20 PM
@AndrasDeak So in effect you are saying that you want functoools.partial to beable to redefine the default value for a named parameter? That seems to be asking quite a lot.
 
if i'm storing records of stuff my app. is doing in some db table
 
I need help with a design decision for my serializer. It's about what exception I should raise if you pass in an object that can't be serialized. The problem is that there are some classes whose instances can't be serialized (like generators) - so the obvious choice there would be a TypeError - but also some classes that can sometimes be serialized and sometimes not, like memoryview - I can't serialize sliced memoryviews like memoryview(b)[1:].
The logical choice for those would be ValueError. But I don't think I want to have 2 different exceptions for this. Should I just throw a custom NotSerializableException instead?
 
does it make sense to have a separate queue + separate consumer dedicated specifically to recording these events? (i.e. - when some other consumer does something, put a message on the queue that will be handled by the "record keeper" consumer)
 
@PM2Ring the tone was nice and I found an se english question which claims otherwise. Which makes me believe he actually wanted to say thats nice or something along those lines :P
 
@Hakaishin Ok. As I said, it is possible for it be not sarcastic. Eg, if there's rising stress on the last word. Also, there are regional differences with stuff like this.
 
wim
6:36 PM
@holdenweb No, he's saying that a kwarg specified by partial should override the default (which it can)
The context was a non-puzzle proposed by Aran-Fey , about whether a partial can/should be allowed to be applied on top of another partial
 
@AmagicalFishy I'm not really following. Why doesn't your model just record the data directly?
 
wim
some subclass of AranFeySerializerError
and don't name your exception SmurfException, SmurfError is typical
 
@roganjosh there's a lot to record, and i like the idea of separating the function (stuff the app. is doing) from the record-keeping. does this make sense to do? or is it superfluous structure?
 
I think it's a superfluous structure unless you're limited by something like SQLite
 
wim
6:41 PM
Yes it was serious advice. A top-level exception class should be part of the public API of your library
 
Hmm, I kind of have that. I have SerializationException and DeserializationException, but they don't share a common parent
 
@AmagicalFishy The whole point of the model is to have an ORM, right? What would you be passing to the writer? It's either just going to be using the same model or executing raw SQL, which doesn't make much sense if you have the model already
 
I shall interpret your silence as silent disapproval and go fix my exceptions
 
i was thinking of it a little like this: there are a few services that add to a couple of different queues (these aren't models, but views that get POSTed too). I'd like to record when said service adds to a queue, so put something on a record_keeping queue. then the consumers (just a couple of workers) do whatever is on their respective queue. several times during their doing, i'd like to create event-records
 
wim
Anyone here tried using github actions for their CI/CD yet? How was your experience?
 
6:49 PM
there are a couple of different event-models (for different records). i thought it'd be cleaner to just have one record_keeping queue which everything sends to
and let one record_keeping consumer do all the busywork when it comes to using the right event, populating the db, etc.
(also this doesn't tie the functioning of the other workers to keeping records—not that i actually expect anything to go wrong on that end; it just feels cleaner) @roganjosh
 
@holdenweb what wim said. I want a new function with a modified kwarg. Which is what Aran's original question did
 
@AmagicalFishy something like background jobs then?
I think I'm following better now with the desire to decouple the POST request and the handling by the server
 
very similar to that, yeah (except with multiple queues---and no cycles, but pretty much that)
 
Kafka always springs to mind for me on this kind of thing but I've never played enough with it to know whether it actually is appropriate. It would be a single middleman but with multiple processes consuming different jobs from the queue
 
right now we're just using amazon SQS and pretty simple docker containers :S
i basically wanted to make sure there weren't any awful downsides to splitting up "record keeping' into its own queue/consumer chain
 
06:00 - 19:0019:00 - 00:00

« first day (3285 days earlier)      last day (1656 days later) »