« first day (3820 days earlier)      last day (1128 days later) » 
01:00 - 19:0019:00 - 00:00

1:02 AM
cbg
 
@AvinashRaj cbg, time for your yearly visit? ;)
 
Hi @AndrasDeak, haha :-) still remembering me ..
 
Everyone remembers the regex ninja :P
 
haha
 
 
3 hours later…
4:07 AM
April Fool
 
the CV could probably stand for Close Vote your questions :D
 
5:05 AM
Well, FastAPI is pretty nice. I used it to create this little free-standing queue server, all packaged up in a Docker container. After relearning that you have to listen on host 0.0.0.0 when running WSGI containers, I was able to fire up this little queue server without installing Python or FastAPI, while doing port forwarding from the "host" machine to the server running in the container.
The nice part of FastAPI is that, when you kick off the server at port xxx, accessing "hostname:xxx/docs" gives you this great little interactive testing form.
Each of those buttons opens up a sub-form with input fields and an "Execute" button. Pressing Execute gives the curl command you would use to run this same command from the command line, and dumps out the response headers, status code, and response body.
 
5:24 AM
this kinda looks like swagger I guess
 
5:47 AM
That sounds about right, since I saw swagger loaded up when I pip installed FastAPI.
 
 
1 hour later…
7:04 AM
Morning folks
I have this line reactor.run(False) but according to the docs twistedmatrix.com/documents/13.1.0/api/… it doesn't take a param, how do I find out what it does?
It's a twisted internet reactor just to make it clear: from twisted.internet import reactor
 
You'd look up the source code no?
I haven't tried to find that particular method, but hopefully the answer to "what does this bool do?" is easy enough when you find it. I guess there's no guarantee that it'll be perfectly clear when you find it
1,884 branches... nice
 
the fractions library from fractions import Fraction does a good job handling rationals. But what about square roots. This is far from complete but it shows what I'm talking about. Is there a library that handles this sort of thing?
from fractions import Fraction

class Root:
    def __init__(self, base: Fraction, i: Fraction, j: Fraction):
        self.base = Fraction(base)
        self.i = Fraction(i)
        self.j = Fraction(j)

    def __mul__(self, other):
        if not isinstance(other, type(self)):
            return other * self
        if self.base != other.base:
            raise ValueError(f'Bases must be the same: {self.base} != {other.base}')
        i = self.i * other.j + self.j * other.i
        j = self.i * other.i * self.base + self.j * other.j
Examples
a = Root(2, 1, 1)
b = Root(2, 3, 4)
print(a * b)
print(a * 10)

# 7 x √2 + 10
# 10 x √2 + 10
 
7:21 AM
@roganjosh yes, good point. Turns out it's not so easy to find, usually Pycharm helps in looking at the source otherwise I use the docs. If neither pycharm nor the docs help I just cry. Jk, yeah I guess cloning the source and sifting trough it might be an option. But the code looks quite convoluted so I will leave it be for now
 
Can't you just search for the name in github?
 
There's a whole bunch of reactor implementations, but it seems they all accept a installSignalHandlers=True argument. Here's one of them
 
Thanks :)
 
I have no idea how an instance of the Reactor class would end up at twisted.internet.reactor though, mind you
 
yeah after 3 indirection files and conditional loading of stuff I stopped looking :P But this seems to be the right solution. So turns out it's irrelevant for me and I can leave it at false
 
7:34 AM
hi there
can someone tell me, where is my model located? prnt.sc/111b2w6
I have connected postgress pgAdmin but when doing python manage.py makemigrations and python manage.py migreate I didn't see my database
there are 5931 database
but I only created less than 5, where is my database exactly?
I am not able to find the exact table
 
What on Earth has happened there?
How have you created all those DBs with UUIDs?
 
after I connected postgress from heroku I see 5929 database
 
But something has created all of them
 
but, I didn't see mine
 
Why is that your concern and not the fact that it's clearly an issue that there are nearly 6k databases in the first place?
 
7:42 AM
but only first database is allowed, others are no privillage
I didn't see my table
 
Well, you'll just have to expand the tree out for each of them and look for your table in the schema, given that you're au fait with this beast
 
AAB
@NIKHILCHANDRAROY those are other DB's created by heroku for other users
 
Why does Heroku do that? What are we looking at exactly?
 
how do I see mine database?
 
AAB
go to your db credentials in heroku
that will give you all details of your database
 
7:47 AM
Ok so here is a gist of my Root class and now I don't need it. from sympy import sqrt
 
AAB
copy paste the database value from there and search in pgadmin
 
thanks, got it
but, Is it secure?
if user search my database and get the all database ?
 
Access rights can be granted on individual databases in postgres, but that still doesn't look either secure or stable to have everything dumped like that
 
AAB
@NIKHILCHANDRAROY they can't do much without the credentials. I used the free tier of Heroku for learning a few things, not an expert on it but I feel it should be safe
@roganjosh first time I opened pg_admin I wondered the same too
not sure if things change after we pay pay 10$ for next tier
 
I certainly wouldn't be putting any sensitive info into that
 
