« first day (2490 days earlier)      last day (2449 days later) » 
00:00 - 18:0018:00 - 00:00

6:00 PM
you could use vim instead ;)
 
fuck vim
 
now, now
then let me add my suggestion: vim
 
Yeah, neovim is much better
 
I tried vim once
that is all.
 
Let's try to keep it PG-13, chums
 
6:00 PM
hahah ,

My scenerio it is bit locked, I am getting a data as dict, and I am trying to plug that dictonary into my jinja template , that these outer braces are making my json invalid :(
 
that doesn't say anything about vim, it says something about you :P
@jeyanthinath I'm sure they aren't
 
Is it accurate to say that in the past tense? I assume you haven't figure out how to exit it yet, as many have trouble with. I was locked in there for a week my first time!
 
oh completely agree
 
@jeyanthinath json.dumps() gives you a JSON. Period.
 
Are you trying to create json via a jinja template? I would not do that
 
6:02 PM
yup

a = { 'a': 'a' }

jinja :

{
{{a}},
'b': { 'b'}
}

here that a with extra brackets making me nuts
 
Jinja templates aren't JSON. Why are you trying to use a JSON serializer to generate them?
 
@KevinMGranger I had a 700+ lines of code that I written with jinja in mind :'(
 
they're trying to join JSON objects somehow?
 
the 'b': {'b'} part isn't valid json
If you're trying to merge 2 dictionaries, use dict.update. But this is very much an XY problem
 
9 mins ago, by Andras Deak
I suspect an XY problem
 
6:05 PM
ok I will change my approach
 
you should try to step back and think of the actual problem you're trying to solve, possibly three turns before where you are now
it's easier to get a good solution to your X in your XY problem
 
wim
If anyone wants a fun mystery to solve ... I just spent an hour figuring this out
1. make a clean python 2.7 virtualenv
2. pip install ruamel.yaml
3. run python, and import ruamel
4. figure out how that "module" got imported, when there is no `__init__.py` file in the package directory.
 
I'm going to take a stab without importing, and say something in its setup config that was made available via its pkg_resources
 
I bet it's due to a mummy's curse
 
I bet it's both
 
6:12 PM
I think I found what's doing it but I don't have experience to say how weird it is
but it looks "very"
 
Historical examples of mummy's curses tend to actually have been caused by, like, mosquito bites that get infected with diseases nobody has had resistance to for two thousand years. So at best, it seems that curses can only increase the probability of already possible bad outcomes. If the module weirdness is due to a mummy's curse, it must also have a mundane but implausible cause.
 
wim
This thing looks worse than a mummy's curse
 
can I paste the piece of code that I think performs the import?
the spoiler link is too long
 
wim
haha
 
Nonetheless if wim hadn't broken into that mummy's antechamber and appropriated his golden ankh for the British museum, he wouldn't be in this conundrum right now
 
6:18 PM
wait, the other package has a shorter curse
 
wim
there could very well be a mummy's curse hidden in his setup.py file .. nobody would find it ...
 
that file gave me anxiety
 
huh, adding a newline turns it into a multiline message, which increases the char limit, but then the whitespace is trimmed and I get a link that works
the one for proper ruaml.yaml is twice as long (not the URL; the code)
 
enums.py
========

from enum import Enum
from enum import auto

class HTTPRequestType(Enum):
GET = auto()
POST = auto()
PUT = auto()
DELETE = auto()


sample.py
=======
from .enum import HTTPRequestType
import requets


print(HTTPRequetsType.GET.name)
======
ques:

is this a valid use case of enum and auto ? because my collegue is suggesting me to use the constants in this way, but I don't know it is a proper way to use enum ? for this kind of scenerios ?
 
wim
just use strings
the enum looks correct, but I don't see the benefit tbh
 
6:26 PM
hmmm , I guess this is introduced in python3.6 , and I wonder what is the purpose of "auto()"
 
so that you don't have to name the values yourself and they're guaranteed(?) to be unique
 
wim
even requests module just uses plain old strings. you think your colleague is better than all the devs who worked on requests?
 
@wim I'm pretty sure a 917-line setup.py is not best practice
 
@win, on the downside he is from my client side, so I can't do this comment on him :P
 
is there also a module named enum?
 
wim
6:28 PM
@jeyanthinath the purpose of auto is described by the author here
@AndrasDeak enum, duh
 
OK, but then what's from .enum import HTTPRequestType?
 
wim
typo for from enums probably
 
I expect that's a typo, much like import requets is probably a typo
 
oooh OK
 
@AndrasDeak its a typeo :D
 
6:32 PM
didn't notice the plural on the first line
 
@Kevin @AndrasDeak Auto Correct made me dump
 
wim
I hate enum.auto()
in case it wasn't obvious from my link above... :)
 
After switching from nodejs to python, still I am missing the freedom in javascript
 
then you haven't used python enough ;)
 
es6 make the javascript more fun, may be we can do something like that in python
but without {} 'these extra bits' it is hard to do so in python
 
6:38 PM
I don't understand what you're talking about
 
wim
js is a lot more messy language than python
the 'freedom' comes at a cost
 
@AndrasDeak I am saying the braces ommited by python is not allowing the python to do a switch like es5 to es6
 
ah, OK, I should know what's it about es5 to es6
I know zero JS, but it's fine
I'm also leaving for a while, rhubarb
 
Good night guys :) , Good time talking to you, leared a lot from you , see you tommorrow
 