AAB
7:56 AM
@roganjosh from what I saw it seems like they have installed postgres on an Amazon EC2 instance and when a user requests a Postgres DB they randomly assign one of those machines with a database for the user.
 
what if I use authentication login/signup and if not secure then any user can get the access of database
 
@AAB so the database isn't even unique to a user?
 
AAB
@NIKHILCHANDRAROY well if credentials for the DB leak then yes all data goes poof but thats possible for any DB accessible from the internet.
@roganjosh they create new Database when a user makes request, though I am not 100% sure on this :|
 
Well, I can cross off "play with Heroku" from my to-do list. Sadly is was always way down the list anyway
 
AAB
@NIKHILCHANDRAROY not saying its unsafe or safe just telling my observation which could be wrong, am not that experience with DB let alone Postgres security
 
8:03 AM
ok, thanks for your concern.
 
AAB
@roganjosh I think you should still test it. Let me clear up a few things the credentials are not permanent they change after some time, and Heroku updates the credentials for the apps automatically.
@roganjosh what heroku is doing is it really poor practice?
 
8:19 AM
recbg
 
8:58 AM
@AAB purely from a usability standpoint it's messy. I also certainly wouldn't be comfortable putting data into a pooled resource that can be seen by anyone with pgAdmin. There would almost certainly be legal implications about storing anything like personally-identifiable info in there (GDPR or ISO27001 for example). I just wouldn't touch it with a bargepole
Though ISO27001 is an accreditation so I shouldn't have implied that this was a legal obligation
 
9:15 AM
Some people are just too paranoid:

foo = Foo()
if foo:
foo.doStuff()

and the constructor of foo does never return None or does something weird. Also if you can't create foo you should abort...
 
text and multiline code don't mix...
the formatting guide is pinned on the starboard
 
Ah I see, I thought I was a noob and always chose the lazy route, but this is the intended route I see :P
I have mixed feelings about the other dev. On one hand I like him personally and we get along on the other hand I want to punch him so hard :D
 
but yeah, that code typically makes no sense if Foo is a type
 
also above code is repeated for 10 objects. Like he loooooves copy paste it's terrible. It should be forbidden
 
and I guess in cases where it would make sense, foo.doStuff would not work
@Hakaishin obviously you should refactor with getattr and globals()
 
9:19 AM
@AndrasDeak <3 I am (not) looking forward when I present him our first new company coding style guide. Based on all his bad examples :P But I want to finish the refactor and show that it works, before shooting shots :P
 
Perhaps you should angle less for "shooting shots" and more for constructive criticism, especially if you like the guy
(but even if you don't)
 
It's super constructive. It is in the style of the google c++ style guide. Like general topic, more specific description, bad example, good example.
 
I'm talking about your approach
 
what do you mean?
 
with the same person and same resources you can both be a jerk and make them dig in their heels, or be constructive, helping them learn how to do things better
Of course one can be passive agressive about it, refactor the code according to the new style guide, and point a finger at it during review. But I doubt that would make them change their coding style.
 
9:27 AM
As if there where a review :D I mean what else do you suggest? Making a style code seems to me the most constructive way
 
I suggest talking to the person. But it's not easy to talk to people right.
yesterday, by Andras Deak
actually solving people problems is often less gratifying in the short run, because one should keep their sense of superiority to themself
 
I mean we talk often, he knows I'm doing a giant refactor. But I think collect and then discuss everything at once makes more sense than every time I find a new thing to talk about it. Seems more efficient
 
Absolutely. The only thing I'm talking about is the tone of the "discuss everything at once"
 
But I gotta say I find it hard to not be passive aggressive, it's a vice of mine. I thought highly of him before, looking at the code that has dramatically changed.
 
you should work on that
 
9:30 AM
yeah, just not sure how...
 
what kind of person someone is is largely independent from what quality their code is
@Hakaishin humility :P
Sticking your ego where it don't shine. Concentrate on objective points. Why the above code snippet is not ideal.
 
Well ofc, I think he is a fine dude. I just thought professionally highly of him. But now realize that he has gaps.
 
and in the long run attend an assertivity training or something :P
 
@AndrasDeak why that? also what is that :D?
 
Assertivity is the ideal communication attitude towards other people. If you force what you want on others that's aggressive and not helpful. If you let others push you around that's submissive and that's also not helpful. Assertivity is the attitude with which you try to achieve what you want without hindering/oppressing others.
It's a typical "soft skill training" topic. And it can be helpful working with other people. I mean being assertive is helpful anyway, but if you work in a team it's best if everyone knows how to communicate non-aggressively.
I'm sure there's a lengthy wikipedia article on assertivity
 
9:36 AM
True, the thing is there is way more to the story and I kinda know what I would have to do to fix it. But it would require me leaving the company and starting something on my own and that would be waaaay too much work. I'm am quite lazy. So yeah i should suck up my passive aggressiveness or just quit.
Well anyways gotta go eat launch. Thanks for the talk :)
 
@Hakaishin also check if Foo implements __bool__(). That makes a huge difference whether the snippet makes sense.
 
10:01 AM
it does not. It inherits from thread, which as I checked also doesn't have a __bool__, but I might be wrong
 
ahh, defensive programming. I could get rid of it in our projects by requiring 100% branch coverage in tested code. If you they to write a new test case every time you type if, people become a lot braver all of a sudden.
 
hahaha as if we had tests :D but yes, that's also how I got rid of defensive programming, I was super annoying to test all those branches
 
@Hakaishin here's how to be humble. YOU had gaps too. we all start somewhere.
let that sentence sink in, sit with it for a bit.
If a person is good natured, and a bad coder, that's honestly infinitely more preferable because you can work with someone like that.
so see whether that's the case here or not. if it is, why don't you help them out. just treat it like a collaborative effort
 
@ParitoshSingh yes, but he is 10 years older and has a bigger salary. Which is the main thing that rubs me wrong. That salary is based on age and merit. I don't like the age factor. You can call it envy, which is 50% true, the other 50% is a strong desire for fairness. Also helping them out would imply that they would want to change something. They were like just changing as little as possible to be able to add your stuff and integration is a nightmare.
While I now clean up his old spaghetti code he goes on to do new projects.
 
okay, so ask yourself this. Does this justify taking out the fault of a bad system on this guy?
 
10:12 AM
No it does not you are right
That's why I said above, if I would really want to fix something I would have to start my own company
but that would be a lot of work now only for payoff later.
 
At the end of the day, it helps to emphasize with others too. they too are just another person trying to earn a living and get by. I mean, imagine it this way: do you think they had the kind of help and resources that we do now, when they were learning things? What if they were literally on their own, having to work through things? I don't want you to answer the question, rather just understand that their life has been a sum of experiences different from your own
 
I'm sorry I keep bringing up bad examples of code. It's a form of venting, but probably not a good one. Usually I do this stuff of venting while doing sports with friends from uni, but lockdown has made that impossible... thus my venting here. I will try to stop it, since it doesn't lead to much good.
 
AAB
@roganjosh curious but isnt that how most hosting websites work like for eg hostinger has a shared plan they offer MySQL, so its one installation of MySQL DB, and for each new user/website they create a database inside right?
 
Occasional venting is fine. my only issue right now is, you're targetting the person behind the code. And that's not good. i'd rather have a guy on my team who says "this code is bad" vs someone who goes "you're a bad coder".
 
I mean why can't both be true? :D
 
10:19 AM
i like the former, i don't like the latter. there's a prejudice and judgement being passed in the latter, and its important to realise it doesn't matter
until you understand that, you yourself are not a great teammate to have.
 
@Hakaishin You could always try help(reactor.run) at a pinch. It can't be worse than completely useless, so anything else is a win.
 
if I say I'm bad at running, what's the prejudice? And ofc it matters it matters for performance reviews. I don't see how these things dont matter
@holdenweb uuuuh amazing, didn't even think of that, another tool in the toolset :) I wonder why pycharm can't show me the help instead of can't find source message
 
:shrug:
 
@Hakaishin slightly different story when you talk about yourself in this manner vs someone else. as for talking about this way in general, the problem is, you've "condemned" the person to be forever bad at something in your own mind. recognizing someone's strengths and weaknesses is good, but there's also the aspect of understanding that people can improve and change their skills.
so this shift in language is a very important trick to prevent yourself from being too judgmental.
 
@ParitoshSingh oh for sure not, everything is fluid. I no doubt believe that he will agree and undestand most points on the styleguide and that it will have a positive impact and that he will become better at writing code. It will take a bit of time and training to get rid of the Java habits, but I believe he can do it. Statements like x is bad at y are ofc always temporary. I mean there is talent in everything, but that's only important if you want to compete in the top 1%
 
10:27 AM
yes, and also, the important thing is, that tasks get finished and things get done. It doesnt matter if i have 2 people on my team who cant code, and 3 on my team who can't interact with clients, as long as we together can finish whatever we need to
 
@Hakaishin "He has gaps"? Show me the person that doesn't (myself fully included). Have you considered the possibility that you hold your role models to impossible/unreasonable standards?
 
and that's why i say it doesnt matter if one person has gaps, because it's a collaborative effort to fill those gaps as a whole
 
[Still catching up: this is not intended to be a pile-on. Thank you for listening.]
 
@holdenweb maybe. The only person I really thought could code was my bachelors thesis supervisor. He was amazing, really beautiful code. He thought me the ways. Everybody else I met was worse. So I know the standard is doable. If 1 person can do it everybody can.
 
@Hakaishin You could perhaps find some way to hook the pycharm UI to the help function? Many IDEs can be so configured.
@Hakaishin Totally disagree. "Edmund Hillary climbed Mount Everest. If one person can do it everybody can." with respect, I see no way to defend that statement.
 
10:30 AM
@holdenweb good idea, a project for calmer times
 
Ah, coffee time. I'll take the laptop back in from the shed now.
 
@holdenweb I mean the above statement is a bit a hyperbole. Ofc to do the things extraordinary people do you need talent(which not everybody has) and training, but I wouldn't consider writing readable code extraordinary. For sure I wouldn't compare it with climbing mount everest
 
Surely that's only a matter of how far away from the median you go. And anyway, this treats coding skill (and human beings) as one-dimensional and is therefore necessarily far form com,plete picture.
 