can i do a quick survey of which editor / IDE you guys use for python?
 
6:46 PM
We already had that conversation today ;-)
51 mins ago, by Daruchini
which editors/IDE do you guys use/recommend?
 
i've always used sublime text (3) and it's great, but at times i wished it had interactive debugger support. (used pycharm)
doh
 
The point of Sublime text is it's light weight to begin with.... non of the extra heavy stuff which personally I enjoy.
Kevin you feeling better? It kinda seem like you were in a deep thought mind about boredom and stuff, don't stray too far from us we need you to run the new world :D
 
FWIW, the principal author of the enum module, Ethan Furman, is a SO member. He has visited this room, but not for a few months.
 
Interesting PM, don't know what enum is so I looked it up. Neat-o
 
I'm bored of boredom, now I'm interested why it's common life advice to say "just be yourself" when, like, plastic surgery and reddit.com/r/cringe exist
 
6:53 PM
I like the concept of enums, but I rarely use them. I guess I'm too old school. :)
 
When a fedora'd gentlesir unsheathes his katana and tells us about how euphoric he is, shouldn't we congratulate him for living the way he wants?
 
@Kevin we should, but society likes to make fun of the unique. People are sheep-lings and don't really want to think for themselves, hence they love to follow other's opinions :\
@PM2Ring I can't really think of a good use for it ... maybe like a game and u have attributes, can you reassign the values in enum? nvm they are constants
 
I think people really mean "if you're basically a normal person, keep doing that"
 
I remember reading a blog(?) where the author propose the idea of the world is being controlled by a group of 10 or some people who basically own every top companies...
was a very interesting read which some points made sense to me, but others were reaching.
I sometimes wonder if I'm alright being "controlled" without my awareness like in the matrix or something... The idea of someone being in charge is repulsive, the idea of someTHING being in charge like an omni being is kinda soothing to me... Everything is already laid out for me I just need to walk to path that was given to me. I think I have freedom because I can think but the path already set that I would be thinking... kinda gets me thinking lol
 
"What if reality is actually this other thing, which is indistinguishable from reality using any instruments of observation that will ever be available to us?" is not a very productive thought experiment, so I try not to worry about it
 
7:06 PM
Oh I'm fully aware of that, it's like trying to prove something that we state we can't observe... :D pointless jibberjabber. Actually no, more like faith I suppose.
 
@PM2Ring he was here not long ago
July 27
 
@MooingRawr They're handy when you have a group of related constants, especially when those constants should have an intrinsic order. You could just use strings, but they waste space. And if you do MONDAY=1; TUESDAY=2, etc, someone will be lazy & just use 2 instead of TUESDAY, making their code less readable.
 
stackoverflow.com/questions/45621722/… LOL someone is done with the bad questions... what was our dup for indent errors
@PM2Ring Oh I see, we do something similar in c# at work, never thought of the need in Python though.
 
@AndrasDeak Oh, ok. His name doesn't autocomplete, though.
 
pingability lasts for a week or so
 
wim
7:09 PM
@MooingRawr could do without all of the text after the Note:
 
+1 for the effort, although I don't know if I like the idea of having a dupe target for what we currently close as typo
 
I don't like how verbose it is.... It's a lot of good information, but generally people would want a tl;dr.
 
yes, don't close as dupe if it's a typo
roomba eats typo but not dupe
 
Welp, now we can close typos single-handedly ;)
 
unless it's a useful dupe which is almost never
 
7:11 PM
@MooingRawr Well, we don't go in for type-checking much in Python, and strings that could be valid identifiers are cached, so there isn't as big a demand for enums in Python. But I guess it's nice to have them for people who are coming from other languages, or for porting code that uses enums.
 
@PM2Ring fully agree, I wonder how long he took to create thie module
 
ah, I see, self-answered canonical candidate
Your Q&A is good. My only recommendation is to delete everything after and including the Note:. — wim 45 secs ago
 
:D badger knows what he wants and goes and tries to get it :D
 
he's perfectly right
I don't want to add "yup" so I linked it here for interested parties to upvote
 
If only there was a badge for badger, would badger be happy to receive the badge?
 
7:13 PM
IIRC my own canonical Q&A has a "please don't downvote me because you don't know that you're allowed to self-answer, thanks" post-script. Can't remember if I put it in the post body or in a comment though
 
I also have a short header on mine, but a full essay is definitely needless
 
Does every great SO user have their own canonical Q&A ?
 
I don't ;)
 
Only if they're the kind of person that tries to order the tide from coming in
 
a good whipping always helps with tide problems
 
wim
7:15 PM
"please don't downvote me" = -1
 
"bro why u downvote" = -3
 
@vaultah What Kevin & Andras said. Typos should not be closed as dupes. We want them to die ASAP. Yes, hammering closes them faster, but some people might consider that an abuse of the hammer. And IIRC, dupes are less likely to get Roomba'd than plain typos.
 
(that was a joke, hence the wink)
 
then again a googlable canonical with typical reasons and fixes might prevent some of those questions in the first place
 
@vaultah Oh, ok. I didn't look at the question you linked, so my response was lacking that context.
 
7:17 PM
I was responding to MooingRawrs so it's fine
you can rebase your response to his :P
 
gotta go test stuff in the sandbox ....
 
Well, there it is. Today's sign to stop reading SO questions. stackoverflow.com/questions/45621914/…
 
Andras, do you manually put the link ref when you post a comment like that ?
 
What comment?
 
@AndrasDeak this one
 
7:24 PM
If you're asking "do you have to manually create the links to "wim" and "45 secs ago" when you quote a comment like that?", no, it's added automatically by the onebox engine
 
that ^
post the link to the comment, yes
copy on main, paste here
 
Oh interesting I didn't know it one boxed.... I've been manually putting the link ref in :\
arg feeling like a potato :D
 
there are onebox cases (non-exhaustive) in the chat faq or help --\
 
Don't be sad about the time you wasted, be happy about the time you'll save :-)
 
Ok, that "I'm getting an IndentationError. How do I fix it?" looks pretty good, although I haven't read the answer thoroughly yet. I don't think we should use it as a dupe target, but it's probably a good idea to link to it when we close-vote indentation error questions from newbies who aren't totally clueless sloppy cargo-culters, but who have made an effort to write a good question and seem like they genuinely want to learn.
 
7:27 PM
@MooingRawr This is a post where I explain how you can co-skew yourself... But the quality of my user-ness is debatable
9
A: how to calculate coskew and cokurtosis

piRSquaredReferences Coskewness Cokurtosis Calculating coskew My interpretation of coskew is the "correlation" between one series and the variance of another. As such, you can actually have two types of coskew depending on which series we are calculating the variance of. Wikipedia shows these two fo...

 
the help/faq didnt say about the one boxing comment but still good to know
 
@PM2Ring Precisely my opinion, as well.
 
you're right
> Some links will be automatically inlined if posted on a single line by themselves, such as:

Stack Exchange questions,
answers, and users
Chat messages and rooms
Images
Wikipedia pages
Amazon products
Youtube videos
Twitter messages
Github gists
one thing that's missing is xkcd
and gist/amazon oneboxes are evil
 
wim
xkcd onebox is a bug not a feature :P
 
@piRSquared interesting lol don't know what a coskew or cokurtosis lol time to learn I guess
 