I don't know why everybody I talk to about these things makes these generalizations. If we talk about coding skill it's 1 dimension ofc. I didn't say anything about the persons other skills or other characteristics and ofc coding skill is not a complete picture of a person.
I kinda think this goes without saying, but people keep bringing up the point you just did
 
"ofc"? I again register disagreement: there are many dimensions. Some people are good at coding for readability, others for performance, still others for testability, for example.
 
10:46 AM
Can confirm, my algorithms are above average and my test suites are below average
 
@holdenweb agh, this is frustrating. Yes things are made up of parts. But you can combine these parts which every way you like, which then looks like coding_skill = your_weighting_function(sub_coding_skill1, sub_coding_skill2, ...)
 
Perhaps the reason people keep bringing up this point is because they feel this narrowness of view will be unhelpful in your coding career. That's generally why people hang out here: they're an altruistic bunch, and also selfish enough to get gratification from sharing their skills.
Linear algebra does not solve all problems ...
 
@Hakaishin if people keep misunderstanding you perhaps you should phrase things better ;) xkcd.com/1028 (see also alt text)
@holdenweb bane of my existence
 
@AndrasDeak :D
 
10:51 AM
Tardigrade!
 
Oddly enough I am currently working on skill set and career path definitions, so this is topical for me. The above diagram was part of an attempt five years ago to determine the shape of my team's skills. The orange section was the team average, the yellow the (self-assessed) scores for a particular individual.
So there's not much room in my brain for a one-dimensional picture of coding skill.
 
Ok let me rephrase that, I often find that people are not enough charitable with their understanding of someones argument. Like if I bring up an argument somebody will take it in it's weakest form and argues against that, which then puts me in the position to have to spell out the strong version. I think when discussing things one should try to empathize and always argue against the strongest form of an argument not the weakest.
The above is a perfect example of this. One could take the easy route and say hey it's not 1 dimension it's many or one could assume that the person had a weighting function like this in mind coding_skill = your_weighting_function(sub_coding_skill1, sub_coding_skill2, ...).
Which then moves the discussion forward into interesting territory of what IS your weighting function? Also I love that chart, is this a thing u developed yourself or is there an overview somewhere?
 
@Hakaishin bad-faith occurences of that are known as the strawman argument. But more often than not (see also Hanlon's razor) it's miscommunication. You can choose to go into meta arguments about it, or just clarify what you mean so you're on the same page as the person you're trying to discuss with.
 
Incidentally, interpreting the other guy's argument in the strongest way is known in some circles as "iron man". The Rationalist community advocates for ironmanning, for example.
I try to do it when possible but the result is that I have to spell out the strong version of what I think they mean. So one way or another, somebody is doing the hard work of hammering out ambiguity
 
11:08 AM
@Kevin Interesting never heard that term, but yes I would advocate for it too
 
Not fun when I put love and care into an essay like "I'm guessing by X you mean Y. But even Y has problems A, B, and C [... etc]" and then the guy is like "I didn't mean Y at all"
 
but Y
 
@Kevin Not necessarily, you can just move forward with assuming the strongest position which then can go 2-3 steps further without anybody having to explain anything, just by both people "iron manning" yes eventually you will make a step where there will be disagreement and then you can discuss in detail. But iron manning makes discussions efficient by skipping many steps. It's basically a form of lazy evaluation. Only somebody has to explain if there is disagreement or confusion
otherwise the train just keeps rolling :)
 
Of course, I could lead off with "What do you mean by X? Are you saying Y?" but then they might say "Ugh, do I have to spell it out, can't you just empathize and argue against the strongest form of my argument?" ;-)
 
@Hakaishin branch prediction has become really expensive in modern CPUs you know stackoverflow.com/questions/11227809/…
 
11:11 AM
@Kevin I feel like that is life :P
@AndrasDeak haha low blow ;)
But humans are not computers and I think they are efficient at branch prediction :P
 
Isn't "disagreement or confusion" what we've been doing for the last two pages? We're exactly in the situation you want :-P
 
But it is actually a similar problem. Realizing that you have been talking past each other for 30 minutes is how you get Shakespeare plays.
 
@Kevin What, nooo :D wait, are you joking?
 
Mostly yeah. Let's say 75%.
 
:D
Iron man is a nice term in contrast to the straw man :) Now make it non gendered and it's perfect :P
 
11:16 AM
I think bad things can still be men
 
IronBeing
 
@AndrasDeak so you think iron manning is not a thing to strive for? Why?
@Kevin Straw being :P It could work, just needs some getting used to
 
All this said, perhaps there's a time and place for strawmanning if you maintain an attitude of "me and the other guy are looking for the truth together" rather than "I'm trying to win this fight". Pointing out seeming weaknesses in a statement can be a first step towards building the iron man collaboratively, rather than a snipe intended to shut down conversation
Basically I'm just saying the Socratic Method is cool and good
 