@MooingRawr no worries... I've just been looking for an excuse to to use the very bad pun which I will not repeat because I just got it out of my system
 
oh...it won't onebox because deleted
 
I understand your 'pun' just not the source of the pun :P
 
I'm just about to post this is a comment on Christian Dean's indentation canonical:
"While this question & its answer looks quite good, please do not use it a target to dupe-close indentation error questions: such questions should be closed as typos (or possibly "lacking MCVE") so they will be swiftly removed from the system by the automatic cleanup process. Of course, you can certainly add a link to this question in a comment when you see an indentation error question."
 
Never doubted it... I'm just admitting that I only linked my link so I could make said pun. And whether you understand the source is secondary.
 
7:34 PM
Any suggestions before I hit Submit?
 
@piRSquared that's what makes a good pun funny.
@PM2Ring might wanna suggest why we want to remove them from the system rather than just stating we should do it
 
@MooingRawr Good idea.
 
I remember reading on Meta, that we want more bad dup links so it would cast a wider net for people to be able to google.
 
@MooingRawr one of these days... I might actually be funny (-:
 
I kinda think that a comment like that ought to be a Meta post. But maybe I'm saying that because I anticipate a protracted back-and-forth in the comments which will eventually get migrated to Meta, so we may as well cut to the chase now
 
7:37 PM
@PM2Ring I don't understand what you mean with your reference to the automatic cleanup process?
 
@PM2Ring meta.stackoverflow.com/questions/265736/… here it is answered by the ninja
 
If there won't be a protracted back-and-forth and the OP immediately replies "oh all right, you convinced me", then it can be a comment.
 
@piRSquared coskewness is a measure of how much two random variables change together. Oh I was looking for this math term for a while now lol
 
@PM2Ring what I mean by that is that I'm ignorant of whatever that process is and I'd expect many people would be. This includes the OP. If that is true, it deserves more explanation.
 
While this question & its answer looks quite good, please do not use it a target to dupe-close indentation error questions. Such questions should be closed as typos (or possibly "lacking MCVE") so they can be removed from the system by the automatic cleanup process. (The system removes closed typo questions because they are unlikely to be helpful to future readers). Of course, you can certainly add a link to this question in a comment when you see an indentation error question. — PM 2Ring 11 secs ago
@piRSquared The system deletes certain categories of closed posts after a short time interval. Typos are one of those categories. There's no point keeping them visible because they'd be almost impossible to search for even if you had an almost identical typo.
 
7:45 PM
@MooingRawr my current explanation is Co-Variance/correlation is the measure of how two variables change together. Co-Skewness is a measure of how one variable changes with another variables change in variance. Co-Kurtosis is ambiguous and can mean either the measure of one variables change in relation to another variables kurtosis. Or, the correlation of two variables change in variance
 
interesting... I can't help wonder who came up with these names
 
Whereas dupes questions can be quite useful: sure we close them ASAP, but that doesn't necessarily imply that they're bad. As Martijn's Meta post says, they can be good signposts... unless we already have 100 almost identical signposts. :) THe reason dupe questions need closing is to prevent the answers being scattered all over the place rather than being consolidated in one place where they can be easily found, and where they can be properly sorted according to the voting process.
 
@PM2Ring so you're suggesting that the key problem being described is that of being a typo. To mark questions as dups whose problems are classified as typographical errors puts two classifications of closures at odds.
Question, can we close said canonical as being the result of a typo?
 
@piRSquared Yes. We don't want to "uplift" a typo to the (potentially) desirable category of being a dupe.
 
Closing canonicals is how supervillains are born
 
7:50 PM
Do you really consider it "resolved in a manner unlikely to help future readers"?
 
@piRSquared Well, we could, but that would be silly, and it would get swiftly reopened. And as 2357112 implied, it was not "resolved in a manner unlikely to help future readers", and that's the bottom line with typo / no-repro questions.
@MooingRawr Kurtosis: the process of turning into the lead singer of Nirvana.
4
 
PM 2Ring's definition of Kurtosis is a very good one
@PM2Ring Also, I'm 100% behind the reasoning as to why certain typo based questions should not be closed as dups that point to this particular canonical. I'm just not sure you captured the whole point in your proposed comment.
 
rbrb
 
@MooingRawr because I'm uncomfortable with my name next to that explanation of co-moments, I wanted to add a disclaimer: That is a loose touchy feely description and not exactly accurate.
 
@piRSquared Well, there's not a lot of room in a comment. It's mostly aimed at dupe hunters, who generally have some familiarity with SO culture, so I don't feel that a long explanation is required.
 
8:04 PM
:D it's okie, that's a lot of math I have to read about.... enough for today
 
Personally, I have no problem closing most indentation questions as dupes. I've never considered them a strong fit for the concept of "typo", especially stuff like tabs-vs-spaces or comments not counting as bodies.
 
I consider typos "obvious issues with the code", but indentation issues are non-obvious
 
8:22 PM
from a closing standpoint, the gist of the typo category is "unlikely to help future readers" but now that I typed this I realized that someone has probably already made this point
 
Fair points. But I don't just close-vote typo questions, I always point out the typo(s) in a comment, unless it's a total mess. I guess in some cases, especially with indentation errors, a full answer may be warranted. But I still think most of those questions ought to be deleted once the OP understands how to fix their code.
 
This is the perfect example of the contradiction in SO's goals: where helping the question asker and maintaining the quality of the site are incompatible. I'd probably link to the canonical in a comment, but then vote to close.
 
nobody said anything about the question asker
Jeff Atwood on June 13, 2011

In March 2010, we rebalanced our reputation system to favor answers.

While we value good questions (and asking a great question is absolutely an art), we want to explicitly encourage people to provide the best possible answers. Without people interested in providing good answers, the questions are moot. We know that answers have more intrinsic value than questions, and the reputation balance should reflect that.

The question asker already enjoys a substantial benefit beyond reputation gain from upvotes on their question — namely, they get great answers to their question! Thus, the asker shouldn’t need as much reputation gain. …

 
Sure, getting the indentation correct may not be obvious when you're new to Python, especially if your code is complex. OTOH, if you're a newbie, you shouldn't be attempting to write overly complex code. ;)
Correct indentation is such a core element of Python that it needs to be mastered fairly early, so if someone doesn't have a clue how to indent their code they need to learn how to do that, and SO isn't really the place to teach them. But I'm happy to give some advice in comments, including linking to that new question by Christian Dean.
 
I'm talking to someone who is taking a paid python course. Their instructor has mixed tabs and spaces multiple times, and even said:
> "In order to make humans feel inadequate, Python randomly emits 'Indentation Errors' on perfectly good code - after about an hour the error will just go away without any changes to your program."
 
8:35 PM
Bad instructor, good marketer. I'm firing up my paid python course right now.
 
@KevinMGranger triggred...
 
Professor Moron to the rescue
 
9:00 PM
latest pr... "un-py2 the code" PR includes strictly removing all class X(object) and all super(class).__init__()
:P
 
I don't mind people doing class MyThing(object):. Python 2 isn't dead yet, so unless the code's using Python 3 stuff that doesn't work in Python 2 it makes sense to write it so it runs correctly in both versions. Of course, if your goal is to purge all Python 2 code from your code base, that's a different matter. :)
 
it's not using py2 though at all
and I'm bored
 
I write code that is deliberately incompatible with Python 2 out of principle.
somewhere, a checkbox next to "antiisocial behavior" is checked
 
it's not antisocial towards all those python3 apologists
 
I made that second one better mispelled Antti's name again
 
9:13 PM
Just trying to get you guys focused on the future...
 
Danke. It's been a long day, I don't usually get up at 6am
 
"There will be no Python 2.8"
 
9:59 PM
<3
 
 
2 hours later…
wim
11:43 PM
@PM2Ring I disagree with that. I won't be marking indentation error questions as "typos", as your comment recommends, because they generally aren't from typos. I'll close them as duplicate, and I don't think it matters whether they are removed from the system or not.
 
fortunately we're one big happy community and we don't have to agree on everything
 
wim
"Likely to help future readers" is good and all, but should not be a prerequisite for content to exist on the site. Helping just one user, and keeping the record of it, is quite fine too. I also think from the asker's point of view it's less unpleasant for your question to be closed as a duplicate ("this topic has been covered before, see here") than patronizingly being categorised as a typo (which says something more like "you're an idiot/complete n00b").
 
You should hang out on Meta more often
 
00:00 - 18:0018:00 - 00:00

« first day (2490 days earlier)      last day (2449 days later) »