@Kevin Really? I see it exactly opposite, strawmanning is I just want to win and don't care about the truth, that's why I interpret your argument weak. Can you explain further? Do you mean something like I agree with you and see the strong argument, but somebody else might not so let's talk about how you could phrase it in such way that it is unambiguous in a public debate?
There is for sure value in that, but then it's not really a "discussion" but a collaborative working on how to make arguments more precise, but not really two disagreeing positions
 
I spy puppies! Hiya @JonClements
 
11:29 AM
@holdenweb oh shucks... my ninja skills have failed me! How you doing?
 
I guess it depends on whether you define "strawmanning" to be "the intentional misinterpretation of an argument as its weakest form", or whether it can also be "taking the most apparent-at-first-glance interpretation of an argument without putting much thought into charitability"
 
Well, the good news is the compensation round is now for all but two people; the bad news is those people are my boss and me. How're you?
 
@holdenweb Same old... just realised it's a 4 day weekend though... yay!
 
I've taken a day's vacation either side of Easter so I get a six-day weekend and onlty have to work three days before the next one.
 
a cunning plan :)
 
11:34 AM
How about I make up a new name for that second definition. It's a clayman. Strong enough to stand on its own, as long as nobody messes with it. Weak enough to be smushed by someone with ill intent. But the well-meaning can improve its shape and forge it into something strong and beautiful.
 
@Kevin taking the weak form, no matter intentional or not. I'd say making strawmans to improve the argument can make sense in a prep for a political(dishonest) debate, to know how to quickly clarify the argument. But in an honest debate there is no place for making them, because in an honest debate we care about truth, not about image
 
@Kevin with the aid of a kiln?
 
@Kevin i love it :)
 
@JonClements Yes, the flames come from the comments section when you post the final form to the greater public ;-)
 
@Kevin xD Giving it the finishing touch
 
11:36 AM
@Hakaishin "Truth" is a slippery concept, though, isn't it? Is it true that I'm a good programmer? Is it true that I used to be better?
 
I can never figure out how I should arrange my files in this situation: I have an abstract base class (Server), a bunch of (still abstract) subclasses thereof (BS4Server and SeleniumServer), and then a bunch of (not abstract) implementations (Xkcd, Dilbert). Here are a few examples to visualize what I'm talking about. Any recommendations?
 
Interestingly enough I believe (sufficiently strongly not to have checked the evidence ;-) that the first bricks were made from clay and straw.
 
@holdenweb I'm an some more ontholigical specifiers which I can't think of right now which I should write down once to know in such a moment realist. So no it is not. Our understand of it is, but I believe there is truth
@holdenweb Make a test, rank yourself and repeat the test over time and there you have your answer :P
This for sure has to be my least productive day in a while, on the bright side it's kinda fun :)
 
Whereas, if forced to elucidate my feelings on the issue I should say truth is an infinite-dimensional continuum conditioned by each person's experience. But that's only an approximatipn.
 
Re: "working on how to make arguments more precise, but not really two disagreeing positions". There is a belief among Rationalists that two perfectly logical people with perfectly defined arguments and perfect evidence are literally incapable of disagreeing. So if a disagreement occurs between people in real life, the problem can only be with the argument or the data, and both can be resolved by making them more precise
 
11:41 AM
@Kevin yes :)
Disagreement is impossible :)
Resistance is futile :D
 
I should prefer to suggest the error is in the rationalists' belief :P
 
@holdenweb In my intuitive understanding of those wishy washi terms, I'd say sounds about right :D
@Kevin that's so well phrased, is that wikipedia? I love it, what a beautiful world to live in :)
 
@holdenweb If you define "good programmer" in painfully objective terms, and if you've kept painfully accurate records of your work, and if you'll agree to some painful exploratory brain scanning, then we can find the one true answer to your question.
@Hakaishin I'm probably paraphrasing from an article on Less Wrong, the old haunt of capital-R rationalists
 
It uses wishy-washy terms while pretending to define something precisely. I assert there is no way to define "perfectly defined arguments" or "perfect agreement" without placing severe limits on the universe of discourse.
 
Heard about it, is it any good? Would you recommend it?
 
11:45 AM
@Kevin Quite.
And even then the ambiguities remain.
 
I think a lot of epistemology fans have distanced themselves from the community somewhat because they kept getting accused of being a cult
 
I don't remember which mathematician said something like: everything gets fuzzy if you look close enough
 
Python programmers do appear to have a tendency towards the pragmatic.
 
@Hakaishin no, that's the quantum foam
 
Understandable in view of the fact that many users are "reluctant programmers," tangling with Python only because it can help them solve some problem of significance to them. Not because they love programming ...
 
11:48 AM
@AndrasDeak do you know who that was? I'm pretty sure it's very close to the original quote, but I can't find the source, not the foam, the fuzzy one :D
 
never heard of it, but I don't normally listen to mathematicians
unless they tell me to take out the trash
 
ah right, I forgot ;)
 
Well what you wrote might be a populist exposition of Heisinberg's Uncertainty Principle.
 
@Hakaishin The superfans all say that reading The Sequences will significantly improve your reasoning ability. Personally, I browsed a couple and quite a lot of them went completely over my head. I do like some of the broad concepts that are simple enough to explain to a regular person, for example "map vs territory"
So I guess I'd say some parts are good, and I recommending reading the good parts, but I don't have any useful advice about how to find the good parts :-P
 
That sounds great, perfect for the holidays
 
11:56 AM
@holdenweb Yeah, I'd say there are practical limitations that prevent Complete Perfection from being a sensible goal for real humans. For example, you could spend years describing corner cases for the question of "is it bad to kill people?"
I know you can spend years doing this because people have cumulatively spent years doing this. There are twenty three million google hits for "trolley problem", and that's only one part of the broader question
 
"No: it either is bad or it isn't!" is about the reductio ad absuurdum of this argument.
 
Ahh... the good old "trolley problem"... one of life's more philosophical debates... but sometimes I do wonder why when I'm at the supermarket it always seems like I get one with a wonky wheel :p
 
After we knock out the trolley problem, we'll cover war, euthanasia, birth control, animal welfare, and boltzmann brains. Then we'll nip out early for a beer.
 
here we should start with simpler things, like gay marriage
 
@Kevin So a good evening talk :) It does get boring tough after the 5th time going trough that loop. But it's a fine game to play. I miss the earlier times with my gf when we would go trough heated debates like this
 
12:02 PM
First, explain to me, a featureless chrome orb from space, what is the meaning of this human emotion called "marriage"
 
@Kevin xD you should do stand up :D
 
Hmm, or domestic abuse
No, don't do that, Kevin
 
ah the "real" world. I like my bubble. I never get why people say we live in bubbles like it's a bad thing. Dude nobody wants to live in "the" world, it has a lot of messed up stuff in it, which if I can avoid it I will.
 
I'm not touching domestic abuse, but I have written a first draft about gay marriage which I am probably not going to post
 
@Hakaishin because distorted realities make other people miserable and harmful idiots political leaders
 
12:07 PM
You can just imagine that I spend five paragraphs trying to precisely define a lot of fuzzy social phenomena
 
bubbles also hinder solidarity which is the only defense against said harmful idiots
 
@AndrasDeak right, I forgot what was happening over there. I meant it more like, don't look at all the bad things in the world on social media before bed and after waking up. But yes I see where you're coming from
 
I just remembered, I came in here an hour ago because I have an actual programming problem I wanted to ask about.
 
Is it truly a problem?
 
Yeah! For once it's something that will actually improve the experience of actual users.
I have a list of domains, each represented as a pair of (left, right) number pairs. I also have a value, P. I want to find all domains where left < P < right. This is easy to do in O(len(domains)) time, but can I do better? Assume the domain list never changes and I'm willing to spend a lot of time constructing a more sophisticated data structure to represent it, for the sake of improving the actual query's performance.
 
12:20 PM
Hmm
Integers or floats? What range?
 
My actual data has 177 float elements between -180 and 180, and there's a lot of overlap between domains. in the worst case I need to test 120 different P values a second, so an O(N) approach may conceivably cause slowdown on potato-powered computers
If they were integers I'd happily just make a 360 element array pointing to 360 distinct domain sets. Alas.
(Hmm, maybe put a pin in that idea as a fallback for super economy potato computer users. It gives wrong answers at the fuzzy edges, but it's better than hanging the page)
 
Slight improvemdnt: store (value, start/end sign) tuples. Then you only add up +-1 until P. Reduces N by P/360
 
Yeah, I think there are a number of approaches that can give me an constant multiplier improvement, or an improvement proportional to P, if I sort my domains in one way or another.
As another example, if I sort domains by left edge, than I can binary search to find the first domain where left > P, and I can completely discard all elements after that without examining them individually
 
One idea I think that might work is: convert the list of N possibly-overlapping domains into a list of up to N^2 non-overlapping domains. Turn the list into a binary tree whose N^2 leaves are domains and whose non-leaf nodes are <mumble>, and search the tree in O(log (N^2)) aka O(2 log N) aka O(log N) time
 
12:35 PM
@Kevin Sort by second element within the first element lets you use a binary chop to find the lower limit for the first element. Another binary chop lets you find P. Then subset those items by examining the second element?
 
@Kevin time for you to look at Bloom filters perhaps ;)
 
@holdenweb Yes, that sounds possible. I suspect there are scenarios where "subset those items" is a bottleneck, when those items are a significant fraction of the whole domain list.
But I think even the worst case scenario is still O(N) so we haven't lost anything by trying this over the brute force approach
 
1:17 PM
morning cabbages folks
 
Here is a rather crufty prototype of my binary tree idea. Hard parts I'm glossing over: automatically choosing valid numerical values for DomainTree's value argument; Making this work for overlapping domains
The former isn't too hard, and the latter seems at least tractable. If domain A is [1, 10) and domain B is [5, 20), I can decompose it into just_A = [1, 5), A_and_B = [5, 10), just_B = [10, 20).
I'm 80% sure that a decomposed non-overlapping domain list is no larger than twice the size of its overlapping form, and 100% sure it's never larger than the square of the size. Both are acceptable for my use.
Actually decomposing the list can take N^4 time for all I care because I only need to do it once per lifetime of the universe
 
2:06 PM
Any networking people know why these constant are so important to be precisely this? Or is this a joke?
class ReconnectingClientFactory(ClientFactory):
    """
    Factory which auto-reconnects clients with an exponential back-off.

    Note that clients should call my resetDelay method after they have
    connected successfully.
    maxDelay = 3600
    initialDelay = 1.0
    # Note: These highly sensitive factors have been precisely measured by
    # the National Institute of Science and Technology.  Take extreme care
    # in altering them, or you may damage your Internet!
    # (Seriously: <http://physics.nist.gov/cuu/Constants/index.html>)
    factor = 2.7182818284590451  # (math.e)
    # Phi = 1.6180339887498948 # (Phi is acceptable for use as a
    # factor if e is too large for your application.)

    # This is the value of the molar Planck constant times c, joule
The links lead nowhere
 
I reckon it's a joke
 
Whoa whoa whoa, altering those constants is gonna do more than just damage your internet. That'll damage the very fabric of reality
 
I was just about to say. "If you change these, you may damage your Internet" is true in the sense that, if you magically changed the value of a universal constant, it would probably cause all conventional matter in the universe to dissolve
 
bizzare humor :P
 
I'm not sure what it would look like if you changed the value of e, because it's a mathematical constant, not a physical one. In other words, it should be consistent in any reality where 1+1 = 2 and "a implies b" == "not b implies not a"
I've long been playing around with a crackpot theory that foundational logic is merely a parameter plugged into our reality by higher beings that created us, and they themselves are not bound by it. It would explain Godel's Incompleteness Theorem: it was 4:55 on a Friday when they were implementing axiomatic systems, and couldn't be bothered to make one that is both complete and consistent.
Big ol' [todo: fix] in the middle of mathematics
 
2:24 PM
@Kevin I know what you mean. I had an interesting moment when thinking about our application and how it's stateless and there is the app and the config file. It felt like our universe how it is now is just a config. Basically there are natural laws and initial conditions, nothing special, but sometimes these simple realizations feel special :P
 
Yeah
Fun anecdote where a universal constant was causing a problem in a program: "We can't send mail more than 500 miles"
 
I read it before but why not again, since I forgot the gist :P
ah yes lovely story
 
2:43 PM
> xkcd.com is best viewed with Netscape Navigator 4.0 or below on a Pentium 3±1 emulated in Javascript on an Apple IIGS at a screen resolution of 1024x1. Please enable your ad blockers, disable high-heat drying, and remove your device from Airplane Mode and set it to Boat Mode. For security reasons, please leave caps lock on while browsing.
Is that always there or only today?
 
I feel like I've seen it before
 
2:59 PM
@Aran-Fey funny. Thanks to that I saw xkcds face for the first time: medium.com/civic-tech-thoughts-from-joshdata/…
 
@inspectorG4dget About time!
 
lovely film :)
 
3:27 PM
Hmm, it's harder than I thought to decompose two overlapping domains. There are seven different cases depending on the relative order of the four edges in question.
I have an idea to use a stack-based state machine that consumes a sorted list of labeled edges, but it might end up being longer than just writing seven conditional blocks.
 
Hi guys
I want to learn data structures and algorithms
What's is the best free way to learn to do that?
 
3:42 PM
I hear MIT has a lot of free learning material online
You can also look at the wiki articles for all the data structures described in the acclaimed "Gang of Four" book en.wikipedia.org/wiki/Design_Patterns#Patterns_by_type
 
most of what you'll need to know:
hashing
binary search tree (± balancing)
further reading:
extendable hashing (like in databases)
the stuff from CLRS
 
Love me some trees. I'm writing a tree right now
Busting my brain trying to write a merge(self, other_tree) method, then I'll bust it again times ten trying to make it produce reasonably balanced output
 
if you really want to go on steriods:
red-black trees

everything from hackerrank
and now, AI (coz that's my thing)
decision trees
neural nets
random forests
boosting (±xgboost)
simulated annealing
tabu search
genetic algorithms (and their 20 billion variants)
@Kevin I assume you don't want to do k inserts, balancing each one along the way?
 
3:57 PM
That's basically what I'm doing ;;>_>
I might end up with some gnarly runtime like O(N^2 log N) but I have days and days to calculate the result
Inserting can be molasses as long as searching is quick
I get a headache any time I think about tree operations that touches more than two nodes at once
 
if the underlying datastore is a list, how about extend and sort?
or actually, if this is a batch process: put the existing data into a list, extend, sort, create a new, balanced BST out of it
 
Quite close to the design I've got in mind, actually
I'm happy to produce a horribly unbalanced tree, then flatten/sort, then load it into a nice balanced tree.
There's just a bit of metadata that I've got to juggle around in order to maintain a quirky property that's important for my use case
 
you Kevin'd me while I was trying to Kevin you, ultimately Kevin-ing yourself
this is turning meta
 
who suggests the idea first is of little concern to me. It's valuable just to know the idea is sane enough that two people thought of it.
 
what if those two people are actually insane? :p
 
4:07 PM
umm... perhaps I didn't convey tone. I was chuckling when I made that statement :)
@JonClements given that I'm one of those, that's a strong possibility
 
I love chuckling... especially when I'm in my comfy tight fitting white jacket - the padded walls means the neighbours can't hear me :p
 
@inspectorG4dget Ok, I accept and appreciate your jocular tone.
I, too, am in light spirits, and continue to not take very seriously the order that our messages appear
 
woohoo!
so how about that local sports team?
 
uh oh... Kevin's gone all async...
 
@JonClements Independent verification is the guardrail on the Cliffs of Madness, but a determined motorist can still vault over the edge
@inspectorG4dget The problem with Arsenal is, they always try to walk it in
 
4:11 PM
"welcome to Async Headquarters. We've been awaiting your arrival"
@Kevin that means that ManU finally has a shot!
 
which comes after: "thanks for visiting Async HQ... we're sorry to see you go!" :p
 
Hi, yeah, my package came in the mail, but inside the box there was just a piece of paper that said "promise"
"Yes, we delivered your order before we assembled it. If you like, you can go block() in the waiting room until it's ready"
 
today, on if Ikea ran your local postoffice
 
"We can also ship you a very small version of the assembly line, which you can keep on your desk until it makes your order"
"will that shipment also contain only a piece of paper that says 'promise'?"
"... Maybe"
 
good to see we're not fulfilling the stereotype that programmers are nerds...
 
4:17 PM
1
 
Are you saying normies don't create improv skits about a willy wonka factory that manufactures abstract concepts and has very poor customer service? What kind of life is that?
 
4:45 PM
cbg
happy to announce that my ~1yr job hunt has paid dividends. I have accepted a Big Data role. I wanted to thank the members of this group for this since you have helped me immensely with your conversations. god bless :) This will be my first tech role and I hope I can cope up:)
 
@anky Pineapple and good luck!
 
Melon :)
 
5:09 PM
👍
 
:)
 
Assignment description: "extend report spreadsheet to include the two columns we discussed last week". End of description.
I certainly remember a discussion about columns. And the name and content of those columns should be... Nope, I'm just getting television static.
 
5:29 PM
@anky congratulations! and good luck :)
 
Melon:)
 
anyone else see this yet?
 
Yes :) click pls
 
April is the cruellest month
 
especially after having to have been wary of the Ides of March...
 
5:35 PM
Et tu April, then fall March
 
5:50 PM
Interestingly Ides of March is the day after Pi Day...coincidence?
I wonder if SO will really sell the Key. I'd buy one.
 
@Code-Apprentice at $40 for 3 keys? Heaven forbid they made a proper keyboard :)
 
yah, maybe not for $40. But for 10 bucks as a desk decoration, I would.
 
@JonClements is it bad that I read that as "the IDEs of March" and instantly thought "why would someone use a different IDE just in March?" ?
7
 
Found an email saying the report should contain the "serial ID". That narrows things down, to the fifty columns in our database with "ID" in the name. 150 if you count surrogate keys.
 
@inspectorG4dget omg...your response has me laughing just as much as the SO april fools joke.
 
5:55 PM
Just to be clear, is that a lot, or not a lot?
 
It's a lot.
 
marks it hard to IDentify the problem for sure... (I'll see myself out)
 
The report is on widgets, and widgets have serial IDs, so that's a likely culprit... But we also have serial IDs for the boxes the widgets come in, the instruction manuals for the widgets, and the deluxe widget cleaning kit with carry bag. Each one of those also appears in the report.
 
I wonder if Kellogg's use "cereal" IDs for their DB stuff...
@Kevin have you tried any Kaldheim yet?
 
I have it on good authority that they do this on their snowFlake datastore
 
6:03 PM
@JonClements Nah, kitchen table magic is in a slump until times stop being unprecedented
And MTG Forge, the project that lets you play games against an AI, suddenly doubled its system requirements in a recent release, and now it plays like treacle. I can still use the old version, but I can't access any cards more recent than Core Set 2021.
 
MTG Arena has a play against AI mode and they're up to date with the cards
 
Hmm, interesting. At the very least I guess I should see how it runs on my potato laptop.
On one hand, I'm guessing Arena's graphical load is greater than Forge's, which has a spartan 2d interface . On the other hand, Forge is written in Java.
 
you have a "how are you?" laptop... Peas...
 
I regularly sail past 1 GB memory usage, just by creating a measly 100 squirrel tokens
... And giving them all unique combinations of power, toughness, and combat-relevant abilities, and challenge the AI to find the minimal amount of damage it can take this combat.
That's only like two bin packing problems stapled together, why is that hard
I hope you don't feel like I'm brushing you off when I talk about how I should try Arena "eventually"... I pretty much do that for all media recommendations I receive
Still haven't finished the book that {beloved_direct_blood_relative[2]} got me for Christmas. Of 2019.
 
6:27 PM
Did anyone come across the april fool prank set by SO?
or am I late to the party.
 
yes
 
@Code-Apprentice Ooo its right here
It got me at first, though I did not have to fall bait. After seeing 3 keys, it seemed too much for SO.
 
1 hour ago, by Code-Apprentice
user image
 
Yea saw that a bit late :9
 
6:36 PM
:>
 
01:00 - 19:0019:00 - 00:00

« first day (3820 days earlier)      last day (1128 days later) »